@pie-element/image-cloze-association 3.6.3-next.135 → 3.6.3-next.1357
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 +283 -0
- package/configure/CHANGELOG.md +212 -0
- package/configure/lib/defaults.js +15 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +17 -3
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +35 -8
- package/configure/lib/root.js.map +1 -1
- package/configure/package.json +4 -3
- package/configure/src/defaults.js +16 -1
- package/configure/src/index.js +19 -1
- package/configure/src/root.jsx +48 -21
- package/controller/CHANGELOG.md +52 -0
- package/controller/lib/index.js +4 -3
- package/controller/lib/index.js.map +1 -1
- package/controller/lib/utils.js +2 -2
- package/controller/package.json +1 -1
- package/docs/config-schema.json +95 -0
- package/docs/config-schema.json.md +73 -1
- package/docs/demo/generate.js +2 -1
- package/docs/pie-schema.json +34 -1
- package/docs/pie-schema.json.md +24 -0
- package/lib/image-container.js +7 -3
- package/lib/image-container.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/lib/interactive-section.js +1 -1
- package/lib/interactive-section.js.map +1 -1
- package/lib/possible-response.js +1 -1
- package/lib/possible-response.js.map +1 -1
- package/lib/root.js +9 -9
- package/lib/root.js.map +1 -1
- package/lib/utils-correctness.js +3 -3
- package/lib/utils-correctness.js.map +1 -1
- package/package.json +5 -5
- package/src/index.js +5 -0
- package/src/root.jsx +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,289 @@
|
|
|
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.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@4.0.0...@pie-element/image-cloze-association@4.1.0) (2022-06-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **image-cloze-association:** add maxImageWidth and maxImageHeight props PD-1801 ([f4132c8](https://github.com/pie-framework/pie-elements/commit/f4132c81475ad141fae5c38def311ac7e9729a42))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.31...@pie-element/image-cloze-association@4.0.0) (2022-06-28)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### chore
|
|
21
|
+
|
|
22
|
+
* Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* Image percent buttons were removed from toolbar.
|
|
28
|
+
New properties maxImageWidth and maxImageHeight were added.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [3.6.31](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.30...@pie-element/image-cloze-association@3.6.31) (2022-06-13)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [3.6.30](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.29...@pie-element/image-cloze-association@3.6.30) (2022-05-30)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [3.6.29](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.28...@pie-element/image-cloze-association@3.6.29) (2022-05-16)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [3.6.28](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.27...@pie-element/image-cloze-association@3.6.28) (2022-05-09)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## [3.6.27](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.26...@pie-element/image-cloze-association@3.6.27) (2022-05-03)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [3.6.26](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.6.25...@pie-element/image-cloze-association@3.6.26) (2022-04-12)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## [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)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## [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)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## [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)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## [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)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## [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)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## [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)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## [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)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
### Bug Fixes
|
|
134
|
+
|
|
135
|
+
* 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))
|
|
136
|
+
* **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))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## [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)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## [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)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## [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)
|
|
159
|
+
|
|
160
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## [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)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
## [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)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## [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)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### Bug Fixes
|
|
186
|
+
|
|
187
|
+
* **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))
|
|
188
|
+
* add dependency for correct answer toggle ([66d52cd](https://github.com/pie-framework/pie-elements/commit/66d52cdff3a5e0500a4ec0efb623948772b4aefe))
|
|
189
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
190
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
191
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
192
|
+
* **image-cloze-association:** add show correct answer toggle for evaluate ([4ac53e7](https://github.com/pie-framework/pie-elements/commit/4ac53e71d10eb9bbe417a9bc445bd1623830823d))
|
|
193
|
+
* **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))
|
|
194
|
+
* **image-cloze-association:** Fixed scoring method console errors PD-1249 ([1484c63](https://github.com/pie-framework/pie-elements/commit/1484c6354d59afcc0b541232c70ddfc5869ecfee))
|
|
195
|
+
* **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))
|
|
196
|
+
* **image-cloze-association:** Removed correct answer in evaluate mode for empty response ([18c886c](https://github.com/pie-framework/pie-elements/commit/18c886c14655b42e4b9b549a700bf0258b9cefc1))
|
|
197
|
+
* **image-cloze-association:** Used classnames instead ([544be10](https://github.com/pie-framework/pie-elements/commit/544be10da1225e5a52e4f0d3b51d52f9714591ae))
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
## [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)
|
|
205
|
+
|
|
206
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
## [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)
|
|
213
|
+
|
|
214
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
## [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)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### Bug Fixes
|
|
224
|
+
|
|
225
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
226
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
227
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## [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)
|
|
234
|
+
|
|
235
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
## [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)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Bug Fixes
|
|
245
|
+
|
|
246
|
+
* **image-cloze-association:** add show correct answer toggle for evaluate ([4ac53e7](https://github.com/pie-framework/pie-elements/commit/4ac53e71d10eb9bbe417a9bc445bd1623830823d))
|
|
247
|
+
* **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))
|
|
248
|
+
* **image-cloze-association:** Fixed scoring method console errors PD-1249 ([1484c63](https://github.com/pie-framework/pie-elements/commit/1484c6354d59afcc0b541232c70ddfc5869ecfee))
|
|
249
|
+
* **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))
|
|
250
|
+
* **image-cloze-association:** Removed correct answer in evaluate mode for empty response ([18c886c](https://github.com/pie-framework/pie-elements/commit/18c886c14655b42e4b9b549a700bf0258b9cefc1))
|
|
251
|
+
* **image-cloze-association:** Used classnames instead ([544be10](https://github.com/pie-framework/pie-elements/commit/544be10da1225e5a52e4f0d3b51d52f9714591ae))
|
|
252
|
+
* add dependency for correct answer toggle ([66d52cd](https://github.com/pie-framework/pie-elements/commit/66d52cdff3a5e0500a4ec0efb623948772b4aefe))
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
## [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)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### Bug Fixes
|
|
262
|
+
|
|
263
|
+
* force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
# [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)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
### Bug Fixes
|
|
273
|
+
|
|
274
|
+
* **image-cloze-association:** Displayed prompt - PD-1094 ([#566](https://github.com/pie-framework/pie-elements/issues/566)) ([2c5e91f](https://github.com/pie-framework/pie-elements/commit/2c5e91fbb4e487347c39063b48219b25d8f18b90))
|
|
275
|
+
* **image-cloze-association:** Dragging a token from one container to other should move it - PD-1099 ([#587](https://github.com/pie-framework/pie-elements/issues/587)) ([6f67fe3](https://github.com/pie-framework/pie-elements/commit/6f67fe35cc6bf3e9b4f28d6bb80a26e33212810e))
|
|
276
|
+
* **image-cloze-association:** Fixed possible responses padding - PD-1096 ([#567](https://github.com/pie-framework/pie-elements/issues/567)) ([ba69438](https://github.com/pie-framework/pie-elements/commit/ba694380dce75d36d4d1218d0658c5380d61f8bc))
|
|
277
|
+
* image-cloze-association create schemas for PD-1095 ([#562](https://github.com/pie-framework/pie-elements/issues/562)) ([d2e39da](https://github.com/pie-framework/pie-elements/commit/d2e39da045f594938239f1a25ac9786bdaffa6d9))
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
### Features
|
|
281
|
+
|
|
282
|
+
* **image-cloze-association:** Displayed a warning message when the max limit of an area is reached - PD-1100 ([#585](https://github.com/pie-framework/pie-elements/issues/585)) ([a9f9f48](https://github.com/pie-framework/pie-elements/commit/a9f9f48e974c46b2affad87bf458478803c96a11))
|
|
283
|
+
* **multi-trait-rubric:** change drag and drop to push instead of swap, drag traits by handle PD-1109 ([#561](https://github.com/pie-framework/pie-elements/issues/561)) ([93d621f](https://github.com/pie-framework/pie-elements/commit/93d621f35d04ecbd571ee0cf179cc0d99d11987c))
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
6
289
|
# [3.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/image-cloze-association@3.4.17...@pie-element/image-cloze-association@3.5.0) (2021-04-07)
|
|
7
290
|
|
|
8
291
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,218 @@
|
|
|
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.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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **image-cloze-association:** add maxImageWidth and maxImageHeight props PD-1801 ([f4132c8](https://github.com/pie-framework/pie-elements/commit/f4132c81475ad141fae5c38def311ac7e9729a42))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### chore
|
|
21
|
+
|
|
22
|
+
* Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* Image percent buttons were removed from toolbar.
|
|
28
|
+
New properties maxImageWidth and maxImageHeight were added.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [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)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [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)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [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)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [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)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## [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)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [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)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## [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)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## [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)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## [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)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## [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)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## [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)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## [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)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## [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)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## [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)
|
|
139
|
+
|
|
140
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
## [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)
|
|
147
|
+
|
|
148
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## [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)
|
|
155
|
+
|
|
156
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
## [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)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## [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)
|
|
171
|
+
|
|
172
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## [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)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
### Bug Fixes
|
|
182
|
+
|
|
183
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
184
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
185
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## [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)
|
|
192
|
+
|
|
193
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## [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)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
### Bug Fixes
|
|
203
|
+
|
|
204
|
+
* force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
## [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)
|
|
211
|
+
|
|
212
|
+
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
6
218
|
## [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)
|
|
7
219
|
|
|
8
220
|
**Note:** Version bump only for package @pie-element/image-cloze-association-configure
|
|
@@ -11,9 +11,24 @@ 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
|
|
28
|
+
},
|
|
29
|
+
withRubric: {
|
|
30
|
+
settings: false,
|
|
31
|
+
label: 'Add Rubric'
|
|
17
32
|
}
|
|
18
33
|
}
|
|
19
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","spellCheck","label","settings","enabled","teacherInstructions","maxImageWidth","maxImageHeight","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,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,KAbH;AAgBbG,IAAAA,UAAU,EAAE;AACVL,MAAAA,QAAQ,EAAE,KADA;AAEVD,MAAAA,KAAK,EAAE;AAFG;AAhBC;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 withRubric: {\n settings: false,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
|
package/configure/lib/index.js
CHANGED
|
@@ -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);
|
|
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]
|
|
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 {
|
|
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;;
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAQA;;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,qBAAYH,OAAZ,EAAqB;AACnB,WAAKL,aAAL,CAAmB,IAAIU,oCAAJ,CAAqBL,OAArB,CAAnB;AACD;;;WAED,uBAAcE,GAAd,EAAmBC,IAAnB,EAAyB;AACvB,WAAKR,aAAL,CAAmB,IAAIW,oCAAJ,CAAqBJ,GAArB,EAA0BC,IAA1B,CAAnB;AACD;;;WAED,mBAAU;AACRvB,MAAAA,GAAG,CAAC,SAAD,CAAH;;AACA,UAAI2B,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,gBAApB,EAA0B;AACtCC,QAAAA,gBAAgB,EAAE,KAAKnB,iBADe;AAEtCoB,QAAAA,KAAK,EAAE,KAAK9B,MAF0B;AAGtCM,QAAAA,aAAa,EAAE,KAAKF,cAHkB;AAItCF,QAAAA,cAAc,EAAE,KAAKA,cAAL,CAAoBC,IAApB,CAAyB,IAAzB,CAJsB;AAKtC4B,QAAAA,sBAAsB,EAAE,KAAKA,sBAAL,CAA4B5B,IAA5B,CAAiC,IAAjC,CALc;AAMtC6B,QAAAA,YAAY,EAAE;AACZC,UAAAA,GAAG,EAAE,KAAKC,WAAL,CAAiB/B,IAAjB,CAAsB,IAAtB,CADO;AAEZ,oBAAQ,KAAKgC,aAAL,CAAmBhC,IAAnB,CAAwB,IAAxB;AAFI,SANwB;AAUtCiC,QAAAA,kBAAkB,EAAE;AAClBH,UAAAA,GAAG,EAAE,KAAKI,WAAL,CAAiBlC,IAAjB,CAAsB,IAAtB,CADa;AAElB,oBAAQ,KAAKmC,aAAL,CAAmBnC,IAAnB,CAAwB,IAAxB;AAFU;AAVkB,OAA1B,CAAd;;AAeAoC,2BAASC,MAAT,CAAgBf,OAAhB,EAAyB,IAAzB;AACD;;;kDAnFyDgB,W;;;iCAAvC1C,8B,wBACS;AAAA,MAAC+B,KAAD,uEAAS,EAAT;AAAA,yCACvBzB,qBAAiByB,KADM,GAEvBA,KAFuB;AAAA,C","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 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 ReactDOM.render(element, this);\n }\n}\n"],"file":"index.js"}
|