@pie-element/inline-dropdown 3.8.3-next.133 → 3.8.3-next.1332

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 CHANGED
@@ -3,6 +3,251 @@
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/inline-dropdown@4.0.0...@pie-element/inline-dropdown@4.1.0) (2022-06-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * inline-dropdown and drag-in-the-blank fix validation error PD-1848 ([24f50f1](https://github.com/pie-framework/pie-elements/commit/24f50f11ee681749e2849c84f178af2b67441454))
12
+
13
+
14
+ ### Features
15
+
16
+ * **inline-dropdown:** add maxImageWidth and maxImageHeight props PD-1801 ([a2ad5d5](https://github.com/pie-framework/pie-elements/commit/a2ad5d5298e5696541f45ab8ca9e5675f5bb1a57))
17
+ * **inline-dropdown, drag-in-the-blank, explicit-constructed-response:** set config default for maxRespponseAreas ([a9e9dc5](https://github.com/pie-framework/pie-elements/commit/a9e9dc5ff43199c946f4226790d924ab5d8674ed))
18
+ * 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))
19
+
20
+
21
+
22
+
23
+
24
+ # [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.11.4...@pie-element/inline-dropdown@4.0.0) (2022-06-28)
25
+
26
+
27
+ ### chore
28
+
29
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
30
+
31
+
32
+ ### BREAKING CHANGES
33
+
34
+ * Image percent buttons were removed from toolbar.
35
+ New properties maxImageWidth and maxImageHeight were added.
36
+
37
+
38
+
39
+
40
+
41
+ ## [3.11.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.11.3...@pie-element/inline-dropdown@3.11.4) (2022-06-13)
42
+
43
+ **Note:** Version bump only for package @pie-element/inline-dropdown
44
+
45
+
46
+
47
+
48
+
49
+ ## [3.11.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.11.2...@pie-element/inline-dropdown@3.11.3) (2022-05-30)
50
+
51
+ **Note:** Version bump only for package @pie-element/inline-dropdown
52
+
53
+
54
+
55
+
56
+
57
+ ## [3.11.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.11.1...@pie-element/inline-dropdown@3.11.2) (2022-05-16)
58
+
59
+ **Note:** Version bump only for package @pie-element/inline-dropdown
60
+
61
+
62
+
63
+
64
+
65
+ ## [3.11.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.11.0...@pie-element/inline-dropdown@3.11.1) (2022-05-09)
66
+
67
+ **Note:** Version bump only for package @pie-element/inline-dropdown
68
+
69
+
70
+
71
+
72
+
73
+ # [3.11.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.7...@pie-element/inline-dropdown@3.11.0) (2022-05-03)
74
+
75
+
76
+ ### Bug Fixes
77
+
78
+ * added getters for the session PD-1668 ([de8a754](https://github.com/pie-framework/pie-elements/commit/de8a754f4580370b127257c435e43db405b4bdc4))
79
+ * **explcit-constructed-response, inline-dropdown, drag-in-the-blank:** Fixed some math symbols rendering PD-1535 ([98b99ff](https://github.com/pie-framework/pie-elements/commit/98b99ff26742c15563b365c7fbb7fab981f057d8))
80
+
81
+
82
+ ### Features
83
+
84
+ * **inline-dropdown:** added configurable validation ([268a876](https://github.com/pie-framework/pie-elements/commit/268a8766c963a35aa7ca2f3831b870f411d1ad10))
85
+ * **inline-dropdown:** added configurable validation PD-1698 ([c326731](https://github.com/pie-framework/pie-elements/commit/c3267310c3620037402b722104dcdf0358e74d42))
86
+ * **inline-dropdown:** added configurable validation PD-1698 ([68405ab](https://github.com/pie-framework/pie-elements/commit/68405ab78680cdc7fda1d893c78ebb4880fbed86))
87
+ * **inline-dropdown:** added validation UI improvements PD-1698 ([477066b](https://github.com/pie-framework/pie-elements/commit/477066b51d746d37ba8ba81ece42c95972466fc3))
88
+ * **inline-dropdown:** ui/ux for validation PD-1699 ([d277f49](https://github.com/pie-framework/pie-elements/commit/d277f4958284cfc8dc8b16df49de924f1810c159))
89
+
90
+
91
+
92
+
93
+
94
+ ## [3.10.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.6...@pie-element/inline-dropdown@3.10.7) (2022-04-12)
95
+
96
+ **Note:** Version bump only for package @pie-element/inline-dropdown
97
+
98
+
99
+
100
+
101
+
102
+ ## [3.10.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.5...@pie-element/inline-dropdown@3.10.6) (2022-03-28)
103
+
104
+ **Note:** Version bump only for package @pie-element/inline-dropdown
105
+
106
+
107
+
108
+
109
+
110
+ ## [3.10.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.4...@pie-element/inline-dropdown@3.10.5) (2022-03-22)
111
+
112
+ **Note:** Version bump only for package @pie-element/inline-dropdown
113
+
114
+
115
+
116
+
117
+
118
+ ## [3.10.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.3...@pie-element/inline-dropdown@3.10.4) (2022-03-08)
119
+
120
+ **Note:** Version bump only for package @pie-element/inline-dropdown
121
+
122
+
123
+
124
+
125
+
126
+ ## [3.10.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.2...@pie-element/inline-dropdown@3.10.3) (2022-03-08)
127
+
128
+ **Note:** Version bump only for package @pie-element/inline-dropdown
129
+
130
+
131
+
132
+
133
+
134
+ ## [3.10.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.1...@pie-element/inline-dropdown@3.10.2) (2022-02-21)
135
+
136
+ **Note:** Version bump only for package @pie-element/inline-dropdown
137
+
138
+
139
+
140
+
141
+
142
+ ## [3.10.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.10.0...@pie-element/inline-dropdown@3.10.1) (2022-02-04)
143
+
144
+ **Note:** Version bump only for package @pie-element/inline-dropdown
145
+
146
+
147
+
148
+
149
+
150
+ # [3.10.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.9...@pie-element/inline-dropdown@3.10.0) (2022-01-24)
151
+
152
+
153
+ ### Bug Fixes
154
+
155
+ * 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))
156
+
157
+
158
+ ### Features
159
+
160
+ * **drag-in-the-blank, inline-dropdown:** move rationale after the item content PD-1379 ([fd71c58](https://github.com/pie-framework/pie-elements/commit/fd71c5853bdd63b31a746241dd5649e5de051300))
161
+
162
+
163
+
164
+
165
+
166
+ ## [3.9.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.8...@pie-element/inline-dropdown@3.9.9) (2022-01-10)
167
+
168
+ **Note:** Version bump only for package @pie-element/inline-dropdown
169
+
170
+
171
+
172
+
173
+
174
+ ## [3.9.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.7...@pie-element/inline-dropdown@3.9.8) (2021-12-23)
175
+
176
+ **Note:** Version bump only for package @pie-element/inline-dropdown
177
+
178
+
179
+
180
+
181
+
182
+ ## [3.9.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.5...@pie-element/inline-dropdown@3.9.6) (2021-12-13)
183
+
184
+ **Note:** Version bump only for package @pie-element/inline-dropdown
185
+
186
+
187
+
188
+
189
+
190
+ ## [3.9.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.2...@pie-element/inline-dropdown@3.9.3) (2021-11-29)
191
+
192
+ **Note:** Version bump only for package @pie-element/inline-dropdown
193
+
194
+
195
+
196
+
197
+
198
+ ## [3.9.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.1...@pie-element/inline-dropdown@3.9.2) (2021-10-18)
199
+
200
+ **Note:** Version bump only for package @pie-element/inline-dropdown
201
+
202
+
203
+
204
+
205
+
206
+ ## [3.9.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.9.0...@pie-element/inline-dropdown@3.9.1) (2021-10-04)
207
+
208
+ **Note:** Version bump only for package @pie-element/inline-dropdown
209
+
210
+
211
+
212
+
213
+
214
+ # [3.9.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.8.4...@pie-element/inline-dropdown@3.9.0) (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
+ ### Features
225
+
226
+ * **inline-dropdown:** add rationale at choice level PD-488 ([1d88366](https://github.com/pie-framework/pie-elements/commit/1d88366f857b90e4ffc5735fe3af78432aa8844c))
227
+
228
+
229
+
230
+
231
+
232
+ ## [3.8.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.8.3...@pie-element/inline-dropdown@3.8.4) (2021-09-01)
233
+
234
+ **Note:** Version bump only for package @pie-element/inline-dropdown
235
+
236
+
237
+
238
+
239
+
240
+ ## [3.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.8.2...@pie-element/inline-dropdown@3.8.3) (2021-08-05)
241
+
242
+
243
+ ### Bug Fixes
244
+
245
+ * **inline-dropdown:** add math input when author clicks + without pressing the green checkmark PD-1230 ([7cfdc3f](https://github.com/pie-framework/pie-elements/commit/7cfdc3f6763fe5b56921824aae3a75e0536e7344))
246
+
247
+
248
+
249
+
250
+
6
251
  ## [3.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown@3.8.0...@pie-element/inline-dropdown@3.8.2) (2021-08-05)
7
252
 
8
253
 
@@ -3,6 +3,217 @@
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/inline-dropdown-configure@4.0.0...@pie-element/inline-dropdown-configure@4.1.0) (2022-06-28)
7
+
8
+
9
+ ### Features
10
+
11
+ * **inline-dropdown:** add maxImageWidth and maxImageHeight props PD-1801 ([a2ad5d5](https://github.com/pie-framework/pie-elements/commit/a2ad5d5298e5696541f45ab8ca9e5675f5bb1a57))
12
+ * **inline-dropdown, drag-in-the-blank, explicit-constructed-response:** set config default for maxRespponseAreas ([a9e9dc5](https://github.com/pie-framework/pie-elements/commit/a9e9dc5ff43199c946f4226790d924ab5d8674ed))
13
+
14
+
15
+
16
+
17
+
18
+ # [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.7.4...@pie-element/inline-dropdown-configure@4.0.0) (2022-06-28)
19
+
20
+
21
+ ### chore
22
+
23
+ * Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
24
+
25
+
26
+ ### BREAKING CHANGES
27
+
28
+ * Image percent buttons were removed from toolbar.
29
+ New properties maxImageWidth and maxImageHeight were added.
30
+
31
+
32
+
33
+
34
+
35
+ ## [3.7.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.7.3...@pie-element/inline-dropdown-configure@3.7.4) (2022-06-13)
36
+
37
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
38
+
39
+
40
+
41
+
42
+
43
+ ## [3.7.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.7.2...@pie-element/inline-dropdown-configure@3.7.3) (2022-05-30)
44
+
45
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
46
+
47
+
48
+
49
+
50
+
51
+ ## [3.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.7.1...@pie-element/inline-dropdown-configure@3.7.2) (2022-05-16)
52
+
53
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
54
+
55
+
56
+
57
+
58
+
59
+ ## [3.7.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.7.0...@pie-element/inline-dropdown-configure@3.7.1) (2022-05-09)
60
+
61
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
62
+
63
+
64
+
65
+
66
+
67
+ # [3.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.16...@pie-element/inline-dropdown-configure@3.7.0) (2022-05-03)
68
+
69
+
70
+ ### Bug Fixes
71
+
72
+ * **explcit-constructed-response, inline-dropdown, drag-in-the-blank:** Fixed some math symbols rendering PD-1535 ([98b99ff](https://github.com/pie-framework/pie-elements/commit/98b99ff26742c15563b365c7fbb7fab981f057d8))
73
+
74
+
75
+ ### Features
76
+
77
+ * **inline-dropdown:** added validation UI improvements PD-1698 ([477066b](https://github.com/pie-framework/pie-elements/commit/477066b51d746d37ba8ba81ece42c95972466fc3))
78
+ * **inline-dropdown:** ui/ux for validation PD-1699 ([d277f49](https://github.com/pie-framework/pie-elements/commit/d277f4958284cfc8dc8b16df49de924f1810c159))
79
+
80
+
81
+
82
+
83
+
84
+ ## [3.6.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.15...@pie-element/inline-dropdown-configure@3.6.16) (2022-04-12)
85
+
86
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
87
+
88
+
89
+
90
+
91
+
92
+ ## [3.6.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.14...@pie-element/inline-dropdown-configure@3.6.15) (2022-03-28)
93
+
94
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
95
+
96
+
97
+
98
+
99
+
100
+ ## [3.6.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.13...@pie-element/inline-dropdown-configure@3.6.14) (2022-03-22)
101
+
102
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
103
+
104
+
105
+
106
+
107
+
108
+ ## [3.6.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.12...@pie-element/inline-dropdown-configure@3.6.13) (2022-03-08)
109
+
110
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
111
+
112
+
113
+
114
+
115
+
116
+ ## [3.6.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.11...@pie-element/inline-dropdown-configure@3.6.12) (2022-03-08)
117
+
118
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
119
+
120
+
121
+
122
+
123
+
124
+ ## [3.6.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.10...@pie-element/inline-dropdown-configure@3.6.11) (2022-02-21)
125
+
126
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
127
+
128
+
129
+
130
+
131
+
132
+ ## [3.6.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.9...@pie-element/inline-dropdown-configure@3.6.10) (2022-02-04)
133
+
134
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
135
+
136
+
137
+
138
+
139
+
140
+ ## [3.6.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.8...@pie-element/inline-dropdown-configure@3.6.9) (2022-01-24)
141
+
142
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
143
+
144
+
145
+
146
+
147
+
148
+ ## [3.6.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.7...@pie-element/inline-dropdown-configure@3.6.8) (2022-01-10)
149
+
150
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
151
+
152
+
153
+
154
+
155
+
156
+ ## [3.6.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.6...@pie-element/inline-dropdown-configure@3.6.7) (2021-12-23)
157
+
158
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
159
+
160
+
161
+
162
+
163
+
164
+ ## [3.6.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.4...@pie-element/inline-dropdown-configure@3.6.5) (2021-12-13)
165
+
166
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
167
+
168
+
169
+
170
+
171
+
172
+ ## [3.6.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.1...@pie-element/inline-dropdown-configure@3.6.2) (2021-11-29)
173
+
174
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
175
+
176
+
177
+
178
+
179
+
180
+ ## [3.6.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.6.0...@pie-element/inline-dropdown-configure@3.6.1) (2021-10-04)
181
+
182
+ **Note:** Version bump only for package @pie-element/inline-dropdown-configure
183
+
184
+
185
+
186
+
187
+
188
+ # [3.6.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.5.3...@pie-element/inline-dropdown-configure@3.6.0) (2021-09-20)
189
+
190
+
191
+ ### Bug Fixes
192
+
193
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
194
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
195
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
196
+
197
+
198
+ ### Features
199
+
200
+ * **inline-dropdown:** add rationale at choice level PD-488 ([1d88366](https://github.com/pie-framework/pie-elements/commit/1d88366f857b90e4ffc5735fe3af78432aa8844c))
201
+
202
+
203
+
204
+
205
+
206
+ ## [3.5.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.5.2...@pie-element/inline-dropdown-configure@3.5.3) (2021-08-05)
207
+
208
+
209
+ ### Bug Fixes
210
+
211
+ * **inline-dropdown:** add math input when author clicks + without pressing the green checkmark PD-1230 ([7cfdc3f](https://github.com/pie-framework/pie-elements/commit/7cfdc3f6763fe5b56921824aae3a75e0536e7344))
212
+
213
+
214
+
215
+
216
+
6
217
  ## [3.5.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/inline-dropdown-configure@3.5.0...@pie-element/inline-dropdown-configure@3.5.2) (2021-08-05)
7
218
 
8
219
 
@@ -15,15 +15,22 @@ var _default = {
15
15
  alternateResponse: {},
16
16
  promptEnabled: true,
17
17
  rationaleEnabled: true,
18
+ choiceRationaleEnabled: true,
18
19
  teacherInstructionsEnabled: true,
19
20
  studentInstructionsEnabled: true,
20
- toolbarEditorPosition: 'bottom'
21
+ toolbarEditorPosition: 'bottom',
22
+ displayType: 'block'
21
23
  },
22
24
  configuration: {
23
25
  prompt: {
24
26
  settings: true,
25
27
  label: 'Prompt'
26
28
  },
29
+ spellCheck: {
30
+ label: 'Spellcheck',
31
+ settings: false,
32
+ enabled: true
33
+ },
27
34
  lockChoiceOrder: {
28
35
  settings: true,
29
36
  label: 'Lock Choice Order'
@@ -40,9 +47,29 @@ var _default = {
40
47
  settings: true,
41
48
  label: 'Teacher Instructions'
42
49
  },
50
+ choiceRationale: {
51
+ settings: true,
52
+ label: 'Choice Rationale'
53
+ },
43
54
  toolbarEditorPosition: {
44
55
  settings: false,
45
56
  label: 'Toolbar Editor Position'
57
+ },
58
+ maxResponseAreas: 10,
59
+ maxResponseAreaChoices: 10,
60
+ maxImageWidth: {
61
+ teacherInstructions: 300,
62
+ prompt: 300,
63
+ rationale: 300
64
+ },
65
+ maxImageHeight: {
66
+ teacherInstructions: 300,
67
+ prompt: 300,
68
+ rationale: 300
69
+ },
70
+ withRubric: {
71
+ settings: true,
72
+ label: 'Add Rubric'
46
73
  }
47
74
  }
48
75
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaults.js"],"names":["model","disabled","mode","prompt","shuffle","markup","choices","alternateResponse","promptEnabled","rationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","settings","label","lockChoiceOrder","partialScoring","rationale","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,KADL;AAELC,IAAAA,IAAI,EAAE,QAFD;AAGLC,IAAAA,MAAM,EAAE,4CAHH;AAILC,IAAAA,OAAO,EAAE,IAJJ;AAKLC,IAAAA,MAAM,EAAE,EALH;AAMLC,IAAAA,OAAO,EAAE,EANJ;AAOLC,IAAAA,iBAAiB,EAAE,EAPd;AAQLC,IAAAA,aAAa,EAAE,IARV;AASLC,IAAAA,gBAAgB,EAAE,IATb;AAULC,IAAAA,0BAA0B,EAAE,IAVvB;AAWLC,IAAAA,0BAA0B,EAAE,IAXvB;AAYLC,IAAAA,qBAAqB,EAAE;AAZlB,GADM;AAebC,EAAAA,aAAa,EAAE;AACbV,IAAAA,MAAM,EAAE;AACNW,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KADK;AAKbC,IAAAA,eAAe,EAAE;AACfF,MAAAA,QAAQ,EAAE,IADK;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KALJ;AASbE,IAAAA,cAAc,EAAE;AACdH,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE;AAFO,KATH;AAabG,IAAAA,SAAS,EAAE;AACTJ,MAAAA,QAAQ,EAAE,IADD;AAETC,MAAAA,KAAK,EAAE;AAFE,KAbE;AAiBbI,IAAAA,mBAAmB,EAAE;AACnBL,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KAjBR;AAqBbH,IAAAA,qBAAqB,EAAC;AACpBE,MAAAA,QAAQ,EAAE,KADU;AAEpBC,MAAAA,KAAK,EAAE;AAFa;AArBT;AAfF,C","sourcesContent":["export default {\n model: {\n disabled: false,\n mode: 'gather',\n prompt: 'Use the dropdowns to complete the sentence',\n shuffle: true,\n markup: '',\n choices: {},\n alternateResponse: {},\n promptEnabled: true,\n rationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\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 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","disabled","mode","prompt","shuffle","markup","choices","alternateResponse","promptEnabled","rationaleEnabled","choiceRationaleEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","displayType","configuration","settings","label","spellCheck","enabled","lockChoiceOrder","partialScoring","rationale","teacherInstructions","choiceRationale","maxResponseAreas","maxResponseAreaChoices","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,KADL;AAELC,IAAAA,IAAI,EAAE,QAFD;AAGLC,IAAAA,MAAM,EAAE,4CAHH;AAILC,IAAAA,OAAO,EAAE,IAJJ;AAKLC,IA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IAAAA,sBAAsB,EAAE,EAnCX;AAoCbC,IAAAA,aAAa,EAAE;AACbJ,MAAAA,mBAAmB,EAAE,GADR;AAEbpB,MAAAA,MAAM,EAAE,GAFK;AAGbmB,MAAAA,SAAS,EAAE;AAHE,KApCF;AAyCbM,IAAAA,cAAc,EAAE;AACdL,MAAAA,mBAAmB,EAAE,GADP;AAEdpB,MAAAA,MAAM,EAAE,GAFM;AAGdmB,MAAAA,SAAS,EAAE;AAHG,KAzCH;AA8CbO,IAAAA,UAAU,EAAE;AACVb,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,EAAE;AAFG;AA9CC;AAjBF,C","sourcesContent":["export default {\n model: {\n disabled: false,\n mode: 'gather',\n prompt: 'Use the dropdowns to complete the sentence',\n shuffle: true,\n markup: '',\n choices: {},\n alternateResponse: {},\n promptEnabled: true,\n rationaleEnabled: true,\n choiceRationaleEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n displayType: 'block'\n },\n configuration: {\n prompt: {\n settings: true,\n label: 'Prompt'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\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 teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions'\n },\n choiceRationale: {\n settings: true,\n label: 'Choice Rationale'\n },\n toolbarEditorPosition:{\n settings: false,\n label: 'Toolbar Editor Position'\n },\n maxResponseAreas: 10,\n maxResponseAreaChoices: 10,\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n },\n withRubric: {\n settings: true,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
@@ -39,13 +39,13 @@ var _defaults2 = _interopRequireDefault(require("./defaults"));
39
39
 
40
40
  var _markupUtils = require("./markupUtils");
41
41
 
42
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
42
+ 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; }
43
43
 
44
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
44
+ 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; }
45
45
 
46
46
  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); }; }
47
47
 
48
- 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; } }
48
+ 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; } }
49
49
 
50
50
  var log = (0, _debug["default"])('multiple-choice:configure');
51
51
 
@@ -121,6 +121,16 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
121
121
  value: function onDeleteImage(src, done) {
122
122
  this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
123
123
  }
124
+ }, {
125
+ key: "insertSound",
126
+ value: function insertSound(handler) {
127
+ this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
128
+ }
129
+ }, {
130
+ key: "onDeleteSound",
131
+ value: function onDeleteSound(src, done) {
132
+ this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
133
+ }
124
134
  }, {
125
135
  key: "_render",
126
136
  value: function _render() {
@@ -135,6 +145,10 @@ var InlineDropdown = /*#__PURE__*/function (_HTMLElement) {
135
145
  imageSupport: {
136
146
  add: this.insertImage.bind(this),
137
147
  "delete": this.onDeleteImage.bind(this)
148
+ },
149
+ uploadSoundSupport: {
150
+ add: this.insertSound.bind(this),
151
+ "delete": this.onDeleteSound.bind(this)
138
152
  }
139
153
  });
140
154
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["log","InlineDropdown","_model","prepareModel","_configuration","sensibleDefaults","configuration","onModelChanged","bind","onConfigurationChanged","s","_render","c","_disableSidePanel","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","dispatchModelUpdated","handler","InsertImageEvent","src","done","DeleteImageEvent","element","React","createElement","Main","model","disableSidePanel","imageSupport","add","insertImage","onDeleteImage","ReactDOM","render","HTMLElement","currModal","slateMarkup","markup","choices"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAMA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,2BAAN,CAAZ;;IAEqBC,c;;;;;AAiBnB,4BAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAcD,cAAc,CAACE,YAAf,EAAd;AACA,UAAKC,cAAL,GAAsBC,sBAAiBC,aAAvC;AACA,UAAKC,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AACA,UAAKC,sBAAL,GAA8B,MAAKA,sBAAL,CAA4BD,IAA5B,gDAA9B;AALY;AAMb;;;;SAED,aAAUE,CAAV,EAAa;AACX,WAAKR,MAAL,GAAcD,cAAc,CAACE,YAAf,CAA4BO,CAA5B,CAAd;;AACA,WAAKC,OAAL;AACD;;;SAED,aAAkBC,CAAlB,EAAqB;AACnB,WAAKR,cAAL,GAAsB,0BAASQ,CAAT,EAAYP,sBAAiBC,aAA7B,CAAtB;;AACA,WAAKK,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,KAAKf,MAA3B,EAAmCa,UAAnC,CAAnB;AACD;;;WAED,wBAAeG,CAAf,EAAkBJ,KAAlB,EAAyB;AACvB,WAAKZ,MAAL,GAAcD,cAAc,CAACE,YAAf,CAA4Be,CAA5B,CAAd;;AACA,WAAKP,OAAL;;AACA,WAAKQ,oBAAL,CAA0BL,KAA1B;AACD;;;WAED,gCAAuBF,CAAvB,EAA0B;AACxB,WAAKR,cAAL,GAAsBQ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;AACA;;AAJF;AAMD,C","sourcesContent":["import {\n DeleteImageEvent,\n InsertImageEvent,\n ModelUpdatedEvent\n} from '@pie-framework/pie-configure-events';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Main from './main';\nimport debug from 'debug';\nimport defaults from 'lodash/defaults';\n\nimport sensibleDefaults from './defaults';\nimport { processMarkup, createSlateMarkup } from './markupUtils'\n\nconst log = debug('multiple-choice:configure');\n\nexport default class InlineDropdown extends HTMLElement {\n static prepareModel = (model = {}) => {\n const currModal = {\n ...sensibleDefaults.model,\n ...model\n };\n const slateMarkup = model.slateMarkup || createSlateMarkup(currModal.markup, currModal.choices);\n const markup = processMarkup(slateMarkup);\n\n return {\n ...currModal,\n slateMarkup,\n markup\n /*...processedMarkup,*/\n };\n };\n\n constructor() {\n super();\n this._model = InlineDropdown.prepareModel();\n this._configuration = sensibleDefaults.configuration;\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(s) {\n this._model = InlineDropdown.prepareModel(s);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = defaults(c, sensibleDefaults.configuration);\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 = InlineDropdown.prepareModel(m);\n this._render();\n this.dispatchModelUpdated(reset);\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this._render();\n }\n\n /** @param {done, progress, file} handler */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n _render() {\n log('_render');\n let element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n disableSidePanel: this._disableSidePanel,\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this)\n }\n });\n ReactDOM.render(element, this);\n }\n}\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../src/index.js"],"names":["log","InlineDropdown","_model","prepareModel","_configuration","sensibleDefaults","configuration","onModelChanged","bind","onConfigurationChanged","s","_render","c","_disableSidePanel","reset","resetValue","dispatchEvent","ModelUpdatedEvent","m","dispatchModelUpdated","handler","InsertImageEvent","src","done","DeleteImageEvent","InsertSoundEvent","DeleteSoundEvent","element","React","createElement","Main","model","disableSidePanel","imageSupport","add","insertImage","onDeleteImage","uploadSoundSupport","insertSound","onDeleteSound","ReactDOM","render","HTMLElement","currModal","slateMarkup","markup","choices"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;;;;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,2BAAN,CAAZ;;IAEqBC,c;;;;;AAiBnB,4BAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAcD,cAAc,CAACE,YAAf,EAAd;AACA,UAAKC,cAAL,GAAsBC,sBAAiBC,aAAvC;AACA,UAAKC,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AACA,UAAKC,sBAAL,GAA8B,MAAKA,sBAAL,CAA4BD,IAA5B,gDAA9B;AALY;AAMb;;;;SAED,aAAUE,CAAV,EAAa;AACX,WAAKR,MAAL,GAAcD,cAAc,CAACE,YAAf,CAA4BO,CAA5B,CAAd;;AACA,WAAKC,OAAL;AACD;;;SAED,aAAkBC,CAAlB,EAAqB;AACnB,WAAKR,cAAL,GAAsB,0BAASQ,CAAT,EAAYP,sBAAiBC,aAA7B,CAAtB;;AACA,WAAKK,OAAL;AACD;;;SAED,aAAqBD,CAArB,EAAwB;AACtB,WAAKG,iBAAL,GAAyBH,CAAzB;;AACA,WAAKC,OAAL;AACD;;;WAED,8BAAq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AA,YAAY,EAAE;AACZC,UAAAA,GAAG,EAAE,KAAKC,WAAL,CAAiB3B,IAAjB,CAAsB,IAAtB,CADO;AAEZ,oBAAQ,KAAK4B,aAAL,CAAmB5B,IAAnB,CAAwB,IAAxB;AAFI,SANwB;AAUtC6B,QAAAA,kBAAkB,EAAE;AAClBH,UAAAA,GAAG,EAAE,KAAKI,WAAL,CAAiB9B,IAAjB,CAAsB,IAAtB,CADa;AAElB,oBAAQ,KAAK+B,aAAL,CAAmB/B,IAAnB,CAAwB,IAAxB;AAFU;AAVkB,OAA1B,CAAd;;AAeAgC,2BAASC,MAAT,CAAgBd,OAAhB,EAAyB,IAAzB;AACD;;;kDA5FyCe,W;;;iCAAvBzC,c,kBACG,YAAgB;AAAA,MAAf8B,KAAe,uEAAP,EAAO;;AACpC,MAAMY,SAAS,mCACVtC,sBAAiB0B,KADP,GAEVA,KAFU,CAAf;;AAIA,MAAMa,WAAW,GAAGb,KAAK,CAACa,WAAN,IAAqB,oCAAkBD,SAAS,CAACE,MAA5B,EAAoCF,SAAS,CAACG,OAA9C,CAAzC;AACA,MAAMD,MAAM,GAAG,gCAAcD,WAAd,CAAf;AAEA,yCACKD,SADL;AAEEC,IAAAA,WAAW,EAAXA,WAFF;AAGEC,IAAAA,MAAM,EAANA;AACA;;AAJF;AAMD,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 Main from './main';\nimport debug from 'debug';\nimport defaults from 'lodash/defaults';\n\nimport sensibleDefaults from './defaults';\nimport { processMarkup, createSlateMarkup } from './markupUtils'\n\nconst log = debug('multiple-choice:configure');\n\nexport default class InlineDropdown extends HTMLElement {\n static prepareModel = (model = {}) => {\n const currModal = {\n ...sensibleDefaults.model,\n ...model\n };\n const slateMarkup = model.slateMarkup || createSlateMarkup(currModal.markup, currModal.choices);\n const markup = processMarkup(slateMarkup);\n\n return {\n ...currModal,\n slateMarkup,\n markup\n /*...processedMarkup,*/\n };\n };\n\n constructor() {\n super();\n this._model = InlineDropdown.prepareModel();\n this._configuration = sensibleDefaults.configuration;\n this.onModelChanged = this.onModelChanged.bind(this);\n this.onConfigurationChanged = this.onConfigurationChanged.bind(this);\n }\n\n set model(s) {\n this._model = InlineDropdown.prepareModel(s);\n this._render();\n }\n\n set configuration(c) {\n this._configuration = defaults(c, sensibleDefaults.configuration);\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 = InlineDropdown.prepareModel(m);\n this._render();\n this.dispatchModelUpdated(reset);\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this._render();\n }\n\n /** @param {done, progress, file} handler */\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(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged,\n onConfigurationChanged: this.onConfigurationChanged,\n disableSidePanel: this._disableSidePanel,\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"}