@pie-element/select-text 6.5.0 → 6.5.3-next.1014

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,211 @@
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.5.26](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.25...@pie-element/select-text@6.5.26) (2022-03-28)
7
+
8
+ **Note:** Version bump only for package @pie-element/select-text
9
+
10
+
11
+
12
+
13
+
14
+ ## [6.5.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.24...@pie-element/select-text@6.5.25) (2022-03-22)
15
+
16
+ **Note:** Version bump only for package @pie-element/select-text
17
+
18
+
19
+
20
+
21
+
22
+ ## [6.5.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.23...@pie-element/select-text@6.5.24) (2022-03-08)
23
+
24
+ **Note:** Version bump only for package @pie-element/select-text
25
+
26
+
27
+
28
+
29
+
30
+ ## [6.5.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.22...@pie-element/select-text@6.5.23) (2022-03-08)
31
+
32
+ **Note:** Version bump only for package @pie-element/select-text
33
+
34
+
35
+
36
+
37
+
38
+ ## [6.5.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.21...@pie-element/select-text@6.5.22) (2022-02-21)
39
+
40
+ **Note:** Version bump only for package @pie-element/select-text
41
+
42
+
43
+
44
+
45
+
46
+ ## [6.5.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.20...@pie-element/select-text@6.5.21) (2022-02-17)
47
+
48
+ **Note:** Version bump only for package @pie-element/select-text
49
+
50
+
51
+
52
+
53
+
54
+ ## [6.5.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.19...@pie-element/select-text@6.5.20) (2022-02-04)
55
+
56
+ **Note:** Version bump only for package @pie-element/select-text
57
+
58
+
59
+
60
+
61
+
62
+ ## [6.5.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.18...@pie-element/select-text@6.5.19) (2022-01-24)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * Try to re-trigger ([04e6e41](https://github.com/pie-framework/pie-elements/commit/04e6e41d36a630b5d11abb8683d6b08ec0d2b3ec))
68
+ * 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))
69
+
70
+
71
+
72
+
73
+
74
+ ## [6.5.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.17...@pie-element/select-text@6.5.18) (2022-01-10)
75
+
76
+ **Note:** Version bump only for package @pie-element/select-text
77
+
78
+
79
+
80
+
81
+
82
+ ## [6.5.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.16...@pie-element/select-text@6.5.17) (2021-12-23)
83
+
84
+ **Note:** Version bump only for package @pie-element/select-text
85
+
86
+
87
+
88
+
89
+
90
+ ## [6.5.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.14...@pie-element/select-text@6.5.15) (2021-12-13)
91
+
92
+ **Note:** Version bump only for package @pie-element/select-text
93
+
94
+
95
+
96
+
97
+
98
+ ## [6.5.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.11...@pie-element/select-text@6.5.12) (2021-11-29)
99
+
100
+ **Note:** Version bump only for package @pie-element/select-text
101
+
102
+
103
+
104
+
105
+
106
+ ## [6.5.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.8...@pie-element/select-text@6.5.11) (2021-11-11)
107
+
108
+ **Note:** Version bump only for package @pie-element/select-text
109
+
110
+
111
+
112
+
113
+
114
+ ## [6.5.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.2...@pie-element/select-text@6.5.10) (2021-11-11)
115
+
116
+
117
+ ### Bug Fixes
118
+
119
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
120
+ * **select-text:** fix tokens in pits ([975622d](https://github.com/pie-framework/pie-elements/commit/975622dee9ec69d91387de21eef2278b53209a53))
121
+ * move dom logic from controller to player ([2425be1](https://github.com/pie-framework/pie-elements/commit/2425be1e506b153d946b7643f4b024d2e0edfbbb))
122
+ * tokens in player ([e9a8ad7](https://github.com/pie-framework/pie-elements/commit/e9a8ad7205212640e349982cd84fe4d606efbc79))
123
+ * tokens in player ([fc96766](https://github.com/pie-framework/pie-elements/commit/fc96766884b14fed7ad6e476431edde27dffcd52))
124
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
125
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
126
+ * **select-text:** fix initial view of tokens in authoring PD-1235 ([22cbc2c](https://github.com/pie-framework/pie-elements/commit/22cbc2cf58e874e095866bd7b36a0a026fc4f11c))
127
+ * **select-text:** move prepareText function to pie-lib ([26eb7bd](https://github.com/pie-framework/pie-elements/commit/26eb7bd7e9d2804286886a0f92f9993d67f6cf77))
128
+
129
+
130
+
131
+
132
+
133
+
134
+ ## [6.5.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.7...@pie-element/select-text@6.5.8) (2021-10-04)
135
+
136
+ **Note:** Version bump only for package @pie-element/select-text
137
+
138
+
139
+
140
+
141
+
142
+ ## [6.5.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.6...@pie-element/select-text@6.5.7) (2021-10-01)
143
+
144
+
145
+ ### Bug Fixes
146
+
147
+ * Remove breaking import. ([a89168d](https://github.com/pie-framework/pie-elements/commit/a89168ddc8d6986eadf74589994f4b4012040721))
148
+
149
+
150
+
151
+
152
+
153
+ ## [6.5.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.5...@pie-element/select-text@6.5.6) (2021-09-20)
154
+
155
+
156
+ ### Bug Fixes
157
+
158
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
159
+ * **select-text:** fix tokens in pits ([975622d](https://github.com/pie-framework/pie-elements/commit/975622dee9ec69d91387de21eef2278b53209a53))
160
+ * move dom logic from controller to player ([2425be1](https://github.com/pie-framework/pie-elements/commit/2425be1e506b153d946b7643f4b024d2e0edfbbb))
161
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
162
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
163
+ * **select-text:** move prepareText function to pie-lib ([26eb7bd](https://github.com/pie-framework/pie-elements/commit/26eb7bd7e9d2804286886a0f92f9993d67f6cf77))
164
+
165
+
166
+
167
+
168
+
169
+ ## [6.5.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.4...@pie-element/select-text@6.5.5) (2021-09-01)
170
+
171
+ **Note:** Version bump only for package @pie-element/select-text
172
+
173
+
174
+
175
+
176
+
177
+ ## [6.5.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.3...@pie-element/select-text@6.5.4) (2021-08-09)
178
+
179
+
180
+ ### Bug Fixes
181
+
182
+ * tokens in player ([e9a8ad7](https://github.com/pie-framework/pie-elements/commit/e9a8ad7205212640e349982cd84fe4d606efbc79))
183
+ * tokens in player ([fc96766](https://github.com/pie-framework/pie-elements/commit/fc96766884b14fed7ad6e476431edde27dffcd52))
184
+
185
+
186
+
187
+
188
+
189
+ ## [6.5.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.2...@pie-element/select-text@6.5.3) (2021-08-05)
190
+
191
+
192
+ ### Bug Fixes
193
+
194
+ * **select-text:** fix initial view of tokens in authoring PD-1235 ([22cbc2c](https://github.com/pie-framework/pie-elements/commit/22cbc2cf58e874e095866bd7b36a0a026fc4f11c))
195
+
196
+
197
+
198
+
199
+
200
+ ## [6.5.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.5.0...@pie-element/select-text@6.5.2) (2021-08-05)
201
+
202
+
203
+ ### Bug Fixes
204
+
205
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
206
+
207
+
208
+
209
+
210
+
6
211
  # [6.5.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text@6.4.0...@pie-element/select-text@6.5.0) (2021-06-29)
7
212
 
8
213
 
@@ -3,6 +3,166 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.2.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.21...@pie-element/select-text-configure@5.2.22) (2022-03-28)
7
+
8
+ **Note:** Version bump only for package @pie-element/select-text-configure
9
+
10
+
11
+
12
+
13
+
14
+ ## [5.2.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.20...@pie-element/select-text-configure@5.2.21) (2022-03-22)
15
+
16
+ **Note:** Version bump only for package @pie-element/select-text-configure
17
+
18
+
19
+
20
+
21
+
22
+ ## [5.2.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.19...@pie-element/select-text-configure@5.2.20) (2022-03-08)
23
+
24
+ **Note:** Version bump only for package @pie-element/select-text-configure
25
+
26
+
27
+
28
+
29
+
30
+ ## [5.2.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.18...@pie-element/select-text-configure@5.2.19) (2022-03-08)
31
+
32
+ **Note:** Version bump only for package @pie-element/select-text-configure
33
+
34
+
35
+
36
+
37
+
38
+ ## [5.2.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.17...@pie-element/select-text-configure@5.2.18) (2022-02-21)
39
+
40
+ **Note:** Version bump only for package @pie-element/select-text-configure
41
+
42
+
43
+
44
+
45
+
46
+ ## [5.2.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.16...@pie-element/select-text-configure@5.2.17) (2022-02-17)
47
+
48
+ **Note:** Version bump only for package @pie-element/select-text-configure
49
+
50
+
51
+
52
+
53
+
54
+ ## [5.2.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.15...@pie-element/select-text-configure@5.2.16) (2022-02-04)
55
+
56
+ **Note:** Version bump only for package @pie-element/select-text-configure
57
+
58
+
59
+
60
+
61
+
62
+ ## [5.2.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.14...@pie-element/select-text-configure@5.2.15) (2022-01-24)
63
+
64
+ **Note:** Version bump only for package @pie-element/select-text-configure
65
+
66
+
67
+
68
+
69
+
70
+ ## [5.2.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.13...@pie-element/select-text-configure@5.2.14) (2022-01-10)
71
+
72
+ **Note:** Version bump only for package @pie-element/select-text-configure
73
+
74
+
75
+
76
+
77
+
78
+ ## [5.2.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.12...@pie-element/select-text-configure@5.2.13) (2021-12-23)
79
+
80
+ **Note:** Version bump only for package @pie-element/select-text-configure
81
+
82
+
83
+
84
+
85
+
86
+ ## [5.2.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.10...@pie-element/select-text-configure@5.2.11) (2021-12-13)
87
+
88
+ **Note:** Version bump only for package @pie-element/select-text-configure
89
+
90
+
91
+
92
+
93
+
94
+ ## [5.2.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.7...@pie-element/select-text-configure@5.2.8) (2021-11-29)
95
+
96
+ **Note:** Version bump only for package @pie-element/select-text-configure
97
+
98
+
99
+
100
+
101
+
102
+ ## [5.2.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.6...@pie-element/select-text-configure@5.2.7) (2021-10-04)
103
+
104
+ **Note:** Version bump only for package @pie-element/select-text-configure
105
+
106
+
107
+
108
+
109
+
110
+ ## [5.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.5...@pie-element/select-text-configure@5.2.6) (2021-09-20)
111
+
112
+
113
+ ### Bug Fixes
114
+
115
+ * pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
116
+ * Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
117
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
118
+ * **select-text:** move prepareText function to pie-lib ([26eb7bd](https://github.com/pie-framework/pie-elements/commit/26eb7bd7e9d2804286886a0f92f9993d67f6cf77))
119
+
120
+
121
+
122
+
123
+
124
+ ## [5.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.4...@pie-element/select-text-configure@5.2.5) (2021-09-01)
125
+
126
+ **Note:** Version bump only for package @pie-element/select-text-configure
127
+
128
+
129
+
130
+
131
+
132
+ ## [5.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.3...@pie-element/select-text-configure@5.2.4) (2021-08-09)
133
+
134
+
135
+ ### Bug Fixes
136
+
137
+ * tokens in player ([e9a8ad7](https://github.com/pie-framework/pie-elements/commit/e9a8ad7205212640e349982cd84fe4d606efbc79))
138
+ * tokens in player ([fc96766](https://github.com/pie-framework/pie-elements/commit/fc96766884b14fed7ad6e476431edde27dffcd52))
139
+
140
+
141
+
142
+
143
+
144
+ ## [5.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.2...@pie-element/select-text-configure@5.2.3) (2021-08-05)
145
+
146
+
147
+ ### Bug Fixes
148
+
149
+ * **select-text:** fix initial view of tokens in authoring PD-1235 ([22cbc2c](https://github.com/pie-framework/pie-elements/commit/22cbc2cf58e874e095866bd7b36a0a026fc4f11c))
150
+
151
+
152
+
153
+
154
+
155
+ ## [5.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.2.0...@pie-element/select-text-configure@5.2.2) (2021-08-05)
156
+
157
+
158
+ ### Bug Fixes
159
+
160
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
161
+
162
+
163
+
164
+
165
+
6
166
  # [5.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/select-text-configure@5.1.23...@pie-element/select-text-configure@5.2.0) (2021-06-29)
7
167
 
8
168
 
@@ -27,7 +27,8 @@ var _default = {
27
27
  rationaleEnabled: true,
28
28
  promptEnabled: true,
29
29
  teacherInstructionsEnabled: true,
30
- studentInstructionsEnabled: true
30
+ studentInstructionsEnabled: true,
31
+ toolbarEditorPosition: 'bottom'
31
32
  },
32
33
  configuration: {
33
34
  selectionCount: {
@@ -78,6 +79,11 @@ var _default = {
78
79
  settings: true,
79
80
  label: 'Feedback'
80
81
  },
82
+ spellCheck: {
83
+ label: 'Spellcheck',
84
+ settings: false,
85
+ enabled: true
86
+ },
81
87
  partialScoring: {
82
88
  settings: false,
83
89
  label: 'Allow Partial Scoring'
@@ -85,6 +91,17 @@ var _default = {
85
91
  mode: {
86
92
  settings: true,
87
93
  label: 'Mode'
94
+ },
95
+ minTokens: 2,
96
+ maxImageWidth: {
97
+ teacherInstructions: 300,
98
+ prompt: 300,
99
+ rationale: 300
100
+ },
101
+ maxImageHeight: {
102
+ teacherInstructions: 300,
103
+ prompt: 300,
104
+ rationale: 300
88
105
  }
89
106
  }
90
107
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/defaultConfiguration.js"],"names":["tokens","text","start","end","model","highlightChoices","partialScoring","maxSelections","mode","prompt","scoringType","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","configuration","selectionCount","settings","label","correctAnswer","selections","rationale","studentInstructions","teacherInstructions","feedback"],"mappings":";;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;AAAA,SAAM,CACnB;AACEC,IAAAA,IAAI,EAAE,EADR;AAEEC,IAAAA,KAAK,EAAE,CAFT;AAGEC,IAAAA,GAAG,EAAE;AAHP,GADmB,CAAN;AAAA,CAAf;;eAQe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,gBAAgB,EAAE,KADb;AAELC,IAAAA,cAAc,EAAE,KAFX;AAGLC,IAAAA,aAAa,EAAE,CAHV;AAILC,IAAAA,IAAI,EAAE,UAJD;AAKLC,IAAAA,MAAM,EAAE,2BALH;AAMLR,IAAAA,IAAI,EAAE,EAND;AAOLD,IAAAA,MAAM,EAAEA,MAAM,EAPT;AAQLU,IAAAA,WAAW,EAAE,MARR;AASLC,IAAAA,eAAe,EAAE,IATZ;AAULC,IAAAA,gBAAgB,EAAE,IAVb;AAWLC,IAAAA,aAAa,EAAE,IAXV;AAYLC,IAAAA,0BAA0B,EAAE,IAZvB;AAaLC,IAAAA,0BAA0B,EAAE;AAbvB,GADM;AAgBbC,EAAAA,aAAa,EAAE;AACbC,IAAAA,cAAc,EAAE;AACdC,MAAAA,QAAQ,EAAE,IADI;AAEdC,MAAAA,KAAK,EAAE;AAFO,KADH;AAKbC,IAAAA,aAAa,EAAE;AACbF,MAAAA,QAAQ,EAAE,IADG;AAEbC,MAAAA,KAAK,EAAE;AAFM,KALF;AASbE,IAAAA,UAAU,EAAE;AACVH,MAAAA,QAAQ,EAAE,IADA;AAEVC,MAAAA,KAAK,EAAE;AAFG,KATC;AAabd,IAAAA,gBAAgB,EAAE;AAChBa,MAAAA,QAAQ,EAAE,IADM;AAEhBC,MAAAA,KAAK,EAAE;AAFS,KAbL;AAiBbG,IAAAA,SAAS,EAAE;AACTJ,MAAAA,QAAQ,EAAE,IADD;AAETC,MAAAA,KAAK,EAAE;AAFE,KAjBE;AAqBbT,IAAAA,WAAW,EAAE;AACXQ,MAAAA,QAAQ,EAAE,KADC;AAEXC,MAAAA,KAAK,EAAE;AAFI,KArBA;AAyBbI,IAAAA,mBAAmB,EAAE;AACnBL,MAAAA,QAAQ,EAAE,KADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KAzBR;AA6BbK,IAAAA,mBAAmB,EAAE;AACnBN,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KA7BR;AAiCbV,IAAAA,MAAM,EAAE;AACNU,MAAAA,KAAK,EAAE,QADD;AAEND,MAAAA,QAAQ,EAAE;AAFJ,KAjCK;AAqCbjB,IAAAA,IAAI,EAAE;AACJiB,MAAAA,QAAQ,EAAE,IADN;AAEJC,MAAAA,KAAK,EAAE;AAFH,KArCO;AAyCbnB,IAAAA,MAAM,EAAE;AACNkB,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KAzCK;AA6CbM,IAAAA,QAAQ,EAAE;AACRP,MAAAA,QAAQ,EAAE,IADF;AAERC,MAAAA,KAAK,EAAE;AAFC,KA7CG;AAiDbb,IAAAA,cAAc,EAAE;AACdY,MAAAA,QAAQ,EAAE,KADI;AAEdC,MAAAA,KAAK,EAAE;AAFO,KAjDH;AAqDbX,IAAAA,IAAI,EAAE;AACJU,MAAAA,QAAQ,EAAE,IADN;AAEJC,MAAAA,KAAK,EAAE;AAFH;AArDO;AAhBF,C","sourcesContent":["const tokens = () => [\n {\n text: '',\n start: 0,\n end: 0\n }\n];\n\nexport default {\n model: {\n highlightChoices: false,\n partialScoring: false,\n maxSelections: 2,\n mode: 'sentence',\n prompt: 'Question Prompt goes here',\n text: '',\n tokens: tokens(),\n scoringType: 'auto',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true\n },\n configuration: {\n selectionCount: {\n settings: true,\n label: 'Selection count'\n },\n correctAnswer: {\n settings: true,\n label: 'Correct Answers'\n },\n selections: {\n settings: true,\n label: 'Selections Available'\n },\n highlightChoices: {\n settings: true,\n label: 'Highlight choices'\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 prompt: {\n label: 'Prompt',\n settings: true\n },\n text: {\n settings: true,\n label: 'Content'\n },\n tokens: {\n settings: true,\n label: 'Tokens'\n },\n feedback: {\n settings: true,\n label: 'Feedback'\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring'\n },\n mode: {\n settings: true,\n label: 'Mode'\n }\n }\n};\n"],"file":"defaultConfiguration.js"}
1
+ {"version":3,"sources":["../src/defaultConfiguration.js"],"names":["tokens","text","start","end","model","highlightChoices","partialScoring","maxSelections","mode","prompt","scoringType","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","selectionCount","settings","label","correctAnswer","selections","rationale","studentInstructions","teacherInstructions","feedback","spellCheck","enabled","minTokens","maxImageWidth","maxImageHeight"],"mappings":"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","sourcesContent":["const tokens = () => [\n {\n text: '',\n start: 0,\n end: 0\n }\n];\n\nexport default {\n model: {\n highlightChoices: false,\n partialScoring: false,\n maxSelections: 2,\n mode: 'sentence',\n prompt: 'Question Prompt goes here',\n text: '',\n tokens: tokens(),\n scoringType: 'auto',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom'\n },\n configuration: {\n selectionCount: {\n settings: true,\n label: 'Selection count'\n },\n correctAnswer: {\n settings: true,\n label: 'Correct Answers'\n },\n selections: {\n settings: true,\n label: 'Selections Available'\n },\n highlightChoices: {\n settings: true,\n label: 'Highlight choices'\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 prompt: {\n label: 'Prompt',\n settings: true\n },\n text: {\n settings: true,\n label: 'Content'\n },\n tokens: {\n settings: true,\n label: 'Tokens'\n },\n feedback: {\n settings: true,\n label: 'Feedback'\n },\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring'\n },\n mode: {\n settings: true,\n label: 'Mode'\n },\n minTokens: 2,\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 }\n};\n"],"file":"defaultConfiguration.js"}
@@ -39,17 +39,23 @@ var _configUi = require("@pie-lib/config-ui");
39
39
 
40
40
  var _Chip = _interopRequireDefault(require("@material-ui/core/Chip"));
41
41
 
42
+ var _Info = _interopRequireDefault(require("@material-ui/icons/Info"));
43
+
42
44
  var _debug = _interopRequireDefault(require("debug"));
43
45
 
44
46
  var _editableHtml = _interopRequireDefault(require("@pie-lib/editable-html"));
45
47
 
46
- 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; }
48
+ var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
49
+
50
+ var _utils = require("./utils");
47
51
 
48
- 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; }
52
+ 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; }
53
+
54
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
49
55
 
50
56
  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); }; }
51
57
 
52
- 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; } }
58
+ 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; } }
53
59
 
54
60
  var Panel = _configUi.settings.Panel,
55
61
  toggle = _configUi.settings.toggle,
@@ -200,14 +206,42 @@ var Design = /*#__PURE__*/function (_React$Component) {
200
206
  rationale = _ref$rationale === void 0 ? {} : _ref$rationale,
201
207
  _ref$scoringType = _ref.scoringType,
202
208
  scoringType = _ref$scoringType === void 0 ? {} : _ref$scoringType,
209
+ _ref$spellCheck = _ref.spellCheck,
210
+ spellCheck = _ref$spellCheck === void 0 ? {} : _ref$spellCheck,
203
211
  _ref$highlightChoices = _ref.highlightChoices,
204
- highlightChoices = _ref$highlightChoices === void 0 ? {} : _ref$highlightChoices;
212
+ highlightChoices = _ref$highlightChoices === void 0 ? {} : _ref$highlightChoices,
213
+ _ref$maxImageWidth = _ref.maxImageWidth,
214
+ maxImageWidth = _ref$maxImageWidth === void 0 ? {} : _ref$maxImageWidth,
215
+ _ref$maxImageHeight = _ref.maxImageHeight,
216
+ maxImageHeight = _ref$maxImageHeight === void 0 ? {} : _ref$maxImageHeight;
205
217
 
206
218
  var _ref2 = model || {},
207
219
  teacherInstructionsEnabled = _ref2.teacherInstructionsEnabled,
208
220
  promptEnabled = _ref2.promptEnabled,
209
221
  rationaleEnabled = _ref2.rationaleEnabled,
210
- feedbackEnabled = _ref2.feedbackEnabled;
222
+ spellCheckEnabled = _ref2.spellCheckEnabled,
223
+ feedbackEnabled = _ref2.feedbackEnabled,
224
+ errors = _ref2.errors;
225
+
226
+ var toolbarOpts = {};
227
+
228
+ var _ref3 = errors || {},
229
+ tokensError = _ref3.tokensError,
230
+ selectionsError = _ref3.selectionsError;
231
+
232
+ var validationMessage = (0, _utils.generateValidationMessage)(configuration);
233
+ var defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
234
+ var defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
235
+
236
+ switch (model.toolbarEditorPosition) {
237
+ case 'top':
238
+ toolbarOpts.position = 'top';
239
+ break;
240
+
241
+ default:
242
+ toolbarOpts.position = 'bottom';
243
+ break;
244
+ }
211
245
 
212
246
  var tokensModel = model.tokens;
213
247
  tokensModel = tokensModel || [];
@@ -231,6 +265,7 @@ var Design = /*#__PURE__*/function (_React$Component) {
231
265
  studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),
232
266
  promptEnabled: prompt.settings && toggle(prompt.label),
233
267
  rationaleEnabled: rationale.settings && toggle(rationale.label),
268
+ spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),
234
269
  scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric'])
235
270
  }
236
271
  }
@@ -245,7 +280,11 @@ var Design = /*#__PURE__*/function (_React$Component) {
245
280
  markup: model.teacherInstructions || '',
246
281
  onChange: this.onTeacherInstructionsChanged,
247
282
  imageSupport: imageSupport,
248
- nonEmpty: false
283
+ nonEmpty: false,
284
+ toolbarOpts: toolbarOpts,
285
+ spellCheck: spellCheckEnabled,
286
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
287
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight
249
288
  })), promptEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
250
289
  label: prompt.label || '',
251
290
  className: classes.promptHolder
@@ -253,7 +292,11 @@ var Design = /*#__PURE__*/function (_React$Component) {
253
292
  className: classes.prompt,
254
293
  markup: model.prompt,
255
294
  onChange: this.onPromptChanged,
256
- imageSupport: imageSupport
295
+ imageSupport: imageSupport,
296
+ toolbarOpts: toolbarOpts,
297
+ spellCheck: spellCheckEnabled,
298
+ maxImageWidth: defaultImageMaxWidth,
299
+ maxImageHeight: defaultImageMaxHeight
257
300
  })), rationaleEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
258
301
  label: rationale.label || '',
259
302
  className: classes.promptHolder
@@ -261,22 +304,47 @@ var Design = /*#__PURE__*/function (_React$Component) {
261
304
  className: classes.prompt,
262
305
  markup: model.rationale || '',
263
306
  onChange: this.onRationaleChanged,
264
- imageSupport: imageSupport
307
+ imageSupport: imageSupport,
308
+ toolbarOpts: toolbarOpts,
309
+ spellCheck: spellCheckEnabled,
310
+ maxImageWidth: maxImageWidth && maxImageWidth.rationale || defaultImageMaxWidth,
311
+ maxImageHeight: maxImageHeight && maxImageHeight.rationale || defaultImageMaxHeight
265
312
  })), text.settings && /*#__PURE__*/_react["default"].createElement(_TextField["default"], {
266
313
  label: text.label,
267
314
  className: classes.input,
268
315
  multiline: true,
269
316
  value: textValue,
270
- onChange: this.changeText
317
+ onChange: this.changeText,
318
+ spellCheck: spellCheckEnabled
271
319
  }), tokens.settings && /*#__PURE__*/_react["default"].createElement(_configUi.InputContainer, {
272
320
  label: tokens.label || '',
273
321
  className: classes.tokenizerContainer
274
- }, /*#__PURE__*/_react["default"].createElement(_textSelect.Tokenizer, {
322
+ }, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
323
+ classes: {
324
+ tooltip: classes.tooltip
325
+ },
326
+ disableFocusListener: true,
327
+ disableTouchListener: true,
328
+ placement: 'right',
329
+ title: validationMessage
330
+ }, /*#__PURE__*/_react["default"].createElement(_Info["default"], {
331
+ fontSize: 'small',
332
+ color: 'primary',
333
+ style: {
334
+ position: 'absolute',
335
+ left: '40px',
336
+ top: '-3px'
337
+ }
338
+ })), /*#__PURE__*/_react["default"].createElement(_textSelect.Tokenizer, {
275
339
  className: classes.tokenizer,
276
340
  text: model.text,
277
341
  tokens: tokensModel,
278
342
  onChange: this.changeTokens
279
- })), mode.settings && /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
343
+ })), tokensError && /*#__PURE__*/_react["default"].createElement("div", {
344
+ className: classes.errorText
345
+ }, tokensError), selectionsError && /*#__PURE__*/_react["default"].createElement("div", {
346
+ className: classes.errorText
347
+ }, selectionsError), mode.settings && /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
280
348
  label: "".concat(mode.label, ": ").concat(model.mode ? model.mode : 'None'),
281
349
  className: classes.chip
282
350
  }), selections.settings && /*#__PURE__*/_react["default"].createElement(_Chip["default"], {
@@ -298,7 +366,8 @@ var Design = /*#__PURE__*/function (_React$Component) {
298
366
  className: classes.numberField
299
367
  }), feedbackEnabled && /*#__PURE__*/_react["default"].createElement(_configUi.FeedbackConfig, {
300
368
  feedback: model.feedback,
301
- onChange: this.changeFeedback
369
+ onChange: this.changeFeedback,
370
+ toolbarOpts: toolbarOpts
302
371
  })));
303
372
  }
304
373
  }]);
@@ -318,6 +387,7 @@ exports.Design = Design;
318
387
  })
319
388
  });
320
389
  (0, _defineProperty2["default"])(Design, "defaultProps", {});
390
+ ;
321
391
 
322
392
  var _default = (0, _styles.withStyles)(function (theme) {
323
393
  return {
@@ -365,6 +435,16 @@ var _default = (0, _styles.withStyles)(function (theme) {
365
435
  },
366
436
  numberField: {
367
437
  width: '180px'
438
+ },
439
+ tooltip: {
440
+ fontSize: '12px',
441
+ whiteSpace: 'pre',
442
+ maxWidth: '500px'
443
+ },
444
+ errorText: {
445
+ fontSize: '12px',
446
+ color: 'red',
447
+ padding: '5px 0'
368
448
  }
369
449
  };
370
450
  })(Design);