@pie-element/drawing-response 3.7.3-next.133 → 3.7.3-next.1335
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 +242 -0
- package/configure/CHANGELOG.md +200 -0
- package/configure/lib/defaults.js +20 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/image-container.js +44 -24
- package/configure/lib/image-container.js.map +1 -1
- package/configure/lib/index.js +17 -9
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +50 -11
- package/configure/lib/root.js.map +1 -1
- package/configure/package.json +4 -4
- package/configure/src/__tests__/__snapshots__/image-container.test.jsx.snap +3 -2
- package/configure/src/__tests__/__snapshots__/root.test.jsx.snap +32 -14
- package/configure/src/__tests__/image-container.test.jsx +2 -2
- package/configure/src/defaults.js +20 -2
- package/configure/src/image-container.jsx +82 -50
- package/configure/src/index.js +14 -6
- package/configure/src/root.jsx +58 -25
- package/controller/CHANGELOG.md +24 -0
- package/controller/lib/index.js +13 -9
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/__tests__/index.test.js +18 -9
- package/controller/src/index.js +4 -1
- package/docs/config-schema.json +95 -0
- package/docs/config-schema.json.md +73 -1
- package/docs/demo/generate.js +3 -1
- package/docs/pie-schema.json +39 -0
- package/docs/pie-schema.json.md +28 -0
- package/lib/drawing-response/container.js +78 -23
- package/lib/drawing-response/container.js.map +1 -1
- package/lib/drawing-response/drawable-circle.js +1 -1
- package/lib/drawing-response/drawable-circle.js.map +1 -1
- package/lib/drawing-response/drawable-eraser.js +1 -1
- package/lib/drawing-response/drawable-eraser.js.map +1 -1
- package/lib/drawing-response/drawable-free-path.js +1 -1
- package/lib/drawing-response/drawable-free-path.js.map +1 -1
- package/lib/drawing-response/drawable-helper.js.map +1 -1
- package/lib/drawing-response/drawable-image.js +1 -0
- package/lib/drawing-response/drawable-image.js.map +1 -1
- package/lib/drawing-response/drawable-line.js +1 -1
- package/lib/drawing-response/drawable-line.js.map +1 -1
- package/lib/drawing-response/drawable-main.js +45 -16
- package/lib/drawing-response/drawable-main.js.map +1 -1
- package/lib/drawing-response/drawable-palette.js +1 -1
- package/lib/drawing-response/drawable-palette.js.map +1 -1
- package/lib/drawing-response/drawable-rectangle.js +1 -1
- package/lib/drawing-response/drawable-rectangle.js.map +1 -1
- package/lib/drawing-response/drawable-text.js +15 -5
- package/lib/drawing-response/drawable-text.js.map +1 -1
- package/lib/drawing-response/drawable-transformer.js +1 -1
- package/lib/drawing-response/drawable-transformer.js.map +1 -1
- package/lib/drawing-response/index.js +9 -9
- package/lib/drawing-response/index.js.map +1 -1
- package/lib/index.js +4 -1
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/drawing-response/__tests__/__snapshots__/container.test.jsx.snap +172 -288
- package/src/drawing-response/__tests__/__snapshots__/drawing-main.test.jsx.snap +26 -2
- package/src/drawing-response/__tests__/container.test.jsx +7 -0
- package/src/drawing-response/__tests__/drawing-main.test.jsx +2 -1
- package/src/drawing-response/container.jsx +78 -36
- package/src/drawing-response/drawable-image.jsx +1 -0
- package/src/drawing-response/drawable-main.jsx +45 -17
- package/src/drawing-response/drawable-text.jsx +7 -1
- package/src/drawing-response/index.jsx +6 -4
- package/src/index.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,248 @@
|
|
|
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/drawing-response@4.0.0...@pie-element/drawing-response@4.1.0) (2022-06-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **drawing-response:** PD-1839 do not set image width if it's 0 ([ba4e321](https://github.com/pie-framework/pie-elements/commit/ba4e321f4fe3252e93ed125efbf93d684a2740f0))
|
|
12
|
+
* add missing prop ([fd4220c](https://github.com/pie-framework/pie-elements/commit/fd4220c60d519dccd9a37ab3639d4feaa90a58a4))
|
|
13
|
+
* **drawing-response:** fix width of image not being rendered correctly PD-1839 ([5599ff5](https://github.com/pie-framework/pie-elements/commit/5599ff5c4d03a1d0d86c687f2b781b92903e5a63))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **drawing-response:** add maxImageWidth and maxImageHeight props PD-1801 ([4f1fb5d](https://github.com/pie-framework/pie-elements/commit/4f1fb5dfa4616c194eefd1702854a5aaa413ce1f))
|
|
19
|
+
* Touch screen support for Drawing Response PD-1633 ([9d13832](https://github.com/pie-framework/pie-elements/commit/9d13832075cc84528a9766a087c0bcc77d38e6d2))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.21...@pie-element/drawing-response@4.0.0) (2022-06-28)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### chore
|
|
29
|
+
|
|
30
|
+
* Merge master with develop. ([cdca48a](https://github.com/pie-framework/pie-elements/commit/cdca48abaa1d4179e4a961e13d171e14b7ed2444))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### BREAKING CHANGES
|
|
34
|
+
|
|
35
|
+
* Image percent buttons were removed from toolbar.
|
|
36
|
+
New properties maxImageWidth and maxImageHeight were added.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
## [3.9.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.20...@pie-element/drawing-response@3.9.21) (2022-06-13)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
## [3.9.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.19...@pie-element/drawing-response@3.9.20) (2022-05-30)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
## [3.9.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.18...@pie-element/drawing-response@3.9.19) (2022-05-16)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## [3.9.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.17...@pie-element/drawing-response@3.9.18) (2022-05-09)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## [3.9.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.16...@pie-element/drawing-response@3.9.17) (2022-05-03)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## [3.9.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.15...@pie-element/drawing-response@3.9.16) (2022-04-12)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## [3.9.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.14...@pie-element/drawing-response@3.9.15) (2022-03-28)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## [3.9.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.13...@pie-element/drawing-response@3.9.14) (2022-03-22)
|
|
99
|
+
|
|
100
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## [3.9.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.12...@pie-element/drawing-response@3.9.13) (2022-03-08)
|
|
107
|
+
|
|
108
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
## [3.9.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.11...@pie-element/drawing-response@3.9.12) (2022-03-08)
|
|
115
|
+
|
|
116
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
## [3.9.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.10...@pie-element/drawing-response@3.9.11) (2022-02-21)
|
|
123
|
+
|
|
124
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
## [3.9.10](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.9...@pie-element/drawing-response@3.9.10) (2022-02-04)
|
|
131
|
+
|
|
132
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## [3.9.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.8...@pie-element/drawing-response@3.9.9) (2022-01-24)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
### Bug Fixes
|
|
142
|
+
|
|
143
|
+
* 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))
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## [3.9.8](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.7...@pie-element/drawing-response@3.9.8) (2022-01-10)
|
|
150
|
+
|
|
151
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
## [3.9.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.6...@pie-element/drawing-response@3.9.7) (2021-12-23)
|
|
158
|
+
|
|
159
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
## [3.9.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.4...@pie-element/drawing-response@3.9.5) (2021-12-13)
|
|
166
|
+
|
|
167
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## [3.9.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.9.1...@pie-element/drawing-response@3.9.2) (2021-11-29)
|
|
174
|
+
|
|
175
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## [3.9.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.8.3...@pie-element/drawing-response@3.9.1) (2021-11-11)
|
|
182
|
+
|
|
183
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
# [3.9.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.7.2...@pie-element/drawing-response@3.9.0) (2021-11-11)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
### Bug Fixes
|
|
193
|
+
|
|
194
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
195
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
196
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Features
|
|
200
|
+
|
|
201
|
+
* **drawing-response:** set toolbar editor position to bottom ([cac36e9](https://github.com/pie-framework/pie-elements/commit/cac36e96e1113a4843409ebaa6683b415ea1ee4a))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
## [3.8.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.8.2...@pie-element/drawing-response@3.8.3) (2021-10-04)
|
|
209
|
+
|
|
210
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
## [3.8.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.8.1...@pie-element/drawing-response@3.8.2) (2021-09-20)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
### Bug Fixes
|
|
220
|
+
|
|
221
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
222
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
223
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
## [3.8.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.8.0...@pie-element/drawing-response@3.8.1) (2021-09-01)
|
|
230
|
+
|
|
231
|
+
**Note:** Version bump only for package @pie-element/drawing-response
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
# [3.8.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.7.2...@pie-element/drawing-response@3.8.0) (2021-08-05)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
### Features
|
|
241
|
+
|
|
242
|
+
* **drawing-response:** set toolbar editor position to bottom ([cac36e9](https://github.com/pie-framework/pie-elements/commit/cac36e96e1113a4843409ebaa6683b415ea1ee4a))
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
6
248
|
## [3.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response@3.7.0...@pie-element/drawing-response@3.7.2) (2021-08-05)
|
|
7
249
|
|
|
8
250
|
|
package/configure/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,206 @@
|
|
|
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/drawing-response-configure@4.0.0...@pie-element/drawing-response-configure@4.1.0) (2022-06-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **drawing-response:** PD-1839 do not set image width if it's 0 ([ba4e321](https://github.com/pie-framework/pie-elements/commit/ba4e321f4fe3252e93ed125efbf93d684a2740f0))
|
|
12
|
+
* add missing prop ([fd4220c](https://github.com/pie-framework/pie-elements/commit/fd4220c60d519dccd9a37ab3639d4feaa90a58a4))
|
|
13
|
+
* **drawing-response:** fix width of image not being rendered correctly PD-1839 ([5599ff5](https://github.com/pie-framework/pie-elements/commit/5599ff5c4d03a1d0d86c687f2b781b92903e5a63))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* **drawing-response:** add maxImageWidth and maxImageHeight props PD-1801 ([4f1fb5d](https://github.com/pie-framework/pie-elements/commit/4f1fb5dfa4616c194eefd1702854a5aaa413ce1f))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# [4.0.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.25...@pie-element/drawing-response-configure@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.2.25](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.24...@pie-element/drawing-response-configure@3.2.25) (2022-06-13)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [3.2.24](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.23...@pie-element/drawing-response-configure@3.2.24) (2022-05-30)
|
|
50
|
+
|
|
51
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
## [3.2.23](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.22...@pie-element/drawing-response-configure@3.2.23) (2022-05-16)
|
|
58
|
+
|
|
59
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## [3.2.22](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.21...@pie-element/drawing-response-configure@3.2.22) (2022-05-09)
|
|
66
|
+
|
|
67
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## [3.2.21](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.20...@pie-element/drawing-response-configure@3.2.21) (2022-05-03)
|
|
74
|
+
|
|
75
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## [3.2.20](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.19...@pie-element/drawing-response-configure@3.2.20) (2022-04-12)
|
|
82
|
+
|
|
83
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## [3.2.19](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.18...@pie-element/drawing-response-configure@3.2.19) (2022-03-28)
|
|
90
|
+
|
|
91
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
## [3.2.18](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.17...@pie-element/drawing-response-configure@3.2.18) (2022-03-22)
|
|
98
|
+
|
|
99
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
## [3.2.17](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.16...@pie-element/drawing-response-configure@3.2.17) (2022-03-08)
|
|
106
|
+
|
|
107
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## [3.2.16](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.15...@pie-element/drawing-response-configure@3.2.16) (2022-03-08)
|
|
114
|
+
|
|
115
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [3.2.15](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.14...@pie-element/drawing-response-configure@3.2.15) (2022-02-21)
|
|
122
|
+
|
|
123
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [3.2.14](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.13...@pie-element/drawing-response-configure@3.2.14) (2022-02-04)
|
|
130
|
+
|
|
131
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
## [3.2.13](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.12...@pie-element/drawing-response-configure@3.2.13) (2022-01-24)
|
|
138
|
+
|
|
139
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## [3.2.12](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.11...@pie-element/drawing-response-configure@3.2.12) (2022-01-10)
|
|
146
|
+
|
|
147
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## [3.2.11](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.10...@pie-element/drawing-response-configure@3.2.11) (2021-12-23)
|
|
154
|
+
|
|
155
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## [3.2.9](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.8...@pie-element/drawing-response-configure@3.2.9) (2021-12-13)
|
|
162
|
+
|
|
163
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## [3.2.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.5...@pie-element/drawing-response-configure@3.2.6) (2021-11-29)
|
|
170
|
+
|
|
171
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
## [3.2.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.4...@pie-element/drawing-response-configure@3.2.5) (2021-10-04)
|
|
178
|
+
|
|
179
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
## [3.2.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.3...@pie-element/drawing-response-configure@3.2.4) (2021-09-20)
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
### Bug Fixes
|
|
189
|
+
|
|
190
|
+
* pie-lib updates ([e521c2f](https://github.com/pie-framework/pie-elements/commit/e521c2f1a44aa7f3e14f82a1cee05ceb484ed0a6))
|
|
191
|
+
* Updated pie-lib versions ([2fe4c5d](https://github.com/pie-framework/pie-elements/commit/2fe4c5d0be2d40f5fdb34815855695a7f1087f56))
|
|
192
|
+
* Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## [3.2.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.2...@pie-element/drawing-response-configure@3.2.3) (2021-08-05)
|
|
199
|
+
|
|
200
|
+
**Note:** Version bump only for package @pie-element/drawing-response-configure
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
6
206
|
## [3.2.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/drawing-response-configure@3.2.0...@pie-element/drawing-response-configure@3.2.2) (2021-08-05)
|
|
7
207
|
|
|
8
208
|
|
|
@@ -15,13 +15,19 @@ var _default = {
|
|
|
15
15
|
promptEnabled: true,
|
|
16
16
|
teacherInstructionsEnabled: true,
|
|
17
17
|
studentInstructionsEnabled: true,
|
|
18
|
+
backgroundImageEnabled: true,
|
|
19
|
+
spellCheckEnabled: true,
|
|
18
20
|
toolbarEditorPosition: 'bottom'
|
|
19
21
|
},
|
|
20
22
|
configuration: {
|
|
23
|
+
spellCheck: {
|
|
24
|
+
label: 'Spellcheck',
|
|
25
|
+
settings: false,
|
|
26
|
+
enabled: true
|
|
27
|
+
},
|
|
21
28
|
backgroundImage: {
|
|
22
29
|
settings: true,
|
|
23
|
-
label: 'Background Image'
|
|
24
|
-
enabled: true
|
|
30
|
+
label: 'Background Image'
|
|
25
31
|
},
|
|
26
32
|
prompt: {
|
|
27
33
|
settings: true,
|
|
@@ -30,6 +36,18 @@ var _default = {
|
|
|
30
36
|
teacherInstructions: {
|
|
31
37
|
settings: true,
|
|
32
38
|
label: 'Teacher Instructions'
|
|
39
|
+
},
|
|
40
|
+
maxImageWidth: {
|
|
41
|
+
teacherInstructions: 300,
|
|
42
|
+
prompt: 300
|
|
43
|
+
},
|
|
44
|
+
maxImageHeight: {
|
|
45
|
+
teacherInstructions: 300,
|
|
46
|
+
prompt: 300
|
|
47
|
+
},
|
|
48
|
+
withRubric: {
|
|
49
|
+
settings: true,
|
|
50
|
+
label: 'Add Rubric'
|
|
33
51
|
}
|
|
34
52
|
}
|
|
35
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","imageUrl","imageDimensions","height","width","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","toolbarEditorPosition","configuration","
|
|
1
|
+
{"version":3,"sources":["../src/defaults.js"],"names":["model","prompt","imageUrl","imageDimensions","height","width","promptEnabled","teacherInstructionsEnabled","studentInstructionsEnabled","backgroundImageEnabled","spellCheckEnabled","toolbarEditorPosition","configuration","spellCheck","label","settings","enabled","backgroundImage","teacherInstructions","maxImageWidth","maxImageHeight","withRubric"],"mappings":";;;;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,6BADH;AAELC,IAAAA,QAAQ,EAAE,EAFL;AAGLC,IAAAA,eAAe,EAAE;AACfC,MAAAA,MAAM,EAAE,CADO;AAEfC,MAAAA,KAAK,EAAE;AAFQ,KAHZ;AAOLC,IAAAA,aAAa,EAAE,IAPV;AAQLC,IAAAA,0BAA0B,EAAE,IARvB;AASLC,IAAAA,0BAA0B,EAAE,IATvB;AAULC,IAAAA,sBAAsB,EAAE,IAVnB;AAWLC,IAAAA,iBAAiB,EAAC,IAXb;AAYLC,IAAAA,qBAAqB,EAAE;AAZlB,GADM;AAebC,EAAAA,aAAa,EAAE;AACbC,IAAAA,UAAU,EAAE;AACVC,MAAAA,KAAK,EAAE,YADG;AAEVC,MAAAA,QAAQ,EAAC,KAFC;AAGVC,MAAAA,OAAO,EAAC;AAHE,KADC;AAMbC,IAAAA,eAAe,EAAE;AACfF,MAAAA,QAAQ,EAAE,IADK;AAEfD,MAAAA,KAAK,EAAE;AAFQ,KANJ;AAUbb,IAAAA,MAAM,EAAE;AACNc,MAAAA,QAAQ,EAAE,IADJ;AAEND,MAAAA,KAAK,EAAE;AAFD,KAVK;AAcbI,IAAAA,mBAAmB,EAAE;AACnBH,MAAAA,QAAQ,EAAE,IADS;AAEnBD,MAAAA,KAAK,EAAE;AAFY,KAdR;AAkBbK,IAAAA,aAAa,EAAE;AACbD,MAAAA,mBAAmB,EAAE,GADR;AAEbjB,MAAAA,MAAM,EAAE;AAFK,KAlBF;AAsBbmB,IAAAA,cAAc,EAAE;AACdF,MAAAA,mBAAmB,EAAE,GADP;AAEdjB,MAAAA,MAAM,EAAE;AAFM,KAtBH;AA0BboB,IAAAA,UAAU,EAAE;AACVN,MAAAA,QAAQ,EAAE,IADA;AAEVD,MAAAA,KAAK,EAAE;AAFG;AA1BC;AAfF,C","sourcesContent":["export default {\n model: {\n prompt: 'This is the question prompt',\n imageUrl: '',\n imageDimensions: {\n height: 0,\n width: 0\n },\n promptEnabled: true,\n teacherInstructionsEnabled: true,\n studentInstructionsEnabled: true,\n backgroundImageEnabled: true,\n spellCheckEnabled:true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n spellCheck: {\n label: 'Spellcheck',\n settings:false,\n enabled:true\n },\n backgroundImage: {\n settings: true,\n label: 'Background Image'\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: true,\n label: 'Add Rubric'\n }\n }\n};\n"],"file":"defaults.js"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
@@ -33,9 +33,13 @@ var _styles = require("@material-ui/core/styles");
|
|
|
33
33
|
|
|
34
34
|
var _button = _interopRequireDefault(require("./button"));
|
|
35
35
|
|
|
36
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37
|
+
|
|
38
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
39
|
+
|
|
36
40
|
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); }; }
|
|
37
41
|
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try {
|
|
42
|
+
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; } }
|
|
39
43
|
|
|
40
44
|
var isImage = function isImage(file) {
|
|
41
45
|
var imageType = /image.*/;
|
|
@@ -125,13 +129,23 @@ var ImageContainer = /*#__PURE__*/function (_Component) {
|
|
|
125
129
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleOnImageLoad", function (_ref) {
|
|
126
130
|
var _ref$target = _ref.target,
|
|
127
131
|
offsetHeight = _ref$target.offsetHeight,
|
|
128
|
-
offsetWidth = _ref$target.offsetWidth
|
|
129
|
-
|
|
132
|
+
offsetWidth = _ref$target.offsetWidth,
|
|
133
|
+
naturalHeight = _ref$target.naturalHeight,
|
|
134
|
+
naturalWidth = _ref$target.naturalWidth;
|
|
135
|
+
var _this$props = _this.props,
|
|
136
|
+
onUpdateImageDimension = _this$props.onUpdateImageDimension,
|
|
137
|
+
imageDimensions = _this$props.imageDimensions;
|
|
130
138
|
var resizeHandle = _this.resize;
|
|
131
139
|
var dimensions = {
|
|
132
|
-
height: offsetHeight,
|
|
133
|
-
width: offsetWidth
|
|
134
|
-
};
|
|
140
|
+
height: imageDimensions && imageDimensions.height || offsetHeight || naturalHeight,
|
|
141
|
+
width: imageDimensions && imageDimensions.width || offsetWidth || naturalWidth
|
|
142
|
+
}; // check if aspect ratio is not respected on replacing image
|
|
143
|
+
|
|
144
|
+
var imageAspectRatio = naturalWidth / naturalHeight;
|
|
145
|
+
|
|
146
|
+
if (dimensions.width !== dimensions.height * imageAspectRatio) {
|
|
147
|
+
dimensions.width = dimensions.height * imageAspectRatio;
|
|
148
|
+
}
|
|
135
149
|
|
|
136
150
|
_this.setState({
|
|
137
151
|
dimensions: dimensions
|
|
@@ -156,21 +170,25 @@ var ImageContainer = /*#__PURE__*/function (_Component) {
|
|
|
156
170
|
});
|
|
157
171
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "startResizing", function (e) {
|
|
158
172
|
var box = _this.image;
|
|
159
|
-
var
|
|
173
|
+
var _this$state = _this.state,
|
|
174
|
+
maxImageWidth = _this$state.maxImageWidth,
|
|
175
|
+
maxImageHeight = _this$state.maxImageHeight,
|
|
176
|
+
dimensions = _this$state.dimensions;
|
|
160
177
|
var bounds = e.target.getBoundingClientRect();
|
|
161
178
|
var x = e.clientX - bounds.left;
|
|
162
179
|
var y = e.clientY - bounds.top;
|
|
163
|
-
var
|
|
180
|
+
var imageAspectRatio = dimensions.width / dimensions.height;
|
|
181
|
+
var fitsContainer = x <= maxImageWidth + 5 && x / imageAspectRatio <= maxImageHeight + 5;
|
|
164
182
|
var hasMinimumWidth = x > 150 && y > 150;
|
|
165
183
|
|
|
166
|
-
if (fitsContainer && hasMinimumWidth) {
|
|
184
|
+
if (fitsContainer && hasMinimumWidth && box) {
|
|
167
185
|
box.style.width = "".concat(x, "px");
|
|
168
|
-
box.style.height = "".concat(
|
|
186
|
+
box.style.height = "".concat(x / imageAspectRatio, "px");
|
|
169
187
|
|
|
170
188
|
_this.setState({
|
|
171
189
|
dimensions: {
|
|
172
|
-
|
|
173
|
-
|
|
190
|
+
width: x,
|
|
191
|
+
height: x / imageAspectRatio
|
|
174
192
|
}
|
|
175
193
|
});
|
|
176
194
|
}
|
|
@@ -178,8 +196,8 @@ var ImageContainer = /*#__PURE__*/function (_Component) {
|
|
|
178
196
|
_this.handleDisableDrag();
|
|
179
197
|
});
|
|
180
198
|
_this.state = {
|
|
181
|
-
maxImageWidth:
|
|
182
|
-
maxImageHeight:
|
|
199
|
+
maxImageWidth: "100%",
|
|
200
|
+
maxImageHeight: "auto",
|
|
183
201
|
dragEnabled: true,
|
|
184
202
|
dropzoneActive: false
|
|
185
203
|
};
|
|
@@ -223,14 +241,15 @@ var ImageContainer = /*#__PURE__*/function (_Component) {
|
|
|
223
241
|
value: function render() {
|
|
224
242
|
var _this3 = this;
|
|
225
243
|
|
|
226
|
-
var _this$
|
|
227
|
-
classes = _this$
|
|
228
|
-
imageUrl = _this$
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
244
|
+
var _this$props2 = this.props,
|
|
245
|
+
classes = _this$props2.classes,
|
|
246
|
+
imageUrl = _this$props2.imageUrl,
|
|
247
|
+
imageDimensions = _this$props2.imageDimensions;
|
|
248
|
+
var _this$state2 = this.state,
|
|
249
|
+
dropzoneActive = _this$state2.dropzoneActive,
|
|
250
|
+
dragEnabled = _this$state2.dragEnabled,
|
|
251
|
+
maxImageHeight = _this$state2.maxImageHeight,
|
|
252
|
+
maxImageWidth = _this$state2.maxImageWidth;
|
|
234
253
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
235
254
|
className: classes.base
|
|
236
255
|
}, /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
@@ -258,6 +277,7 @@ var ImageContainer = /*#__PURE__*/function (_Component) {
|
|
|
258
277
|
},
|
|
259
278
|
src: imageUrl,
|
|
260
279
|
style: {
|
|
280
|
+
width: imageDimensions && imageDimensions.width ? imageDimensions.width : undefined,
|
|
261
281
|
maxWidth: maxImageWidth,
|
|
262
282
|
maxHeight: maxImageHeight
|
|
263
283
|
},
|