@pie-element/multiple-choice 5.8.0 → 5.8.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.
- package/CHANGELOG.md +529 -0
- package/PRINT.md +35 -0
- package/README.md +1 -1
- package/configure/CHANGELOG.md +468 -0
- package/configure/lib/defaults.js +39 -8
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +24 -5
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +290 -77
- package/configure/lib/main.js.map +1 -1
- package/configure/lib/utils.js +18 -0
- package/configure/lib/utils.js.map +1 -0
- package/configure/package.json +5 -5
- package/controller/CHANGELOG.md +97 -0
- package/controller/lib/defaults.js +4 -2
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +85 -9
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +9 -1
- package/controller/lib/utils.js.map +1 -1
- package/controller/package.json +2 -2
- package/docs/config-schema.json +158 -1
- package/docs/config-schema.json.md +123 -3
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +18 -11
- package/docs/demo/index.html +1 -1
- package/docs/demo/session.js +1 -1
- package/docs/pie-schema.json +69 -4
- package/docs/pie-schema.json.md +57 -2
- package/lib/choice-input.js +44 -20
- package/lib/choice-input.js.map +1 -1
- package/lib/choice.js +157 -0
- package/lib/choice.js.map +1 -0
- package/lib/feedback-tick.js +1 -1
- package/lib/feedback-tick.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/main.js +5 -2
- package/lib/main.js.map +1 -1
- package/lib/multiple-choice.js +85 -148
- package/lib/multiple-choice.js.map +1 -1
- package/lib/print.js +129 -0
- package/lib/print.js.map +1 -0
- package/lib/session-updater.js.map +1 -1
- package/package.json +12 -7
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,474 @@
|
|
|
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
|
+
# [5.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.3.0...@pie-element/multiple-choice-configure@5.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
|
+
# [5.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.6...@pie-element/multiple-choice-configure@5.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
|
+
* **multiple-choice:** added configuration prop to hide the settings pannel PD-1999 + refactoring ([f0f3f6e](https://github.com/pie-framework/pie-elements/commit/f0f3f6e95f9bd96196dec2ba5e861b5bf170e146))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [5.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.5...@pie-element/multiple-choice-configure@5.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
|
+
## [5.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.4...@pie-element/multiple-choice-configure@5.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
|
+
## [5.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.3...@pie-element/multiple-choice-configure@5.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
|
+
## [5.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.2...@pie-element/multiple-choice-configure@5.2.3) (2022-11-15)
|
|
70
|
+
|
|
71
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
## [5.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.1...@pie-element/multiple-choice-configure@5.2.2) (2022-11-11)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Bug Fixes
|
|
81
|
+
|
|
82
|
+
* **multiple-choice:** add sanity checks for withRubric ([76558ed](https://github.com/pie-framework/pie-elements/commit/76558ed68c4c2f038640864996197d8139431c3e))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [5.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.2.0...@pie-element/multiple-choice-configure@5.2.1) (2022-10-31)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# [5.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.9...@pie-element/multiple-choice-configure@5.2.0) (2022-10-17)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Bug Fixes
|
|
100
|
+
|
|
101
|
+
* **multiple-choice:** add upload file option in choices ([1968e45](https://github.com/pie-framework/pie-elements/commit/1968e45753265c4e7267017b0d59cc745a115aa1))
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* enable spanish and special characters in author PD-2120 ([85fd3dd](https://github.com/pie-framework/pie-elements/commit/85fd3dd0fc10da1a2dfd5a842809c625790f8ba9))
|
|
107
|
+
* 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))
|
|
108
|
+
* update libs ([7e174fb](https://github.com/pie-framework/pie-elements/commit/7e174fba75e7ea668900ad5c103751cefe33e2af))
|
|
109
|
+
* **categorize:** add pie-api config PD-23 ([79a3424](https://github.com/pie-framework/pie-elements/commit/79a3424efbb4e32097028da0bada6c493ad4d0e5))
|
|
110
|
+
* **categorize:** add uploadSoundSupport property PD-23-updated ([74eb10b](https://github.com/pie-framework/pie-elements/commit/74eb10b6187cdd5c068820e5079e88230246b0d4))
|
|
111
|
+
* **multiple-choice:** add pie-api config PD-23 ([2568ef7](https://github.com/pie-framework/pie-elements/commit/2568ef75200a95d014f803addda8addf520b2abc))
|
|
112
|
+
* **multiple-choice:** add settings to enable rubric. Add withRubric prop to configuration and rubricEnabled prop to model PD-2019 ([92668e4](https://github.com/pie-framework/pie-elements/commit/92668e40e6e7f6a015c8ee49ab773c4d4cd09dc0))
|
|
113
|
+
* **multiple-choice:** add uploadSoundSupport property + proper events emit events (wip) PD-23-updated ([488f422](https://github.com/pie-framework/pie-elements/commit/488f4224f95de2ffdcb11ac608d7c627146b6216))
|
|
114
|
+
* **multiple-choice:** bump pie-configure-events and editable-html versions ([aaaaf46](https://github.com/pie-framework/pie-elements/commit/aaaaf46b44b0bed74fd09f05ccf5fcda2f8bb71f))
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
## [5.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.8...@pie-element/multiple-choice-configure@5.1.9) (2022-09-29)
|
|
121
|
+
|
|
122
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## [5.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.7...@pie-element/multiple-choice-configure@5.1.8) (2022-09-14)
|
|
129
|
+
|
|
130
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## [5.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.6...@pie-element/multiple-choice-configure@5.1.7) (2022-08-31)
|
|
137
|
+
|
|
138
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [5.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.5...@pie-element/multiple-choice-configure@5.1.6) (2022-08-16)
|
|
145
|
+
|
|
146
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [5.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.4...@pie-element/multiple-choice-configure@5.1.5) (2022-08-08)
|
|
153
|
+
|
|
154
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## [5.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.3...@pie-element/multiple-choice-configure@5.1.4) (2022-08-02)
|
|
161
|
+
|
|
162
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## [5.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.2...@pie-element/multiple-choice-configure@5.1.3) (2022-07-22)
|
|
169
|
+
|
|
170
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## [5.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.1...@pie-element/multiple-choice-configure@5.1.2) (2022-07-20)
|
|
177
|
+
|
|
178
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
## [5.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.1.0...@pie-element/multiple-choice-configure@5.1.1) (2022-07-19)
|
|
185
|
+
|
|
186
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
# [5.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@5.0.0...@pie-element/multiple-choice-configure@5.1.0) (2022-06-28)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### Features
|
|
196
|
+
|
|
197
|
+
* **multiple-choice:** add maxImageWidth and maxImageHeight props PD-1801 ([36b9617](https://github.com/pie-framework/pie-elements/commit/36b961715f3913606b8abb9e9aae764bf02c8d7a))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
# [5.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.2.4...@pie-element/multiple-choice-configure@5.0.0) (2022-06-28)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
### chore
|
|
207
|
+
|
|
208
|
+
* Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
### BREAKING CHANGES
|
|
212
|
+
|
|
213
|
+
* Image percent buttons were removed from toolbar.
|
|
214
|
+
New properties maxImageWidth and maxImageHeight were added.
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## [4.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.2.3...@pie-element/multiple-choice-configure@4.2.4) (2022-06-13)
|
|
221
|
+
|
|
222
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
## [4.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.2.2...@pie-element/multiple-choice-configure@4.2.3) (2022-05-30)
|
|
229
|
+
|
|
230
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## [4.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.2.1...@pie-element/multiple-choice-configure@4.2.2) (2022-05-16)
|
|
237
|
+
|
|
238
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
## [4.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.2.0...@pie-element/multiple-choice-configure@4.2.1) (2022-05-09)
|
|
245
|
+
|
|
246
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
# [4.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.7...@pie-element/multiple-choice-configure@4.2.0) (2022-05-03)
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
### Bug Fixes
|
|
256
|
+
|
|
257
|
+
* build ([7b3a278](https://github.com/pie-framework/pie-elements/commit/7b3a278f2c83562cbe848bd08c38a20d6cd2b8a0))
|
|
258
|
+
* fix crash ([0b5ab48](https://github.com/pie-framework/pie-elements/commit/0b5ab48ecf0468ac7fb724a152a5640dc25fea62))
|
|
259
|
+
* **multiple-choice:** comment validation ui/ux ([89e731c](https://github.com/pie-framework/pie-elements/commit/89e731c549a3da60f4dcbdb2e131d53a4587b5ea))
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Features
|
|
263
|
+
|
|
264
|
+
* **multiple-choice:** PD-1697 ui/ux for validation ([9a088a3](https://github.com/pie-framework/pie-elements/commit/9a088a3d4af75586d6b8e302078c8629a3e7d718))
|
|
265
|
+
* **multiple-choice:** updated validation behaviors PD-1696 PD-1697 ([ab009c4](https://github.com/pie-framework/pie-elements/commit/ab009c4832572dab96c5b4130a5088dea17222e6))
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
## [4.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.6...@pie-element/multiple-choice-configure@4.1.7) (2022-04-12)
|
|
272
|
+
|
|
273
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
## [4.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.5...@pie-element/multiple-choice-configure@4.1.6) (2022-03-28)
|
|
280
|
+
|
|
281
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
## [4.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.4...@pie-element/multiple-choice-configure@4.1.5) (2022-03-22)
|
|
288
|
+
|
|
289
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
## [4.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.3...@pie-element/multiple-choice-configure@4.1.4) (2022-03-08)
|
|
296
|
+
|
|
297
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
## [4.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.2...@pie-element/multiple-choice-configure@4.1.3) (2022-03-08)
|
|
304
|
+
|
|
305
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
## [4.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.1...@pie-element/multiple-choice-configure@4.1.2) (2022-02-21)
|
|
312
|
+
|
|
313
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
## [4.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.1.0...@pie-element/multiple-choice-configure@4.1.1) (2022-02-04)
|
|
320
|
+
|
|
321
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
# [4.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.11...@pie-element/multiple-choice-configure@4.1.0) (2022-01-24)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
### Bug Fixes
|
|
331
|
+
|
|
332
|
+
* check if limitChoicesNumber is defined when adding a choice ([6f32cf0](https://github.com/pie-framework/pie-elements/commit/6f32cf05a1095b2be28864f2bb697080d05744f8))
|
|
333
|
+
* **multiple-choice:** limit choice number to 9 if it's defined ([4fa374c](https://github.com/pie-framework/pie-elements/commit/4fa374c77ca625522549ce68e1062ca4a5145b8b))
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
### Features
|
|
337
|
+
|
|
338
|
+
* **multiple-choice:** set min and max number of choices. BREAKING CHANGE: removed limitChoicesNumber from config and added minAnswerChoices and maxAnswerChoices ([a467f8f](https://github.com/pie-framework/pie-elements/commit/a467f8f4827c032c88de480b25eb49efcf1486aa))
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
## [4.0.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.10...@pie-element/multiple-choice-configure@4.0.11) (2022-01-11)
|
|
345
|
+
|
|
346
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
## [4.0.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.9...@pie-element/multiple-choice-configure@4.0.10) (2022-01-10)
|
|
353
|
+
|
|
354
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
## [4.0.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.8...@pie-element/multiple-choice-configure@4.0.9) (2021-12-23)
|
|
361
|
+
|
|
362
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
## [4.0.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.6...@pie-element/multiple-choice-configure@4.0.7) (2021-12-13)
|
|
369
|
+
|
|
370
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
## [4.0.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.3...@pie-element/multiple-choice-configure@4.0.4) (2021-11-29)
|
|
377
|
+
|
|
378
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
## [4.0.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.2...@pie-element/multiple-choice-configure@4.0.3) (2021-10-04)
|
|
385
|
+
|
|
386
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
## [4.0.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.1...@pie-element/multiple-choice-configure@4.0.2) (2021-09-20)
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
### Bug Fixes
|
|
396
|
+
|
|
397
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
398
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
399
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
## [4.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@4.0.0...@pie-element/multiple-choice-configure@4.0.1) (2021-09-01)
|
|
406
|
+
|
|
407
|
+
**Note:** Version bump only for package @pie-element/multiple-choice-configure
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
# [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@3.5.0...@pie-element/multiple-choice-configure@4.0.0) (2021-08-09)
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
### Features
|
|
417
|
+
|
|
418
|
+
* **ebsr:** Added choicesLayout support ([33fb7e7](https://github.com/pie-framework/pie-elements/commit/33fb7e765146a7343a58663f3667f4a5de472960))
|
|
419
|
+
* **ebsr:** Added choicesLayout support \n BREAKING CHANGE: removed vertical mode ([348fc00](https://github.com/pie-framework/pie-elements/commit/348fc0031536d458071a1105e742c3d19399a15e))
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
### BREAKING CHANGES
|
|
423
|
+
|
|
424
|
+
* **ebsr:** removed vertical mode.
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
# [3.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@3.4.2...@pie-element/multiple-choice-configure@3.5.0) (2021-08-05)
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
### Bug Fixes
|
|
434
|
+
|
|
435
|
+
* merge conflict ([01655ca](https://github.com/pie-framework/pie-elements/commit/01655caf59311cc1a7a6624a6243147b2819d76e))
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
### Features
|
|
439
|
+
|
|
440
|
+
* **multiple-choice:** accessibility label - added aria label to checkbox and radio input types ([22514bb](https://github.com/pie-framework/pie-elements/commit/22514bb5e2476bc79a55756ff9a5c0c1e0642a29))
|
|
441
|
+
* if there are no choices - do not show grid columns dropdown BREAKING CHANGE: removed verticalMode(boolean) from model & configuration - and replaced it with choicesLayout(string) ([1c36ae8](https://github.com/pie-framework/pie-elements/commit/1c36ae8b7f9369b2723a6a84e7350370e1186c50))
|
|
442
|
+
* **multiple-choice:** added possibility to change layout - vertical, grid, horizontal ([46e7681](https://github.com/pie-framework/pie-elements/commit/46e7681a178ff29c983db1c7b6206389b55e2a00))
|
|
443
|
+
* **multiple-choice:** grid layout - fix tests ([ab3c750](https://github.com/pie-framework/pie-elements/commit/ab3c750af03d9fbe0794f7ec53452c948b530ad8))
|
|
444
|
+
* **multiple-choice:** toolbar position ( bottom or top ) ([9af6cd9](https://github.com/pie-framework/pie-elements/commit/9af6cd9f6b893501e00640500a34e1c3404edc94))
|
|
445
|
+
* **multiple-choice:** update docs ([0843122](https://github.com/pie-framework/pie-elements/commit/084312288b501a7f1129b24a046f9ab19cf25f79))
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
## [3.4.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@3.4.0...@pie-element/multiple-choice-configure@3.4.2) (2021-08-05)
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
### Bug Fixes
|
|
455
|
+
|
|
456
|
+
* force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
# [3.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@3.3.0...@pie-element/multiple-choice-configure@3.4.0) (2021-06-29)
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
### Features
|
|
466
|
+
|
|
467
|
+
* remove audio and video buttons from various fields of various items PD-1180 ([#601](https://github.com/pie-framework/pie-elements/issues/601)) ([8766b25](https://github.com/pie-framework/pie-elements/commit/8766b25690f5dde6c3e896860d63e205bf3c831b))
|
|
468
|
+
* **ebsr:** Added vertical/horizontal layout setting - PD-1144 ([#579](https://github.com/pie-framework/pie-elements/issues/579)) ([51c4093](https://github.com/pie-framework/pie-elements/commit/51c4093b4ade86a9c1118066b9dee36bc0582f3a))
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
|
|
6
474
|
# [3.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/multiple-choice-configure@3.2.5...@pie-element/multiple-choice-configure@3.3.0) (2021-04-07)
|
|
7
475
|
|
|
8
476
|
|
|
@@ -21,25 +21,30 @@ var _default = {
|
|
|
21
21
|
feedbackEnabled: true,
|
|
22
22
|
promptEnabled: true,
|
|
23
23
|
rationaleEnabled: true,
|
|
24
|
-
limitChoicesNumber: true,
|
|
25
24
|
teacherInstructionsEnabled: true,
|
|
26
25
|
studentInstructionsEnabled: true,
|
|
27
|
-
|
|
26
|
+
toolbarEditorPosition: 'bottom',
|
|
27
|
+
choicesLayout: 'vertical',
|
|
28
|
+
gridColumns: '2'
|
|
28
29
|
},
|
|
29
30
|
configuration: {
|
|
30
|
-
|
|
31
|
+
spellCheck: {
|
|
32
|
+
label: 'Spellcheck',
|
|
31
33
|
settings: false,
|
|
32
|
-
|
|
34
|
+
enabled: true
|
|
35
|
+
},
|
|
36
|
+
choicesLayout: {
|
|
37
|
+
settings: false,
|
|
38
|
+
label: 'Choices Layout'
|
|
39
|
+
},
|
|
40
|
+
gridColumns: {
|
|
41
|
+
label: 'Grid columns'
|
|
33
42
|
},
|
|
34
43
|
answerChoiceCount: 0,
|
|
35
44
|
addChoiceButton: {
|
|
36
45
|
settings: true,
|
|
37
46
|
label: 'Add a Choice'
|
|
38
47
|
},
|
|
39
|
-
limitChoicesNumber: {
|
|
40
|
-
settings: true,
|
|
41
|
-
label: 'Limit choices to 9'
|
|
42
|
-
},
|
|
43
48
|
choiceMode: {
|
|
44
49
|
settings: true,
|
|
45
50
|
label: 'Response Type'
|
|
@@ -71,6 +76,10 @@ var _default = {
|
|
|
71
76
|
settings: true,
|
|
72
77
|
label: 'Rationale'
|
|
73
78
|
},
|
|
79
|
+
accessibility: {
|
|
80
|
+
settings: false,
|
|
81
|
+
label: 'Accessibility Label'
|
|
82
|
+
},
|
|
74
83
|
scoringType: {
|
|
75
84
|
settings: false,
|
|
76
85
|
label: 'Scoring Type'
|
|
@@ -82,6 +91,28 @@ var _default = {
|
|
|
82
91
|
teacherInstructions: {
|
|
83
92
|
settings: true,
|
|
84
93
|
label: 'Teacher Instructions'
|
|
94
|
+
},
|
|
95
|
+
toolbarEditorPosition: {
|
|
96
|
+
settings: false,
|
|
97
|
+
label: 'Toolbar Editor Position'
|
|
98
|
+
},
|
|
99
|
+
minAnswerChoices: 2,
|
|
100
|
+
maxAnswerChoices: 5,
|
|
101
|
+
maxImageWidth: {
|
|
102
|
+
teacherInstructions: 300,
|
|
103
|
+
prompt: 300,
|
|
104
|
+
rationale: 636,
|
|
105
|
+
choices: 636
|
|
106
|
+
},
|
|
107
|
+
maxImageHeight: {
|
|
108
|
+
teacherInstructions: 300,
|
|
109
|
+
prompt: 300,
|
|
110
|
+
rationale: 300,
|
|
111
|
+
choices: 300
|
|
112
|
+
},
|
|
113
|
+
withRubric: {
|
|
114
|
+
settings: false,
|
|
115
|
+
label: 'Add Rubric'
|
|
85
116
|
}
|
|
86
117
|
}
|
|
87
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","choiceMode","choicePrefix","choices","prompt","lockChoiceOrder","partialScoring","scoringType","feedbackEnabled","promptEnabled","rationaleEnabled","
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","choiceMode","choicePrefix","choices","prompt","lockChoiceOrder","partialScoring","scoringType","feedbackEnabled","promptEnabled","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","choicesLayout","gridColumns","configuration","spellCheck","label","settings","enabled","answerChoiceCount","addChoiceButton","deleteChoice","feedback","rationale","accessibility","studentInstructions","teacherInstructions","minAnswerChoices","maxAnswerChoices","maxImageWidth","maxImageHeight","withRubric"],"mappings":"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","sourcesContent":["/** NOTE: teacherInstructions, studentInstructions, rationale & scoringType\n * functionalities are not defined yet - the value for those can belong to\n * model or to configure\n */\nexport default {\n model: {\n choiceMode: 'checkbox',\n choicePrefix: 'letters',\n choices: [],\n prompt: 'Question Prompt goes here',\n lockChoiceOrder: true,\n partialScoring: true,\n scoringType: 'auto',\n feedbackEnabled: true,\n promptEnabled: true,\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n choicesLayout: 'vertical',\n gridColumns: '2',\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n choicesLayout: {\n settings: false,\n label: 'Choices Layout',\n },\n gridColumns: {\n label: 'Grid columns',\n },\n answerChoiceCount: 0,\n addChoiceButton: {\n settings: true,\n label: 'Add a Choice',\n },\n choiceMode: {\n settings: true,\n label: 'Response Type',\n },\n choicePrefix: {\n settings: true,\n label: 'Choice Labels',\n },\n deleteChoice: {\n settings: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n },\n accessibility: {\n settings: false,\n label: 'Accessibility Label',\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n minAnswerChoices: 2,\n maxAnswerChoices: 5,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 636,\n choices: 636,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n choices: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n },\n};\n"],"file":"defaults.js"}
|
package/configure/lib/index.js
CHANGED
|
@@ -41,11 +41,11 @@ var _defaults2 = _interopRequireDefault(require("./defaults"));
|
|
|
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 {
|
|
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
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
46
|
+
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; }
|
|
47
47
|
|
|
48
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
48
|
+
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; }
|
|
49
49
|
|
|
50
50
|
var log = (0, _debug["default"])('multiple-choice:configure');
|
|
51
51
|
|
|
@@ -160,6 +160,16 @@ var MultipleChoice = /*#__PURE__*/function (_HTMLElement) {
|
|
|
160
160
|
value: function onDeleteImage(src, done) {
|
|
161
161
|
this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
|
|
162
162
|
}
|
|
163
|
+
}, {
|
|
164
|
+
key: "insertSound",
|
|
165
|
+
value: function insertSound(handler) {
|
|
166
|
+
this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
|
|
167
|
+
}
|
|
168
|
+
}, {
|
|
169
|
+
key: "onDeleteSound",
|
|
170
|
+
value: function onDeleteSound(src, done) {
|
|
171
|
+
this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
|
|
172
|
+
}
|
|
163
173
|
}, {
|
|
164
174
|
key: "_render",
|
|
165
175
|
value: function _render() {
|
|
@@ -174,6 +184,10 @@ var MultipleChoice = /*#__PURE__*/function (_HTMLElement) {
|
|
|
174
184
|
imageSupport: {
|
|
175
185
|
add: this.insertImage.bind(this),
|
|
176
186
|
"delete": this.onDeleteImage.bind(this)
|
|
187
|
+
},
|
|
188
|
+
uploadSoundSupport: {
|
|
189
|
+
add: this.insertSound.bind(this),
|
|
190
|
+
"delete": this.onDeleteSound.bind(this)
|
|
177
191
|
}
|
|
178
192
|
});
|
|
179
193
|
|
|
@@ -186,8 +200,13 @@ var MultipleChoice = /*#__PURE__*/function (_HTMLElement) {
|
|
|
186
200
|
exports["default"] = MultipleChoice;
|
|
187
201
|
(0, _defineProperty2["default"])(MultipleChoice, "createDefaultModel", function () {
|
|
188
202
|
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
189
|
-
|
|
203
|
+
|
|
204
|
+
var normalizedModel = _configUi.choiceUtils.normalizeChoices(_objectSpread(_objectSpread(_objectSpread({}, _defaults2["default"].model), model), {}, {
|
|
190
205
|
choices: generateFormattedChoices(model && model.choices || [])
|
|
191
|
-
}));
|
|
206
|
+
})); // This is used for offering support for old models which have the property "verticalMode"
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
normalizedModel.choicesLayout = model.choicesLayout || model.verticalMode === false && 'horizontal' || _defaults2["default"].model.choicesLayout;
|
|
210
|
+
return normalizedModel;
|
|
192
211
|
});
|
|
193
212
|
//# sourceMappingURL=index.js.map
|