@pie-element/image-cloze-association 3.6.0 → 3.6.3-next.1014

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 (39) hide show
  1. package/CHANGELOG.md +187 -0
  2. package/configure/CHANGELOG.md +128 -0
  3. package/configure/lib/defaults.js +11 -0
  4. package/configure/lib/defaults.js.map +1 -1
  5. package/configure/lib/index.js +3 -3
  6. package/configure/lib/root.js +20 -7
  7. package/configure/lib/root.js.map +1 -1
  8. package/configure/package.json +2 -2
  9. package/configure/src/defaults.js +12 -1
  10. package/configure/src/root.jsx +34 -21
  11. package/controller/CHANGELOG.md +41 -0
  12. package/controller/lib/index.js +4 -3
  13. package/controller/lib/index.js.map +1 -1
  14. package/controller/lib/utils.js +3 -3
  15. package/controller/lib/utils.js.map +1 -1
  16. package/controller/package.json +1 -1
  17. package/controller/src/utils.js +1 -2
  18. package/docs/config-schema.json +79 -0
  19. package/docs/config-schema.json.md +61 -1
  20. package/docs/pie-schema.json +28 -1
  21. package/docs/pie-schema.json.md +20 -0
  22. package/lib/image-container.js +7 -3
  23. package/lib/image-container.js.map +1 -1
  24. package/lib/index.js +4 -1
  25. package/lib/index.js.map +1 -1
  26. package/lib/interactive-section.js +1 -1
  27. package/lib/interactive-section.js.map +1 -1
  28. package/lib/possible-response.js +11 -4
  29. package/lib/possible-response.js.map +1 -1
  30. package/lib/root.js +63 -14
  31. package/lib/root.js.map +1 -1
  32. package/lib/utils-correctness.js +31 -3
  33. package/lib/utils-correctness.js.map +1 -1
  34. package/package.json +6 -4
  35. package/src/__tests__/__snapshots__/root.test.jsx.snap +6 -0
  36. package/src/index.js +5 -0
  37. package/src/possible-response.jsx +12 -3
  38. package/src/root.jsx +78 -29
  39. package/src/utils-correctness.js +22 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,193 @@
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
+ ## [3.6.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.24...@pie-element/image-cloze-association@3.6.25) (2022-03-28)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.6.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.23...@pie-element/image-cloze-association@3.6.24) (2022-03-22)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.6.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.22...@pie-element/image-cloze-association@3.6.23) (2022-03-08)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association
25
+
26
+
27
+
28
+
29
+
30
+ ## [3.6.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.21...@pie-element/image-cloze-association@3.6.22) (2022-03-08)
31
+
32
+ **Note:** Version bump only for package @pie-element/image-cloze-association
33
+
34
+
35
+
36
+
37
+
38
+ ## [3.6.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.20...@pie-element/image-cloze-association@3.6.21) (2022-02-21)
39
+
40
+ **Note:** Version bump only for package @pie-element/image-cloze-association
41
+
42
+
43
+
44
+
45
+
46
+ ## [3.6.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.19...@pie-element/image-cloze-association@3.6.20) (2022-02-04)
47
+
48
+ **Note:** Version bump only for package @pie-element/image-cloze-association
49
+
50
+
51
+
52
+
53
+
54
+ ## [3.6.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.18...@pie-element/image-cloze-association@3.6.19) (2022-01-24)
55
+
56
+
57
+ ### Bug Fixes
58
+
59
+ * use preview prompt for prompt, rationale and teacher instructions to fix table rendering PD-1456 ([f330601](https://github.com/pie-framework/pie-elements/commit/f3306019a2d1c8ce3e2783823dfe9ef0a0394e4f))
60
+ * **image-cloze-association:** show correct toggle should not be visible when answer is correct PD-1327 ([e0c7b3f](https://github.com/pie-framework/pie-elements/commit/e0c7b3fa15f3ed94a4e78589980230e798ebf91d))
61
+
62
+
63
+
64
+
65
+
66
+ ## [3.6.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.17...@pie-element/image-cloze-association@3.6.18) (2022-01-10)
67
+
68
+ **Note:** Version bump only for package @pie-element/image-cloze-association
69
+
70
+
71
+
72
+
73
+
74
+ ## [3.6.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.16...@pie-element/image-cloze-association@3.6.17) (2021-12-23)
75
+
76
+ **Note:** Version bump only for package @pie-element/image-cloze-association
77
+
78
+
79
+
80
+
81
+
82
+ ## [3.6.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.14...@pie-element/image-cloze-association@3.6.15) (2021-12-13)
83
+
84
+ **Note:** Version bump only for package @pie-element/image-cloze-association
85
+
86
+
87
+
88
+
89
+
90
+ ## [3.6.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.11...@pie-element/image-cloze-association@3.6.12) (2021-11-29)
91
+
92
+ **Note:** Version bump only for package @pie-element/image-cloze-association
93
+
94
+
95
+
96
+
97
+
98
+ ## [3.6.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.7...@pie-element/image-cloze-association@3.6.11) (2021-11-11)
99
+
100
+ **Note:** Version bump only for package @pie-element/image-cloze-association
101
+
102
+
103
+
104
+
105
+
106
+ ## [3.6.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.2...@pie-element/image-cloze-association@3.6.10) (2021-11-11)
107
+
108
+
109
+ ### Bug Fixes
110
+
111
+ * **image-cloze-association:** show correct toggle should not be visible when answer is correct PD-1327 ([e0c7b3f](https://github.com/pie-framework/pie-elements/commit/e0c7b3fa15f3ed94a4e78589980230e798ebf91d))
112
+ * add dependency for correct answer toggle ([66d52cd](https://github.com/pie-framework/pie-elements/commit/66d52cdff3a5e0500a4ec0efb623948772b4aefe))
113
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
114
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
115
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
116
+ * **image-cloze-association:** add show correct answer toggle for evaluate ([4ac53e7](https://github.com/pie-framework/pie-elements/commit/4ac53e71d10eb9bbe417a9bc445bd1623830823d))
117
+ * **image-cloze-association:** Added missing responses and marked as incorrect in evaluate mode PD-1246 ([a5d0e98](https://github.com/pie-framework/pie-elements/commit/a5d0e9807e5c99dd352e908483e143b6081eefe3))
118
+ * **image-cloze-association:** Fixed scoring method console errors PD-1249 ([1484c63](https://github.com/pie-framework/pie-elements/commit/1484c6354d59afcc0b541232c70ddfc5869ecfee))
119
+ * **image-cloze-association:** Moved the evaluate symbol to fit in the available content PD-1244 ([3266e19](https://github.com/pie-framework/pie-elements/commit/3266e199e1147773fe57d199a6ae468855d05af6))
120
+ * **image-cloze-association:** Removed correct answer in evaluate mode for empty response ([18c886c](https://github.com/pie-framework/pie-elements/commit/18c886c14655b42e4b9b549a700bf0258b9cefc1))
121
+ * **image-cloze-association:** Used classnames instead ([544be10](https://github.com/pie-framework/pie-elements/commit/544be10da1225e5a52e4f0d3b51d52f9714591ae))
122
+
123
+
124
+
125
+
126
+
127
+
128
+ ## [3.6.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.6...@pie-element/image-cloze-association@3.6.7) (2021-11-01)
129
+
130
+ **Note:** Version bump only for package @pie-element/image-cloze-association
131
+
132
+
133
+
134
+
135
+
136
+ ## [3.6.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.5...@pie-element/image-cloze-association@3.6.6) (2021-10-04)
137
+
138
+ **Note:** Version bump only for package @pie-element/image-cloze-association
139
+
140
+
141
+
142
+
143
+
144
+ ## [3.6.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.4...@pie-element/image-cloze-association@3.6.5) (2021-09-20)
145
+
146
+
147
+ ### Bug Fixes
148
+
149
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
150
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
151
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
152
+
153
+
154
+
155
+
156
+
157
+ ## [3.6.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.3...@pie-element/image-cloze-association@3.6.4) (2021-09-01)
158
+
159
+ **Note:** Version bump only for package @pie-element/image-cloze-association
160
+
161
+
162
+
163
+
164
+
165
+ ## [3.6.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.2...@pie-element/image-cloze-association@3.6.3) (2021-08-05)
166
+
167
+
168
+ ### Bug Fixes
169
+
170
+ * **image-cloze-association:** add show correct answer toggle for evaluate ([4ac53e7](https://github.com/pie-framework/pie-elements/commit/4ac53e71d10eb9bbe417a9bc445bd1623830823d))
171
+ * **image-cloze-association:** Added missing responses and marked as incorrect in evaluate mode PD-1246 ([a5d0e98](https://github.com/pie-framework/pie-elements/commit/a5d0e9807e5c99dd352e908483e143b6081eefe3))
172
+ * **image-cloze-association:** Fixed scoring method console errors PD-1249 ([1484c63](https://github.com/pie-framework/pie-elements/commit/1484c6354d59afcc0b541232c70ddfc5869ecfee))
173
+ * **image-cloze-association:** Moved the evaluate symbol to fit in the available content PD-1244 ([3266e19](https://github.com/pie-framework/pie-elements/commit/3266e199e1147773fe57d199a6ae468855d05af6))
174
+ * **image-cloze-association:** Removed correct answer in evaluate mode for empty response ([18c886c](https://github.com/pie-framework/pie-elements/commit/18c886c14655b42e4b9b549a700bf0258b9cefc1))
175
+ * **image-cloze-association:** Used classnames instead ([544be10](https://github.com/pie-framework/pie-elements/commit/544be10da1225e5a52e4f0d3b51d52f9714591ae))
176
+ * add dependency for correct answer toggle ([66d52cd](https://github.com/pie-framework/pie-elements/commit/66d52cdff3a5e0500a4ec0efb623948772b4aefe))
177
+
178
+
179
+
180
+
181
+
182
+ ## [3.6.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.0...@pie-element/image-cloze-association@3.6.2) (2021-08-05)
183
+
184
+
185
+ ### Bug Fixes
186
+
187
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
188
+
189
+
190
+
191
+
192
+
6
193
  # [3.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.5.0...@pie-element/image-cloze-association@3.6.0) (2021-06-29)
7
194
 
8
195
 
@@ -3,6 +3,134 @@
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
+ ## [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)
7
+
8
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [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)
15
+
16
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
17
+
18
+
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
25
+
26
+
27
+
28
+
29
+
30
+ ## [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)
31
+
32
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
33
+
34
+
35
+
36
+
37
+
38
+ ## [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)
39
+
40
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
41
+
42
+
43
+
44
+
45
+
46
+ ## [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)
47
+
48
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
49
+
50
+
51
+
52
+
53
+
54
+ ## [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)
55
+
56
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
57
+
58
+
59
+
60
+
61
+
62
+ ## [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)
63
+
64
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
65
+
66
+
67
+
68
+
69
+
70
+ ## [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)
71
+
72
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
73
+
74
+
75
+
76
+
77
+
78
+ ## [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)
79
+
80
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
81
+
82
+
83
+
84
+
85
+
86
+ ## [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)
87
+
88
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
89
+
90
+
91
+
92
+
93
+
94
+ ## [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)
95
+
96
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
97
+
98
+
99
+
100
+
101
+
102
+ ## [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)
103
+
104
+
105
+ ### Bug Fixes
106
+
107
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
108
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
109
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
110
+
111
+
112
+
113
+
114
+
115
+ ## [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)
116
+
117
+ **Note:** Version bump only for package @pie-element/image-cloze-association-configure
118
+
119
+
120
+
121
+
122
+
123
+ ## [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)
124
+
125
+
126
+ ### Bug Fixes
127
+
128
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
129
+
130
+
131
+
132
+
133
+
6
134
  ## [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)
7
135
 
8
136
  **Note:** Version bump only for package @pie-element/image-cloze-association-configure
@@ -11,9 +11,20 @@ var _default = {
11
11
  studentInstructionsEnabled: true
12
12
  },
13
13
  configuration: {
14
+ spellCheck: {
15
+ label: 'Spellcheck',
16
+ settings: false,
17
+ enabled: true
18
+ },
14
19
  teacherInstructions: {
15
20
  settings: true,
16
21
  label: 'Teacher Instructions'
22
+ },
23
+ maxImageWidth: {
24
+ teacherInstructions: 300
25
+ },
26
+ maxImageHeight: {
27
+ teacherInstructions: 300
17
28
  }
18
29
  }
19
30
  };
@@ -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","spellCheck","label","settings","enabled","teacherInstructions","maxImageWidth","maxImageHeight"],"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,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAC,KAFC;AAGVC,MAAAA,OAAO,EAAC;AAHE,KADC;AAMbC,IAAAA,mBAAmB,EAAE;AACnBF,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY,KANR;AAUbI,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE;AADR,KAVF;AAabE,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE;AADP;AAbH;AANF,C","sourcesContent":["export default {\n model: {\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n maxImageWidth: {\n teacherInstructions: 300\n },\n maxImageHeight: {\n teacherInstructions: 300\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
 
@@ -31,13 +31,13 @@ var _configUi = require("@pie-lib/config-ui");
31
31
 
32
32
  var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
33
33
 
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; }
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;
@@ -78,7 +78,16 @@ var Root = /*#__PURE__*/function (_React$Component) {
78
78
 
79
79
  var _ref = configuration || {},
80
80
  _ref$teacherInstructi = _ref.teacherInstructions,
81
- teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi;
81
+ teacherInstructions = _ref$teacherInstructi === void 0 ? {} : _ref$teacherInstructi,
82
+ _ref$spellCheck = _ref.spellCheck,
83
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
84
+ _ref$maxImageWidth = _ref.maxImageWidth,
85
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
86
+ _ref$maxImageHeight = _ref.maxImageHeight,
87
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
88
+
89
+ var _ref2 = model || {},
90
+ spellCheckEnabled = _ref2.spellCheckEnabled;
82
91
 
83
92
  return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
84
93
  settings: /*#__PURE__*/_react["default"].createElement(Panel, {
@@ -91,8 +100,9 @@ var Root = /*#__PURE__*/function (_React$Component) {
91
100
  return onConfigurationChanged(config);
92
101
  },
93
102
  groups: {
94
- 'Properties': {
95
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label)
103
+ Properties: {
104
+ teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
105
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label)
96
106
  }
97
107
  }
98
108
  })
@@ -106,7 +116,10 @@ var Root = /*#__PURE__*/function (_React$Component) {
106
116
  markup: model.teacherInstructions || '',
107
117
  onChange: this.onTeacherInstructionsChanged,
108
118
  imageSupport: imageSupport,
109
- nonEmpty: false
119
+ nonEmpty: false,
120
+ spellCheck: spellCheckEnabled,
121
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions,
122
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions
110
123
  })), "Image cloze association"));
111
124
  }
112
125
  }]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","config","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","React","Component","styles","theme","base","marginTop","spacing","unit","width","paddingTop","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;;;;;;;;;IAEQA,K,GAAkBC,kB,CAAlBD,K;IAAOE,M,GAAWD,kB,CAAXC,M;;IAEFC,I;;;;;;;;;;;;;;;qHACoB,UAAAC,mBAAmB,EAAI;AACpD,YAAKC,KAAL,CAAWC,cAAX,iCACK,MAAKD,KAAL,CAAWE,KADhB;AAEEH,QAAAA,mBAAmB,EAAnBA;AAFF;AAID,K;;;;;;WAED,kBAAS;AAAA,wBACyF,KAAKC,KAD9F;AAAA,UACCG,OADD,eACCA,OADD;AAAA,UACUD,KADV,eACUA,KADV;AAAA,UACiBE,aADjB,eACiBA,aADjB;AAAA,UACgCH,cADhC,eACgCA,cADhC;AAAA,UACgDI,sBADhD,eACgDA,sBADhD;AAAA,UACwEC,YADxE,eACwEA,YADxE;;AAAA,iBAE8BF,aAAa,IAAI,EAF/C;AAAA,uCAECL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AAEZC,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AAFrB,KAJS;AAQvBT,IAAAA,MAAM,EAAE;AACNW,MAAAA,UAAU,EAAEN,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB,CAD3B;AAENC,MAAAA,KAAK,EAAE;AAFD;AARe,GAAL;AAAA,CAApB;;AAcAxB,IAAI,CAAC0B,SAAL,GAAiB;AACfrB,EAAAA,OAAO,EAAEsB,sBAAUC,MAAV,CAAiBC,UADX;AAEf1B,EAAAA,cAAc,EAAEwB,sBAAUG,IAFX;AAGfvB,EAAAA,sBAAsB,EAAEoB,sBAAUG,IAHnB;AAIf1B,EAAAA,KAAK,EAAEuB,sBAAUC,MAAV,CAAiBC,UAJT;AAKfvB,EAAAA,aAAa,EAAEqB,sBAAUC,MAAV,CAAiBC,UALjB;AAMfrB,EAAAA,YAAY,EAAEmB,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB;AANC,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBlB,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport {\n settings,\n layout,\n InputContainer\n} from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = teacherInstructions => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions\n });\n };\n\n render() {\n const { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport } = this.props;\n const { teacherInstructions = {} } = configuration || {};\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={model => onModelChanged(model)}\n onChangeConfiguration={config => onConfigurationChanged(config)}\n groups={{\n 'Properties': {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n },\n }}\n />\n }\n >\n <div className={classes.content}>\n {model && model.teacherInstructionsEnabled && (\n <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n />\n </InputContainer>\n )}\n\n Image cloze association\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = theme => ({\n base: {\n marginTop: theme.spacing.unit * 3\n },\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%'\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired\n })\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
1
+ {"version":3,"sources":["../src/root.jsx"],"names":["Panel","settings","toggle","Root","teacherInstructions","props","onModelChanged","model","classes","configuration","onConfigurationChanged","imageSupport","spellCheck","maxImageWidth","maxImageHeight","spellCheckEnabled","config","Properties","teacherInstructionsEnabled","label","content","promptHolder","prompt","onTeacherInstructionsChanged","React","Component","styles","theme","base","marginTop","spacing","unit","width","paddingTop","propTypes","PropTypes","object","isRequired","func","shape","add"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,KAAR,GAA0BC,kBAA1B,CAAQD,KAAR;AAAA,IAAeE,MAAf,GAA0BD,kBAA1B,CAAeC,MAAf;;IAEaC,I;;;;;;;;;;;;;;;qHACoB,UAACC,mBAAD,EAAyB;AACtD,YAAKC,KAAL,CAAWC,cAAX,iCACK,MAAKD,KA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AAA,sBAAsB,EAAEyB,sBAAUG,IAHnB;AAIf/B,EAAAA,KAAK,EAAE4B,sBAAUC,MAAV,CAAiBC,UAJT;AAKf5B,EAAAA,aAAa,EAAE0B,sBAAUC,MAAV,CAAiBC,UALjB;AAMf1B,EAAAA,YAAY,EAAEwB,sBAAUI,KAAV,CAAgB;AAC5BC,IAAAA,GAAG,EAAEL,sBAAUG,IAAV,CAAeD,UADQ;AAE5B,cAAQF,sBAAUG,IAAV,CAAeD;AAFK,GAAhB;AANC,CAAjB;;eAYe,wBAAWX,MAAX,EAAmBvB,IAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { settings, layout, InputContainer } from '@pie-lib/config-ui';\nimport EditableHtml from '@pie-lib/editable-html';\n\nconst { Panel, toggle } = settings;\n\nexport class Root extends React.Component {\n onTeacherInstructionsChanged = (teacherInstructions) => {\n this.props.onModelChanged({\n ...this.props.model,\n teacherInstructions,\n });\n };\n\n render() {\n const {\n classes,\n model,\n configuration,\n onModelChanged,\n onConfigurationChanged,\n imageSupport,\n } = this.props;\n const { teacherInstructions = {}, spellCheck = {}, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};\n const { spellCheckEnabled } = model || {};\n\n return (\n <layout.ConfigLayout\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Properties: {\n teacherInstructionsEnabled:\n teacherInstructions.settings &&\n toggle(teacherInstructions.label),\n spellCheckEnabled:\n spellCheck.settings && toggle(spellCheck.label),\n },\n }}\n />\n }\n >\n <div className={classes.content}>\n {model && model.teacherInstructionsEnabled && (\n <InputContainer\n label={teacherInstructions.label}\n className={classes.promptHolder}\n >\n <EditableHtml\n className={classes.prompt}\n markup={model.teacherInstructions || ''}\n onChange={this.onTeacherInstructionsChanged}\n imageSupport={imageSupport}\n nonEmpty={false}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}\n maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}\n />\n </InputContainer>\n )}\n Image cloze association\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nconst styles = (theme) => ({\n base: {\n marginTop: theme.spacing.unit * 3,\n },\n promptHolder: {\n width: '100%',\n paddingTop: theme.spacing.unit * 2,\n },\n prompt: {\n paddingTop: theme.spacing.unit * 2,\n width: '100%',\n },\n});\n\nRoot.propTypes = {\n classes: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n};\n\nexport default withStyles(styles)(Root);\n"],"file":"root.js"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/image-cloze-association-configure",
3
3
  "private": true,
4
- "version": "3.1.24",
4
+ "version": "3.1.43",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "module": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  "dependencies": {
10
10
  "@material-ui/core": "^3.9.2",
11
11
  "@pie-framework/pie-configure-events": "^1.2.0",
12
- "@pie-lib/config-ui": "^10.9.2",
12
+ "@pie-lib/config-ui": "^10.13.3",
13
13
  "debug": "^3.1.0",
14
14
  "prop-types": "^15.7.2",
15
15
  "react": "^16.8.6",
@@ -2,12 +2,23 @@ export default {
2
2
  model: {
3
3
  rationaleEnabled: true,
4
4
  teacherInstructionsEnabled: true,
5
- studentInstructionsEnabled: true
5
+ studentInstructionsEnabled: true,
6
6
  },
7
7
  configuration: {
8
+ spellCheck: {
9
+ label: 'Spellcheck',
10
+ settings:false,
11
+ enabled:true
12
+ },
8
13
  teacherInstructions: {
9
14
  settings: true,
10
15
  label: 'Teacher Instructions'
16
+ },
17
+ maxImageWidth: {
18
+ teacherInstructions: 300
19
+ },
20
+ maxImageHeight: {
21
+ teacherInstructions: 300
11
22
  }
12
23
  }
13
24
  };
@@ -1,26 +1,30 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { withStyles } from '@material-ui/core/styles';
4
- import {
5
- settings,
6
- layout,
7
- InputContainer
8
- } from '@pie-lib/config-ui';
4
+ import { settings, layout, InputContainer } from '@pie-lib/config-ui';
9
5
  import EditableHtml from '@pie-lib/editable-html';
10
6
 
11
7
  const { Panel, toggle } = settings;
12
8
 
13
9
  export class Root extends React.Component {
14
- onTeacherInstructionsChanged = teacherInstructions => {
10
+ onTeacherInstructionsChanged = (teacherInstructions) => {
15
11
  this.props.onModelChanged({
16
12
  ...this.props.model,
17
- teacherInstructions
13
+ teacherInstructions,
18
14
  });
19
15
  };
20
16
 
21
17
  render() {
22
- const { classes, model, configuration, onModelChanged, onConfigurationChanged, imageSupport } = this.props;
23
- const { teacherInstructions = {} } = configuration || {};
18
+ const {
19
+ classes,
20
+ model,
21
+ configuration,
22
+ onModelChanged,
23
+ onConfigurationChanged,
24
+ imageSupport,
25
+ } = this.props;
26
+ const { teacherInstructions = {}, spellCheck = {}, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};
27
+ const { spellCheckEnabled } = model || {};
24
28
 
25
29
  return (
26
30
  <layout.ConfigLayout
@@ -28,11 +32,15 @@ export class Root extends React.Component {
28
32
  <Panel
29
33
  model={model}
30
34
  configuration={configuration}
31
- onChangeModel={model => onModelChanged(model)}
32
- onChangeConfiguration={config => onConfigurationChanged(config)}
35
+ onChangeModel={(model) => onModelChanged(model)}
36
+ onChangeConfiguration={(config) => onConfigurationChanged(config)}
33
37
  groups={{
34
- 'Properties': {
35
- teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),
38
+ Properties: {
39
+ teacherInstructionsEnabled:
40
+ teacherInstructions.settings &&
41
+ toggle(teacherInstructions.label),
42
+ spellCheckEnabled:
43
+ spellCheck.settings && toggle(spellCheck.label),
36
44
  },
37
45
  }}
38
46
  />
@@ -40,17 +48,22 @@ export class Root extends React.Component {
40
48
  >
41
49
  <div className={classes.content}>
42
50
  {model && model.teacherInstructionsEnabled && (
43
- <InputContainer label={teacherInstructions.label} className={classes.promptHolder}>
51
+ <InputContainer
52
+ label={teacherInstructions.label}
53
+ className={classes.promptHolder}
54
+ >
44
55
  <EditableHtml
45
56
  className={classes.prompt}
46
57
  markup={model.teacherInstructions || ''}
47
58
  onChange={this.onTeacherInstructionsChanged}
48
59
  imageSupport={imageSupport}
49
60
  nonEmpty={false}
61
+ spellCheck={spellCheckEnabled}
62
+ maxImageWidth={maxImageWidth && maxImageWidth.teacherInstructions}
63
+ maxImageHeight={maxImageHeight && maxImageHeight.teacherInstructions}
50
64
  />
51
65
  </InputContainer>
52
66
  )}
53
-
54
67
  Image cloze association
55
68
  </div>
56
69
  </layout.ConfigLayout>
@@ -58,17 +71,17 @@ export class Root extends React.Component {
58
71
  }
59
72
  }
60
73
 
61
- const styles = theme => ({
74
+ const styles = (theme) => ({
62
75
  base: {
63
- marginTop: theme.spacing.unit * 3
76
+ marginTop: theme.spacing.unit * 3,
64
77
  },
65
78
  promptHolder: {
66
79
  width: '100%',
67
- paddingTop: theme.spacing.unit * 2
80
+ paddingTop: theme.spacing.unit * 2,
68
81
  },
69
82
  prompt: {
70
83
  paddingTop: theme.spacing.unit * 2,
71
- width: '100%'
84
+ width: '100%',
72
85
  },
73
86
  });
74
87
 
@@ -80,8 +93,8 @@ Root.propTypes = {
80
93
  configuration: PropTypes.object.isRequired,
81
94
  imageSupport: PropTypes.shape({
82
95
  add: PropTypes.func.isRequired,
83
- delete: PropTypes.func.isRequired
84
- })
96
+ delete: PropTypes.func.isRequired,
97
+ }),
85
98
  };
86
99
 
87
100
  export default withStyles(styles)(Root);