@tarojs/taro-rn 3.4.2 → 3.4.5

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.
Files changed (55) hide show
  1. package/dist/lib/Mask.js +1 -1
  2. package/dist/lib/Mask.js.map +1 -1
  3. package/dist/lib/Popup.js +3 -2
  4. package/dist/lib/Popup.js.map +1 -1
  5. package/dist/lib/chooseVideo/index.js +1 -1
  6. package/dist/lib/chooseVideo/index.js.map +1 -1
  7. package/dist/lib/connectSocket/index.js +0 -1
  8. package/dist/lib/connectSocket/index.js.map +1 -1
  9. package/dist/lib/connectSocket/socketTask.js +2 -2
  10. package/dist/lib/connectSocket/socketTask.js.map +1 -1
  11. package/dist/lib/createInnerAudioContext/index.js +10 -10
  12. package/dist/lib/createInnerAudioContext/index.js.map +1 -1
  13. package/dist/lib/file.js +2 -1
  14. package/dist/lib/file.js.map +1 -1
  15. package/dist/lib/getLocation/index.js +1 -1
  16. package/dist/lib/getLocation/index.js.map +1 -1
  17. package/dist/lib/location.js +1 -1
  18. package/dist/lib/location.js.map +1 -1
  19. package/dist/lib/permission.js +1 -1
  20. package/dist/lib/permission.js.map +1 -1
  21. package/dist/lib/request/index.js +4 -4
  22. package/dist/lib/request/index.js.map +1 -1
  23. package/dist/lib/scanCode/index.js +1 -1
  24. package/dist/lib/scanCode/index.js.map +1 -1
  25. package/dist/lib/showModal/toast.js +9 -8
  26. package/dist/lib/showModal/toast.js.map +1 -1
  27. package/dist/setup.js +64 -0
  28. package/dist/setup.js.map +1 -0
  29. package/package.json +12 -14
  30. package/src/__tests__/__mock__/mockAsyncStorage.js +0 -1
  31. package/src/__tests__/__mock__/mockExpoPermissions.js +1 -1
  32. package/src/__tests__/__snapshots__/scanCode.test.js.snap +113 -0
  33. package/src/__tests__/interactive.test.js +40 -66
  34. package/src/__tests__/keyboard.test.js +6 -6
  35. package/src/__tests__/request.test.js +1 -1
  36. package/src/__tests__/scanCode.test.js +14 -0
  37. package/src/__tests__/storage.test.js +1 -1
  38. package/src/__tests__/system.test.js +8 -8
  39. package/src/lib/Mask.tsx +1 -0
  40. package/src/lib/Popup.tsx +2 -2
  41. package/src/lib/chooseVideo/index.ts +1 -1
  42. package/src/lib/connectSocket/index.ts +0 -1
  43. package/src/lib/connectSocket/socketTask.ts +2 -2
  44. package/src/lib/createInnerAudioContext/index.ts +10 -10
  45. package/src/lib/file.ts +2 -1
  46. package/src/lib/getLocation/index.ts +1 -1
  47. package/src/lib/location.ts +1 -1
  48. package/src/lib/permission.ts +1 -1
  49. package/src/lib/request/index.ts +4 -4
  50. package/src/lib/scanCode/index.tsx +1 -1
  51. package/src/lib/showModal/toast.tsx +10 -8
  52. package/src/setup.ts +71 -0
  53. package/src/types/definition.d.ts +2 -0
  54. package/src/__tests__/__snapshots__/interactive.test.js.snap +0 -1690
  55. package/src/__tests__/scanCode.test_.js +0 -24
@@ -1,1690 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`interactive Mask should render Mask success 1`] = `
4
- <Mask
5
- onPress={[MockFunction]}
6
- style={
7
- Object {
8
- "color": "red",
9
- }
10
- }
11
- >
12
- <TouchableWithoutFeedback
13
- onPress={[MockFunction]}
14
- >
15
- <View
16
- accessible={true}
17
- focusable={true}
18
- onClick={[Function]}
19
- onResponderGrant={[Function]}
20
- onResponderMove={[Function]}
21
- onResponderRelease={[Function]}
22
- onResponderTerminate={[Function]}
23
- onResponderTerminationRequest={[Function]}
24
- onStartShouldSetResponder={[Function]}
25
- style={
26
- Array [
27
- Object {
28
- "flex": 1,
29
- "zIndex": 1000,
30
- },
31
- Object {
32
- "backgroundColor": "rgba(0,0,0,.6)",
33
- },
34
- Object {
35
- "color": "red",
36
- },
37
- ]
38
- }
39
- >
40
- <View
41
- accessible={true}
42
- focusable={true}
43
- onClick={[Function]}
44
- onResponderGrant={[Function]}
45
- onResponderMove={[Function]}
46
- onResponderRelease={[Function]}
47
- onResponderTerminate={[Function]}
48
- onResponderTerminationRequest={[Function]}
49
- onStartShouldSetResponder={[Function]}
50
- style={
51
- Array [
52
- Object {
53
- "flex": 1,
54
- "zIndex": 1000,
55
- },
56
- Object {
57
- "backgroundColor": "rgba(0,0,0,.6)",
58
- },
59
- Object {
60
- "color": "red",
61
- },
62
- ]
63
- }
64
- >
65
- <TouchableWithoutFeedback>
66
- <Text
67
- accessible={true}
68
- focusable={false}
69
- onClick={[Function]}
70
- onResponderGrant={[Function]}
71
- onResponderMove={[Function]}
72
- onResponderRelease={[Function]}
73
- onResponderTerminate={[Function]}
74
- onResponderTerminationRequest={[Function]}
75
- onStartShouldSetResponder={[Function]}
76
- >
77
- <Text
78
- accessible={true}
79
- focusable={false}
80
- onClick={[Function]}
81
- onResponderGrant={[Function]}
82
- onResponderMove={[Function]}
83
- onResponderRelease={[Function]}
84
- onResponderTerminate={[Function]}
85
- onResponderTerminationRequest={[Function]}
86
- onStartShouldSetResponder={[Function]}
87
- >
88
- Test
89
- </Text>
90
- </Text>
91
- </TouchableWithoutFeedback>
92
- <PressabilityDebugView
93
- color="red"
94
- />
95
- </View>
96
- </View>
97
- </TouchableWithoutFeedback>
98
- </Mask>
99
- `;
100
-
101
- exports[`interactive Popup should render Popup success 1`] = `
102
- <Popup
103
- onClose={[MockFunction]}
104
- onShow={[MockFunction]}
105
- style={
106
- Object {
107
- "color": "red",
108
- }
109
- }
110
- >
111
- <Modal
112
- hardwareAccelerated={false}
113
- onRequestClose={[MockFunction]}
114
- onShow={[MockFunction]}
115
- transparent={true}
116
- visible={false}
117
- >
118
- <Modal
119
- hardwareAccelerated={false}
120
- onRequestClose={[MockFunction]}
121
- onShow={[MockFunction]}
122
- transparent={true}
123
- visible={false}
124
- >
125
- <Mask
126
- onPress={[MockFunction]}
127
- >
128
- <TouchableWithoutFeedback
129
- onPress={[MockFunction]}
130
- >
131
- <View
132
- accessible={true}
133
- focusable={true}
134
- onClick={[Function]}
135
- onResponderGrant={[Function]}
136
- onResponderMove={[Function]}
137
- onResponderRelease={[Function]}
138
- onResponderTerminate={[Function]}
139
- onResponderTerminationRequest={[Function]}
140
- onStartShouldSetResponder={[Function]}
141
- style={
142
- Array [
143
- Object {
144
- "flex": 1,
145
- "zIndex": 1000,
146
- },
147
- Object {
148
- "backgroundColor": "rgba(0,0,0,.6)",
149
- },
150
- undefined,
151
- ]
152
- }
153
- >
154
- <View
155
- accessible={true}
156
- focusable={true}
157
- onClick={[Function]}
158
- onResponderGrant={[Function]}
159
- onResponderMove={[Function]}
160
- onResponderRelease={[Function]}
161
- onResponderTerminate={[Function]}
162
- onResponderTerminationRequest={[Function]}
163
- onStartShouldSetResponder={[Function]}
164
- style={
165
- Array [
166
- Object {
167
- "flex": 1,
168
- "zIndex": 1000,
169
- },
170
- Object {
171
- "backgroundColor": "rgba(0,0,0,.6)",
172
- },
173
- undefined,
174
- ]
175
- }
176
- >
177
- <TouchableWithoutFeedback>
178
- <ForwardRef(AnimatedComponentWrapper)
179
- accessible={true}
180
- focusable={false}
181
- onClick={[Function]}
182
- onResponderGrant={[Function]}
183
- onResponderMove={[Function]}
184
- onResponderRelease={[Function]}
185
- onResponderTerminate={[Function]}
186
- onResponderTerminationRequest={[Function]}
187
- onStartShouldSetResponder={[Function]}
188
- style={
189
- Array [
190
- Object {
191
- "backgroundColor": "#EFEFF4",
192
- "bottom": 0,
193
- "left": 0,
194
- "position": "absolute",
195
- "width": 750,
196
- },
197
- Object {
198
- "color": "red",
199
- },
200
- Object {
201
- "transform": Array [
202
- Object {
203
- "translateY": 1334,
204
- },
205
- ],
206
- },
207
- ]
208
- }
209
- >
210
- <AnimatedComponent
211
- accessible={true}
212
- focusable={false}
213
- onClick={[Function]}
214
- onResponderGrant={[Function]}
215
- onResponderMove={[Function]}
216
- onResponderRelease={[Function]}
217
- onResponderTerminate={[Function]}
218
- onResponderTerminationRequest={[Function]}
219
- onStartShouldSetResponder={[Function]}
220
- style={
221
- Array [
222
- Object {
223
- "backgroundColor": "#EFEFF4",
224
- "bottom": 0,
225
- "left": 0,
226
- "position": "absolute",
227
- "width": 750,
228
- },
229
- Object {
230
- "color": "red",
231
- },
232
- Object {
233
- "transform": Array [
234
- Object {
235
- "translateY": 1334,
236
- },
237
- ],
238
- },
239
- ]
240
- }
241
- >
242
- <View
243
- accessible={true}
244
- focusable={false}
245
- onClick={[Function]}
246
- onResponderGrant={[Function]}
247
- onResponderMove={[Function]}
248
- onResponderRelease={[Function]}
249
- onResponderTerminate={[Function]}
250
- onResponderTerminationRequest={[Function]}
251
- onStartShouldSetResponder={[Function]}
252
- style={
253
- Object {
254
- "backgroundColor": "#EFEFF4",
255
- "bottom": 0,
256
- "color": "red",
257
- "left": 0,
258
- "position": "absolute",
259
- "transform": Array [
260
- Object {
261
- "translateY": 1334,
262
- },
263
- ],
264
- "width": 750,
265
- }
266
- }
267
- >
268
- <View
269
- accessible={true}
270
- focusable={false}
271
- onClick={[Function]}
272
- onResponderGrant={[Function]}
273
- onResponderMove={[Function]}
274
- onResponderRelease={[Function]}
275
- onResponderTerminate={[Function]}
276
- onResponderTerminationRequest={[Function]}
277
- onStartShouldSetResponder={[Function]}
278
- style={
279
- Object {
280
- "backgroundColor": "#EFEFF4",
281
- "bottom": 0,
282
- "color": "red",
283
- "left": 0,
284
- "position": "absolute",
285
- "transform": Array [
286
- Object {
287
- "translateY": 1334,
288
- },
289
- ],
290
- "width": 750,
291
- }
292
- }
293
- >
294
- <View
295
- onLayout={[Function]}
296
- >
297
- <View
298
- onLayout={[Function]}
299
- >
300
- <Text>
301
- <Text>
302
- Test
303
- </Text>
304
- </Text>
305
- </View>
306
- </View>
307
- </View>
308
- </View>
309
- </AnimatedComponent>
310
- </ForwardRef(AnimatedComponentWrapper)>
311
- </TouchableWithoutFeedback>
312
- <PressabilityDebugView
313
- color="red"
314
- />
315
- </View>
316
- </View>
317
- </TouchableWithoutFeedback>
318
- </Mask>
319
- </Modal>
320
- </Modal>
321
- </Popup>
322
- `;
323
-
324
- exports[`interactive showActionSheet should render ActionSheet success 1`] = `
325
- <Index
326
- actions={
327
- Array [
328
- Object {
329
- "label": "取消",
330
- "onPress": [MockFunction],
331
- "textStyle": Object {
332
- "color": "#000000",
333
- },
334
- "type": "default",
335
- },
336
- ]
337
- }
338
- autoDectect={true}
339
- menus={
340
- Array [
341
- Object {
342
- "label": "选项一",
343
- "onPress": [MockFunction],
344
- "textStyle": Object {
345
- "color": "#000000",
346
- },
347
- "type": "default",
348
- },
349
- Object {
350
- "label": "选项二",
351
- "onPress": [MockFunction],
352
- "textStyle": Object {
353
- "color": "#000000",
354
- },
355
- "type": "default",
356
- },
357
- ]
358
- }
359
- onClose={[MockFunction]}
360
- type="ios"
361
- visible={false}
362
- >
363
- <Popup
364
- onClose={[MockFunction]}
365
- style={
366
- Array [
367
- Object {
368
- "backgroundColor": "#EFEFF4",
369
- },
370
- undefined,
371
- ]
372
- }
373
- visible={false}
374
- >
375
- <Modal
376
- hardwareAccelerated={false}
377
- onRequestClose={[MockFunction]}
378
- transparent={true}
379
- visible={false}
380
- >
381
- <Modal
382
- hardwareAccelerated={false}
383
- onRequestClose={[MockFunction]}
384
- transparent={true}
385
- visible={false}
386
- >
387
- <Mask
388
- onPress={[MockFunction]}
389
- >
390
- <TouchableWithoutFeedback
391
- onPress={[MockFunction]}
392
- >
393
- <View
394
- accessible={true}
395
- focusable={true}
396
- onClick={[Function]}
397
- onResponderGrant={[Function]}
398
- onResponderMove={[Function]}
399
- onResponderRelease={[Function]}
400
- onResponderTerminate={[Function]}
401
- onResponderTerminationRequest={[Function]}
402
- onStartShouldSetResponder={[Function]}
403
- style={
404
- Array [
405
- Object {
406
- "flex": 1,
407
- "zIndex": 1000,
408
- },
409
- Object {
410
- "backgroundColor": "rgba(0,0,0,.6)",
411
- },
412
- undefined,
413
- ]
414
- }
415
- >
416
- <View
417
- accessible={true}
418
- focusable={true}
419
- onClick={[Function]}
420
- onResponderGrant={[Function]}
421
- onResponderMove={[Function]}
422
- onResponderRelease={[Function]}
423
- onResponderTerminate={[Function]}
424
- onResponderTerminationRequest={[Function]}
425
- onStartShouldSetResponder={[Function]}
426
- style={
427
- Array [
428
- Object {
429
- "flex": 1,
430
- "zIndex": 1000,
431
- },
432
- Object {
433
- "backgroundColor": "rgba(0,0,0,.6)",
434
- },
435
- undefined,
436
- ]
437
- }
438
- >
439
- <TouchableWithoutFeedback>
440
- <ForwardRef(AnimatedComponentWrapper)
441
- accessible={true}
442
- focusable={false}
443
- onClick={[Function]}
444
- onResponderGrant={[Function]}
445
- onResponderMove={[Function]}
446
- onResponderRelease={[Function]}
447
- onResponderTerminate={[Function]}
448
- onResponderTerminationRequest={[Function]}
449
- onStartShouldSetResponder={[Function]}
450
- style={
451
- Array [
452
- Object {
453
- "backgroundColor": "#EFEFF4",
454
- "bottom": 0,
455
- "left": 0,
456
- "position": "absolute",
457
- "width": 750,
458
- },
459
- Array [
460
- Object {
461
- "backgroundColor": "#EFEFF4",
462
- },
463
- undefined,
464
- ],
465
- Object {
466
- "transform": Array [
467
- Object {
468
- "translateY": 1334,
469
- },
470
- ],
471
- },
472
- ]
473
- }
474
- >
475
- <AnimatedComponent
476
- accessible={true}
477
- focusable={false}
478
- onClick={[Function]}
479
- onResponderGrant={[Function]}
480
- onResponderMove={[Function]}
481
- onResponderRelease={[Function]}
482
- onResponderTerminate={[Function]}
483
- onResponderTerminationRequest={[Function]}
484
- onStartShouldSetResponder={[Function]}
485
- style={
486
- Array [
487
- Object {
488
- "backgroundColor": "#EFEFF4",
489
- "bottom": 0,
490
- "left": 0,
491
- "position": "absolute",
492
- "width": 750,
493
- },
494
- Array [
495
- Object {
496
- "backgroundColor": "#EFEFF4",
497
- },
498
- undefined,
499
- ],
500
- Object {
501
- "transform": Array [
502
- Object {
503
- "translateY": 1334,
504
- },
505
- ],
506
- },
507
- ]
508
- }
509
- >
510
- <View
511
- accessible={true}
512
- focusable={false}
513
- onClick={[Function]}
514
- onResponderGrant={[Function]}
515
- onResponderMove={[Function]}
516
- onResponderRelease={[Function]}
517
- onResponderTerminate={[Function]}
518
- onResponderTerminationRequest={[Function]}
519
- onStartShouldSetResponder={[Function]}
520
- style={
521
- Object {
522
- "backgroundColor": "#EFEFF4",
523
- "bottom": 0,
524
- "left": 0,
525
- "position": "absolute",
526
- "transform": Array [
527
- Object {
528
- "translateY": 1334,
529
- },
530
- ],
531
- "width": 750,
532
- }
533
- }
534
- >
535
- <View
536
- accessible={true}
537
- focusable={false}
538
- onClick={[Function]}
539
- onResponderGrant={[Function]}
540
- onResponderMove={[Function]}
541
- onResponderRelease={[Function]}
542
- onResponderTerminate={[Function]}
543
- onResponderTerminationRequest={[Function]}
544
- onStartShouldSetResponder={[Function]}
545
- style={
546
- Object {
547
- "backgroundColor": "#EFEFF4",
548
- "bottom": 0,
549
- "left": 0,
550
- "position": "absolute",
551
- "transform": Array [
552
- Object {
553
- "translateY": 1334,
554
- },
555
- ],
556
- "width": 750,
557
- }
558
- }
559
- >
560
- <View
561
- onLayout={[Function]}
562
- >
563
- <View
564
- onLayout={[Function]}
565
- >
566
- <View
567
- style={
568
- Array [
569
- Object {
570
- "backgroundColor": "#fff",
571
- },
572
- ]
573
- }
574
- >
575
- <View
576
- style={
577
- Array [
578
- Object {
579
- "backgroundColor": "#fff",
580
- },
581
- ]
582
- }
583
- >
584
- <ForwardRef
585
- key="0"
586
- onPress={[MockFunction]}
587
- style={
588
- Array [
589
- Object {
590
- "borderColor": "#D9D9D9",
591
- "borderStyle": "solid",
592
- "borderTopWidth": 0.5,
593
- },
594
- Object {
595
- "paddingBottom": 10,
596
- "paddingTop": 10,
597
- },
598
- Object {
599
- "borderTopWidth": 0,
600
- },
601
- undefined,
602
- ]
603
- }
604
- underlayColor="#ECECEC"
605
- >
606
- <TouchableHighlight
607
- hostRef={null}
608
- onPress={[MockFunction]}
609
- style={
610
- Array [
611
- Object {
612
- "borderColor": "#D9D9D9",
613
- "borderStyle": "solid",
614
- "borderTopWidth": 0.5,
615
- },
616
- Object {
617
- "paddingBottom": 10,
618
- "paddingTop": 10,
619
- },
620
- Object {
621
- "borderTopWidth": 0,
622
- },
623
- undefined,
624
- ]
625
- }
626
- underlayColor="#ECECEC"
627
- >
628
- <View
629
- accessible={true}
630
- focusable={true}
631
- onClick={[Function]}
632
- onResponderGrant={[Function]}
633
- onResponderMove={[Function]}
634
- onResponderRelease={[Function]}
635
- onResponderTerminate={[Function]}
636
- onResponderTerminationRequest={[Function]}
637
- onStartShouldSetResponder={[Function]}
638
- style={
639
- Array [
640
- Object {
641
- "borderColor": "#D9D9D9",
642
- "borderStyle": "solid",
643
- "borderTopWidth": 0.5,
644
- },
645
- Object {
646
- "paddingBottom": 10,
647
- "paddingTop": 10,
648
- },
649
- Object {
650
- "borderTopWidth": 0,
651
- },
652
- undefined,
653
- ]
654
- }
655
- >
656
- <View
657
- accessible={true}
658
- focusable={true}
659
- onClick={[Function]}
660
- onResponderGrant={[Function]}
661
- onResponderMove={[Function]}
662
- onResponderRelease={[Function]}
663
- onResponderTerminate={[Function]}
664
- onResponderTerminationRequest={[Function]}
665
- onStartShouldSetResponder={[Function]}
666
- style={
667
- Array [
668
- Object {
669
- "borderColor": "#D9D9D9",
670
- "borderStyle": "solid",
671
- "borderTopWidth": 0.5,
672
- },
673
- Object {
674
- "paddingBottom": 10,
675
- "paddingTop": 10,
676
- },
677
- Object {
678
- "borderTopWidth": 0,
679
- },
680
- undefined,
681
- ]
682
- }
683
- >
684
- <Text
685
- style={
686
- Array [
687
- Object {
688
- "fontSize": 18,
689
- "marginBottom": 5.4,
690
- "marginTop": 5.4,
691
- "textAlign": "center",
692
- },
693
- Object {
694
- "color": "#000",
695
- },
696
- Object {
697
- "color": "#000000",
698
- },
699
- ]
700
- }
701
- >
702
- <Text
703
- style={
704
- Array [
705
- Object {
706
- "fontSize": 18,
707
- "marginBottom": 5.4,
708
- "marginTop": 5.4,
709
- "textAlign": "center",
710
- },
711
- Object {
712
- "color": "#000",
713
- },
714
- Object {
715
- "color": "#000000",
716
- },
717
- ]
718
- }
719
- >
720
- 选项一
721
- </Text>
722
- </Text>
723
- <PressabilityDebugView
724
- color="green"
725
- />
726
- </View>
727
- </View>
728
- </TouchableHighlight>
729
- </ForwardRef>
730
- <ForwardRef
731
- key="1"
732
- onPress={[MockFunction]}
733
- style={
734
- Array [
735
- Object {
736
- "borderColor": "#D9D9D9",
737
- "borderStyle": "solid",
738
- "borderTopWidth": 0.5,
739
- },
740
- Object {
741
- "paddingBottom": 10,
742
- "paddingTop": 10,
743
- },
744
- Object {},
745
- undefined,
746
- ]
747
- }
748
- underlayColor="#ECECEC"
749
- >
750
- <TouchableHighlight
751
- hostRef={null}
752
- onPress={[MockFunction]}
753
- style={
754
- Array [
755
- Object {
756
- "borderColor": "#D9D9D9",
757
- "borderStyle": "solid",
758
- "borderTopWidth": 0.5,
759
- },
760
- Object {
761
- "paddingBottom": 10,
762
- "paddingTop": 10,
763
- },
764
- Object {},
765
- undefined,
766
- ]
767
- }
768
- underlayColor="#ECECEC"
769
- >
770
- <View
771
- accessible={true}
772
- focusable={true}
773
- onClick={[Function]}
774
- onResponderGrant={[Function]}
775
- onResponderMove={[Function]}
776
- onResponderRelease={[Function]}
777
- onResponderTerminate={[Function]}
778
- onResponderTerminationRequest={[Function]}
779
- onStartShouldSetResponder={[Function]}
780
- style={
781
- Array [
782
- Object {
783
- "borderColor": "#D9D9D9",
784
- "borderStyle": "solid",
785
- "borderTopWidth": 0.5,
786
- },
787
- Object {
788
- "paddingBottom": 10,
789
- "paddingTop": 10,
790
- },
791
- Object {},
792
- undefined,
793
- ]
794
- }
795
- >
796
- <View
797
- accessible={true}
798
- focusable={true}
799
- onClick={[Function]}
800
- onResponderGrant={[Function]}
801
- onResponderMove={[Function]}
802
- onResponderRelease={[Function]}
803
- onResponderTerminate={[Function]}
804
- onResponderTerminationRequest={[Function]}
805
- onStartShouldSetResponder={[Function]}
806
- style={
807
- Array [
808
- Object {
809
- "borderColor": "#D9D9D9",
810
- "borderStyle": "solid",
811
- "borderTopWidth": 0.5,
812
- },
813
- Object {
814
- "paddingBottom": 10,
815
- "paddingTop": 10,
816
- },
817
- Object {},
818
- undefined,
819
- ]
820
- }
821
- >
822
- <Text
823
- style={
824
- Array [
825
- Object {
826
- "fontSize": 18,
827
- "marginBottom": 5.4,
828
- "marginTop": 5.4,
829
- "textAlign": "center",
830
- },
831
- Object {
832
- "color": "#000",
833
- },
834
- Object {
835
- "color": "#000000",
836
- },
837
- ]
838
- }
839
- >
840
- <Text
841
- style={
842
- Array [
843
- Object {
844
- "fontSize": 18,
845
- "marginBottom": 5.4,
846
- "marginTop": 5.4,
847
- "textAlign": "center",
848
- },
849
- Object {
850
- "color": "#000",
851
- },
852
- Object {
853
- "color": "#000000",
854
- },
855
- ]
856
- }
857
- >
858
- 选项二
859
- </Text>
860
- </Text>
861
- <PressabilityDebugView
862
- color="green"
863
- />
864
- </View>
865
- </View>
866
- </TouchableHighlight>
867
- </ForwardRef>
868
- </View>
869
- </View>
870
- <View
871
- style={
872
- Array [
873
- Object {
874
- "backgroundColor": "#fff",
875
- "marginTop": 6,
876
- },
877
- ]
878
- }
879
- >
880
- <View
881
- style={
882
- Array [
883
- Object {
884
- "backgroundColor": "#fff",
885
- "marginTop": 6,
886
- },
887
- ]
888
- }
889
- >
890
- <ForwardRef
891
- key="0"
892
- onPress={[MockFunction]}
893
- style={
894
- Array [
895
- Object {
896
- "borderColor": "#D9D9D9",
897
- "borderStyle": "solid",
898
- "borderTopWidth": 0.5,
899
- },
900
- Object {
901
- "paddingBottom": 10,
902
- "paddingTop": 10,
903
- },
904
- Object {
905
- "borderTopWidth": 0,
906
- },
907
- undefined,
908
- ]
909
- }
910
- underlayColor="#ECECEC"
911
- >
912
- <TouchableHighlight
913
- hostRef={null}
914
- onPress={[MockFunction]}
915
- style={
916
- Array [
917
- Object {
918
- "borderColor": "#D9D9D9",
919
- "borderStyle": "solid",
920
- "borderTopWidth": 0.5,
921
- },
922
- Object {
923
- "paddingBottom": 10,
924
- "paddingTop": 10,
925
- },
926
- Object {
927
- "borderTopWidth": 0,
928
- },
929
- undefined,
930
- ]
931
- }
932
- underlayColor="#ECECEC"
933
- >
934
- <View
935
- accessible={true}
936
- focusable={true}
937
- onClick={[Function]}
938
- onResponderGrant={[Function]}
939
- onResponderMove={[Function]}
940
- onResponderRelease={[Function]}
941
- onResponderTerminate={[Function]}
942
- onResponderTerminationRequest={[Function]}
943
- onStartShouldSetResponder={[Function]}
944
- style={
945
- Array [
946
- Object {
947
- "borderColor": "#D9D9D9",
948
- "borderStyle": "solid",
949
- "borderTopWidth": 0.5,
950
- },
951
- Object {
952
- "paddingBottom": 10,
953
- "paddingTop": 10,
954
- },
955
- Object {
956
- "borderTopWidth": 0,
957
- },
958
- undefined,
959
- ]
960
- }
961
- >
962
- <View
963
- accessible={true}
964
- focusable={true}
965
- onClick={[Function]}
966
- onResponderGrant={[Function]}
967
- onResponderMove={[Function]}
968
- onResponderRelease={[Function]}
969
- onResponderTerminate={[Function]}
970
- onResponderTerminationRequest={[Function]}
971
- onStartShouldSetResponder={[Function]}
972
- style={
973
- Array [
974
- Object {
975
- "borderColor": "#D9D9D9",
976
- "borderStyle": "solid",
977
- "borderTopWidth": 0.5,
978
- },
979
- Object {
980
- "paddingBottom": 10,
981
- "paddingTop": 10,
982
- },
983
- Object {
984
- "borderTopWidth": 0,
985
- },
986
- undefined,
987
- ]
988
- }
989
- >
990
- <Text
991
- style={
992
- Array [
993
- Object {
994
- "fontSize": 18,
995
- "marginBottom": 5.4,
996
- "marginTop": 5.4,
997
- "textAlign": "center",
998
- },
999
- Object {
1000
- "color": "#000",
1001
- },
1002
- Object {
1003
- "color": "#000000",
1004
- },
1005
- ]
1006
- }
1007
- >
1008
- <Text
1009
- style={
1010
- Array [
1011
- Object {
1012
- "fontSize": 18,
1013
- "marginBottom": 5.4,
1014
- "marginTop": 5.4,
1015
- "textAlign": "center",
1016
- },
1017
- Object {
1018
- "color": "#000",
1019
- },
1020
- Object {
1021
- "color": "#000000",
1022
- },
1023
- ]
1024
- }
1025
- >
1026
- 取消
1027
- </Text>
1028
- </Text>
1029
- <PressabilityDebugView
1030
- color="green"
1031
- />
1032
- </View>
1033
- </View>
1034
- </TouchableHighlight>
1035
- </ForwardRef>
1036
- </View>
1037
- </View>
1038
- <View
1039
- style={
1040
- Object {
1041
- "backgroundColor": "#fff",
1042
- "paddingBottom": 16,
1043
- }
1044
- }
1045
- >
1046
- <View
1047
- style={
1048
- Object {
1049
- "backgroundColor": "#fff",
1050
- "paddingBottom": 16,
1051
- }
1052
- }
1053
- />
1054
- </View>
1055
- </View>
1056
- </View>
1057
- </View>
1058
- </View>
1059
- </AnimatedComponent>
1060
- </ForwardRef(AnimatedComponentWrapper)>
1061
- </TouchableWithoutFeedback>
1062
- <PressabilityDebugView
1063
- color="red"
1064
- />
1065
- </View>
1066
- </View>
1067
- </TouchableWithoutFeedback>
1068
- </Mask>
1069
- </Modal>
1070
- </Modal>
1071
- </Popup>
1072
- </Index>
1073
- `;
1074
-
1075
- exports[`interactive showModal should render Dialog success 1`] = `
1076
- <Index
1077
- autoDectect={true}
1078
- buttons={
1079
- Array [
1080
- Object {
1081
- "label": "取消",
1082
- "onPress": [MockFunction],
1083
- "type": "#000000",
1084
- },
1085
- Object {
1086
- "label": "确定",
1087
- "onPress": [MockFunction],
1088
- "type": "#3CC51F",
1089
- },
1090
- ]
1091
- }
1092
- onClose={[MockFunction]}
1093
- title="title"
1094
- visible={true}
1095
- >
1096
- <View
1097
- style={
1098
- Array [
1099
- Object {
1100
- "backgroundColor": "transparent",
1101
- "bottom": 0,
1102
- "left": 0,
1103
- "position": "absolute",
1104
- "right": 0,
1105
- "top": 0,
1106
- },
1107
- Object {
1108
- "display": "flex",
1109
- },
1110
- ]
1111
- }
1112
- >
1113
- <View
1114
- style={
1115
- Array [
1116
- Object {
1117
- "backgroundColor": "transparent",
1118
- "bottom": 0,
1119
- "left": 0,
1120
- "position": "absolute",
1121
- "right": 0,
1122
- "top": 0,
1123
- },
1124
- Object {
1125
- "display": "flex",
1126
- },
1127
- ]
1128
- }
1129
- >
1130
- <Mask
1131
- onPress={[MockFunction]}
1132
- style={
1133
- Array [
1134
- Object {
1135
- "alignItems": "center",
1136
- "flexDirection": "row",
1137
- "justifyContent": "center",
1138
- },
1139
- undefined,
1140
- ]
1141
- }
1142
- >
1143
- <TouchableWithoutFeedback
1144
- onPress={[MockFunction]}
1145
- >
1146
- <View
1147
- accessible={true}
1148
- focusable={true}
1149
- onClick={[Function]}
1150
- onResponderGrant={[Function]}
1151
- onResponderMove={[Function]}
1152
- onResponderRelease={[Function]}
1153
- onResponderTerminate={[Function]}
1154
- onResponderTerminationRequest={[Function]}
1155
- onStartShouldSetResponder={[Function]}
1156
- style={
1157
- Array [
1158
- Object {
1159
- "flex": 1,
1160
- "zIndex": 1000,
1161
- },
1162
- Object {
1163
- "backgroundColor": "rgba(0,0,0,.6)",
1164
- },
1165
- Array [
1166
- Object {
1167
- "alignItems": "center",
1168
- "flexDirection": "row",
1169
- "justifyContent": "center",
1170
- },
1171
- undefined,
1172
- ],
1173
- ]
1174
- }
1175
- >
1176
- <View
1177
- accessible={true}
1178
- focusable={true}
1179
- onClick={[Function]}
1180
- onResponderGrant={[Function]}
1181
- onResponderMove={[Function]}
1182
- onResponderRelease={[Function]}
1183
- onResponderTerminate={[Function]}
1184
- onResponderTerminationRequest={[Function]}
1185
- onStartShouldSetResponder={[Function]}
1186
- style={
1187
- Array [
1188
- Object {
1189
- "flex": 1,
1190
- "zIndex": 1000,
1191
- },
1192
- Object {
1193
- "backgroundColor": "rgba(0,0,0,.6)",
1194
- },
1195
- Array [
1196
- Object {
1197
- "alignItems": "center",
1198
- "flexDirection": "row",
1199
- "justifyContent": "center",
1200
- },
1201
- undefined,
1202
- ],
1203
- ]
1204
- }
1205
- >
1206
- <TouchableWithoutFeedback>
1207
- <View
1208
- accessible={true}
1209
- focusable={false}
1210
- onClick={[Function]}
1211
- onResponderGrant={[Function]}
1212
- onResponderMove={[Function]}
1213
- onResponderRelease={[Function]}
1214
- onResponderTerminate={[Function]}
1215
- onResponderTerminationRequest={[Function]}
1216
- onStartShouldSetResponder={[Function]}
1217
- style={
1218
- Array [
1219
- Object {
1220
- "backgroundColor": "#FFFFFF",
1221
- "borderRadius": 3,
1222
- "overflow": "hidden",
1223
- "width": 690,
1224
- },
1225
- undefined,
1226
- ]
1227
- }
1228
- >
1229
- <View
1230
- accessible={true}
1231
- focusable={false}
1232
- onClick={[Function]}
1233
- onResponderGrant={[Function]}
1234
- onResponderMove={[Function]}
1235
- onResponderRelease={[Function]}
1236
- onResponderTerminate={[Function]}
1237
- onResponderTerminationRequest={[Function]}
1238
- onStartShouldSetResponder={[Function]}
1239
- style={
1240
- Array [
1241
- Object {
1242
- "backgroundColor": "#FFFFFF",
1243
- "borderRadius": 3,
1244
- "overflow": "hidden",
1245
- "width": 690,
1246
- },
1247
- undefined,
1248
- ]
1249
- }
1250
- >
1251
- <View
1252
- style={
1253
- Array [
1254
- Object {
1255
- "paddingBottom": 8,
1256
- "paddingLeft": 25.6,
1257
- "paddingRight": 25.6,
1258
- "paddingTop": 20.8,
1259
- },
1260
- undefined,
1261
- ]
1262
- }
1263
- >
1264
- <View
1265
- style={
1266
- Array [
1267
- Object {
1268
- "paddingBottom": 8,
1269
- "paddingLeft": 25.6,
1270
- "paddingRight": 25.6,
1271
- "paddingTop": 20.8,
1272
- },
1273
- undefined,
1274
- ]
1275
- }
1276
- >
1277
- <Text
1278
- style={
1279
- Array [
1280
- Object {
1281
- "fontWeight": "400",
1282
- },
1283
- Object {
1284
- "fontSize": 18,
1285
- "textAlign": "center",
1286
- },
1287
- undefined,
1288
- ]
1289
- }
1290
- >
1291
- <Text
1292
- style={
1293
- Array [
1294
- Object {
1295
- "fontWeight": "400",
1296
- },
1297
- Object {
1298
- "fontSize": 18,
1299
- "textAlign": "center",
1300
- },
1301
- undefined,
1302
- ]
1303
- }
1304
- >
1305
- title
1306
- </Text>
1307
- </Text>
1308
- </View>
1309
- </View>
1310
- <View
1311
- style={
1312
- Array [
1313
- Object {
1314
- "paddingLeft": 25.6,
1315
- "paddingRight": 25.6,
1316
- },
1317
- Object {
1318
- "paddingBottom": 32,
1319
- },
1320
- undefined,
1321
- ]
1322
- }
1323
- >
1324
- <View
1325
- style={
1326
- Array [
1327
- Object {
1328
- "paddingLeft": 25.6,
1329
- "paddingRight": 25.6,
1330
- },
1331
- Object {
1332
- "paddingBottom": 32,
1333
- },
1334
- undefined,
1335
- ]
1336
- }
1337
- >
1338
- <Text
1339
- key=".0"
1340
- style={
1341
- Array [
1342
- Object {
1343
- "color": "#999999",
1344
- "lineHeight": 19.5,
1345
- },
1346
- Object {
1347
- "fontSize": 15,
1348
- "textAlign": "center",
1349
- },
1350
- undefined,
1351
- undefined,
1352
- ]
1353
- }
1354
- >
1355
- <Text
1356
- style={
1357
- Array [
1358
- Object {
1359
- "color": "#999999",
1360
- "lineHeight": 19.5,
1361
- },
1362
- Object {
1363
- "fontSize": 15,
1364
- "textAlign": "center",
1365
- },
1366
- undefined,
1367
- undefined,
1368
- ]
1369
- }
1370
- >
1371
- Test
1372
- </Text>
1373
- </Text>
1374
- </View>
1375
- </View>
1376
- <View
1377
- style={
1378
- Array [
1379
- Object {
1380
- "flexDirection": "row",
1381
- },
1382
- Object {
1383
- "alignItems": "center",
1384
- "borderColor": "#D5D5D6",
1385
- "borderStyle": "solid",
1386
- "borderTopWidth": 0.5,
1387
- "height": 48,
1388
- "justifyContent": "center",
1389
- },
1390
- undefined,
1391
- ]
1392
- }
1393
- >
1394
- <View
1395
- style={
1396
- Array [
1397
- Object {
1398
- "flexDirection": "row",
1399
- },
1400
- Object {
1401
- "alignItems": "center",
1402
- "borderColor": "#D5D5D6",
1403
- "borderStyle": "solid",
1404
- "borderTopWidth": 0.5,
1405
- "height": 48,
1406
- "justifyContent": "center",
1407
- },
1408
- undefined,
1409
- ]
1410
- }
1411
- >
1412
- <ForwardRef
1413
- key="0"
1414
- onPress={[MockFunction]}
1415
- style={
1416
- Array [
1417
- Object {
1418
- "alignItems": "center",
1419
- "justifyContent": "center",
1420
- },
1421
- Object {
1422
- "flex": 1,
1423
- "height": 48,
1424
- },
1425
- Object {},
1426
- Object {},
1427
- ]
1428
- }
1429
- underlayColor="#EEEEEE"
1430
- >
1431
- <TouchableHighlight
1432
- hostRef={null}
1433
- onPress={[MockFunction]}
1434
- style={
1435
- Array [
1436
- Object {
1437
- "alignItems": "center",
1438
- "justifyContent": "center",
1439
- },
1440
- Object {
1441
- "flex": 1,
1442
- "height": 48,
1443
- },
1444
- Object {},
1445
- Object {},
1446
- ]
1447
- }
1448
- underlayColor="#EEEEEE"
1449
- >
1450
- <View
1451
- accessible={true}
1452
- focusable={true}
1453
- onClick={[Function]}
1454
- onResponderGrant={[Function]}
1455
- onResponderMove={[Function]}
1456
- onResponderRelease={[Function]}
1457
- onResponderTerminate={[Function]}
1458
- onResponderTerminationRequest={[Function]}
1459
- onStartShouldSetResponder={[Function]}
1460
- style={
1461
- Array [
1462
- Object {
1463
- "alignItems": "center",
1464
- "justifyContent": "center",
1465
- },
1466
- Object {
1467
- "flex": 1,
1468
- "height": 48,
1469
- },
1470
- Object {},
1471
- Object {},
1472
- ]
1473
- }
1474
- >
1475
- <View
1476
- accessible={true}
1477
- focusable={true}
1478
- onClick={[Function]}
1479
- onResponderGrant={[Function]}
1480
- onResponderMove={[Function]}
1481
- onResponderRelease={[Function]}
1482
- onResponderTerminate={[Function]}
1483
- onResponderTerminationRequest={[Function]}
1484
- onStartShouldSetResponder={[Function]}
1485
- style={
1486
- Array [
1487
- Object {
1488
- "alignItems": "center",
1489
- "justifyContent": "center",
1490
- },
1491
- Object {
1492
- "flex": 1,
1493
- "height": 48,
1494
- },
1495
- Object {},
1496
- Object {},
1497
- ]
1498
- }
1499
- >
1500
- <Text
1501
- style={
1502
- Array [
1503
- Object {
1504
- "fontSize": 18,
1505
- },
1506
- Object {
1507
- "color": "#000000",
1508
- },
1509
- ]
1510
- }
1511
- >
1512
- <Text
1513
- style={
1514
- Array [
1515
- Object {
1516
- "fontSize": 18,
1517
- },
1518
- Object {
1519
- "color": "#000000",
1520
- },
1521
- ]
1522
- }
1523
- >
1524
- 取消
1525
- </Text>
1526
- </Text>
1527
- <PressabilityDebugView
1528
- color="green"
1529
- />
1530
- </View>
1531
- </View>
1532
- </TouchableHighlight>
1533
- </ForwardRef>
1534
- <ForwardRef
1535
- key="1"
1536
- onPress={[MockFunction]}
1537
- style={
1538
- Array [
1539
- Object {
1540
- "alignItems": "center",
1541
- "justifyContent": "center",
1542
- },
1543
- Object {
1544
- "flex": 1,
1545
- "height": 48,
1546
- },
1547
- Object {
1548
- "borderColor": "#D5D5D6",
1549
- "borderLeftWidth": 0.5,
1550
- "borderStyle": "solid",
1551
- },
1552
- Object {},
1553
- ]
1554
- }
1555
- underlayColor="#EEEEEE"
1556
- >
1557
- <TouchableHighlight
1558
- hostRef={null}
1559
- onPress={[MockFunction]}
1560
- style={
1561
- Array [
1562
- Object {
1563
- "alignItems": "center",
1564
- "justifyContent": "center",
1565
- },
1566
- Object {
1567
- "flex": 1,
1568
- "height": 48,
1569
- },
1570
- Object {
1571
- "borderColor": "#D5D5D6",
1572
- "borderLeftWidth": 0.5,
1573
- "borderStyle": "solid",
1574
- },
1575
- Object {},
1576
- ]
1577
- }
1578
- underlayColor="#EEEEEE"
1579
- >
1580
- <View
1581
- accessible={true}
1582
- focusable={true}
1583
- onClick={[Function]}
1584
- onResponderGrant={[Function]}
1585
- onResponderMove={[Function]}
1586
- onResponderRelease={[Function]}
1587
- onResponderTerminate={[Function]}
1588
- onResponderTerminationRequest={[Function]}
1589
- onStartShouldSetResponder={[Function]}
1590
- style={
1591
- Array [
1592
- Object {
1593
- "alignItems": "center",
1594
- "justifyContent": "center",
1595
- },
1596
- Object {
1597
- "flex": 1,
1598
- "height": 48,
1599
- },
1600
- Object {
1601
- "borderColor": "#D5D5D6",
1602
- "borderLeftWidth": 0.5,
1603
- "borderStyle": "solid",
1604
- },
1605
- Object {},
1606
- ]
1607
- }
1608
- >
1609
- <View
1610
- accessible={true}
1611
- focusable={true}
1612
- onClick={[Function]}
1613
- onResponderGrant={[Function]}
1614
- onResponderMove={[Function]}
1615
- onResponderRelease={[Function]}
1616
- onResponderTerminate={[Function]}
1617
- onResponderTerminationRequest={[Function]}
1618
- onStartShouldSetResponder={[Function]}
1619
- style={
1620
- Array [
1621
- Object {
1622
- "alignItems": "center",
1623
- "justifyContent": "center",
1624
- },
1625
- Object {
1626
- "flex": 1,
1627
- "height": 48,
1628
- },
1629
- Object {
1630
- "borderColor": "#D5D5D6",
1631
- "borderLeftWidth": 0.5,
1632
- "borderStyle": "solid",
1633
- },
1634
- Object {},
1635
- ]
1636
- }
1637
- >
1638
- <Text
1639
- style={
1640
- Array [
1641
- Object {
1642
- "fontSize": 18,
1643
- },
1644
- Object {
1645
- "color": "#3CC51F",
1646
- },
1647
- ]
1648
- }
1649
- >
1650
- <Text
1651
- style={
1652
- Array [
1653
- Object {
1654
- "fontSize": 18,
1655
- },
1656
- Object {
1657
- "color": "#3CC51F",
1658
- },
1659
- ]
1660
- }
1661
- >
1662
- 确定
1663
- </Text>
1664
- </Text>
1665
- <PressabilityDebugView
1666
- color="green"
1667
- />
1668
- </View>
1669
- </View>
1670
- </TouchableHighlight>
1671
- </ForwardRef>
1672
- </View>
1673
- </View>
1674
- <PressabilityDebugView
1675
- color="red"
1676
- />
1677
- </View>
1678
- </View>
1679
- </TouchableWithoutFeedback>
1680
- <PressabilityDebugView
1681
- color="red"
1682
- />
1683
- </View>
1684
- </View>
1685
- </TouchableWithoutFeedback>
1686
- </Mask>
1687
- </View>
1688
- </View>
1689
- </Index>
1690
- `;