react-dropzone 4.0.0 → 4.1.2
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/.babelrc +1 -1
- package/.eslintrc +6 -4
- package/.travis.yml +1 -3
- package/README.md +33 -6
- package/dist/index.js +938 -844
- package/dist/index.js.map +1 -1
- package/examples/Basic/Readme.md +42 -0
- package/package.json +27 -25
- package/src/__snapshots__/index.spec.js.snap +3 -3
- package/src/index.js +90 -67
- package/src/index.spec.js +146 -37
- package/src/utils/index.js +43 -0
- package/src/{getDataTransferItems.spec.js → utils/index.spec.js} +8 -8
- package/src/utils/styles.js +23 -0
- package/webpack.config.js +2 -5
- package/yarn.lock +2382 -1403
- package/src/getDataTransferItems.js +0 -17
package/dist/index.js
CHANGED
|
@@ -16,21 +16,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
16
16
|
/******/ function __webpack_require__(moduleId) {
|
|
17
17
|
/******/
|
|
18
18
|
/******/ // Check if module is in cache
|
|
19
|
-
/******/ if(installedModules[moduleId])
|
|
19
|
+
/******/ if(installedModules[moduleId]) {
|
|
20
20
|
/******/ return installedModules[moduleId].exports;
|
|
21
|
-
/******/
|
|
21
|
+
/******/ }
|
|
22
22
|
/******/ // Create a new module (and put it into the cache)
|
|
23
23
|
/******/ var module = installedModules[moduleId] = {
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
24
|
+
/******/ i: moduleId,
|
|
25
|
+
/******/ l: false,
|
|
26
|
+
/******/ exports: {}
|
|
27
27
|
/******/ };
|
|
28
28
|
/******/
|
|
29
29
|
/******/ // Execute the module function
|
|
30
30
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
31
31
|
/******/
|
|
32
32
|
/******/ // Flag the module as loaded
|
|
33
|
-
/******/ module.
|
|
33
|
+
/******/ module.l = true;
|
|
34
34
|
/******/
|
|
35
35
|
/******/ // Return the exports of the module
|
|
36
36
|
/******/ return module.exports;
|
|
@@ -43,880 +43,974 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
|
43
43
|
/******/ // expose the module cache
|
|
44
44
|
/******/ __webpack_require__.c = installedModules;
|
|
45
45
|
/******/
|
|
46
|
+
/******/ // define getter function for harmony exports
|
|
47
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
48
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
49
|
+
/******/ Object.defineProperty(exports, name, {
|
|
50
|
+
/******/ configurable: false,
|
|
51
|
+
/******/ enumerable: true,
|
|
52
|
+
/******/ get: getter
|
|
53
|
+
/******/ });
|
|
54
|
+
/******/ }
|
|
55
|
+
/******/ };
|
|
56
|
+
/******/
|
|
57
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
58
|
+
/******/ __webpack_require__.n = function(module) {
|
|
59
|
+
/******/ var getter = module && module.__esModule ?
|
|
60
|
+
/******/ function getDefault() { return module['default']; } :
|
|
61
|
+
/******/ function getModuleExports() { return module; };
|
|
62
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
63
|
+
/******/ return getter;
|
|
64
|
+
/******/ };
|
|
65
|
+
/******/
|
|
66
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
67
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
68
|
+
/******/
|
|
46
69
|
/******/ // __webpack_public_path__
|
|
47
70
|
/******/ __webpack_require__.p = "";
|
|
48
71
|
/******/
|
|
49
72
|
/******/ // Load entry module and return exports
|
|
50
|
-
/******/ return __webpack_require__(0);
|
|
73
|
+
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
|
51
74
|
/******/ })
|
|
52
75
|
/************************************************************************/
|
|
53
76
|
/******/ ([
|
|
54
77
|
/* 0 */
|
|
55
78
|
/***/ (function(module, exports, __webpack_require__) {
|
|
56
79
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
80
|
+
"use strict";
|
|
81
|
+
/* WEBPACK VAR INJECTION */(function(process) {
|
|
82
|
+
|
|
83
|
+
Object.defineProperty(exports, "__esModule", {
|
|
84
|
+
value: true
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
88
|
+
|
|
89
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
90
|
+
|
|
91
|
+
var _react = __webpack_require__(2);
|
|
92
|
+
|
|
93
|
+
var _react2 = _interopRequireDefault(_react);
|
|
94
|
+
|
|
95
|
+
var _propTypes = __webpack_require__(3);
|
|
96
|
+
|
|
97
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
98
|
+
|
|
99
|
+
var _utils = __webpack_require__(4);
|
|
100
|
+
|
|
101
|
+
var _styles = __webpack_require__(6);
|
|
102
|
+
|
|
103
|
+
var _styles2 = _interopRequireDefault(_styles);
|
|
104
|
+
|
|
105
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
106
|
+
|
|
107
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
108
|
+
|
|
109
|
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
110
|
+
|
|
111
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
112
|
+
|
|
113
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
114
|
+
|
|
115
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint prefer-template: 0 */
|
|
116
|
+
|
|
117
|
+
var Dropzone = function (_React$Component) {
|
|
118
|
+
_inherits(Dropzone, _React$Component);
|
|
119
|
+
|
|
120
|
+
function Dropzone(props, context) {
|
|
121
|
+
_classCallCheck(this, Dropzone);
|
|
122
|
+
|
|
123
|
+
var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props, context));
|
|
124
|
+
|
|
125
|
+
_this.renderChildren = function (children, isDragActive, isDragAccept, isDragReject) {
|
|
126
|
+
if (typeof children === 'function') {
|
|
127
|
+
return children(_extends({}, _this.state, {
|
|
128
|
+
isDragActive: isDragActive,
|
|
129
|
+
isDragAccept: isDragAccept,
|
|
130
|
+
isDragReject: isDragReject
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
return children;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
_this.composeHandlers = _this.composeHandlers.bind(_this);
|
|
137
|
+
_this.onClick = _this.onClick.bind(_this);
|
|
138
|
+
_this.onDocumentDrop = _this.onDocumentDrop.bind(_this);
|
|
139
|
+
_this.onDragEnter = _this.onDragEnter.bind(_this);
|
|
140
|
+
_this.onDragLeave = _this.onDragLeave.bind(_this);
|
|
141
|
+
_this.onDragOver = _this.onDragOver.bind(_this);
|
|
142
|
+
_this.onDragStart = _this.onDragStart.bind(_this);
|
|
143
|
+
_this.onDrop = _this.onDrop.bind(_this);
|
|
144
|
+
_this.onFileDialogCancel = _this.onFileDialogCancel.bind(_this);
|
|
145
|
+
_this.onInputElementClick = _this.onInputElementClick.bind(_this);
|
|
146
|
+
|
|
147
|
+
_this.setRef = _this.setRef.bind(_this);
|
|
148
|
+
_this.setRefs = _this.setRefs.bind(_this);
|
|
149
|
+
|
|
150
|
+
_this.isFileDialogActive = false;
|
|
151
|
+
|
|
152
|
+
_this.state = {
|
|
153
|
+
draggedFiles: [],
|
|
154
|
+
acceptedFiles: [],
|
|
155
|
+
rejectedFiles: []
|
|
156
|
+
};
|
|
157
|
+
return _this;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
_createClass(Dropzone, [{
|
|
161
|
+
key: 'componentDidMount',
|
|
162
|
+
value: function componentDidMount() {
|
|
163
|
+
var preventDropOnDocument = this.props.preventDropOnDocument;
|
|
164
|
+
|
|
165
|
+
this.dragTargets = [];
|
|
166
|
+
|
|
167
|
+
if (preventDropOnDocument) {
|
|
168
|
+
document.addEventListener('dragover', _utils.onDocumentDragOver, false);
|
|
169
|
+
document.addEventListener('drop', this.onDocumentDrop, false);
|
|
170
|
+
}
|
|
171
|
+
this.fileInputEl.addEventListener('click', this.onInputElementClick, false);
|
|
172
|
+
// Tried implementing addEventListener, but didn't work out
|
|
173
|
+
document.body.onfocus = this.onFileDialogCancel;
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
key: 'componentWillUnmount',
|
|
177
|
+
value: function componentWillUnmount() {
|
|
178
|
+
var preventDropOnDocument = this.props.preventDropOnDocument;
|
|
179
|
+
|
|
180
|
+
if (preventDropOnDocument) {
|
|
181
|
+
document.removeEventListener('dragover', _utils.onDocumentDragOver);
|
|
182
|
+
document.removeEventListener('drop', this.onDocumentDrop);
|
|
183
|
+
}
|
|
184
|
+
this.fileInputEl.removeEventListener('click', this.onInputElementClick, false);
|
|
185
|
+
// Can be replaced with removeEventListener, if addEventListener works
|
|
186
|
+
document.body.onfocus = null;
|
|
187
|
+
}
|
|
188
|
+
}, {
|
|
189
|
+
key: 'composeHandlers',
|
|
190
|
+
value: function composeHandlers(handler) {
|
|
191
|
+
if (this.props.disabled) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return handler;
|
|
196
|
+
}
|
|
197
|
+
}, {
|
|
198
|
+
key: 'onDocumentDrop',
|
|
199
|
+
value: function onDocumentDrop(evt) {
|
|
200
|
+
if (this.node.contains(evt.target)) {
|
|
201
|
+
// if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
evt.preventDefault();
|
|
205
|
+
this.dragTargets = [];
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: 'onDragStart',
|
|
209
|
+
value: function onDragStart(evt) {
|
|
210
|
+
if (this.props.onDragStart) {
|
|
211
|
+
this.props.onDragStart.call(this, evt);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}, {
|
|
215
|
+
key: 'onDragEnter',
|
|
216
|
+
value: function onDragEnter(evt) {
|
|
217
|
+
evt.preventDefault();
|
|
218
|
+
|
|
219
|
+
// Count the dropzone and any children that are entered.
|
|
220
|
+
if (this.dragTargets.indexOf(evt.target) === -1) {
|
|
221
|
+
this.dragTargets.push(evt.target);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
this.setState({
|
|
225
|
+
isDragActive: true, // Do not rely on files for the drag state. It doesn't work in Safari.
|
|
226
|
+
draggedFiles: (0, _utils.getDataTransferItems)(evt)
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
if (this.props.onDragEnter) {
|
|
230
|
+
this.props.onDragEnter.call(this, evt);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}, {
|
|
234
|
+
key: 'onDragOver',
|
|
235
|
+
value: function onDragOver(evt) {
|
|
236
|
+
// eslint-disable-line class-methods-use-this
|
|
237
|
+
evt.preventDefault();
|
|
238
|
+
evt.stopPropagation();
|
|
239
|
+
try {
|
|
240
|
+
evt.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign
|
|
241
|
+
} catch (err) {
|
|
242
|
+
// continue regardless of error
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
if (this.props.onDragOver) {
|
|
246
|
+
this.props.onDragOver.call(this, evt);
|
|
247
|
+
}
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: 'onDragLeave',
|
|
252
|
+
value: function onDragLeave(evt) {
|
|
253
|
+
var _this2 = this;
|
|
254
|
+
|
|
255
|
+
evt.preventDefault();
|
|
256
|
+
|
|
257
|
+
// Only deactivate once the dropzone and all children have been left.
|
|
258
|
+
this.dragTargets = this.dragTargets.filter(function (el) {
|
|
259
|
+
return el !== evt.target && _this2.node.contains(el);
|
|
260
|
+
});
|
|
261
|
+
if (this.dragTargets.length > 0) {
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Clear dragging files state
|
|
266
|
+
this.setState({
|
|
267
|
+
isDragActive: false,
|
|
268
|
+
draggedFiles: []
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
if (this.props.onDragLeave) {
|
|
272
|
+
this.props.onDragLeave.call(this, evt);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}, {
|
|
276
|
+
key: 'onDrop',
|
|
277
|
+
value: function onDrop(evt) {
|
|
278
|
+
var _this3 = this;
|
|
279
|
+
|
|
280
|
+
var _props = this.props,
|
|
281
|
+
onDrop = _props.onDrop,
|
|
282
|
+
onDropAccepted = _props.onDropAccepted,
|
|
283
|
+
onDropRejected = _props.onDropRejected,
|
|
284
|
+
multiple = _props.multiple,
|
|
285
|
+
disablePreview = _props.disablePreview,
|
|
286
|
+
accept = _props.accept;
|
|
287
|
+
|
|
288
|
+
var fileList = (0, _utils.getDataTransferItems)(evt);
|
|
289
|
+
var acceptedFiles = [];
|
|
290
|
+
var rejectedFiles = [];
|
|
291
|
+
|
|
292
|
+
// Stop default browser behavior
|
|
293
|
+
evt.preventDefault();
|
|
294
|
+
|
|
295
|
+
// Reset the counter along with the drag on a drop.
|
|
296
|
+
this.dragTargets = [];
|
|
297
|
+
this.isFileDialogActive = false;
|
|
298
|
+
|
|
299
|
+
fileList.forEach(function (file) {
|
|
300
|
+
if (!disablePreview) {
|
|
301
|
+
try {
|
|
302
|
+
file.preview = window.URL.createObjectURL(file); // eslint-disable-line no-param-reassign
|
|
303
|
+
} catch (err) {
|
|
304
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
305
|
+
console.error('Failed to generate preview for file', file, err); // eslint-disable-line no-console
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if ((0, _utils.fileAccepted)(file, accept) && (0, _utils.fileMatchSize)(file, _this3.props.maxSize, _this3.props.minSize)) {
|
|
311
|
+
acceptedFiles.push(file);
|
|
312
|
+
} else {
|
|
313
|
+
rejectedFiles.push(file);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
if (!multiple) {
|
|
318
|
+
// if not in multi mode add any extra accepted files to rejected.
|
|
319
|
+
// This will allow end users to easily ignore a multi file drop in "single" mode.
|
|
320
|
+
rejectedFiles.push.apply(rejectedFiles, _toConsumableArray(acceptedFiles.splice(1)));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (onDrop) {
|
|
324
|
+
onDrop.call(this, acceptedFiles, rejectedFiles, evt);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (rejectedFiles.length > 0 && onDropRejected) {
|
|
328
|
+
onDropRejected.call(this, rejectedFiles, evt);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (acceptedFiles.length > 0 && onDropAccepted) {
|
|
332
|
+
onDropAccepted.call(this, acceptedFiles, evt);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// Clear files value
|
|
336
|
+
this.draggedFiles = null;
|
|
337
|
+
|
|
338
|
+
// Reset drag state
|
|
339
|
+
this.setState({
|
|
340
|
+
isDragActive: false,
|
|
341
|
+
draggedFiles: [],
|
|
342
|
+
acceptedFiles: acceptedFiles,
|
|
343
|
+
rejectedFiles: rejectedFiles
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}, {
|
|
347
|
+
key: 'onClick',
|
|
348
|
+
value: function onClick(evt) {
|
|
349
|
+
var _props2 = this.props,
|
|
350
|
+
onClick = _props2.onClick,
|
|
351
|
+
disableClick = _props2.disableClick;
|
|
352
|
+
|
|
353
|
+
if (!disableClick) {
|
|
354
|
+
evt.stopPropagation();
|
|
355
|
+
|
|
356
|
+
if (onClick) {
|
|
357
|
+
onClick.call(this, evt);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
// in IE11/Edge the file-browser dialog is blocking, ensure this is behind setTimeout
|
|
361
|
+
// this is so react can handle state changes in the onClick prop above above
|
|
362
|
+
// see: https://github.com/react-dropzone/react-dropzone/issues/450
|
|
363
|
+
setTimeout(this.open.bind(this), 0);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
key: 'onInputElementClick',
|
|
368
|
+
value: function onInputElementClick(evt) {
|
|
369
|
+
evt.stopPropagation();
|
|
370
|
+
if (this.props.inputProps && this.props.inputProps.onClick) {
|
|
371
|
+
this.props.inputProps.onClick();
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}, {
|
|
375
|
+
key: 'onFileDialogCancel',
|
|
376
|
+
value: function onFileDialogCancel() {
|
|
377
|
+
// timeout will not recognize context of this method
|
|
378
|
+
var onFileDialogCancel = this.props.onFileDialogCancel;
|
|
379
|
+
var fileInputEl = this.fileInputEl;
|
|
380
|
+
var isFileDialogActive = this.isFileDialogActive;
|
|
381
|
+
// execute the timeout only if the onFileDialogCancel is defined and FileDialog
|
|
382
|
+
// is opened in the browser
|
|
383
|
+
|
|
384
|
+
if (onFileDialogCancel && isFileDialogActive) {
|
|
385
|
+
setTimeout(function () {
|
|
386
|
+
// Returns an object as FileList
|
|
387
|
+
var FileList = fileInputEl.files;
|
|
388
|
+
if (!FileList.length) {
|
|
389
|
+
isFileDialogActive = false;
|
|
390
|
+
onFileDialogCancel();
|
|
391
|
+
}
|
|
392
|
+
}, 300);
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}, {
|
|
396
|
+
key: 'setRef',
|
|
397
|
+
value: function setRef(ref) {
|
|
398
|
+
this.node = ref;
|
|
399
|
+
}
|
|
400
|
+
}, {
|
|
401
|
+
key: 'setRefs',
|
|
402
|
+
value: function setRefs(ref) {
|
|
403
|
+
this.fileInputEl = ref;
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Open system file upload dialog.
|
|
407
|
+
*
|
|
408
|
+
* @public
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
}, {
|
|
412
|
+
key: 'open',
|
|
413
|
+
value: function open() {
|
|
414
|
+
this.isFileDialogActive = true;
|
|
415
|
+
this.fileInputEl.value = null;
|
|
416
|
+
this.fileInputEl.click();
|
|
417
|
+
}
|
|
418
|
+
}, {
|
|
419
|
+
key: 'render',
|
|
420
|
+
value: function render() {
|
|
421
|
+
var _props3 = this.props,
|
|
422
|
+
accept = _props3.accept,
|
|
423
|
+
acceptClassName = _props3.acceptClassName,
|
|
424
|
+
activeClassName = _props3.activeClassName,
|
|
425
|
+
children = _props3.children,
|
|
426
|
+
disabled = _props3.disabled,
|
|
427
|
+
disabledClassName = _props3.disabledClassName,
|
|
428
|
+
inputProps = _props3.inputProps,
|
|
429
|
+
multiple = _props3.multiple,
|
|
430
|
+
name = _props3.name,
|
|
431
|
+
rejectClassName = _props3.rejectClassName,
|
|
432
|
+
rest = _objectWithoutProperties(_props3, ['accept', 'acceptClassName', 'activeClassName', 'children', 'disabled', 'disabledClassName', 'inputProps', 'multiple', 'name', 'rejectClassName']);
|
|
433
|
+
|
|
434
|
+
var acceptStyle = rest.acceptStyle,
|
|
435
|
+
activeStyle = rest.activeStyle,
|
|
436
|
+
className = rest.className,
|
|
437
|
+
disabledStyle = rest.disabledStyle,
|
|
438
|
+
rejectStyle = rest.rejectStyle,
|
|
439
|
+
style = rest.style,
|
|
440
|
+
props = _objectWithoutProperties(rest, ['acceptStyle', 'activeStyle', 'className', 'disabledStyle', 'rejectStyle', 'style']);
|
|
441
|
+
|
|
442
|
+
var _state = this.state,
|
|
443
|
+
isDragActive = _state.isDragActive,
|
|
444
|
+
draggedFiles = _state.draggedFiles;
|
|
445
|
+
|
|
446
|
+
var filesCount = draggedFiles.length;
|
|
447
|
+
var isMultipleAllowed = multiple || filesCount <= 1;
|
|
448
|
+
var isDragAccept = filesCount > 0 && (0, _utils.allFilesAccepted)(draggedFiles, this.props.accept);
|
|
449
|
+
var isDragReject = filesCount > 0 && (!isDragAccept || !isMultipleAllowed);
|
|
450
|
+
className = className || '';
|
|
451
|
+
var noStyles = !className && !style && !activeStyle && !acceptStyle && !rejectStyle && !disabledStyle;
|
|
452
|
+
|
|
453
|
+
if (isDragActive && activeClassName) {
|
|
454
|
+
className += ' ' + activeClassName;
|
|
455
|
+
}
|
|
456
|
+
if (isDragAccept && acceptClassName) {
|
|
457
|
+
className += ' ' + acceptClassName;
|
|
458
|
+
}
|
|
459
|
+
if (isDragReject && rejectClassName) {
|
|
460
|
+
className += ' ' + rejectClassName;
|
|
461
|
+
}
|
|
462
|
+
if (disabled && disabledClassName) {
|
|
463
|
+
className += ' ' + disabledClassName;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (noStyles) {
|
|
467
|
+
style = _styles2.default.default;
|
|
468
|
+
activeStyle = _styles2.default.active;
|
|
469
|
+
acceptStyle = style.active;
|
|
470
|
+
rejectStyle = _styles2.default.rejected;
|
|
471
|
+
disabledStyle = _styles2.default.disabled;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
var appliedStyle = _extends({}, style);
|
|
475
|
+
if (activeStyle && isDragActive) {
|
|
476
|
+
appliedStyle = _extends({}, style, activeStyle);
|
|
477
|
+
}
|
|
478
|
+
if (acceptStyle && isDragAccept) {
|
|
479
|
+
appliedStyle = _extends({}, appliedStyle, acceptStyle);
|
|
480
|
+
}
|
|
481
|
+
if (rejectStyle && isDragReject) {
|
|
482
|
+
appliedStyle = _extends({}, appliedStyle, rejectStyle);
|
|
483
|
+
}
|
|
484
|
+
if (disabledStyle && disabled) {
|
|
485
|
+
appliedStyle = _extends({}, style, disabledStyle);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
var inputAttributes = {
|
|
489
|
+
accept: accept,
|
|
490
|
+
disabled: disabled,
|
|
491
|
+
type: 'file',
|
|
492
|
+
style: { display: 'none' },
|
|
493
|
+
multiple: _utils.supportMultiple && multiple,
|
|
494
|
+
ref: this.setRefs,
|
|
495
|
+
onChange: this.onDrop,
|
|
496
|
+
autoComplete: 'off'
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
if (name && name.length) {
|
|
500
|
+
inputAttributes.name = name;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
// Remove custom properties before passing them to the wrapper div element
|
|
504
|
+
var customProps = ['acceptedFiles', 'preventDropOnDocument', 'disablePreview', 'disableClick', 'onDropAccepted', 'onDropRejected', 'onFileDialogCancel', 'maxSize', 'minSize'];
|
|
505
|
+
var divProps = _extends({}, props);
|
|
506
|
+
customProps.forEach(function (prop) {
|
|
507
|
+
return delete divProps[prop];
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
return _react2.default.createElement(
|
|
511
|
+
'div',
|
|
512
|
+
_extends({
|
|
513
|
+
className: className,
|
|
514
|
+
style: appliedStyle
|
|
515
|
+
}, divProps /* expand user provided props first so event handlers are never overridden */, {
|
|
516
|
+
onClick: this.composeHandlers(this.onClick),
|
|
517
|
+
onDragStart: this.composeHandlers(this.onDragStart),
|
|
518
|
+
onDragEnter: this.composeHandlers(this.onDragEnter),
|
|
519
|
+
onDragOver: this.composeHandlers(this.onDragOver),
|
|
520
|
+
onDragLeave: this.composeHandlers(this.onDragLeave),
|
|
521
|
+
onDrop: this.composeHandlers(this.onDrop),
|
|
522
|
+
ref: this.setRef,
|
|
523
|
+
'aria-disabled': disabled
|
|
524
|
+
}),
|
|
525
|
+
this.renderChildren(children, isDragActive, isDragAccept, isDragReject),
|
|
526
|
+
_react2.default.createElement('input', _extends({}, inputProps /* expand user provided inputProps first so inputAttributes override them */, inputAttributes))
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
}]);
|
|
530
|
+
|
|
531
|
+
return Dropzone;
|
|
532
|
+
}(_react2.default.Component);
|
|
533
|
+
|
|
534
|
+
exports.default = Dropzone;
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
Dropzone.propTypes = {
|
|
538
|
+
/**
|
|
539
|
+
* Allow specific types of files. See https://github.com/okonet/attr-accept for more information.
|
|
540
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
541
|
+
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
542
|
+
* Windows. In some cases there might not be a mime type set at all.
|
|
543
|
+
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
|
544
|
+
*/
|
|
545
|
+
accept: _propTypes2.default.string,
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Contents of the dropzone
|
|
549
|
+
*/
|
|
550
|
+
children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]),
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Disallow clicking on the dropzone container to open file dialog
|
|
554
|
+
*/
|
|
555
|
+
disableClick: _propTypes2.default.bool,
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* Enable/disable the dropzone entirely
|
|
559
|
+
*/
|
|
560
|
+
disabled: _propTypes2.default.bool,
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Enable/disable preview generation
|
|
564
|
+
*/
|
|
565
|
+
disablePreview: _propTypes2.default.bool,
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* If false, allow dropped items to take over the current browser window
|
|
569
|
+
*/
|
|
570
|
+
preventDropOnDocument: _propTypes2.default.bool,
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Pass additional attributes to the `<input type="file"/>` tag
|
|
574
|
+
*/
|
|
575
|
+
inputProps: _propTypes2.default.object,
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Allow dropping multiple files
|
|
579
|
+
*/
|
|
580
|
+
multiple: _propTypes2.default.bool,
|
|
581
|
+
|
|
582
|
+
/**
|
|
583
|
+
* `name` attribute for the input tag
|
|
584
|
+
*/
|
|
585
|
+
name: _propTypes2.default.string,
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* Maximum file size
|
|
589
|
+
*/
|
|
590
|
+
maxSize: _propTypes2.default.number,
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Minimum file size
|
|
594
|
+
*/
|
|
595
|
+
minSize: _propTypes2.default.number,
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* className
|
|
599
|
+
*/
|
|
600
|
+
className: _propTypes2.default.string,
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* className for active state
|
|
604
|
+
*/
|
|
605
|
+
activeClassName: _propTypes2.default.string,
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* className for accepted state
|
|
609
|
+
*/
|
|
610
|
+
acceptClassName: _propTypes2.default.string,
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* className for rejected state
|
|
614
|
+
*/
|
|
615
|
+
rejectClassName: _propTypes2.default.string,
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* className for disabled state
|
|
619
|
+
*/
|
|
620
|
+
disabledClassName: _propTypes2.default.string,
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* CSS styles to apply
|
|
624
|
+
*/
|
|
625
|
+
style: _propTypes2.default.object,
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* CSS styles to apply when drag is active
|
|
629
|
+
*/
|
|
630
|
+
activeStyle: _propTypes2.default.object,
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* CSS styles to apply when drop will be accepted
|
|
634
|
+
*/
|
|
635
|
+
acceptStyle: _propTypes2.default.object,
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* CSS styles to apply when drop will be rejected
|
|
639
|
+
*/
|
|
640
|
+
rejectStyle: _propTypes2.default.object,
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* CSS styles to apply when dropzone is disabled
|
|
644
|
+
*/
|
|
645
|
+
disabledStyle: _propTypes2.default.object,
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* onClick callback
|
|
649
|
+
* @param {Event} event
|
|
650
|
+
*/
|
|
651
|
+
onClick: _propTypes2.default.func,
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* onDrop callback
|
|
655
|
+
*/
|
|
656
|
+
onDrop: _propTypes2.default.func,
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* onDropAccepted callback
|
|
660
|
+
*/
|
|
661
|
+
onDropAccepted: _propTypes2.default.func,
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* onDropRejected callback
|
|
665
|
+
*/
|
|
666
|
+
onDropRejected: _propTypes2.default.func,
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* onDragStart callback
|
|
670
|
+
*/
|
|
671
|
+
onDragStart: _propTypes2.default.func,
|
|
672
|
+
|
|
673
|
+
/**
|
|
674
|
+
* onDragEnter callback
|
|
675
|
+
*/
|
|
676
|
+
onDragEnter: _propTypes2.default.func,
|
|
677
|
+
|
|
678
|
+
/**
|
|
679
|
+
* onDragOver callback
|
|
680
|
+
*/
|
|
681
|
+
onDragOver: _propTypes2.default.func,
|
|
682
|
+
|
|
683
|
+
/**
|
|
684
|
+
* onDragLeave callback
|
|
685
|
+
*/
|
|
686
|
+
onDragLeave: _propTypes2.default.func,
|
|
687
|
+
|
|
688
|
+
/**
|
|
689
|
+
* Provide a callback on clicking the cancel button of the file dialog
|
|
690
|
+
*/
|
|
691
|
+
onFileDialogCancel: _propTypes2.default.func
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
Dropzone.defaultProps = {
|
|
695
|
+
preventDropOnDocument: true,
|
|
696
|
+
disabled: false,
|
|
697
|
+
disablePreview: false,
|
|
698
|
+
disableClick: false,
|
|
699
|
+
multiple: true,
|
|
700
|
+
maxSize: Infinity,
|
|
701
|
+
minSize: 0
|
|
702
|
+
};
|
|
703
|
+
module.exports = exports['default'];
|
|
704
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
|
680
705
|
|
|
681
706
|
/***/ }),
|
|
682
707
|
/* 1 */
|
|
683
708
|
/***/ (function(module, exports) {
|
|
684
709
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
710
|
+
// shim for using process in browser
|
|
711
|
+
var process = module.exports = {};
|
|
712
|
+
|
|
713
|
+
// cached from whatever global is present so that test runners that stub it
|
|
714
|
+
// don't break things. But we need to wrap it in a try catch in case it is
|
|
715
|
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
716
|
+
// function because try/catches deoptimize in certain engines.
|
|
717
|
+
|
|
718
|
+
var cachedSetTimeout;
|
|
719
|
+
var cachedClearTimeout;
|
|
720
|
+
|
|
721
|
+
function defaultSetTimout() {
|
|
722
|
+
throw new Error('setTimeout has not been defined');
|
|
723
|
+
}
|
|
724
|
+
function defaultClearTimeout () {
|
|
725
|
+
throw new Error('clearTimeout has not been defined');
|
|
726
|
+
}
|
|
727
|
+
(function () {
|
|
728
|
+
try {
|
|
729
|
+
if (typeof setTimeout === 'function') {
|
|
730
|
+
cachedSetTimeout = setTimeout;
|
|
731
|
+
} else {
|
|
732
|
+
cachedSetTimeout = defaultSetTimout;
|
|
733
|
+
}
|
|
734
|
+
} catch (e) {
|
|
735
|
+
cachedSetTimeout = defaultSetTimout;
|
|
736
|
+
}
|
|
737
|
+
try {
|
|
738
|
+
if (typeof clearTimeout === 'function') {
|
|
739
|
+
cachedClearTimeout = clearTimeout;
|
|
740
|
+
} else {
|
|
741
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
742
|
+
}
|
|
743
|
+
} catch (e) {
|
|
744
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
745
|
+
}
|
|
746
|
+
} ())
|
|
747
|
+
function runTimeout(fun) {
|
|
748
|
+
if (cachedSetTimeout === setTimeout) {
|
|
749
|
+
//normal enviroments in sane situations
|
|
750
|
+
return setTimeout(fun, 0);
|
|
751
|
+
}
|
|
752
|
+
// if setTimeout wasn't available but was latter defined
|
|
753
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
754
|
+
cachedSetTimeout = setTimeout;
|
|
755
|
+
return setTimeout(fun, 0);
|
|
756
|
+
}
|
|
757
|
+
try {
|
|
758
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
759
|
+
return cachedSetTimeout(fun, 0);
|
|
760
|
+
} catch(e){
|
|
761
|
+
try {
|
|
762
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
763
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
764
|
+
} catch(e){
|
|
765
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
766
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
}
|
|
772
|
+
function runClearTimeout(marker) {
|
|
773
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
774
|
+
//normal enviroments in sane situations
|
|
775
|
+
return clearTimeout(marker);
|
|
776
|
+
}
|
|
777
|
+
// if clearTimeout wasn't available but was latter defined
|
|
778
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
779
|
+
cachedClearTimeout = clearTimeout;
|
|
780
|
+
return clearTimeout(marker);
|
|
781
|
+
}
|
|
782
|
+
try {
|
|
783
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
784
|
+
return cachedClearTimeout(marker);
|
|
785
|
+
} catch (e){
|
|
786
|
+
try {
|
|
787
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
788
|
+
return cachedClearTimeout.call(null, marker);
|
|
789
|
+
} catch (e){
|
|
790
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
791
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
792
|
+
return cachedClearTimeout.call(this, marker);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
}
|
|
799
|
+
var queue = [];
|
|
800
|
+
var draining = false;
|
|
801
|
+
var currentQueue;
|
|
802
|
+
var queueIndex = -1;
|
|
803
|
+
|
|
804
|
+
function cleanUpNextTick() {
|
|
805
|
+
if (!draining || !currentQueue) {
|
|
806
|
+
return;
|
|
807
|
+
}
|
|
808
|
+
draining = false;
|
|
809
|
+
if (currentQueue.length) {
|
|
810
|
+
queue = currentQueue.concat(queue);
|
|
811
|
+
} else {
|
|
812
|
+
queueIndex = -1;
|
|
813
|
+
}
|
|
814
|
+
if (queue.length) {
|
|
815
|
+
drainQueue();
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function drainQueue() {
|
|
820
|
+
if (draining) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
824
|
+
draining = true;
|
|
825
|
+
|
|
826
|
+
var len = queue.length;
|
|
827
|
+
while(len) {
|
|
828
|
+
currentQueue = queue;
|
|
829
|
+
queue = [];
|
|
830
|
+
while (++queueIndex < len) {
|
|
831
|
+
if (currentQueue) {
|
|
832
|
+
currentQueue[queueIndex].run();
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
queueIndex = -1;
|
|
836
|
+
len = queue.length;
|
|
837
|
+
}
|
|
838
|
+
currentQueue = null;
|
|
839
|
+
draining = false;
|
|
840
|
+
runClearTimeout(timeout);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
process.nextTick = function (fun) {
|
|
844
|
+
var args = new Array(arguments.length - 1);
|
|
845
|
+
if (arguments.length > 1) {
|
|
846
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
847
|
+
args[i - 1] = arguments[i];
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
queue.push(new Item(fun, args));
|
|
851
|
+
if (queue.length === 1 && !draining) {
|
|
852
|
+
runTimeout(drainQueue);
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
// v8 likes predictible objects
|
|
857
|
+
function Item(fun, array) {
|
|
858
|
+
this.fun = fun;
|
|
859
|
+
this.array = array;
|
|
860
|
+
}
|
|
861
|
+
Item.prototype.run = function () {
|
|
862
|
+
this.fun.apply(null, this.array);
|
|
863
|
+
};
|
|
864
|
+
process.title = 'browser';
|
|
865
|
+
process.browser = true;
|
|
866
|
+
process.env = {};
|
|
867
|
+
process.argv = [];
|
|
868
|
+
process.version = ''; // empty string to avoid regexp issues
|
|
869
|
+
process.versions = {};
|
|
870
|
+
|
|
871
|
+
function noop() {}
|
|
872
|
+
|
|
873
|
+
process.on = noop;
|
|
874
|
+
process.addListener = noop;
|
|
875
|
+
process.once = noop;
|
|
876
|
+
process.off = noop;
|
|
877
|
+
process.removeListener = noop;
|
|
878
|
+
process.removeAllListeners = noop;
|
|
879
|
+
process.emit = noop;
|
|
880
|
+
process.prependListener = noop;
|
|
881
|
+
process.prependOnceListener = noop;
|
|
882
|
+
|
|
883
|
+
process.listeners = function (name) { return [] }
|
|
884
|
+
|
|
885
|
+
process.binding = function (name) {
|
|
886
|
+
throw new Error('process.binding is not supported');
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
process.cwd = function () { return '/' };
|
|
890
|
+
process.chdir = function (dir) {
|
|
891
|
+
throw new Error('process.chdir is not supported');
|
|
892
|
+
};
|
|
893
|
+
process.umask = function() { return 0; };
|
|
869
894
|
|
|
870
895
|
|
|
871
896
|
/***/ }),
|
|
872
897
|
/* 2 */
|
|
873
898
|
/***/ (function(module, exports) {
|
|
874
899
|
|
|
875
|
-
|
|
900
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
|
|
876
901
|
|
|
877
902
|
/***/ }),
|
|
878
903
|
/* 3 */
|
|
879
904
|
/***/ (function(module, exports) {
|
|
880
905
|
|
|
881
|
-
|
|
906
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
|
|
882
907
|
|
|
883
908
|
/***/ }),
|
|
884
909
|
/* 4 */
|
|
885
|
-
/***/ (function(module, exports) {
|
|
910
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
886
911
|
|
|
887
|
-
|
|
912
|
+
"use strict";
|
|
913
|
+
|
|
914
|
+
|
|
915
|
+
Object.defineProperty(exports, "__esModule", {
|
|
916
|
+
value: true
|
|
917
|
+
});
|
|
918
|
+
exports.supportMultiple = undefined;
|
|
919
|
+
exports.getDataTransferItems = getDataTransferItems;
|
|
920
|
+
exports.fileAccepted = fileAccepted;
|
|
921
|
+
exports.fileMatchSize = fileMatchSize;
|
|
922
|
+
exports.allFilesAccepted = allFilesAccepted;
|
|
923
|
+
exports.onDocumentDragOver = onDocumentDragOver;
|
|
924
|
+
|
|
925
|
+
var _attrAccept = __webpack_require__(5);
|
|
926
|
+
|
|
927
|
+
var _attrAccept2 = _interopRequireDefault(_attrAccept);
|
|
928
|
+
|
|
929
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
930
|
+
|
|
931
|
+
var supportMultiple = exports.supportMultiple = typeof document !== 'undefined' && document && document.createElement ? 'multiple' in document.createElement('input') : true;
|
|
932
|
+
|
|
933
|
+
function getDataTransferItems(event) {
|
|
934
|
+
var dataTransferItemsList = [];
|
|
935
|
+
if (event.dataTransfer) {
|
|
936
|
+
var dt = event.dataTransfer;
|
|
937
|
+
if (dt.files && dt.files.length) {
|
|
938
|
+
dataTransferItemsList = dt.files;
|
|
939
|
+
} else if (dt.items && dt.items.length) {
|
|
940
|
+
// During the drag even the dataTransfer.files is null
|
|
941
|
+
// but Chrome implements some drag store, which is accesible via dataTransfer.items
|
|
942
|
+
dataTransferItemsList = dt.items;
|
|
943
|
+
}
|
|
944
|
+
} else if (event.target && event.target.files) {
|
|
945
|
+
dataTransferItemsList = event.target.files;
|
|
946
|
+
}
|
|
947
|
+
// Convert from DataTransferItemsList to the native Array
|
|
948
|
+
return Array.prototype.slice.call(dataTransferItemsList);
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with
|
|
952
|
+
// that MIME type will always be accepted
|
|
953
|
+
function fileAccepted(file, accept) {
|
|
954
|
+
return file.type === 'application/x-moz-file' || (0, _attrAccept2.default)(file, accept);
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
function fileMatchSize(file, maxSize, minSize) {
|
|
958
|
+
return file.size <= maxSize && file.size >= minSize;
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
function allFilesAccepted(files, accept) {
|
|
962
|
+
return files.every(function (file) {
|
|
963
|
+
return fileAccepted(file, accept);
|
|
964
|
+
});
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
// allow the entire document to be a drag target
|
|
968
|
+
function onDocumentDragOver(evt) {
|
|
969
|
+
evt.preventDefault();
|
|
970
|
+
}
|
|
888
971
|
|
|
889
972
|
/***/ }),
|
|
890
973
|
/* 5 */
|
|
891
974
|
/***/ (function(module, exports) {
|
|
892
975
|
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
976
|
+
module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){"use strict";n.__esModule=!0,r(8),r(9),n["default"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(","),e=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return{v:r.some(function(t){var n=t.trim();return"."===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\/\*$/.test(n)?i===n.replace(/\/.*$/,""):o===n})}}();if("object"==typeof r)return r.v}return!0},t.exports=n["default"]},function(t,n){var r=t.exports={version:"1.2.2"};"number"==typeof __e&&(__e=r)},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c="prototype",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&"function"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(20)("wks"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))("Symbol."+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r(7)("match")]=!1,!"/./"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)("src"),u="toString",c=Function[u],f=(""+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){"function"==typeof r&&(o(r,i,t[n]?""+t[n]:f.join(String(n))),"name"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return"function"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o="__core-js_shared__",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){"use strict";var e=r(3),o=r(24),i=r(21),u="endsWith",c=""[u];e(e.P+e.F*r(14)(u),"String",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(","),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c("pop,reverse,shift,keys,values,entries",1),c("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),c("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),o(o.S,"Array",u)}]);
|
|
977
|
+
|
|
978
|
+
/***/ }),
|
|
979
|
+
/* 6 */
|
|
980
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
981
|
+
|
|
982
|
+
"use strict";
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
Object.defineProperty(exports, "__esModule", {
|
|
986
|
+
value: true
|
|
987
|
+
});
|
|
988
|
+
exports.default = {
|
|
989
|
+
rejected: {
|
|
990
|
+
borderStyle: 'solid',
|
|
991
|
+
borderColor: '#c66',
|
|
992
|
+
backgroundColor: '#eee'
|
|
993
|
+
},
|
|
994
|
+
disabled: {
|
|
995
|
+
opacity: 0.5
|
|
996
|
+
},
|
|
997
|
+
active: {
|
|
998
|
+
borderStyle: 'solid',
|
|
999
|
+
borderColor: '#6c6',
|
|
1000
|
+
backgroundColor: '#eee'
|
|
1001
|
+
},
|
|
1002
|
+
default: {
|
|
1003
|
+
width: 200,
|
|
1004
|
+
height: 200,
|
|
1005
|
+
borderWidth: 2,
|
|
1006
|
+
borderColor: '#666',
|
|
1007
|
+
borderStyle: 'dashed',
|
|
1008
|
+
borderRadius: 5
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
module.exports = exports['default'];
|
|
917
1012
|
|
|
918
1013
|
/***/ })
|
|
919
|
-
/******/ ])
|
|
1014
|
+
/******/ ]);
|
|
920
1015
|
});
|
|
921
|
-
;
|
|
922
1016
|
//# sourceMappingURL=index.js.map
|