@pie-element/categorize 6.7.3-next.137 → 6.7.3-next.1372

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 (63) hide show
  1. package/CHANGELOG.md +272 -0
  2. package/configure/CHANGELOG.md +223 -0
  3. package/configure/lib/defaults.js +25 -0
  4. package/configure/lib/defaults.js.map +1 -1
  5. package/configure/lib/design/builder.js +8 -5
  6. package/configure/lib/design/builder.js.map +1 -1
  7. package/configure/lib/design/buttons.js +6 -4
  8. package/configure/lib/design/buttons.js.map +1 -1
  9. package/configure/lib/design/categories/alternateResponses.js +12 -4
  10. package/configure/lib/design/categories/alternateResponses.js.map +1 -1
  11. package/configure/lib/design/categories/category.js +16 -4
  12. package/configure/lib/design/categories/category.js.map +1 -1
  13. package/configure/lib/design/categories/choice-preview.js +4 -4
  14. package/configure/lib/design/categories/choice-preview.js.map +1 -1
  15. package/configure/lib/design/categories/droppable-placeholder.js +3 -3
  16. package/configure/lib/design/categories/droppable-placeholder.js.map +1 -1
  17. package/configure/lib/design/categories/index.js +91 -10
  18. package/configure/lib/design/categories/index.js.map +1 -1
  19. package/configure/lib/design/choices/choice.js +28 -6
  20. package/configure/lib/design/choices/choice.js.map +1 -1
  21. package/configure/lib/design/choices/config.js +5 -3
  22. package/configure/lib/design/choices/config.js.map +1 -1
  23. package/configure/lib/design/choices/index.js +44 -7
  24. package/configure/lib/design/choices/index.js.map +1 -1
  25. package/configure/lib/design/header.js +15 -5
  26. package/configure/lib/design/header.js.map +1 -1
  27. package/configure/lib/design/index.js +70 -12
  28. package/configure/lib/design/index.js.map +1 -1
  29. package/configure/lib/design/input-header.js +24 -4
  30. package/configure/lib/design/input-header.js.map +1 -1
  31. package/configure/lib/index.js +17 -3
  32. package/configure/lib/index.js.map +1 -1
  33. package/configure/lib/main.js +4 -2
  34. package/configure/lib/main.js.map +1 -1
  35. package/configure/lib/utils.js +20 -0
  36. package/configure/lib/utils.js.map +1 -0
  37. package/configure/package.json +5 -5
  38. package/controller/CHANGELOG.md +47 -0
  39. package/controller/lib/index.js +103 -15
  40. package/controller/lib/index.js.map +1 -1
  41. package/controller/package.json +1 -1
  42. package/docs/config-schema.json +155 -0
  43. package/docs/config-schema.json.md +121 -1
  44. package/docs/demo/generate.js +1 -0
  45. package/docs/pie-schema.json +48 -0
  46. package/docs/pie-schema.json.md +36 -0
  47. package/lib/categorize/categories.js +9 -4
  48. package/lib/categorize/categories.js.map +1 -1
  49. package/lib/categorize/category.js +4 -4
  50. package/lib/categorize/category.js.map +1 -1
  51. package/lib/categorize/choice.js +5 -4
  52. package/lib/categorize/choice.js.map +1 -1
  53. package/lib/categorize/choices.js +12 -5
  54. package/lib/categorize/choices.js.map +1 -1
  55. package/lib/categorize/droppable-placeholder.js +2 -2
  56. package/lib/categorize/droppable-placeholder.js.map +1 -1
  57. package/lib/categorize/grid-content.js +3 -3
  58. package/lib/categorize/grid-content.js.map +1 -1
  59. package/lib/categorize/index.js +11 -15
  60. package/lib/categorize/index.js.map +1 -1
  61. package/lib/index.js +4 -1
  62. package/lib/index.js.map +1 -1
  63. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -3,6 +3,278 @@
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
+ # [7.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@7.0.0...@pie-element/categorize@7.1.0) (2022-06-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **categorize:** add maxImageWidth and maxImageHeight props PD-1801 ([c438cea](https://github.com/pie-framework/pie-elements/commit/c438cea310e6e5cdfbd8c057fc9aadb36d53bb76))
12
+ * update documentation for items that have validation with settings configurable by client systems PD-1789 ([8ef69cc](https://github.com/pie-framework/pie-elements/commit/8ef69cc0c7439a5803dc95f570efc7cd24c8e334))
13
+ * **categorize:** added configurable validation PD-1739 ([c0d8275](https://github.com/pie-framework/pie-elements/commit/c0d827559fd43106e907967c111912ad92366e8e))
14
+ * **categorize:** implement generate validation message method, add info tooltip PD-1740 ([b315f4e](https://github.com/pie-framework/pie-elements/commit/b315f4ea0bc1461da0a8469bd9df383bc98e78ca))
15
+ * **categorize:** implement ui/ux for validation PD-1740 ([0a05866](https://github.com/pie-framework/pie-elements/commit/0a05866af89b0123b8979ef3b4916af4b2a0cdf9))
16
+
17
+
18
+
19
+
20
+
21
+ # [7.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.21...@pie-element/categorize@7.0.0) (2022-06-28)
22
+
23
+
24
+ ### chore
25
+
26
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
27
+
28
+
29
+ ### BREAKING CHANGES
30
+
31
+ * Image percent buttons were removed from toolbar.
32
+ New properties maxImageWidth and maxImageHeight were added.
33
+
34
+
35
+
36
+
37
+
38
+ ## [6.9.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.20...@pie-element/categorize@6.9.21) (2022-06-13)
39
+
40
+ **Note:** Version bump only for package @pie-element/categorize
41
+
42
+
43
+
44
+
45
+
46
+ ## [6.9.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.19...@pie-element/categorize@6.9.20) (2022-05-30)
47
+
48
+ **Note:** Version bump only for package @pie-element/categorize
49
+
50
+
51
+
52
+
53
+
54
+ ## [6.9.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.18...@pie-element/categorize@6.9.19) (2022-05-16)
55
+
56
+ **Note:** Version bump only for package @pie-element/categorize
57
+
58
+
59
+
60
+
61
+
62
+ ## [6.9.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.17...@pie-element/categorize@6.9.18) (2022-05-09)
63
+
64
+ **Note:** Version bump only for package @pie-element/categorize
65
+
66
+
67
+
68
+
69
+
70
+ ## [6.9.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.16...@pie-element/categorize@6.9.17) (2022-05-03)
71
+
72
+ **Note:** Version bump only for package @pie-element/categorize
73
+
74
+
75
+
76
+
77
+
78
+ ## [6.9.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.15...@pie-element/categorize@6.9.16) (2022-04-12)
79
+
80
+ **Note:** Version bump only for package @pie-element/categorize
81
+
82
+
83
+
84
+
85
+
86
+ ## [6.9.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.14...@pie-element/categorize@6.9.15) (2022-03-28)
87
+
88
+ **Note:** Version bump only for package @pie-element/categorize
89
+
90
+
91
+
92
+
93
+
94
+ ## [6.9.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.13...@pie-element/categorize@6.9.14) (2022-03-22)
95
+
96
+ **Note:** Version bump only for package @pie-element/categorize
97
+
98
+
99
+
100
+
101
+
102
+ ## [6.9.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.12...@pie-element/categorize@6.9.13) (2022-03-08)
103
+
104
+ **Note:** Version bump only for package @pie-element/categorize
105
+
106
+
107
+
108
+
109
+
110
+ ## [6.9.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.11...@pie-element/categorize@6.9.12) (2022-03-08)
111
+
112
+ **Note:** Version bump only for package @pie-element/categorize
113
+
114
+
115
+
116
+
117
+
118
+ ## [6.9.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.10...@pie-element/categorize@6.9.11) (2022-02-21)
119
+
120
+ **Note:** Version bump only for package @pie-element/categorize
121
+
122
+
123
+
124
+
125
+
126
+ ## [6.9.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.9...@pie-element/categorize@6.9.10) (2022-02-04)
127
+
128
+ **Note:** Version bump only for package @pie-element/categorize
129
+
130
+
131
+
132
+
133
+
134
+ ## [6.9.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.8...@pie-element/categorize@6.9.9) (2022-01-24)
135
+
136
+
137
+ ### Bug Fixes
138
+
139
+ * 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))
140
+ * **categorize:** fix layout issue and choice content direction PD-1420 ([f6f7a3c](https://github.com/pie-framework/pie-elements/commit/f6f7a3c50173669cf994a358eea58d97d9b1f507))
141
+ * **categorize:** render choicesLabel as Html ([ca8c542](https://github.com/pie-framework/pie-elements/commit/ca8c54297d8ab7370ea452a17f5be60f94b55843))
142
+
143
+
144
+
145
+
146
+
147
+ ## [6.9.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.7...@pie-element/categorize@6.9.8) (2022-01-10)
148
+
149
+ **Note:** Version bump only for package @pie-element/categorize
150
+
151
+
152
+
153
+
154
+
155
+ ## [6.9.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.6...@pie-element/categorize@6.9.7) (2021-12-23)
156
+
157
+ **Note:** Version bump only for package @pie-element/categorize
158
+
159
+
160
+
161
+
162
+
163
+ ## [6.9.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.4...@pie-element/categorize@6.9.5) (2021-12-13)
164
+
165
+ **Note:** Version bump only for package @pie-element/categorize
166
+
167
+
168
+
169
+
170
+
171
+ ## [6.9.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.9.1...@pie-element/categorize@6.9.2) (2021-11-29)
172
+
173
+ **Note:** Version bump only for package @pie-element/categorize
174
+
175
+
176
+
177
+
178
+
179
+ ## [6.9.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.3...@pie-element/categorize@6.9.1) (2021-11-11)
180
+
181
+ **Note:** Version bump only for package @pie-element/categorize
182
+
183
+
184
+
185
+
186
+
187
+ # [6.9.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.2...@pie-element/categorize@6.9.0) (2021-11-11)
188
+
189
+
190
+ ### Bug Fixes
191
+
192
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
193
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
194
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
195
+
196
+
197
+ ### Features
198
+
199
+ * **categorize:** set toolbar editor position to bottom ([10da834](https://github.com/pie-framework/pie-elements/commit/10da834902b136aa4fa83e46315d9155d4308b5a))
200
+
201
+
202
+
203
+
204
+
205
+
206
+ ## [6.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.2...@pie-element/categorize@6.8.3) (2021-10-04)
207
+
208
+ **Note:** Version bump only for package @pie-element/categorize
209
+
210
+
211
+
212
+
213
+
214
+ ## [6.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.1...@pie-element/categorize@6.8.2) (2021-09-20)
215
+
216
+
217
+ ### Bug Fixes
218
+
219
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
220
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
221
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
222
+
223
+
224
+
225
+
226
+
227
+ ## [6.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.8.0...@pie-element/categorize@6.8.1) (2021-09-01)
228
+
229
+ **Note:** Version bump only for package @pie-element/categorize
230
+
231
+
232
+
233
+
234
+
235
+ # [6.8.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.2...@pie-element/categorize@6.8.0) (2021-08-05)
236
+
237
+
238
+ ### Features
239
+
240
+ * **categorize:** set toolbar editor position to bottom ([10da834](https://github.com/pie-framework/pie-elements/commit/10da834902b136aa4fa83e46315d9155d4308b5a))
241
+
242
+
243
+
244
+
245
+
246
+ ## [6.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.7.0...@pie-element/categorize@6.7.2) (2021-08-05)
247
+
248
+
249
+ ### Bug Fixes
250
+
251
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
252
+
253
+
254
+
255
+
256
+
257
+ # [6.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.6.0...@pie-element/categorize@6.7.0) (2021-06-29)
258
+
259
+
260
+ ### Bug Fixes
261
+
262
+ * **categorize:** Fixed choices position ([#611](https://github.com/pie-framework/pie-elements/issues/611)) ([2494876](https://github.com/pie-framework/pie-elements/commit/2494876a03221fdae5d77ae4bbb992042e98e2df))
263
+ * Removed excess white space at the beginning of all items - PD-1184 ([#602](https://github.com/pie-framework/pie-elements/issues/602)) ([25b9f72](https://github.com/pie-framework/pie-elements/commit/25b9f72d2fe73bd46ea1a5c3611ff82eef3efb84))
264
+ * **categorize:** Changed category labels font size - PD-1141 ([#572](https://github.com/pie-framework/pie-elements/issues/572)) ([7df6244](https://github.com/pie-framework/pie-elements/commit/7df6244c687f8d713d6403313b49f315600d7a84))
265
+ * **categorize:** Fixed Row labels appearance and the display of categories - PD-197 ([#594](https://github.com/pie-framework/pie-elements/issues/594)) ([825724e](https://github.com/pie-framework/pie-elements/commit/825724e57a3c95b29c4f9ecfafea0618ed38b250))
266
+
267
+
268
+ ### Features
269
+
270
+ * **categorize:** Changed draggable tokens to be sized according to their content PD-401 ([#609](https://github.com/pie-framework/pie-elements/issues/609)) ([e5ae5d5](https://github.com/pie-framework/pie-elements/commit/e5ae5d5db3188a8bd732048ee4b70761810815e5))
271
+ * Displayed a message when the item has one or more alternate answers - PD-167 ([#590](https://github.com/pie-framework/pie-elements/issues/590)) ([889d8b5](https://github.com/pie-framework/pie-elements/commit/889d8b578a915c997a95bd5cd4bdf18f53cc2b68))
272
+ * 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))
273
+
274
+
275
+
276
+
277
+
6
278
  # [6.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize@6.5.18...@pie-element/categorize@6.6.0) (2021-04-07)
7
279
 
8
280
 
@@ -3,6 +3,229 @@
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
+ # [6.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@6.0.0...@pie-element/categorize-configure@6.1.0) (2022-06-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **categorize:** add maxImageWidth and maxImageHeight props PD-1801 ([c438cea](https://github.com/pie-framework/pie-elements/commit/c438cea310e6e5cdfbd8c057fc9aadb36d53bb76))
12
+ * **categorize:** implement generate validation message method, add info tooltip PD-1740 ([b315f4e](https://github.com/pie-framework/pie-elements/commit/b315f4ea0bc1461da0a8469bd9df383bc98e78ca))
13
+ * **categorize:** implement ui/ux for validation PD-1740 ([0a05866](https://github.com/pie-framework/pie-elements/commit/0a05866af89b0123b8979ef3b4916af4b2a0cdf9))
14
+
15
+
16
+
17
+
18
+
19
+ # [6.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.25...@pie-element/categorize-configure@6.0.0) (2022-06-28)
20
+
21
+
22
+ ### chore
23
+
24
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
25
+
26
+
27
+ ### BREAKING CHANGES
28
+
29
+ * Image percent buttons were removed from toolbar.
30
+ New properties maxImageWidth and maxImageHeight were added.
31
+
32
+
33
+
34
+
35
+
36
+ ## [5.4.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.24...@pie-element/categorize-configure@5.4.25) (2022-06-13)
37
+
38
+ **Note:** Version bump only for package @pie-element/categorize-configure
39
+
40
+
41
+
42
+
43
+
44
+ ## [5.4.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.23...@pie-element/categorize-configure@5.4.24) (2022-05-30)
45
+
46
+ **Note:** Version bump only for package @pie-element/categorize-configure
47
+
48
+
49
+
50
+
51
+
52
+ ## [5.4.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.22...@pie-element/categorize-configure@5.4.23) (2022-05-16)
53
+
54
+ **Note:** Version bump only for package @pie-element/categorize-configure
55
+
56
+
57
+
58
+
59
+
60
+ ## [5.4.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.21...@pie-element/categorize-configure@5.4.22) (2022-05-09)
61
+
62
+ **Note:** Version bump only for package @pie-element/categorize-configure
63
+
64
+
65
+
66
+
67
+
68
+ ## [5.4.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.20...@pie-element/categorize-configure@5.4.21) (2022-05-03)
69
+
70
+ **Note:** Version bump only for package @pie-element/categorize-configure
71
+
72
+
73
+
74
+
75
+
76
+ ## [5.4.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.19...@pie-element/categorize-configure@5.4.20) (2022-04-12)
77
+
78
+ **Note:** Version bump only for package @pie-element/categorize-configure
79
+
80
+
81
+
82
+
83
+
84
+ ## [5.4.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.18...@pie-element/categorize-configure@5.4.19) (2022-03-28)
85
+
86
+ **Note:** Version bump only for package @pie-element/categorize-configure
87
+
88
+
89
+
90
+
91
+
92
+ ## [5.4.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.17...@pie-element/categorize-configure@5.4.18) (2022-03-22)
93
+
94
+ **Note:** Version bump only for package @pie-element/categorize-configure
95
+
96
+
97
+
98
+
99
+
100
+ ## [5.4.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.16...@pie-element/categorize-configure@5.4.17) (2022-03-08)
101
+
102
+ **Note:** Version bump only for package @pie-element/categorize-configure
103
+
104
+
105
+
106
+
107
+
108
+ ## [5.4.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.15...@pie-element/categorize-configure@5.4.16) (2022-03-08)
109
+
110
+ **Note:** Version bump only for package @pie-element/categorize-configure
111
+
112
+
113
+
114
+
115
+
116
+ ## [5.4.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.14...@pie-element/categorize-configure@5.4.15) (2022-02-21)
117
+
118
+ **Note:** Version bump only for package @pie-element/categorize-configure
119
+
120
+
121
+
122
+
123
+
124
+ ## [5.4.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.13...@pie-element/categorize-configure@5.4.14) (2022-02-04)
125
+
126
+ **Note:** Version bump only for package @pie-element/categorize-configure
127
+
128
+
129
+
130
+
131
+
132
+ ## [5.4.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.12...@pie-element/categorize-configure@5.4.13) (2022-01-24)
133
+
134
+ **Note:** Version bump only for package @pie-element/categorize-configure
135
+
136
+
137
+
138
+
139
+
140
+ ## [5.4.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.11...@pie-element/categorize-configure@5.4.12) (2022-01-10)
141
+
142
+ **Note:** Version bump only for package @pie-element/categorize-configure
143
+
144
+
145
+
146
+
147
+
148
+ ## [5.4.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.10...@pie-element/categorize-configure@5.4.11) (2021-12-23)
149
+
150
+ **Note:** Version bump only for package @pie-element/categorize-configure
151
+
152
+
153
+
154
+
155
+
156
+ ## [5.4.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.8...@pie-element/categorize-configure@5.4.9) (2021-12-13)
157
+
158
+ **Note:** Version bump only for package @pie-element/categorize-configure
159
+
160
+
161
+
162
+
163
+
164
+ ## [5.4.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.5...@pie-element/categorize-configure@5.4.6) (2021-11-29)
165
+
166
+ **Note:** Version bump only for package @pie-element/categorize-configure
167
+
168
+
169
+
170
+
171
+
172
+ ## [5.4.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.4...@pie-element/categorize-configure@5.4.5) (2021-10-04)
173
+
174
+ **Note:** Version bump only for package @pie-element/categorize-configure
175
+
176
+
177
+
178
+
179
+
180
+ ## [5.4.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.3...@pie-element/categorize-configure@5.4.4) (2021-09-20)
181
+
182
+
183
+ ### Bug Fixes
184
+
185
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
186
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
187
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
188
+
189
+
190
+
191
+
192
+
193
+ ## [5.4.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.2...@pie-element/categorize-configure@5.4.3) (2021-08-05)
194
+
195
+ **Note:** Version bump only for package @pie-element/categorize-configure
196
+
197
+
198
+
199
+
200
+
201
+ ## [5.4.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.4.0...@pie-element/categorize-configure@5.4.2) (2021-08-05)
202
+
203
+
204
+ ### Bug Fixes
205
+
206
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
207
+
208
+
209
+
210
+
211
+
212
+ # [5.4.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.3.0...@pie-element/categorize-configure@5.4.0) (2021-06-29)
213
+
214
+
215
+ ### Bug Fixes
216
+
217
+ * **categorize:** Fixed Row labels appearance and the display of categories - PD-197 ([#594](https://github.com/pie-framework/pie-elements/issues/594)) ([825724e](https://github.com/pie-framework/pie-elements/commit/825724e57a3c95b29c4f9ecfafea0618ed38b250))
218
+
219
+
220
+ ### Features
221
+
222
+ * **categorize:** Changed draggable tokens to be sized according to their content PD-401 ([#609](https://github.com/pie-framework/pie-elements/issues/609)) ([e5ae5d5](https://github.com/pie-framework/pie-elements/commit/e5ae5d5db3188a8bd732048ee4b70761810815e5))
223
+ * 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))
224
+
225
+
226
+
227
+
228
+
6
229
  # [5.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/categorize-configure@5.2.23...@pie-element/categorize-configure@5.3.0) (2021-04-07)
7
230
 
8
231
 
@@ -25,6 +25,11 @@ var _default = {
25
25
  toolbarEditorPosition: 'bottom'
26
26
  },
27
27
  configuration: {
28
+ spellCheck: {
29
+ label: 'Spellcheck',
30
+ settings: false,
31
+ enabled: true
32
+ },
28
33
  feedback: {
29
34
  settings: true,
30
35
  label: 'Feedback',
@@ -61,6 +66,26 @@ var _default = {
61
66
  toolbarEditorPosition: {
62
67
  settings: false,
63
68
  label: 'Toolbar Editor Position'
69
+ },
70
+ maxImageWidth: {
71
+ teacherInstructions: 300,
72
+ prompt: 300,
73
+ rationale: 300,
74
+ rowLabel: 200,
75
+ categoryLabel: 260,
76
+ choices: 240
77
+ },
78
+ maxImageHeight: {
79
+ teacherInstructions: 300,
80
+ prompt: 300,
81
+ rationale: 300,
82
+ rowLabel: 100,
83
+ categoryLabel: 100,
84
+ choices: 150
85
+ },
86
+ withRubric: {
87
+ settings: false,
88
+ label: 'Add Rubric'
64
89
  }
65
90
  }
66
91
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","choices","choicesPosition","choicesLabel","lockChoiceOrder","removeTilesAfterPlacing","categoriesPerRow","categories","alternates","correctResponse","rowLabels","partialScoring","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","feedback","settings","label","enabled","prompt","rationale","scoringType","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,EADJ;AAELC,IAAAA,eAAe,EAAE,OAFZ;AAGLC,IAAAA,YAAY,EAAE,EAHT;AAILC,IAAAA,eAAe,EAAE,IAJZ;AAKLC,IAAAA,uBAAuB,EAAE,KALpB;AAMLC,IAAAA,gBAAgB,EAAE,CANb;AAOLC,IAAAA,UAAU,EAAE,EAPP;AAQLC,IAAAA,UAAU,EAAE,EARP;AASLC,IAAAA,eAAe,EAAE,EATZ;AAULC,IAAAA,SAAS,EAAE,CAAC,EAAD,CAVN;AAWLC,IAAAA,cAAc,EAAE,IAXX;AAYLC,IAAAA,eAAe,EAAE,IAZZ;AAaLC,IAAAA,gBAAgB,EAAE,IAbb;AAcLC,IAAAA,aAAa,EAAE,IAdV;AAeLC,IAAAA,0BAA0B,EAAE,IAfvB;AAgBLC,IAAAA,0BAA0B,EAAE,IAhBvB;AAiBLC,IAAAA,qBAAqB,EAAE;AAjBlB,GADM;AAoBbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAE,IADF;AAERC,MAAAA,KAAK,EAAE,UAFC;AAGRC,MAAAA,OAAO,EAAE;AAHD,KADG;AAMblB,IAAAA,eAAe,EAAE;AACfgB,MAAAA,QAAQ,EAAE,KADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KANJ;AAUbV,IAAAA,cAAc,EAAE;AACdS,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE;AAFO,KAVH;AAcbE,IAAAA,MAAM,EAAE;AACNH,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KAdK;AAkBbG,IAAAA,SAAS,EAAE;AACTJ,MAAAA,QAAQ,EAAE,IADD;AAETC,MAAAA,KAAK,EAAE;AAFE,KAlBE;AAsBbI,IAAAA,WAAW,EAAE;AACXL,MAAAA,QAAQ,EAAE,KADC;AAEXC,MAAAA,KAAK,EAAE;AAFI,KAtBA;AA0BbK,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,KADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KA1BR;AA8BbM,IAAAA,mBAAmB,EAAE;AACnBP,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KA9BR;AAkCbJ,IAAAA,qBAAqB,EAAC;AACpBG,MAAAA,QAAQ,EAAE,KADU;AAEpBC,MAAAA,KAAK,EAAE;AAFa;AAlCT;AApBF,C","sourcesContent":["export default {\n model: {\n choices: [],\n choicesPosition: 'below',\n choicesLabel: '',\n lockChoiceOrder: true,\n removeTilesAfterPlacing: false,\n categoriesPerRow: 2,\n categories: [],\n alternates: [],\n correctResponse: [],\n rowLabels: [''],\n partialScoring: true,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true\n },\n lockChoiceOrder: {\n settings: false,\n label: 'Lock Choice Order'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\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 }\n};\n"],"file":"defaults.js"}
1
+ {"version":3,"sources":["../src/defaults.js"],"names":["model","choices","choicesPosition","choicesLabel","lockChoiceOrder","removeTilesAfterPlacing","categoriesPerRow","categories","alternates","correctResponse","rowLabels","partialScoring","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","spellCheck","label","settings","enabled","feedback","prompt","rationale","scoringType","studentInstructions","teacherInstructions","maxImageWidth","rowLabel","categoryLabel","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,EADJ;AAELC,IAAAA,eAAe,EAAE,OAFZ;AAGLC,IAAAA,YAAY,EAAE,EAHT;AAILC,IAAAA,eAAe,EAAE,IAJZ;AAKLC,IAAAA,uBAAuB,EAAE,KALpB;AAMLC,IAAAA,gBAAgB,EAAE,CANb;AAOLC,IAAAA,UAAU,EAAE,EAPP;AAQLC,IAAAA,UAAU,EAAE,EARP;AASLC,IAAAA,eAAe,EAAE,EATZ;AAULC,IAAAA,SAAS,EAAE,CAAC,EAAD,CAVN;AAWLC,IAAAA,cAAc,EAAE,IAXX;AAYLC,IAAAA,eAAe,EAAE,IAZZ;AAaLC,IAAAA,gBAAgB,EAAE,IAbb;AAcLC,IAAAA,aAAa,EAAE,IAdV;AAeLC,IAAAA,0BAA0B,EAAE,IAfvB;AAgBLC,IAAAA,0BAA0B,EAAE,IAhBvB;AAiBLC,IAAAA,qBAAqB,EAAE;AAjBlB,GADM;AAoBbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAC,K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AACdJ,MAAAA,mBAAmB,EAAE,GADP;AAEdJ,MAAAA,MAAM,EAAE,GAFM;AAGdC,MAAAA,SAAS,EAAE,GAHG;AAIdK,MAAAA,QAAQ,EAAE,GAJI;AAKdC,MAAAA,aAAa,EAAE,GALD;AAMd9B,MAAAA,OAAO,EAAE;AANK,KAnDH;AA2DbgC,IAAAA,UAAU,EAAE;AACVZ,MAAAA,QAAQ,EAAE,KADA;AAEVD,MAAAA,KAAK,EAAE;AAFG;AA3DC;AApBF,C","sourcesContent":["export default {\n model: {\n choices: [],\n choicesPosition: 'below',\n choicesLabel: '',\n lockChoiceOrder: true,\n removeTilesAfterPlacing: false,\n categoriesPerRow: 2,\n categories: [],\n alternates: [],\n correctResponse: [],\n rowLabels: [''],\n partialScoring: true,\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true\n },\n lockChoiceOrder: {\n settings: false,\n label: 'Lock Choice Order'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n rationale: {\n settings: true,\n label: 'Rationale'\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 maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.buildAlternateResponses = exports.buildCategories = void 0;
8
+ exports.buildCategories = exports.buildAlternateResponses = void 0;
9
9
 
10
10
  var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
11
11
 
@@ -21,10 +21,13 @@ var buildCategories = function buildCategories(categories, choices, correctRespo
21
21
  var choice = choices.find(function (h) {
22
22
  return h.id === choiceId;
23
23
  });
24
- return Object.assign({}, {
25
- id: choice.id,
26
- content: choice.content
27
- });
24
+
25
+ if (choice) {
26
+ return Object.assign({}, {
27
+ id: choice.id,
28
+ content: choice.content
29
+ });
30
+ }
28
31
  });
29
32
  }
30
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/design/builder.js"],"names":["buildCategories","categories","choices","correctResponse","clonedCategories","map","category","cr","find","id","choiceId","choice","h","Object","assign","content","getChoices","cat","index","alternateResponses","length","alt","ch","buildAlternateResponses","mostAlternates","reduce","mostAlt","alternatesArray","Array","fill","val","catIndex","currentCategory","label"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,UAAD,EAAaC,OAAb,EAAsBC,eAAtB,EAA0C;AACvE,MAAMC,gBAAgB,GAAG,2BAAUH,UAAV,CAAzB;AAEA,SAAOG,gBAAgB,CAACC,GAAjB,CAAqB,UAAAC,QAAQ,EAAI;AACtC,QAAMC,EAAE,GAAGJ,eAAe,CAACK,IAAhB,CAAqB,UAAAD,EAAE;AAAA,aAAIA,EAAE,CAACD,QAAH,KAAgBA,QAAQ,CAACG,EAA7B;AAAA,KAAvB,CAAX;;AAEA,QAAIF,EAAJ,EAAQ;AACND,MAAAA,QAAQ,CAACJ,OAAT,GAAmB,CAACK,EAAE,CAACL,OAAH,IAAc,EAAf,EAAmBG,GAAnB,CAA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B,CAAvB;AAOA,MAAMC,eAAe,GAAI,IAAIC,KAAJ,CAAUJ,cAAV,CAAD,CAA4BK,IAA5B,CAAiC,CAAjC,CAAxB;AAEA,SAAOF,eAAe,CAACtB,GAAhB,CAAoB,UAACyB,GAAD,EAAMZ,KAAN,EAAgB;AACzC,WAAOf,eAAe,CAACE,GAAhB,CAAoB,UAACY,GAAD,EAAMc,QAAN,EAAmB;AAC5C,UAAMC,eAAe,GAAG/B,UAAU,CAAC8B,QAAD,CAAlC;AAEA,aAAO;AACLtB,QAAAA,EAAE,EAAEuB,eAAe,CAACvB,EADf;AAELwB,QAAAA,KAAK,EAAED,eAAe,CAACC,KAFlB;AAGL/B,QAAAA,OAAO,EAAEc,UAAU,CAACC,GAAD,EAAMf,OAAN,EAAegB,KAAf;AAHd,OAAP;AAKD,KARM,CAAP;AASD,GAVM,CAAP;AAWD,CArBM","sourcesContent":["import cloneDeep from 'lodash/cloneDeep';\n\nexport const buildCategories = (categories, choices, correctResponse) => {\n const clonedCategories = cloneDeep(categories);\n\n return clonedCategories.map(category => {\n const cr = correctResponse.find(cr => cr.category === category.id);\n\n if (cr) {\n category.choices = (cr.choices || []).map(choiceId => {\n const choice = choices.find(h => h.id === choiceId);\n return Object.assign({}, { id: choice.id, content: choice.content });\n });\n }\n\n return category;\n });\n};\n\nconst getChoices = (cat, choices, index) => {\n if (!cat.alternateResponses || cat.alternateResponses.length === 0) {\n return [];\n }\n\n return (cat.alternateResponses[index] || []).map(alt => {\n return choices.find(ch => ch.id === alt);\n });\n};\n\nexport const buildAlternateResponses = (categories, choices, correctResponse) => {\n const mostAlternates = correctResponse.reduce((mostAlt, cat) => {\n if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {\n return cat.alternateResponses.length;\n }\n\n return mostAlt;\n }, 0);\n const alternatesArray = (new Array(mostAlternates)).fill(0);\n\n return alternatesArray.map((val, index) => {\n return correctResponse.map((cat, catIndex) => {\n const currentCategory = categories[catIndex];\n\n return {\n id: currentCategory.id,\n label: currentCategory.label,\n choices: getChoices(cat, choices, index)\n };\n });\n });\n};\n"],"file":"builder.js"}
1
+ {"version":3,"sources":["../../src/design/builder.js"],"names":["buildCategories","categories","choices","correctResponse","clonedCategories","map","category","cr","find","id","choiceId","choice","h","Object","assign","content","getChoices","cat","index","alternateResponses","length","alt","ch","buildAlternateResponses","mostAlternates","reduce","mostAlt","alternatesArray","Array","fill","val","catIndex","currentCategory","label"],"mappings":";;;;;;;;;AAAA;;AAEO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,UAAD,EAAaC,OAAb,EAAsBC,eAAtB,EAA0C;AACvE,MAAMC,gBAAgB,GAAG,2BAAUH,UAAV,CAAzB;AAEA,SAAOG,gBAAgB,CAACC,GAAjB,CAAqB,UAAAC,QAAQ,EAAI;AACtC,QAAMC,EAAE,GAAGJ,eAAe,CAACK,IAAhB,CAAqB,UAAAD,EAAE;AAAA,aAAIA,EAAE,CAACD,QAAH,KAAgBA,QAAQ,CAACG,EAA7B;AAAA,KAAvB,CAAX;;AAEA,QAAIF,EAAJ,EAAQ;AACND,MAAAA,QAAQ,CAACJ,OAAT,GAAmB,CAACK,EAAE,CAACL,OAAH,IAAc,EAAf,EAAmBG,GAAnB,CAAuB,UAAAK,QAAQ,EAAI;AACpD,YAAMC,MAAM,GAAGT,OAAO,CAACM,IAAR,CAAa,UAAAI,CAAC;AAAA,iBAAIA,CAAC,CAACH,EAAF,KAASC,QAAb;AAAA,SAAd,CAAf;;AACA,YAAIC,MAAJ,EAAY;AACV,iBAAOE,MAAM,CAACC,MAAP,CAAc,EAAd,EAAkB;AAAEL,YAAAA,EAAE,EAAEE,MAAM,CAACF,EAAb;AAAiBM,YAAAA,OAAO,EAAEJ,MAAM,CAACI;AAAjC,WAAlB,CAAP;AACD;AACF,OALkB,CAAnB;AAMD;;AAED,WAAOT,QAAP;AACD,GAbM,CAAP;AAcD,CAjBM;;;;AAmBP,IAAMU,UAAU,GAAG,SAAbA,UAAa,CAACC,GA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OAAO,EAAEc,UAAU,CAACC,GAAD,EAAMf,OAAN,EAAegB,KAAf;AAHd,OAAP;AAKD,KARM,CAAP;AASD,GAVM,CAAP;AAWD,CArBM","sourcesContent":["import cloneDeep from 'lodash/cloneDeep';\n\nexport const buildCategories = (categories, choices, correctResponse) => {\n const clonedCategories = cloneDeep(categories);\n\n return clonedCategories.map(category => {\n const cr = correctResponse.find(cr => cr.category === category.id);\n\n if (cr) {\n category.choices = (cr.choices || []).map(choiceId => {\n const choice = choices.find(h => h.id === choiceId);\n if (choice) {\n return Object.assign({}, { id: choice.id, content: choice.content });\n }\n });\n }\n\n return category;\n });\n};\n\nconst getChoices = (cat, choices, index) => {\n if (!cat.alternateResponses || cat.alternateResponses.length === 0) {\n return [];\n }\n\n return (cat.alternateResponses[index] || []).map(alt => {\n return choices.find(ch => ch.id === alt);\n });\n};\n\nexport const buildAlternateResponses = (categories, choices, correctResponse) => {\n const mostAlternates = correctResponse.reduce((mostAlt, cat) => {\n if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {\n return cat.alternateResponses.length;\n }\n\n return mostAlt;\n }, 0);\n const alternatesArray = (new Array(mostAlternates)).fill(0);\n\n return alternatesArray.map((val, index) => {\n return correctResponse.map((cat, catIndex) => {\n const currentCategory = categories[catIndex];\n\n return {\n id: currentCategory.id,\n label: currentCategory.label,\n choices: getChoices(cat, choices, index)\n };\n });\n });\n};\n"],"file":"builder.js"}
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.Divider = exports.DeleteButton = exports.AddButton = exports.RawAddButton = void 0;
8
+ exports.RawAddButton = exports.Divider = exports.DeleteButton = exports.AddButton = void 0;
9
9
 
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
11
 
@@ -33,7 +33,7 @@ var _Divider = _interopRequireDefault(require("@material-ui/core/Divider"));
33
33
 
34
34
  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); }; }
35
35
 
36
- 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; } }
36
+ 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; } }
37
37
 
38
38
  var RawAddButton = /*#__PURE__*/function (_React$Component) {
39
39
  (0, _inherits2["default"])(RawAddButton, _React$Component);
@@ -99,12 +99,14 @@ var DeleteButton = (0, _styles.withStyles)(function () {
99
99
  })(function (_ref) {
100
100
  var classes = _ref.classes,
101
101
  label = _ref.label,
102
- onClick = _ref.onClick;
102
+ onClick = _ref.onClick,
103
+ disabled = _ref.disabled;
103
104
  return /*#__PURE__*/_react["default"].createElement(_Button["default"], {
104
105
  className: classes.deleteButton,
105
106
  onClick: onClick,
106
107
  size: "small",
107
- color: "primary"
108
+ color: "primary",
109
+ disabled: disabled
108
110
  }, label);
109
111
  });
110
112
  exports.DeleteButton = DeleteButton;