@pie-element/drawing-response 3.9.9 → 3.9.10-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 +370 -0
- package/configure/CHANGELOG.md +355 -0
- package/configure/lib/button.js.map +1 -1
- package/configure/lib/defaults.js +21 -2
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/image-container.js +37 -21
- package/configure/lib/image-container.js.map +1 -1
- package/configure/lib/index.js +64 -11
- package/configure/lib/index.js.map +1 -1
- package/configure/lib/root.js +65 -30
- 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 +34 -14
- package/configure/src/__tests__/image-container.test.jsx +42 -35
- package/configure/src/__tests__/index.test.js +7 -7
- package/configure/src/__tests__/root.test.jsx +18 -18
- package/configure/src/button.jsx +4 -4
- package/configure/src/defaults.js +24 -5
- package/configure/src/image-container.jsx +80 -59
- package/configure/src/index.js +46 -14
- package/configure/src/root.jsx +71 -63
- package/controller/CHANGELOG.md +20 -0
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +13 -7
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -1
- package/controller/src/__tests__/index.test.js +29 -19
- package/controller/src/defaults.js +2 -2
- package/controller/src/index.js +13 -14
- package/docs/config-schema.json +126 -0
- package/docs/config-schema.json.md +97 -1
- package/docs/demo/config.js +2 -2
- package/docs/demo/generate.js +4 -2
- package/docs/demo/session.js +4 -4
- package/docs/pie-schema.json +60 -0
- package/docs/pie-schema.json.md +44 -0
- package/lib/drawing-response/button.js.map +1 -1
- package/lib/drawing-response/constants.js.map +1 -1
- package/lib/drawing-response/container.js +73 -22
- package/lib/drawing-response/container.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-main.js +45 -15
- package/lib/drawing-response/drawable-main.js.map +1 -1
- package/lib/drawing-response/drawable-palette.js +6 -1
- package/lib/drawing-response/drawable-palette.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.map +1 -1
- package/lib/drawing-response/factory.js.map +1 -1
- package/lib/drawing-response/icon.js.map +1 -1
- package/lib/drawing-response/index.js +3 -0
- package/lib/drawing-response/index.js.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/drawing-index-test.jsx +4 -4
- package/src/drawing-response/__tests__/__snapshots__/container.test.jsx.snap +174 -290
- package/src/drawing-response/__tests__/__snapshots__/drawing-main.test.jsx.snap +26 -2
- package/src/drawing-response/__tests__/container.test.jsx +9 -2
- package/src/drawing-response/__tests__/drawable-helper.test.jsx +1 -1
- package/src/drawing-response/__tests__/drawing-main.test.jsx +74 -86
- package/src/drawing-response/button.jsx +5 -8
- package/src/drawing-response/constants.js +42 -34
- package/src/drawing-response/container.jsx +93 -70
- package/src/drawing-response/drawable-image.jsx +5 -4
- package/src/drawing-response/drawable-main.jsx +46 -17
- package/src/drawing-response/drawable-palette.jsx +18 -35
- package/src/drawing-response/drawable-text.jsx +34 -48
- package/src/drawing-response/drawable-transformer.jsx +3 -1
- package/src/drawing-response/factory.js +3 -11
- package/src/drawing-response/icon.jsx +19 -20
- package/src/drawing-response/index.jsx +9 -15
- package/src/index.js +8 -11
|
@@ -11,11 +11,11 @@ exports[`Container snapshot renders 1`] = `
|
|
|
11
11
|
"value": "transparent",
|
|
12
12
|
},
|
|
13
13
|
Object {
|
|
14
|
-
"label": "
|
|
14
|
+
"label": "light blue",
|
|
15
15
|
"value": "lightblue",
|
|
16
16
|
},
|
|
17
17
|
Object {
|
|
18
|
-
"label": "
|
|
18
|
+
"label": "light yellow",
|
|
19
19
|
"value": "lightyellow",
|
|
20
20
|
},
|
|
21
21
|
Object {
|
|
@@ -132,87 +132,92 @@ exports[`Container snapshot renders 1`] = `
|
|
|
132
132
|
/>
|
|
133
133
|
<div>
|
|
134
134
|
<div>
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
/>
|
|
213
|
-
</div>
|
|
135
|
+
<WithStyles(RawButton)
|
|
136
|
+
disabled={true}
|
|
137
|
+
key="Select"
|
|
138
|
+
label={
|
|
139
|
+
<IconWrapper
|
|
140
|
+
path="mdiCursorDefault"
|
|
141
|
+
/>
|
|
142
|
+
}
|
|
143
|
+
onClick={[Function]}
|
|
144
|
+
title="Select"
|
|
145
|
+
/>
|
|
146
|
+
<WithStyles(RawButton)
|
|
147
|
+
disabled={false}
|
|
148
|
+
key="FreePathDrawable"
|
|
149
|
+
label={
|
|
150
|
+
<IconWrapper
|
|
151
|
+
path="mdiPencil"
|
|
152
|
+
/>
|
|
153
|
+
}
|
|
154
|
+
onClick={[Function]}
|
|
155
|
+
title="Free Draw"
|
|
156
|
+
/>
|
|
157
|
+
<WithStyles(RawButton)
|
|
158
|
+
disabled={false}
|
|
159
|
+
key="LineDrawable"
|
|
160
|
+
label={
|
|
161
|
+
<IconWrapper
|
|
162
|
+
path="mdiMinus"
|
|
163
|
+
/>
|
|
164
|
+
}
|
|
165
|
+
onClick={[Function]}
|
|
166
|
+
title="Line"
|
|
167
|
+
/>
|
|
168
|
+
<WithStyles(RawButton)
|
|
169
|
+
disabled={false}
|
|
170
|
+
key="RectangleDrawable"
|
|
171
|
+
label={
|
|
172
|
+
<IconWrapper
|
|
173
|
+
path="mdiRectangle"
|
|
174
|
+
/>
|
|
175
|
+
}
|
|
176
|
+
onClick={[Function]}
|
|
177
|
+
title="Rectangle"
|
|
178
|
+
/>
|
|
179
|
+
<WithStyles(RawButton)
|
|
180
|
+
disabled={false}
|
|
181
|
+
key="CircleDrawable"
|
|
182
|
+
label={
|
|
183
|
+
<IconWrapper
|
|
184
|
+
path="mdiCircle"
|
|
185
|
+
/>
|
|
186
|
+
}
|
|
187
|
+
onClick={[Function]}
|
|
188
|
+
title="Circle"
|
|
189
|
+
/>
|
|
190
|
+
<WithStyles(RawButton)
|
|
191
|
+
disabled={false}
|
|
192
|
+
key="Text"
|
|
193
|
+
label={
|
|
194
|
+
<IconWrapper
|
|
195
|
+
path="mdiFormatColorText"
|
|
196
|
+
/>
|
|
197
|
+
}
|
|
198
|
+
onClick={[Function]}
|
|
199
|
+
title="Text Entry"
|
|
200
|
+
/>
|
|
201
|
+
<WithStyles(RawButton)
|
|
202
|
+
disabled={false}
|
|
203
|
+
key="EraserDrawable"
|
|
204
|
+
label={
|
|
205
|
+
<IconWrapper
|
|
206
|
+
path="mdiEraser"
|
|
207
|
+
/>
|
|
208
|
+
}
|
|
209
|
+
onClick={[Function]}
|
|
210
|
+
title="Eraser"
|
|
211
|
+
/>
|
|
214
212
|
</div>
|
|
215
|
-
<div
|
|
213
|
+
<div
|
|
214
|
+
style={
|
|
215
|
+
Object {
|
|
216
|
+
"height": 0,
|
|
217
|
+
"maxHeight": 0,
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
>
|
|
216
221
|
<WithStyles(DrawableMain)
|
|
217
222
|
TextEntry={
|
|
218
223
|
TextDrawable {
|
|
@@ -240,6 +245,7 @@ exports[`Container snapshot renders 1`] = `
|
|
|
240
245
|
onSessionChange={[MockFunction]}
|
|
241
246
|
outlineColor="black"
|
|
242
247
|
paintColor="red"
|
|
248
|
+
scale={1}
|
|
243
249
|
session={Object {}}
|
|
244
250
|
toolActive={
|
|
245
251
|
Object {
|
|
@@ -256,217 +262,94 @@ exports[`Container snapshot renders 1`] = `
|
|
|
256
262
|
|
|
257
263
|
exports[`Container snapshot renders disabled 1`] = `
|
|
258
264
|
<div>
|
|
259
|
-
<WithStyles(Palette)
|
|
260
|
-
fillColor="white"
|
|
261
|
-
fillList={
|
|
262
|
-
Array [
|
|
263
|
-
Object {
|
|
264
|
-
"label": "no fill",
|
|
265
|
-
"value": "transparent",
|
|
266
|
-
},
|
|
267
|
-
Object {
|
|
268
|
-
"label": "lightblue",
|
|
269
|
-
"value": "lightblue",
|
|
270
|
-
},
|
|
271
|
-
Object {
|
|
272
|
-
"label": "lightyellow",
|
|
273
|
-
"value": "lightyellow",
|
|
274
|
-
},
|
|
275
|
-
Object {
|
|
276
|
-
"label": "red",
|
|
277
|
-
"value": "red",
|
|
278
|
-
},
|
|
279
|
-
Object {
|
|
280
|
-
"label": "orange",
|
|
281
|
-
"value": "orange",
|
|
282
|
-
},
|
|
283
|
-
Object {
|
|
284
|
-
"label": "yellow",
|
|
285
|
-
"value": "yellow",
|
|
286
|
-
},
|
|
287
|
-
Object {
|
|
288
|
-
"label": "violet",
|
|
289
|
-
"value": "violet",
|
|
290
|
-
},
|
|
291
|
-
Object {
|
|
292
|
-
"label": "blue",
|
|
293
|
-
"value": "blue",
|
|
294
|
-
},
|
|
295
|
-
Object {
|
|
296
|
-
"label": "green",
|
|
297
|
-
"value": "green",
|
|
298
|
-
},
|
|
299
|
-
Object {
|
|
300
|
-
"label": "white",
|
|
301
|
-
"value": "white",
|
|
302
|
-
},
|
|
303
|
-
Object {
|
|
304
|
-
"label": "black",
|
|
305
|
-
"value": "black",
|
|
306
|
-
},
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
onFillColorChange={[Function]}
|
|
310
|
-
onOutlineColorChange={[Function]}
|
|
311
|
-
onPaintColorChange={[Function]}
|
|
312
|
-
outlineColor="black"
|
|
313
|
-
outlineList={
|
|
314
|
-
Array [
|
|
315
|
-
Object {
|
|
316
|
-
"label": "red",
|
|
317
|
-
"value": "red",
|
|
318
|
-
},
|
|
319
|
-
Object {
|
|
320
|
-
"label": "orange",
|
|
321
|
-
"value": "orange",
|
|
322
|
-
},
|
|
323
|
-
Object {
|
|
324
|
-
"label": "yellow",
|
|
325
|
-
"value": "yellow",
|
|
326
|
-
},
|
|
327
|
-
Object {
|
|
328
|
-
"label": "violet",
|
|
329
|
-
"value": "violet",
|
|
330
|
-
},
|
|
331
|
-
Object {
|
|
332
|
-
"label": "blue",
|
|
333
|
-
"value": "blue",
|
|
334
|
-
},
|
|
335
|
-
Object {
|
|
336
|
-
"label": "green",
|
|
337
|
-
"value": "green",
|
|
338
|
-
},
|
|
339
|
-
Object {
|
|
340
|
-
"label": "white",
|
|
341
|
-
"value": "white",
|
|
342
|
-
},
|
|
343
|
-
Object {
|
|
344
|
-
"label": "black",
|
|
345
|
-
"value": "black",
|
|
346
|
-
},
|
|
347
|
-
]
|
|
348
|
-
}
|
|
349
|
-
paintColor="red"
|
|
350
|
-
paintList={
|
|
351
|
-
Array [
|
|
352
|
-
Object {
|
|
353
|
-
"label": "red",
|
|
354
|
-
"value": "red",
|
|
355
|
-
},
|
|
356
|
-
Object {
|
|
357
|
-
"label": "orange",
|
|
358
|
-
"value": "orange",
|
|
359
|
-
},
|
|
360
|
-
Object {
|
|
361
|
-
"label": "yellow",
|
|
362
|
-
"value": "yellow",
|
|
363
|
-
},
|
|
364
|
-
Object {
|
|
365
|
-
"label": "violet",
|
|
366
|
-
"value": "violet",
|
|
367
|
-
},
|
|
368
|
-
Object {
|
|
369
|
-
"label": "blue",
|
|
370
|
-
"value": "blue",
|
|
371
|
-
},
|
|
372
|
-
Object {
|
|
373
|
-
"label": "green",
|
|
374
|
-
"value": "green",
|
|
375
|
-
},
|
|
376
|
-
Object {
|
|
377
|
-
"label": "white",
|
|
378
|
-
"value": "white",
|
|
379
|
-
},
|
|
380
|
-
Object {
|
|
381
|
-
"label": "black",
|
|
382
|
-
"value": "black",
|
|
383
|
-
},
|
|
384
|
-
]
|
|
385
|
-
}
|
|
386
|
-
/>
|
|
387
265
|
<div>
|
|
388
266
|
<div>
|
|
389
|
-
<
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
/>
|
|
467
|
-
</div>
|
|
267
|
+
<WithStyles(RawButton)
|
|
268
|
+
disabled={true}
|
|
269
|
+
key="Select"
|
|
270
|
+
label={
|
|
271
|
+
<IconWrapper
|
|
272
|
+
path="mdiCursorDefault"
|
|
273
|
+
/>
|
|
274
|
+
}
|
|
275
|
+
onClick={[Function]}
|
|
276
|
+
title="Select"
|
|
277
|
+
/>
|
|
278
|
+
<WithStyles(RawButton)
|
|
279
|
+
disabled={true}
|
|
280
|
+
key="FreePathDrawable"
|
|
281
|
+
label={
|
|
282
|
+
<IconWrapper
|
|
283
|
+
path="mdiPencil"
|
|
284
|
+
/>
|
|
285
|
+
}
|
|
286
|
+
onClick={[Function]}
|
|
287
|
+
title="Free Draw"
|
|
288
|
+
/>
|
|
289
|
+
<WithStyles(RawButton)
|
|
290
|
+
disabled={true}
|
|
291
|
+
key="LineDrawable"
|
|
292
|
+
label={
|
|
293
|
+
<IconWrapper
|
|
294
|
+
path="mdiMinus"
|
|
295
|
+
/>
|
|
296
|
+
}
|
|
297
|
+
onClick={[Function]}
|
|
298
|
+
title="Line"
|
|
299
|
+
/>
|
|
300
|
+
<WithStyles(RawButton)
|
|
301
|
+
disabled={true}
|
|
302
|
+
key="RectangleDrawable"
|
|
303
|
+
label={
|
|
304
|
+
<IconWrapper
|
|
305
|
+
path="mdiRectangle"
|
|
306
|
+
/>
|
|
307
|
+
}
|
|
308
|
+
onClick={[Function]}
|
|
309
|
+
title="Rectangle"
|
|
310
|
+
/>
|
|
311
|
+
<WithStyles(RawButton)
|
|
312
|
+
disabled={true}
|
|
313
|
+
key="CircleDrawable"
|
|
314
|
+
label={
|
|
315
|
+
<IconWrapper
|
|
316
|
+
path="mdiCircle"
|
|
317
|
+
/>
|
|
318
|
+
}
|
|
319
|
+
onClick={[Function]}
|
|
320
|
+
title="Circle"
|
|
321
|
+
/>
|
|
322
|
+
<WithStyles(RawButton)
|
|
323
|
+
disabled={true}
|
|
324
|
+
key="Text"
|
|
325
|
+
label={
|
|
326
|
+
<IconWrapper
|
|
327
|
+
path="mdiFormatColorText"
|
|
328
|
+
/>
|
|
329
|
+
}
|
|
330
|
+
onClick={[Function]}
|
|
331
|
+
title="Text Entry"
|
|
332
|
+
/>
|
|
333
|
+
<WithStyles(RawButton)
|
|
334
|
+
disabled={true}
|
|
335
|
+
key="EraserDrawable"
|
|
336
|
+
label={
|
|
337
|
+
<IconWrapper
|
|
338
|
+
path="mdiEraser"
|
|
339
|
+
/>
|
|
340
|
+
}
|
|
341
|
+
onClick={[Function]}
|
|
342
|
+
title="Eraser"
|
|
343
|
+
/>
|
|
468
344
|
</div>
|
|
469
|
-
<div
|
|
345
|
+
<div
|
|
346
|
+
style={
|
|
347
|
+
Object {
|
|
348
|
+
"height": 0,
|
|
349
|
+
"maxHeight": 0,
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
>
|
|
470
353
|
<WithStyles(DrawableMain)
|
|
471
354
|
TextEntry={
|
|
472
355
|
TextDrawable {
|
|
@@ -495,6 +378,7 @@ exports[`Container snapshot renders disabled 1`] = `
|
|
|
495
378
|
onSessionChange={[MockFunction]}
|
|
496
379
|
outlineColor="black"
|
|
497
380
|
paintColor="red"
|
|
381
|
+
scale={1}
|
|
498
382
|
session={Object {}}
|
|
499
383
|
toolActive={
|
|
500
384
|
Object {
|
|
@@ -26,7 +26,12 @@ exports[`DrawingResponse DrawableMain snapshot renders 1`] = `
|
|
|
26
26
|
</div>
|
|
27
27
|
<div>
|
|
28
28
|
<WithStyles(DrawableImage)
|
|
29
|
-
dimensions={
|
|
29
|
+
dimensions={
|
|
30
|
+
Object {
|
|
31
|
+
"height": NaN,
|
|
32
|
+
"width": NaN,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
30
35
|
url="url"
|
|
31
36
|
/>
|
|
32
37
|
<ForwardRef
|
|
@@ -34,6 +39,8 @@ exports[`DrawingResponse DrawableMain snapshot renders 1`] = `
|
|
|
34
39
|
height={350}
|
|
35
40
|
onMouseMove={[Function]}
|
|
36
41
|
onMouseUp={[Function]}
|
|
42
|
+
onTouchEnd={[Function]}
|
|
43
|
+
onTouchMove={[Function]}
|
|
37
44
|
width={353}
|
|
38
45
|
>
|
|
39
46
|
<Layer />
|
|
@@ -58,7 +65,12 @@ exports[`DrawingResponse DrawableMain snapshot renders disabled 1`] = `
|
|
|
58
65
|
</div>
|
|
59
66
|
<div>
|
|
60
67
|
<WithStyles(DrawableImage)
|
|
61
|
-
dimensions={
|
|
68
|
+
dimensions={
|
|
69
|
+
Object {
|
|
70
|
+
"height": NaN,
|
|
71
|
+
"width": NaN,
|
|
72
|
+
}
|
|
73
|
+
}
|
|
62
74
|
url="url"
|
|
63
75
|
/>
|
|
64
76
|
<ForwardRef
|
|
@@ -83,9 +95,13 @@ exports[`DrawingResponse DrawableText snapshot renders 1`] = `
|
|
|
83
95
|
name="text_gcifqhhimf8k2d6g8hs"
|
|
84
96
|
onClick={[Function]}
|
|
85
97
|
onDblClick={[Function]}
|
|
98
|
+
onDblTap={[Function]}
|
|
86
99
|
onDragEnd={[MockFunction]}
|
|
87
100
|
onMouseDown={[Function]}
|
|
88
101
|
onMouseUp={[Function]}
|
|
102
|
+
onTap={[Function]}
|
|
103
|
+
onTouchEnd={[Function]}
|
|
104
|
+
onTouchStart={[Function]}
|
|
89
105
|
onTransform={[Function]}
|
|
90
106
|
onTransformEnd={[MockFunction]}
|
|
91
107
|
text="Double click to edit this text. Press Enter to submit."
|
|
@@ -98,6 +114,8 @@ exports[`DrawingResponse DrawableText snapshot renders 1`] = `
|
|
|
98
114
|
key="transformer_gcifqhhimf8k2d6g8hs"
|
|
99
115
|
onMouseDown={[Function]}
|
|
100
116
|
onMouseUp={[Function]}
|
|
117
|
+
onTouchEnd={[Function]}
|
|
118
|
+
onTouchStart={[Function]}
|
|
101
119
|
selectedShapeName="text_gcifqhhimf8k2d6g8hs"
|
|
102
120
|
/>
|
|
103
121
|
</div>
|
|
@@ -127,9 +145,13 @@ exports[`DrawingResponse DrawableText snapshot when there is no value renders 1`
|
|
|
127
145
|
name="text_gcifqhhimf8k2d6g8hs"
|
|
128
146
|
onClick={[Function]}
|
|
129
147
|
onDblClick={[Function]}
|
|
148
|
+
onDblTap={[Function]}
|
|
130
149
|
onDragEnd={[MockFunction]}
|
|
131
150
|
onMouseDown={[Function]}
|
|
132
151
|
onMouseUp={[Function]}
|
|
152
|
+
onTap={[Function]}
|
|
153
|
+
onTouchEnd={[Function]}
|
|
154
|
+
onTouchStart={[Function]}
|
|
133
155
|
onTransform={[Function]}
|
|
134
156
|
onTransformEnd={[MockFunction]}
|
|
135
157
|
text="Double click to edit this text. Press Enter to submit."
|
|
@@ -142,6 +164,8 @@ exports[`DrawingResponse DrawableText snapshot when there is no value renders 1`
|
|
|
142
164
|
key="transformer_gcifqhhimf8k2d6g8hs"
|
|
143
165
|
onMouseDown={[Function]}
|
|
144
166
|
onMouseUp={[Function]}
|
|
167
|
+
onTouchEnd={[Function]}
|
|
168
|
+
onTouchStart={[Function]}
|
|
145
169
|
selectedShapeName="text_gcifqhhimf8k2d6g8hs"
|
|
146
170
|
/>
|
|
147
171
|
</div>
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { shallow } from 'enzyme';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
|
|
4
|
+
global.MutationObserver = class {
|
|
5
|
+
constructor(callback) {}
|
|
6
|
+
disconnect() {}
|
|
7
|
+
observe(element, initObject) {}
|
|
8
|
+
};
|
|
9
|
+
|
|
3
10
|
import { Container } from '../container';
|
|
4
11
|
|
|
5
12
|
beforeEach(() => {
|
|
@@ -15,12 +22,12 @@ describe('Container', () => {
|
|
|
15
22
|
onSessionChange,
|
|
16
23
|
imageDimensions: {},
|
|
17
24
|
imageUrl: 'url',
|
|
18
|
-
session: {}
|
|
25
|
+
session: {},
|
|
19
26
|
};
|
|
20
27
|
const props = { ...defaults, ...extras };
|
|
21
28
|
return shallow(<Container {...props} />, {
|
|
22
29
|
disableLifecycleMethods: false,
|
|
23
|
-
...renderOpts
|
|
30
|
+
...renderOpts,
|
|
24
31
|
});
|
|
25
32
|
};
|
|
26
33
|
|