@pie-element/extended-text-entry 6.7.8 → 6.8.1-beta.1443
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 +402 -0
- package/README.md +1 -1
- package/configure/CHANGELOG.md +371 -0
- package/configure/lib/defaults.js +37 -0
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/index.js +75 -5
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/main.js +93 -55
- package/configure/lib/main.js.map +1 -1
- package/configure/package.json +4 -4
- package/controller/CHANGELOG.md +60 -0
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +13 -6
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +2 -2
- package/docs/config-schema.json +174 -0
- package/docs/config-schema.json.md +133 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +4 -3
- package/docs/demo/index.html +1 -1
- package/docs/demo/session.js +1 -1
- package/docs/pie-schema.json +82 -0
- package/docs/pie-schema.json.md +67 -0
- package/lib/index.js +12 -3
- package/lib/index.js.map +1 -1
- package/lib/main.js +35 -11
- package/lib/main.js.map +1 -1
- package/lib/print.js +2 -2
- package/lib/print.js.map +1 -1
- package/package.json +5 -5
- package/module/configure.js +0 -386
- package/module/controller.js +0 -96
- package/module/demo.js +0 -36
- package/module/element.js +0 -33601
- package/module/index.html +0 -21
- package/module/manifest.json +0 -22
- package/module/print-demo.js +0 -74
- package/module/print.html +0 -18
- package/module/print.js +0 -33566
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,377 @@
|
|
|
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.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@7.1.0...@pie-element/extended-text-entry-configure@7.2.0) (2023-01-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* update pie-libs ([6423903](https://github.com/pie-framework/pie-elements/commit/6423903898b041f56db2111de2e4aac4ee9f1fd3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [7.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@7.0.1...@pie-element/extended-text-entry-configure@7.1.0) (2023-01-05)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* update pie-libs ([b174476](https://github.com/pie-framework/pie-elements/commit/b174476729119a0689f1f8adfc8c235246676cab))
|
|
23
|
+
* update pie-libs ([f72c3c8](https://github.com/pie-framework/pie-elements/commit/f72c3c8d8bc9bbf061bb81502317157a63c22972))
|
|
24
|
+
* update pie-libs ([8490729](https://github.com/pie-framework/pie-elements/commit/8490729a2389d36fd3968f0806119fde96577842))
|
|
25
|
+
* **extended-text-entry:** added configuration prop to hide the settings panel PD-1999 ([ca137ff](https://github.com/pie-framework/pie-elements/commit/ca137fffaac68d645f36b1bc41eeec3a0dcac3ba))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [7.0.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@7.0.0...@pie-element/extended-text-entry-configure@7.0.1) (2022-12-21)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* updated pie-libs ([8cb5b90](https://github.com/pie-framework/pie-elements/commit/8cb5b90d501ccbdf5ffd764e6555faa48b8f54d6))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
# [7.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.3.4...@pie-element/extended-text-entry-configure@7.0.0) (2022-12-20)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Bug Fixes
|
|
46
|
+
|
|
47
|
+
* **extended-text-entry:** update default label for player's spellcheck property in settings panel ([597996d](https://github.com/pie-framework/pie-elements/commit/597996da5e8042c7d9bf1257a8fb1ff0077996c8))
|
|
48
|
+
* updated pie-libs ([6549302](https://github.com/pie-framework/pie-elements/commit/65493026fbf356c5ab752ae6a14d961d4b256368))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
* **extended-text-entry:** flip the meaning of the spellCheck property in player ([f07fe0c](https://github.com/pie-framework/pie-elements/commit/f07fe0c27c36fa9343bff401543a5d711a2603ae))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Performance Improvements
|
|
57
|
+
|
|
58
|
+
* **extended-text-entry:** replace playerSpellCheckEnable with playerSpellCheckDisabled and change the meaning of spellcheckEnabled for player ([bc20d02](https://github.com/pie-framework/pie-elements/commit/bc20d021fe64f24e743e2f56d8c235ecb60c9eeb))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
### BREAKING CHANGES
|
|
62
|
+
|
|
63
|
+
* **extended-text-entry:** The playerSpellCheckEnable property is replaced by playerSpellCheckDisabled propery.
|
|
64
|
+
The default bahaviour is to disable the spellcheck for the player.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [6.3.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.3.3...@pie-element/extended-text-entry-configure@6.3.4) (2022-12-07)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
### Bug Fixes
|
|
74
|
+
|
|
75
|
+
* update libs ([441f403](https://github.com/pie-framework/pie-elements/commit/441f403870b7bec0d61fab58b8d93dbe0ead4c32))
|
|
76
|
+
* update libs for PD-2030 PD-2031 ([3174022](https://github.com/pie-framework/pie-elements/commit/3174022d45603ed217bbe8804a142b07084636a5))
|
|
77
|
+
* updated lib PD-1715 ([42e788d](https://github.com/pie-framework/pie-elements/commit/42e788db0c792838994e55001952da7701251a8e))
|
|
78
|
+
* updated libs ([c20de3a](https://github.com/pie-framework/pie-elements/commit/c20de3a6ba4499a090c809e18e52588d2a585fa0))
|
|
79
|
+
* updated libs ([0eed79a](https://github.com/pie-framework/pie-elements/commit/0eed79a32c3b777c16c8cabf201513fc1d2726a0))
|
|
80
|
+
* updated libs ([343c9ec](https://github.com/pie-framework/pie-elements/commit/343c9ec3dccba7f781e90ae2bd195cac6f78f467))
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## [6.3.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.3.2...@pie-element/extended-text-entry-configure@6.3.3) (2022-11-15)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## [6.3.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.3.1...@pie-element/extended-text-entry-configure@6.3.2) (2022-11-11)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Bug Fixes
|
|
98
|
+
|
|
99
|
+
* add sanity checks ([1cfd187](https://github.com/pie-framework/pie-elements/commit/1cfd187d2c2bab2d589aa2d7b7563b1c69e3295e))
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [6.3.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.3.0...@pie-element/extended-text-entry-configure@6.3.1) (2022-11-11)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Bug Fixes
|
|
109
|
+
|
|
110
|
+
* **extended-text-entry:** add sanity checks for withRubric ([01ee1db](https://github.com/pie-framework/pie-elements/commit/01ee1db32ec5f6d6fc2602ee5d25ad5204ede456))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# [6.3.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.2.2...@pie-element/extended-text-entry-configure@6.3.0) (2022-11-01)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
### Features
|
|
120
|
+
|
|
121
|
+
* add a different property in the config, forceEnabled, to force a value ([300c664](https://github.com/pie-framework/pie-elements/commit/300c664618f46177137deef3bced2d096cdb8126))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## [6.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.2.1...@pie-element/extended-text-entry-configure@6.2.2) (2022-11-01)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
* trigger updating model depending on configuration.withRubric ([6b42963](https://github.com/pie-framework/pie-elements/commit/6b429639dade1f72e77e972530ab784c5417384c))
|
|
133
|
+
* trigger updating model depending on configuration.withRubric (added additional check) ([02ae9c0](https://github.com/pie-framework/pie-elements/commit/02ae9c0664aa140d6624643b6efbdef33cea2acb))
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## [6.2.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.2.0...@pie-element/extended-text-entry-configure@6.2.1) (2022-10-31)
|
|
140
|
+
|
|
141
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
# [6.2.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.9...@pie-element/extended-text-entry-configure@6.2.0) (2022-10-17)
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
### Bug Fixes
|
|
151
|
+
|
|
152
|
+
* update snapshots ([9781596](https://github.com/pie-framework/pie-elements/commit/978159686bbbd6b727dff4b88ce4ab9606504586))
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Features
|
|
156
|
+
|
|
157
|
+
* set withRubric to false in item default configurations. Set rubricEnabled to true if it's enabled for drawing-response and extended-text-entry ([a209057](https://github.com/pie-framework/pie-elements/commit/a209057f5a3fa5438efc8595453c89c11959a8f5))
|
|
158
|
+
* update libs ([7e174fb](https://github.com/pie-framework/pie-elements/commit/7e174fba75e7ea668900ad5c103751cefe33e2af))
|
|
159
|
+
* **extended-text-entry:** add pie-api config PD-23 ([59c151a](https://github.com/pie-framework/pie-elements/commit/59c151a668e6caf8828ee48547fbd34c0645f863))
|
|
160
|
+
* **extended-text-entry:** add settings to enable rubric. Add withRubric prop to configuration and rubricEnabled prop to model PD-2098 ([1046c20](https://github.com/pie-framework/pie-elements/commit/1046c207db5d1246479ec2daf6219cb30a10ec00))
|
|
161
|
+
* **extended-text-entry:** updated snapshot PD-2098 ([1c06fc3](https://github.com/pie-framework/pie-elements/commit/1c06fc37827b6aa93cbfaeedb43207408c910f3c))
|
|
162
|
+
* enable spanish and special characters in author PD-2120 ([85fd3dd](https://github.com/pie-framework/pie-elements/commit/85fd3dd0fc10da1a2dfd5a842809c625790f8ba9))
|
|
163
|
+
* **extended-text-entry:** add uploadSoundSupport property PD-23-updated ([bf1ce39](https://github.com/pie-framework/pie-elements/commit/bf1ce390aa95e0ae9b937391a08e70139e842aaa))
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## [6.1.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.8...@pie-element/extended-text-entry-configure@6.1.9) (2022-09-29)
|
|
170
|
+
|
|
171
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
## [6.1.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.7...@pie-element/extended-text-entry-configure@6.1.8) (2022-09-14)
|
|
178
|
+
|
|
179
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## [6.1.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.6...@pie-element/extended-text-entry-configure@6.1.7) (2022-08-31)
|
|
186
|
+
|
|
187
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
## [6.1.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.5...@pie-element/extended-text-entry-configure@6.1.6) (2022-08-16)
|
|
194
|
+
|
|
195
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
## [6.1.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.4...@pie-element/extended-text-entry-configure@6.1.5) (2022-08-08)
|
|
202
|
+
|
|
203
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## [6.1.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.3...@pie-element/extended-text-entry-configure@6.1.4) (2022-08-02)
|
|
210
|
+
|
|
211
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
## [6.1.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.2...@pie-element/extended-text-entry-configure@6.1.3) (2022-07-22)
|
|
218
|
+
|
|
219
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## [6.1.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.1...@pie-element/extended-text-entry-configure@6.1.2) (2022-07-20)
|
|
226
|
+
|
|
227
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## [6.1.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.1.0...@pie-element/extended-text-entry-configure@6.1.1) (2022-07-19)
|
|
234
|
+
|
|
235
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
# [6.1.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@6.0.0...@pie-element/extended-text-entry-configure@6.1.0) (2022-06-28)
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
### Features
|
|
245
|
+
|
|
246
|
+
* **extended-text-entry:** add maxImageWidth and maxImageHeight props PD-1801 ([82b1404](https://github.com/pie-framework/pie-elements/commit/82b1404a25c67d21599c916574a9caa66b536584))
|
|
247
|
+
* **input:** added configurability for inserting spanish and special characters [PD-1461], [PD-1462] ([11f381e](https://github.com/pie-framework/pie-elements/commit/11f381ea44a3ae2b2c5c189dc53932d689c8e044))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# [6.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.21...@pie-element/extended-text-entry-configure@6.0.0) (2022-06-28)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### chore
|
|
257
|
+
|
|
258
|
+
* Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
### BREAKING CHANGES
|
|
262
|
+
|
|
263
|
+
* Image percent buttons were removed from toolbar.
|
|
264
|
+
New properties maxImageWidth and maxImageHeight were added.
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
## [5.4.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.20...@pie-element/extended-text-entry-configure@5.4.21) (2022-06-13)
|
|
271
|
+
|
|
272
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
## [5.4.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.19...@pie-element/extended-text-entry-configure@5.4.20) (2022-05-30)
|
|
279
|
+
|
|
280
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
## [5.4.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.18...@pie-element/extended-text-entry-configure@5.4.19) (2022-05-16)
|
|
287
|
+
|
|
288
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
## [5.4.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.17...@pie-element/extended-text-entry-configure@5.4.18) (2022-05-09)
|
|
295
|
+
|
|
296
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
## [5.4.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.16...@pie-element/extended-text-entry-configure@5.4.17) (2022-05-03)
|
|
303
|
+
|
|
304
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## [5.4.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.15...@pie-element/extended-text-entry-configure@5.4.16) (2022-04-12)
|
|
311
|
+
|
|
312
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
## [5.4.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.14...@pie-element/extended-text-entry-configure@5.4.15) (2022-03-28)
|
|
319
|
+
|
|
320
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
## [5.4.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.13...@pie-element/extended-text-entry-configure@5.4.14) (2022-03-22)
|
|
327
|
+
|
|
328
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
## [5.4.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.12...@pie-element/extended-text-entry-configure@5.4.13) (2022-03-08)
|
|
335
|
+
|
|
336
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
## [5.4.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.11...@pie-element/extended-text-entry-configure@5.4.12) (2022-03-08)
|
|
343
|
+
|
|
344
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
## [5.4.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.10...@pie-element/extended-text-entry-configure@5.4.11) (2022-02-21)
|
|
351
|
+
|
|
352
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
## [5.4.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.9...@pie-element/extended-text-entry-configure@5.4.10) (2022-02-04)
|
|
359
|
+
|
|
360
|
+
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
## [5.4.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.8...@pie-element/extended-text-entry-configure@5.4.9) (2022-01-24)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
### Bug Fixes
|
|
370
|
+
|
|
371
|
+
* **math-inline, extended-text-entry:** use new editors ([2123b8a](https://github.com/pie-framework/pie-elements/commit/2123b8a6d930852a629140053a8459dbc75f281f))
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
|
|
6
377
|
## [5.4.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/extended-text-entry-configure@5.4.7...@pie-element/extended-text-entry-configure@5.4.8) (2022-01-10)
|
|
7
378
|
|
|
8
379
|
**Note:** Version bump only for package @pie-element/extended-text-entry-configure
|
|
@@ -12,12 +12,16 @@ var _default = {
|
|
|
12
12
|
},
|
|
13
13
|
prompt: 'This is the question prompt',
|
|
14
14
|
mathInput: false,
|
|
15
|
+
spanishInput: false,
|
|
16
|
+
specialInput: false,
|
|
15
17
|
equationEditor: 'Grade 8 - HS',
|
|
16
18
|
feedbackEnabled: true,
|
|
17
19
|
rationaleEnabled: true,
|
|
18
20
|
promptEnabled: true,
|
|
19
21
|
teacherInstructionsEnabled: true,
|
|
20
22
|
studentInstructionsEnabled: true,
|
|
23
|
+
spellCheckEnabled: true,
|
|
24
|
+
playerSpellCheckDisabled: true,
|
|
21
25
|
toolbarEditorPosition: 'bottom'
|
|
22
26
|
},
|
|
23
27
|
configuration: {
|
|
@@ -25,6 +29,16 @@ var _default = {
|
|
|
25
29
|
settings: true,
|
|
26
30
|
label: 'Text-Entry Display Size'
|
|
27
31
|
},
|
|
32
|
+
spellCheck: {
|
|
33
|
+
label: 'Spellcheck',
|
|
34
|
+
settings: false,
|
|
35
|
+
enabled: true
|
|
36
|
+
},
|
|
37
|
+
playerSpellCheck: {
|
|
38
|
+
label: 'Disable Student Spellcheck',
|
|
39
|
+
settings: true,
|
|
40
|
+
enabled: true
|
|
41
|
+
},
|
|
28
42
|
equationEditor: {
|
|
29
43
|
settings: false,
|
|
30
44
|
label: 'Equation Editor',
|
|
@@ -39,6 +53,17 @@ var _default = {
|
|
|
39
53
|
label: 'Student response can include math notation',
|
|
40
54
|
enabled: false
|
|
41
55
|
},
|
|
56
|
+
settingsPanelDisabled: false,
|
|
57
|
+
spanishInput: {
|
|
58
|
+
settings: true,
|
|
59
|
+
label: 'Students can insert Spanish',
|
|
60
|
+
enabled: false
|
|
61
|
+
},
|
|
62
|
+
specialInput: {
|
|
63
|
+
settings: true,
|
|
64
|
+
label: 'Students can insert Special Characters',
|
|
65
|
+
enabled: false
|
|
66
|
+
},
|
|
42
67
|
multiple: {
|
|
43
68
|
settings: false,
|
|
44
69
|
label: 'Multiple Parts',
|
|
@@ -55,6 +80,18 @@ var _default = {
|
|
|
55
80
|
teacherInstructions: {
|
|
56
81
|
settings: true,
|
|
57
82
|
label: 'Teacher Instructions'
|
|
83
|
+
},
|
|
84
|
+
maxImageWidth: {
|
|
85
|
+
teacherInstructions: 300,
|
|
86
|
+
prompt: 300
|
|
87
|
+
},
|
|
88
|
+
maxImageHeight: {
|
|
89
|
+
teacherInstructions: 300,
|
|
90
|
+
prompt: 300
|
|
91
|
+
},
|
|
92
|
+
withRubric: {
|
|
93
|
+
settings: false,
|
|
94
|
+
label: 'Add Rubric'
|
|
58
95
|
}
|
|
59
96
|
}
|
|
60
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","settings","label","enabled","feedback","multiple","studentInstructions","teacherInstructions"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","dimensions","height","width","prompt","mathInput","spanishInput","specialInput","equationEditor","feedbackEnabled","rationaleEnabled","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","spellCheckEnabled","playerSpellCheckDisabled","toolbarEditorPosition","configuration","settings","label","spellCheck","enabled","playerSpellCheck","feedback","settingsPanelDisabled","multiple","studentInstructions","teacherInstructions","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,UAAU,EAAE;AACVC,MAAAA,MAAM,EAAE,GADE;AAEVC,MAAAA,KAAK,EAAE;AAFG,KADP;AAKLC,IAAAA,MAAM,EAAE,6BALH;AAMLC,IAAAA,SAAS,EAAE,KANN;AAOLC,IAAAA,YAAY,EAAE,KAPT;AAQLC,IAAAA,YAAY,EAAE,KART;A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AmCbd,IAAAA,YAAY,EAAE;AACZW,MAAAA,QAAQ,EAAE,IADE;AAEZC,MAAAA,KAAK,EAAE,wCAFK;AAGZE,MAAAA,OAAO,EAAE;AAHG,KAnCD;AAwCbI,IAAAA,QAAQ,EAAE;AACRP,MAAAA,QAAQ,EAAE,KADF;AAERC,MAAAA,KAAK,EAAE,gBAFC;AAGRE,MAAAA,OAAO,EAAE;AAHD,KAxCG;AA6CbK,IAAAA,mBAAmB,EAAE;AACnBR,MAAAA,QAAQ,EAAE,KADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KA7CR;AAiDbf,IAAAA,MAAM,EAAE;AACNc,MAAAA,QAAQ,EAAE,IADJ;AAENC,MAAAA,KAAK,EAAE;AAFD,KAjDK;AAqDbQ,IAAAA,mBAAmB,EAAE;AACnBT,MAAAA,QAAQ,EAAE,IADS;AAEnBC,MAAAA,KAAK,EAAE;AAFY,KArDR;AAyDbS,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE,GADR;AAEbvB,MAAAA,MAAM,EAAE;AAFK,KAzDF;AA6DbyB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdvB,MAAAA,MAAM,EAAE;AAFM,KA7DH;AAiEb0B,IAAAA,UAAU,EAAE;AACVZ,MAAAA,QAAQ,EAAE,KADA;AAEVC,MAAAA,KAAK,EAAE;AAFG;AAjEC;AApBF,C","sourcesContent":["export default {\n model: {\n dimensions: {\n height: 100,\n width: 500,\n },\n prompt: 'This is the question prompt',\n mathInput: false,\n spanishInput: false,\n specialInput: false,\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: true,\n rationaleEnabled: true,\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n spellCheckEnabled: true,\n playerSpellCheckDisabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size',\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n playerSpellCheck: {\n label: 'Disable Student Spellcheck',\n settings: true,\n enabled: true,\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n settingsPanelDisabled: false,\n spanishInput: {\n settings: true,\n label: 'Students can insert Spanish',\n enabled: false,\n },\n specialInput: {\n settings: true,\n label: 'Students can insert Special Characters',\n enabled: false,\n },\n multiple: {\n settings: false,\n label: 'Multiple Parts',\n enabled: false,\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n },\n};\n"],"file":"defaults.js"}
|
package/configure/lib/index.js
CHANGED
|
@@ -7,10 +7,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports["default"] = void 0;
|
|
9
9
|
|
|
10
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
11
|
+
|
|
12
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
13
|
+
|
|
10
14
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
15
|
|
|
12
16
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
17
|
|
|
18
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
19
|
+
|
|
14
20
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
21
|
|
|
16
22
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
@@ -31,9 +37,9 @@ var _main = _interopRequireDefault(require("./main"));
|
|
|
31
37
|
|
|
32
38
|
var _defaults = _interopRequireDefault(require("./defaults"));
|
|
33
39
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
40
|
+
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; }
|
|
35
41
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
42
|
+
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; }
|
|
37
43
|
|
|
38
44
|
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); }; }
|
|
39
45
|
|
|
@@ -49,21 +55,51 @@ var ExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
|
|
|
49
55
|
|
|
50
56
|
(0, _classCallCheck2["default"])(this, ExtendedTextEntry);
|
|
51
57
|
_this = _super.call(this);
|
|
52
|
-
_this
|
|
58
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "verifyRubric", /*#__PURE__*/function () {
|
|
59
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(c) {
|
|
60
|
+
var _ref2, _ref2$withRubric, withRubric;
|
|
61
|
+
|
|
62
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
63
|
+
while (1) {
|
|
64
|
+
switch (_context.prev = _context.next) {
|
|
65
|
+
case 0:
|
|
66
|
+
_ref2 = c || {}, _ref2$withRubric = _ref2.withRubric, withRubric = _ref2$withRubric === void 0 ? {} : _ref2$withRubric;
|
|
67
|
+
|
|
68
|
+
if (withRubric !== null && withRubric !== void 0 && withRubric.forceEnabled && !_this._model.rubricEnabled) {
|
|
69
|
+
_this._model.rubricEnabled = true;
|
|
70
|
+
|
|
71
|
+
_this.dispatchEvent(new _pieConfigureEvents.ModelUpdatedEvent(_this._model));
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
case 2:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}, _callee);
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
return function (_x) {
|
|
83
|
+
return _ref.apply(this, arguments);
|
|
84
|
+
};
|
|
85
|
+
}());
|
|
53
86
|
_this._configuration = _defaults["default"].configuration;
|
|
87
|
+
_this._model = ExtendedTextEntry.createDefaultModel({}, _this._configuration);
|
|
88
|
+
_this.onModelChanged = _this.onModelChanged.bind((0, _assertThisInitialized2["default"])(_this));
|
|
54
89
|
return _this;
|
|
55
90
|
}
|
|
56
91
|
|
|
57
92
|
(0, _createClass2["default"])(ExtendedTextEntry, [{
|
|
58
93
|
key: "model",
|
|
59
94
|
set: function set(m) {
|
|
60
|
-
this._model = ExtendedTextEntry.createDefaultModel(m);
|
|
95
|
+
this._model = ExtendedTextEntry.createDefaultModel(m, this._configuration);
|
|
61
96
|
this.render();
|
|
62
97
|
}
|
|
63
98
|
}, {
|
|
64
99
|
key: "configuration",
|
|
65
100
|
set: function set(c) {
|
|
66
101
|
this._configuration = _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
|
|
102
|
+
this.verifyRubric(this._configuration);
|
|
67
103
|
this.render();
|
|
68
104
|
}
|
|
69
105
|
}, {
|
|
@@ -79,6 +115,14 @@ var ExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
|
|
|
79
115
|
this._configuration = _objectSpread(_objectSpread({}, _defaults["default"].configuration), c);
|
|
80
116
|
|
|
81
117
|
if (this._model) {
|
|
118
|
+
var _ref3 = c || {},
|
|
119
|
+
_ref3$withRubric = _ref3.withRubric,
|
|
120
|
+
withRubric = _ref3$withRubric === void 0 ? {} : _ref3$withRubric;
|
|
121
|
+
|
|
122
|
+
if (withRubric !== null && withRubric !== void 0 && withRubric.forceEnabled) {
|
|
123
|
+
this._model.rubricEnabled = true;
|
|
124
|
+
}
|
|
125
|
+
|
|
82
126
|
this.onModelChanged(this._model);
|
|
83
127
|
}
|
|
84
128
|
|
|
@@ -99,9 +143,21 @@ var ExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
|
|
|
99
143
|
value: function onDeleteImage(src, done) {
|
|
100
144
|
this.dispatchEvent(new _pieConfigureEvents.DeleteImageEvent(src, done));
|
|
101
145
|
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "insertSound",
|
|
148
|
+
value: function insertSound(handler) {
|
|
149
|
+
this.dispatchEvent(new _pieConfigureEvents.InsertSoundEvent(handler));
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "onDeleteSound",
|
|
153
|
+
value: function onDeleteSound(src, done) {
|
|
154
|
+
this.dispatchEvent(new _pieConfigureEvents.DeleteSoundEvent(src, done));
|
|
155
|
+
}
|
|
102
156
|
}, {
|
|
103
157
|
key: "render",
|
|
104
158
|
value: function render() {
|
|
159
|
+
console.log('this._model.rubricEnabled', this._model.rubricEnabled);
|
|
160
|
+
|
|
105
161
|
if (this._model) {
|
|
106
162
|
var element = /*#__PURE__*/_react["default"].createElement(_main["default"], {
|
|
107
163
|
model: this._model,
|
|
@@ -111,6 +167,10 @@ var ExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
|
|
|
111
167
|
imageSupport: {
|
|
112
168
|
add: this.insertImage.bind(this),
|
|
113
169
|
"delete": this.onDeleteImage.bind(this)
|
|
170
|
+
},
|
|
171
|
+
uploadSoundSupport: {
|
|
172
|
+
add: this.insertSound.bind(this),
|
|
173
|
+
"delete": this.onDeleteSound.bind(this)
|
|
114
174
|
}
|
|
115
175
|
});
|
|
116
176
|
|
|
@@ -123,7 +183,17 @@ var ExtendedTextEntry = /*#__PURE__*/function (_HTMLElement) {
|
|
|
123
183
|
|
|
124
184
|
exports["default"] = ExtendedTextEntry;
|
|
125
185
|
(0, _defineProperty2["default"])(ExtendedTextEntry, "createDefaultModel", function () {
|
|
186
|
+
var _config$withRubric;
|
|
187
|
+
|
|
126
188
|
var model = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
127
|
-
|
|
189
|
+
var config = arguments.length > 1 ? arguments[1] : undefined;
|
|
190
|
+
|
|
191
|
+
var defaultModel = _objectSpread(_objectSpread({}, _defaults["default"].model), model);
|
|
192
|
+
|
|
193
|
+
if (config !== null && config !== void 0 && (_config$withRubric = config.withRubric) !== null && _config$withRubric !== void 0 && _config$withRubric.forceEnabled && !defaultModel.rubricEnabled) {
|
|
194
|
+
defaultModel.rubricEnabled = true;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return defaultModel;
|
|
128
198
|
});
|
|
129
199
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":["ExtendedTextEntry","_model","
|
|
1
|
+
{"version":3,"sources":["../src/index.js"],"names":["ExtendedTextEntry","c","withRubric","forceEnabled","_model","rubricEnabled","dispatchEvent","ModelUpdatedEvent","_configuration","defaults","configuration","createDefaultModel","onModelChanged","bind","m","render","verifyRubric","handler","InsertImageEvent","src","done","DeleteImageEvent","InsertSoundEvent","DeleteSoundEvent","console","log","element","React","createElement","Main","model","onConfigurationChanged","imageSupport","add","insertImage","onDeleteImage","uploadSoundSupport","insertSound","onDeleteSound","ReactDOM","HTMLElement","config","defaultModel"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAOA;;AACA;;AACA;;AAEA;;;;;;;;;;IAEqBA,iB;;;;;AAcnB,+BAAc;AAAA;;AAAA;AACZ;AADY;AAAA,+FAOC,iBAAOC,CAAP;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA,wBACeA,CAAC,IAAI,EADpB,2BACLC,UADK,EACLA,UADK,iCACQ,EADR;;AAGb,oBAAIA,UAAU,SAAV,IAAAA,UAAU,WAAV,IAAAA,UAAU,CAAEC,YAAZ,IAA4B,CAAC,MAAKC,MAAL,CAAYC,aAA7C,EAA4D;AAC1D,wBAAKD,MAAL,CAAYC,aAAZ,GAA4B,IAA5B;;AACA,wBAAKC,aAAL,CAAmB,IAAIC,qCAAJ,CAAsB,MAAKH,MAA3B,CAAnB;AACD;;AANY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAPD;;AAAA;AAAA;AAAA;AAAA;AAEZ,UAAKI,cAAL,GAAsBC,qBAASC,aAA/B;AACA,UAAKN,MAAL,GAAcJ,iBAAiB,CAACW,kBAAlB,CAAqC,EAArC,EAAyC,MAAKH,cAA9C,CAAd;AACA,UAAKI,cAAL,GAAsB,MAAKA,cAAL,CAAoBC,IAApB,gDAAtB;AAJY;AAKb;;;;SAWD,aAAUC,CAAV,EAAa;AACX,WAAKV,MAAL,GAAcJ,iBAAiB,CAACW,kBAAlB,CAAqCG,CAArC,EAAwC,KAAKN,cAA7C,CAAd;AACA,WAAKO,MAAL;AACD;;;SAED,aAAkBd,CAAlB,EAAqB;AACnB,WAAKO,c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\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-framework/pie-configure-events';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport Main from './main';\n\nimport defaults from './defaults';\n\nexport default class ExtendedTextEntry extends HTMLElement {\n static createDefaultModel = (model = {}, config) => {\n const defaultModel = {\n ...defaults.model,\n ...model,\n };\n\n if (config?.withRubric?.forceEnabled && !defaultModel.rubricEnabled) {\n defaultModel.rubricEnabled = true;\n }\n\n return defaultModel;\n };\n\n constructor() {\n super();\n this._configuration = defaults.configuration;\n this._model = ExtendedTextEntry.createDefaultModel({}, this._configuration);\n this.onModelChanged = this.onModelChanged.bind(this);\n }\n\n verifyRubric = async (c) => {\n const { withRubric = {} } = c || {};\n\n if (withRubric?.forceEnabled && !this._model.rubricEnabled) {\n this._model.rubricEnabled = true;\n this.dispatchEvent(new ModelUpdatedEvent(this._model));\n }\n };\n\n set model(m) {\n this._model = ExtendedTextEntry.createDefaultModel(m, this._configuration);\n this.render();\n }\n\n set configuration(c) {\n this._configuration = {\n ...defaults.configuration,\n ...c,\n };\n\n this.verifyRubric(this._configuration);\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = {\n ...defaults.configuration,\n ...c,\n };\n\n if (this._model) {\n const { withRubric = {} } = c || {};\n\n if (withRubric?.forceEnabled) {\n this._model.rubricEnabled = true;\n }\n\n this.onModelChanged(this._model);\n }\n\n this.render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n render() {\n console.log('this._model.rubricEnabled', this._model.rubricEnabled);\n\n if (this._model) {\n const element = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n ReactDOM.render(element, this);\n }\n }\n}\n"],"file":"index.js"}
|