1 | (function webpackUniversalModuleDefinition(root, factory) {
|
2 | if(typeof exports === 'object' && typeof module === 'object')
|
3 | module.exports = factory(require("react"), require("react-dom"));
|
4 | else if(typeof define === 'function' && define.amd)
|
5 | define(["react", "react-dom"], factory);
|
6 | else if(typeof exports === 'object')
|
7 | exports["rc-swipeout"] = factory(require("react"), require("react-dom"));
|
8 | else
|
9 | root["rc-swipeout"] = factory(root["React"], root["ReactDOM"]);
|
10 | })(this, function(__WEBPACK_EXTERNAL_MODULE_48__, __WEBPACK_EXTERNAL_MODULE_96__) {
|
11 | return (function(modules) {
|
12 |
|
13 | var installedModules = {};
|
14 |
|
15 |
|
16 | function __webpack_require__(moduleId) {
|
17 |
|
18 |
|
19 | if(installedModules[moduleId]) {
|
20 | return installedModules[moduleId].exports;
|
21 | }
|
22 |
|
23 | var module = installedModules[moduleId] = {
|
24 | i: moduleId,
|
25 | l: false,
|
26 | exports: {}
|
27 | };
|
28 |
|
29 |
|
30 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31 |
|
32 |
|
33 | module.l = true;
|
34 |
|
35 |
|
36 | return module.exports;
|
37 | }
|
38 |
|
39 |
|
40 |
|
41 | __webpack_require__.m = modules;
|
42 |
|
43 |
|
44 | __webpack_require__.c = installedModules;
|
45 |
|
46 |
|
47 | __webpack_require__.i = function(value) { return value; };
|
48 |
|
49 |
|
50 | __webpack_require__.d = function(exports, name, getter) {
|
51 | if(!__webpack_require__.o(exports, name)) {
|
52 | Object.defineProperty(exports, name, {
|
53 | configurable: false,
|
54 | enumerable: true,
|
55 | get: getter
|
56 | /******/ });
|
57 | /******/ }
|
58 | /******/ };
|
59 | /******/
|
60 | /******/ // getDefaultExport function for compatibility with non-harmony modules
|
61 | /******/ __webpack_require__.n = function(module) {
|
62 | var getter = module && module.__esModule ?
|
63 | function getDefault() { return module['default']; } :
|
64 | function getModuleExports() { return module; };
|
65 | __webpack_require__.d(getter, 'a', getter);
|
66 | return getter;
|
67 | };
|
68 |
|
69 |
|
70 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
71 |
|
72 |
|
73 | __webpack_require__.p = "";
|
74 |
|
75 |
|
76 | return __webpack_require__(__webpack_require__.s = 97);
|
77 | })
|
78 |
|
79 | ([
|
80 |
|
81 | (function(module, exports) {
|
82 |
|
83 |
|
84 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
85 | ? window : typeof self != 'undefined' && self.Math == Math ? self
|
86 |
|
87 | : Function('return this')();
|
88 | if (typeof __g == 'number') __g = global;
|
89 |
|
90 |
|
91 | }),
|
92 |
|
93 | (function(module, exports) {
|
94 |
|
95 | var core = module.exports = { version: '2.5.1' };
|
96 | if (typeof __e == 'number') __e = core;
|
97 |
|
98 |
|
99 | }),
|
100 |
|
101 | (function(module, exports, __webpack_require__) {
|
102 |
|
103 |
|
104 | module.exports = !__webpack_require__(10)(function () {
|
105 | return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
106 | });
|
107 |
|
108 |
|
109 | }),
|
110 |
|
111 | (function(module, exports) {
|
112 |
|
113 | var hasOwnProperty = {}.hasOwnProperty;
|
114 | module.exports = function (it, key) {
|
115 | return hasOwnProperty.call(it, key);
|
116 | };
|
117 |
|
118 |
|
119 | }),
|
120 |
|
121 | (function(module, exports, __webpack_require__) {
|
122 |
|
123 | var anObject = __webpack_require__(9);
|
124 | var IE8_DOM_DEFINE = __webpack_require__(39);
|
125 | var toPrimitive = __webpack_require__(26);
|
126 | var dP = Object.defineProperty;
|
127 |
|
128 | exports.f = __webpack_require__(2) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
129 | anObject(O);
|
130 | P = toPrimitive(P, true);
|
131 | anObject(Attributes);
|
132 | if (IE8_DOM_DEFINE) try {
|
133 | return dP(O, P, Attributes);
|
134 | } catch (e) { }
|
135 | if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
136 | if ('value' in Attributes) O[P] = Attributes.value;
|
137 | return O;
|
138 | };
|
139 |
|
140 |
|
141 | }),
|
142 |
|
143 | (function(module, exports, __webpack_require__) {
|
144 |
|
145 | var global = __webpack_require__(0);
|
146 | var core = __webpack_require__(1);
|
147 | var ctx = __webpack_require__(37);
|
148 | var hide = __webpack_require__(6);
|
149 | var PROTOTYPE = 'prototype';
|
150 |
|
151 | var $export = function (type, name, source) {
|
152 | var IS_FORCED = type & $export.F;
|
153 | var IS_GLOBAL = type & $export.G;
|
154 | var IS_STATIC = type & $export.S;
|
155 | var IS_PROTO = type & $export.P;
|
156 | var IS_BIND = type & $export.B;
|
157 | var IS_WRAP = type & $export.W;
|
158 | var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
159 | var expProto = exports[PROTOTYPE];
|
160 | var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
|
161 | var key, own, out;
|
162 | if (IS_GLOBAL) source = name;
|
163 | for (key in source) {
|
164 |
|
165 | own = !IS_FORCED && target && target[key] !== undefined;
|
166 | if (own && key in exports) continue;
|
167 |
|
168 | out = own ? target[key] : source[key];
|
169 |
|
170 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
171 |
|
172 | : IS_BIND && own ? ctx(out, global)
|
173 |
|
174 | : IS_WRAP && target[key] == out ? (function (C) {
|
175 | var F = function (a, b, c) {
|
176 | if (this instanceof C) {
|
177 | switch (arguments.length) {
|
178 | case 0: return new C();
|
179 | case 1: return new C(a);
|
180 | case 2: return new C(a, b);
|
181 | } return new C(a, b, c);
|
182 | } return C.apply(this, arguments);
|
183 | };
|
184 | F[PROTOTYPE] = C[PROTOTYPE];
|
185 | return F;
|
186 |
|
187 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
188 |
|
189 | if (IS_PROTO) {
|
190 | (exports.virtual || (exports.virtual = {}))[key] = out;
|
191 |
|
192 | if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
|
193 | }
|
194 | }
|
195 | };
|
196 |
|
197 | $export.F = 1;
|
198 | $export.G = 2;
|
199 | $export.S = 4;
|
200 | $export.P = 8;
|
201 | $export.B = 16;
|
202 | $export.W = 32;
|
203 | $export.U = 64;
|
204 | $export.R = 128;
|
205 | module.exports = $export;
|
206 |
|
207 |
|
208 | }),
|
209 |
|
210 | (function(module, exports, __webpack_require__) {
|
211 |
|
212 | var dP = __webpack_require__(4);
|
213 | var createDesc = __webpack_require__(14);
|
214 | module.exports = __webpack_require__(2) ? function (object, key, value) {
|
215 | return dP.f(object, key, createDesc(1, value));
|
216 | } : function (object, key, value) {
|
217 | object[key] = value;
|
218 | return object;
|
219 | };
|
220 |
|
221 |
|
222 | }),
|
223 |
|
224 | (function(module, exports, __webpack_require__) {
|
225 |
|
226 |
|
227 | var IObject = __webpack_require__(40);
|
228 | var defined = __webpack_require__(16);
|
229 | module.exports = function (it) {
|
230 | return IObject(defined(it));
|
231 | };
|
232 |
|
233 |
|
234 | }),
|
235 |
|
236 | (function(module, exports, __webpack_require__) {
|
237 |
|
238 | var store = __webpack_require__(24)('wks');
|
239 | var uid = __webpack_require__(15);
|
240 | var Symbol = __webpack_require__(0).Symbol;
|
241 | var USE_SYMBOL = typeof Symbol == 'function';
|
242 |
|
243 | var $exports = module.exports = function (name) {
|
244 | return store[name] || (store[name] =
|
245 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
246 | };
|
247 |
|
248 | $exports.store = store;
|
249 |
|
250 |
|
251 | }),
|
252 |
|
253 | (function(module, exports, __webpack_require__) {
|
254 |
|
255 | var isObject = __webpack_require__(11);
|
256 | module.exports = function (it) {
|
257 | if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
258 | return it;
|
259 | };
|
260 |
|
261 |
|
262 | }),
|
263 |
|
264 | (function(module, exports) {
|
265 |
|
266 | module.exports = function (exec) {
|
267 | try {
|
268 | return !!exec();
|
269 | } catch (e) {
|
270 | return true;
|
271 | }
|
272 | };
|
273 |
|
274 |
|
275 | }),
|
276 |
|
277 | (function(module, exports) {
|
278 |
|
279 | module.exports = function (it) {
|
280 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
281 | };
|
282 |
|
283 |
|
284 | }),
|
285 |
|
286 | (function(module, exports, __webpack_require__) {
|
287 |
|
288 |
|
289 | var $keys = __webpack_require__(44);
|
290 | var enumBugKeys = __webpack_require__(17);
|
291 |
|
292 | module.exports = Object.keys || function keys(O) {
|
293 | return $keys(O, enumBugKeys);
|
294 | };
|
295 |
|
296 |
|
297 | }),
|
298 |
|
299 | (function(module, exports) {
|
300 |
|
301 | exports.f = {}.propertyIsEnumerable;
|
302 |
|
303 |
|
304 | }),
|
305 |
|
306 | (function(module, exports) {
|
307 |
|
308 | module.exports = function (bitmap, value) {
|
309 | return {
|
310 | enumerable: !(bitmap & 1),
|
311 | configurable: !(bitmap & 2),
|
312 | writable: !(bitmap & 4),
|
313 | value: value
|
314 | };
|
315 | };
|
316 |
|
317 |
|
318 | }),
|
319 |
|
320 | (function(module, exports) {
|
321 |
|
322 | var id = 0;
|
323 | var px = Math.random();
|
324 | module.exports = function (key) {
|
325 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
326 | };
|
327 |
|
328 |
|
329 | }),
|
330 |
|
331 | (function(module, exports) {
|
332 |
|
333 |
|
334 | module.exports = function (it) {
|
335 | if (it == undefined) throw TypeError("Can't call method on " + it);
|
336 | return it;
|
337 | };
|
338 |
|
339 |
|
340 | }),
|
341 |
|
342 | (function(module, exports) {
|
343 |
|
344 |
|
345 | module.exports = (
|
346 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
347 | ).split(',');
|
348 |
|
349 |
|
350 | }),
|
351 |
|
352 | (function(module, exports) {
|
353 |
|
354 | module.exports = {};
|
355 |
|
356 |
|
357 | }),
|
358 |
|
359 | (function(module, exports) {
|
360 |
|
361 | module.exports = true;
|
362 |
|
363 |
|
364 | }),
|
365 |
|
366 | (function(module, exports, __webpack_require__) {
|
367 |
|
368 |
|
369 | var anObject = __webpack_require__(9);
|
370 | var dPs = __webpack_require__(76);
|
371 | var enumBugKeys = __webpack_require__(17);
|
372 | var IE_PROTO = __webpack_require__(23)('IE_PROTO');
|
373 | var Empty = function () { };
|
374 | var PROTOTYPE = 'prototype';
|
375 |
|
376 |
|
377 | var createDict = function () {
|
378 |
|
379 | var iframe = __webpack_require__(38)('iframe');
|
380 | var i = enumBugKeys.length;
|
381 | var lt = '<';
|
382 | var gt = '>';
|
383 | var iframeDocument;
|
384 | iframe.style.display = 'none';
|
385 | __webpack_require__(70).appendChild(iframe);
|
386 | iframe.src = 'javascript:';
|
387 |
|
388 |
|
389 | iframeDocument = iframe.contentWindow.document;
|
390 | iframeDocument.open();
|
391 | iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
392 | iframeDocument.close();
|
393 | createDict = iframeDocument.F;
|
394 | while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
395 | return createDict();
|
396 | };
|
397 |
|
398 | module.exports = Object.create || function create(O, Properties) {
|
399 | var result;
|
400 | if (O !== null) {
|
401 | Empty[PROTOTYPE] = anObject(O);
|
402 | result = new Empty();
|
403 | Empty[PROTOTYPE] = null;
|
404 |
|
405 | result[IE_PROTO] = O;
|
406 | } else result = createDict();
|
407 | return Properties === undefined ? result : dPs(result, Properties);
|
408 | };
|
409 |
|
410 |
|
411 | }),
|
412 |
|
413 | (function(module, exports) {
|
414 |
|
415 | exports.f = Object.getOwnPropertySymbols;
|
416 |
|
417 |
|
418 | }),
|
419 |
|
420 | (function(module, exports, __webpack_require__) {
|
421 |
|
422 | var def = __webpack_require__(4).f;
|
423 | var has = __webpack_require__(3);
|
424 | var TAG = __webpack_require__(8)('toStringTag');
|
425 |
|
426 | module.exports = function (it, tag, stat) {
|
427 | if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
428 | };
|
429 |
|
430 |
|
431 | }),
|
432 |
|
433 | (function(module, exports, __webpack_require__) {
|
434 |
|
435 | var shared = __webpack_require__(24)('keys');
|
436 | var uid = __webpack_require__(15);
|
437 | module.exports = function (key) {
|
438 | return shared[key] || (shared[key] = uid(key));
|
439 | };
|
440 |
|
441 |
|
442 | }),
|
443 |
|
444 | (function(module, exports, __webpack_require__) {
|
445 |
|
446 | var global = __webpack_require__(0);
|
447 | var SHARED = '__core-js_shared__';
|
448 | var store = global[SHARED] || (global[SHARED] = {});
|
449 | module.exports = function (key) {
|
450 | return store[key] || (store[key] = {});
|
451 | };
|
452 |
|
453 |
|
454 | }),
|
455 |
|
456 | (function(module, exports) {
|
457 |
|
458 |
|
459 | var ceil = Math.ceil;
|
460 | var floor = Math.floor;
|
461 | module.exports = function (it) {
|
462 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
463 | };
|
464 |
|
465 |
|
466 | }),
|
467 |
|
468 | (function(module, exports, __webpack_require__) {
|
469 |
|
470 |
|
471 | var isObject = __webpack_require__(11);
|
472 |
|
473 |
|
474 | module.exports = function (it, S) {
|
475 | if (!isObject(it)) return it;
|
476 | var fn, val;
|
477 | if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
478 | if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
479 | if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
480 | throw TypeError("Can't convert object to primitive value");
|
481 | };
|
482 |
|
483 |
|
484 | }),
|
485 |
|
486 | (function(module, exports, __webpack_require__) {
|
487 |
|
488 | var global = __webpack_require__(0);
|
489 | var core = __webpack_require__(1);
|
490 | var LIBRARY = __webpack_require__(19);
|
491 | var wksExt = __webpack_require__(28);
|
492 | var defineProperty = __webpack_require__(4).f;
|
493 | module.exports = function (name) {
|
494 | var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
495 | if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
496 | };
|
497 |
|
498 |
|
499 | }),
|
500 |
|
501 | (function(module, exports, __webpack_require__) {
|
502 |
|
503 | exports.f = __webpack_require__(8);
|
504 |
|
505 |
|
506 | }),
|
507 |
|
508 | (function(module, exports, __webpack_require__) {
|
509 |
|
510 | module.exports = { "default": __webpack_require__(62), __esModule: true };
|
511 |
|
512 | }),
|
513 |
|
514 | (function(module, exports, __webpack_require__) {
|
515 |
|
516 | "use strict";
|
517 |
|
518 |
|
519 | exports.__esModule = true;
|
520 |
|
521 | exports.default = function (instance, Constructor) {
|
522 | if (!(instance instanceof Constructor)) {
|
523 | throw new TypeError("Cannot call a class as a function");
|
524 | }
|
525 | };
|
526 |
|
527 | }),
|
528 |
|
529 | (function(module, exports, __webpack_require__) {
|
530 |
|
531 | "use strict";
|
532 |
|
533 |
|
534 | exports.__esModule = true;
|
535 |
|
536 | var _defineProperty = __webpack_require__(29);
|
537 |
|
538 | var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
539 |
|
540 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
541 |
|
542 | exports.default = function () {
|
543 | function defineProperties(target, props) {
|
544 | for (var i = 0; i < props.length; i++) {
|
545 | var descriptor = props[i];
|
546 | descriptor.enumerable = descriptor.enumerable || false;
|
547 | descriptor.configurable = true;
|
548 | if ("value" in descriptor) descriptor.writable = true;
|
549 | (0, _defineProperty2.default)(target, descriptor.key, descriptor);
|
550 | }
|
551 | }
|
552 |
|
553 | return function (Constructor, protoProps, staticProps) {
|
554 | if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
555 | if (staticProps) defineProperties(Constructor, staticProps);
|
556 | return Constructor;
|
557 | };
|
558 | }();
|
559 |
|
560 | }),
|
561 |
|
562 | (function(module, exports, __webpack_require__) {
|
563 |
|
564 | "use strict";
|
565 |
|
566 |
|
567 | exports.__esModule = true;
|
568 |
|
569 | var _assign = __webpack_require__(53);
|
570 |
|
571 | var _assign2 = _interopRequireDefault(_assign);
|
572 |
|
573 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
574 |
|
575 | exports.default = _assign2.default || function (target) {
|
576 | for (var i = 1; i < arguments.length; i++) {
|
577 | var source = arguments[i];
|
578 |
|
579 | for (var key in source) {
|
580 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
581 | target[key] = source[key];
|
582 | }
|
583 | }
|
584 | }
|
585 |
|
586 | return target;
|
587 | };
|
588 |
|
589 | }),
|
590 |
|
591 | (function(module, exports, __webpack_require__) {
|
592 |
|
593 | "use strict";
|
594 |
|
595 |
|
596 | exports.__esModule = true;
|
597 |
|
598 | var _setPrototypeOf = __webpack_require__(55);
|
599 |
|
600 | var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
601 |
|
602 | var _create = __webpack_require__(54);
|
603 |
|
604 | var _create2 = _interopRequireDefault(_create);
|
605 |
|
606 | var _typeof2 = __webpack_require__(35);
|
607 |
|
608 | var _typeof3 = _interopRequireDefault(_typeof2);
|
609 |
|
610 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
611 |
|
612 | exports.default = function (subClass, superClass) {
|
613 | if (typeof superClass !== "function" && superClass !== null) {
|
614 | throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
|
615 | }
|
616 |
|
617 | subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
|
618 | constructor: {
|
619 | value: subClass,
|
620 | enumerable: false,
|
621 | writable: true,
|
622 | configurable: true
|
623 | }
|
624 | });
|
625 | if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
|
626 | };
|
627 |
|
628 | }),
|
629 |
|
630 | (function(module, exports, __webpack_require__) {
|
631 |
|
632 | "use strict";
|
633 |
|
634 |
|
635 | exports.__esModule = true;
|
636 |
|
637 | var _typeof2 = __webpack_require__(35);
|
638 |
|
639 | var _typeof3 = _interopRequireDefault(_typeof2);
|
640 |
|
641 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
642 |
|
643 | exports.default = function (self, call) {
|
644 | if (!self) {
|
645 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
646 | }
|
647 |
|
648 | return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
|
649 | };
|
650 |
|
651 | }),
|
652 |
|
653 | (function(module, exports, __webpack_require__) {
|
654 |
|
655 | "use strict";
|
656 |
|
657 |
|
658 | exports.__esModule = true;
|
659 |
|
660 | var _iterator = __webpack_require__(57);
|
661 |
|
662 | var _iterator2 = _interopRequireDefault(_iterator);
|
663 |
|
664 | var _symbol = __webpack_require__(56);
|
665 |
|
666 | var _symbol2 = _interopRequireDefault(_symbol);
|
667 |
|
668 | var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; };
|
669 |
|
670 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
671 |
|
672 | exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
673 | return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
674 | } : function (obj) {
|
675 | return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
676 | };
|
677 |
|
678 | }),
|
679 |
|
680 | (function(module, exports) {
|
681 |
|
682 | var toString = {}.toString;
|
683 |
|
684 | module.exports = function (it) {
|
685 | return toString.call(it).slice(8, -1);
|
686 | };
|
687 |
|
688 |
|
689 | }),
|
690 |
|
691 | (function(module, exports, __webpack_require__) {
|
692 |
|
693 |
|
694 | var aFunction = __webpack_require__(66);
|
695 | module.exports = function (fn, that, length) {
|
696 | aFunction(fn);
|
697 | if (that === undefined) return fn;
|
698 | switch (length) {
|
699 | case 1: return function (a) {
|
700 | return fn.call(that, a);
|
701 | };
|
702 | case 2: return function (a, b) {
|
703 | return fn.call(that, a, b);
|
704 | };
|
705 | case 3: return function (a, b, c) {
|
706 | return fn.call(that, a, b, c);
|
707 | };
|
708 | }
|
709 | return function (/* ...args */) {
|
710 | return fn.apply(that, arguments);
|
711 | };
|
712 | };
|
713 |
|
714 |
|
715 | }),
|
716 |
|
717 | (function(module, exports, __webpack_require__) {
|
718 |
|
719 | var isObject = __webpack_require__(11);
|
720 | var document = __webpack_require__(0).document;
|
721 |
|
722 | var is = isObject(document) && isObject(document.createElement);
|
723 | module.exports = function (it) {
|
724 | return is ? document.createElement(it) : {};
|
725 | };
|
726 |
|
727 |
|
728 | }),
|
729 |
|
730 | (function(module, exports, __webpack_require__) {
|
731 |
|
732 | module.exports = !__webpack_require__(2) && !__webpack_require__(10)(function () {
|
733 | return Object.defineProperty(__webpack_require__(38)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
734 | });
|
735 |
|
736 |
|
737 | }),
|
738 |
|
739 | (function(module, exports, __webpack_require__) {
|
740 |
|
741 |
|
742 | var cof = __webpack_require__(36);
|
743 |
|
744 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
745 | return cof(it) == 'String' ? it.split('') : Object(it);
|
746 | };
|
747 |
|
748 |
|
749 | }),
|
750 |
|
751 | (function(module, exports, __webpack_require__) {
|
752 |
|
753 | "use strict";
|
754 |
|
755 | var LIBRARY = __webpack_require__(19);
|
756 | var $export = __webpack_require__(5);
|
757 | var redefine = __webpack_require__(45);
|
758 | var hide = __webpack_require__(6);
|
759 | var has = __webpack_require__(3);
|
760 | var Iterators = __webpack_require__(18);
|
761 | var $iterCreate = __webpack_require__(72);
|
762 | var setToStringTag = __webpack_require__(22);
|
763 | var getPrototypeOf = __webpack_require__(78);
|
764 | var ITERATOR = __webpack_require__(8)('iterator');
|
765 | var BUGGY = !([].keys && 'next' in [].keys());
|
766 | var FF_ITERATOR = '@@iterator';
|
767 | var KEYS = 'keys';
|
768 | var VALUES = 'values';
|
769 |
|
770 | var returnThis = function () { return this; };
|
771 |
|
772 | module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
773 | $iterCreate(Constructor, NAME, next);
|
774 | var getMethod = function (kind) {
|
775 | if (!BUGGY && kind in proto) return proto[kind];
|
776 | switch (kind) {
|
777 | case KEYS: return function keys() { return new Constructor(this, kind); };
|
778 | case VALUES: return function values() { return new Constructor(this, kind); };
|
779 | } return function entries() { return new Constructor(this, kind); };
|
780 | };
|
781 | var TAG = NAME + ' Iterator';
|
782 | var DEF_VALUES = DEFAULT == VALUES;
|
783 | var VALUES_BUG = false;
|
784 | var proto = Base.prototype;
|
785 | var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
786 | var $default = $native || getMethod(DEFAULT);
|
787 | var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
788 | var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
789 | var methods, key, IteratorPrototype;
|
790 |
|
791 | if ($anyNative) {
|
792 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
793 | if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
794 |
|
795 | setToStringTag(IteratorPrototype, TAG, true);
|
796 |
|
797 | if (!LIBRARY && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
|
798 | }
|
799 | }
|
800 |
|
801 | if (DEF_VALUES && $native && $native.name !== VALUES) {
|
802 | VALUES_BUG = true;
|
803 | $default = function values() { return $native.call(this); };
|
804 | }
|
805 |
|
806 | if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
807 | hide(proto, ITERATOR, $default);
|
808 | }
|
809 |
|
810 | Iterators[NAME] = $default;
|
811 | Iterators[TAG] = returnThis;
|
812 | if (DEFAULT) {
|
813 | methods = {
|
814 | values: DEF_VALUES ? $default : getMethod(VALUES),
|
815 | keys: IS_SET ? $default : getMethod(KEYS),
|
816 | entries: $entries
|
817 | };
|
818 | if (FORCED) for (key in methods) {
|
819 | if (!(key in proto)) redefine(proto, key, methods[key]);
|
820 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
821 | }
|
822 | return methods;
|
823 | };
|
824 |
|
825 |
|
826 | }),
|
827 |
|
828 | (function(module, exports, __webpack_require__) {
|
829 |
|
830 | var pIE = __webpack_require__(13);
|
831 | var createDesc = __webpack_require__(14);
|
832 | var toIObject = __webpack_require__(7);
|
833 | var toPrimitive = __webpack_require__(26);
|
834 | var has = __webpack_require__(3);
|
835 | var IE8_DOM_DEFINE = __webpack_require__(39);
|
836 | var gOPD = Object.getOwnPropertyDescriptor;
|
837 |
|
838 | exports.f = __webpack_require__(2) ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
839 | O = toIObject(O);
|
840 | P = toPrimitive(P, true);
|
841 | if (IE8_DOM_DEFINE) try {
|
842 | return gOPD(O, P);
|
843 | } catch (e) { }
|
844 | if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
845 | };
|
846 |
|
847 |
|
848 | }),
|
849 |
|
850 | (function(module, exports, __webpack_require__) {
|
851 |
|
852 |
|
853 | var $keys = __webpack_require__(44);
|
854 | var hiddenKeys = __webpack_require__(17).concat('length', 'prototype');
|
855 |
|
856 | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
857 | return $keys(O, hiddenKeys);
|
858 | };
|
859 |
|
860 |
|
861 | }),
|
862 |
|
863 | (function(module, exports, __webpack_require__) {
|
864 |
|
865 | var has = __webpack_require__(3);
|
866 | var toIObject = __webpack_require__(7);
|
867 | var arrayIndexOf = __webpack_require__(68)(false);
|
868 | var IE_PROTO = __webpack_require__(23)('IE_PROTO');
|
869 |
|
870 | module.exports = function (object, names) {
|
871 | var O = toIObject(object);
|
872 | var i = 0;
|
873 | var result = [];
|
874 | var key;
|
875 | for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
876 |
|
877 | while (names.length > i) if (has(O, key = names[i++])) {
|
878 | ~arrayIndexOf(result, key) || result.push(key);
|
879 | }
|
880 | return result;
|
881 | };
|
882 |
|
883 |
|
884 | }),
|
885 |
|
886 | (function(module, exports, __webpack_require__) {
|
887 |
|
888 | module.exports = __webpack_require__(6);
|
889 |
|
890 |
|
891 | }),
|
892 |
|
893 | (function(module, exports, __webpack_require__) {
|
894 |
|
895 |
|
896 | var defined = __webpack_require__(16);
|
897 | module.exports = function (it) {
|
898 | return Object(defined(it));
|
899 | };
|
900 |
|
901 |
|
902 | }),
|
903 |
|
904 | (function(module, __webpack_exports__, __webpack_require__) {
|
905 |
|
906 | "use strict";
|
907 | __webpack_require__.d(__webpack_exports__, "f", function() { return DIRECTION_NONE; });
|
908 | __webpack_require__.d(__webpack_exports__, "g", function() { return DIRECTION_LEFT; });
|
909 | __webpack_require__.d(__webpack_exports__, "h", function() { return DIRECTION_RIGHT; });
|
910 | __webpack_require__.d(__webpack_exports__, "i", function() { return DIRECTION_UP; });
|
911 | __webpack_require__.d(__webpack_exports__, "j", function() { return DIRECTION_DOWN; });
|
912 | __webpack_require__.d(__webpack_exports__, "c", function() { return DIRECTION_HORIZONTAL; });
|
913 | __webpack_require__.d(__webpack_exports__, "b", function() { return DIRECTION_VERTICAL; });
|
914 | __webpack_require__.d(__webpack_exports__, "a", function() { return DIRECTION_ALL; });
|
915 | __webpack_require__.d(__webpack_exports__, "d", function() { return PRESS; });
|
916 | __webpack_require__.d(__webpack_exports__, "e", function() { return SWIPE; });
|
917 |
|
918 |
|
919 | var DIRECTION_NONE = 1;
|
920 | var DIRECTION_LEFT = 2;
|
921 | var DIRECTION_RIGHT = 4;
|
922 | var DIRECTION_UP = 8;
|
923 | var DIRECTION_DOWN = 16;
|
924 | var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
|
925 | var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
|
926 | var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
|
927 |
|
928 | var PRESS = {
|
929 | time: 251
|
930 | };
|
931 |
|
932 | var SWIPE = {
|
933 | threshold: 10,
|
934 | velocity: 0.3
|
935 | };
|
936 |
|
937 | }),
|
938 |
|
939 | (function(module, exports) {
|
940 |
|
941 | module.exports = __WEBPACK_EXTERNAL_MODULE_48__;
|
942 |
|
943 | }),
|
944 |
|
945 | (function(module, __webpack_exports__, __webpack_require__) {
|
946 |
|
947 | "use strict";
|
948 | Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
949 | var __WEBPACK_IMPORTED_MODULE_0__src___ = __webpack_require__(52);
|
950 |
|
951 |
|
952 | __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__src___["a" ]);
|
953 |
|
954 | }),
|
955 |
|
956 | (function(module, exports) {
|
957 |
|
958 |
|
959 |
|
960 | }),
|
961 |
|
962 | (function(module, __webpack_exports__, __webpack_require__) {
|
963 |
|
964 | "use strict";
|
965 | var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(32);
|
966 | var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
|
967 | var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(58);
|
968 | var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
|
969 | var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(30);
|
970 | var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
|
971 | var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(31);
|
972 | var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
|
973 | var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(34);
|
974 | var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
|
975 | var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(33);
|
976 | var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
|
977 | var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(48);
|
978 | var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
979 | var __WEBPACK_IMPORTED_MODULE_7_react_dom__ = __webpack_require__(96);
|
980 | var __WEBPACK_IMPORTED_MODULE_7_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_dom__);
|
981 | var __WEBPACK_IMPORTED_MODULE_8_rc_gesture__ = __webpack_require__(94);
|
982 | var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(59);
|
983 | var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 | var __rest = this && this.__rest || function (s, e) {
|
991 | var t = {};
|
992 | for (var p in s) {
|
993 | if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
994 | }if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
995 | if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
|
996 | }return t;
|
997 | };
|
998 |
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 |
|
1004 | function closest(el, selector) {
|
1005 | var matchesSelector = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;
|
1006 | while (el) {
|
1007 | if (matchesSelector.call(el, selector)) {
|
1008 | return el;
|
1009 | } else {
|
1010 | el = el.parentElement;
|
1011 | }
|
1012 | }
|
1013 | return null;
|
1014 | }
|
1015 |
|
1016 | var Swipeout = function (_React$Component) {
|
1017 | __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Swipeout, _React$Component);
|
1018 |
|
1019 | function Swipeout(props) {
|
1020 | __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Swipeout);
|
1021 |
|
1022 | var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Swipeout.__proto__ || Object.getPrototypeOf(Swipeout)).call(this, props));
|
1023 |
|
1024 | _this.onCloseSwipe = function (ev) {
|
1025 | if (!(_this.openedLeft || _this.openedRight)) {
|
1026 | return;
|
1027 | }
|
1028 | var pNode = closest(ev.target, '.' + _this.props.prefixCls + '-actions');
|
1029 | if (!pNode) {
|
1030 | ev.preventDefault();
|
1031 | _this.close();
|
1032 | }
|
1033 | };
|
1034 | _this.onPanStart = function (e) {
|
1035 | var direction = e.direction,
|
1036 | moveStatus = e.moveStatus;
|
1037 | var deltaX = moveStatus.x;
|
1038 |
|
1039 |
|
1040 | var isLeft = direction === 2;
|
1041 | var isRight = direction === 4;
|
1042 | if (!isLeft && !isRight) {
|
1043 | return;
|
1044 | }
|
1045 | var _this$props = _this.props,
|
1046 | left = _this$props.left,
|
1047 | right = _this$props.right;
|
1048 |
|
1049 | _this.needShowRight = isLeft && right.length > 0;
|
1050 | _this.needShowLeft = isRight && left.length > 0;
|
1051 | if (_this.left) {
|
1052 | _this.left.style.visibility = _this.needShowRight ? 'hidden' : 'visible';
|
1053 | }
|
1054 | if (_this.right) {
|
1055 | _this.right.style.visibility = _this.needShowLeft ? 'hidden' : 'visible';
|
1056 | }
|
1057 | if (_this.needShowLeft || _this.needShowRight) {
|
1058 | _this.swiping = true;
|
1059 | _this.setState({
|
1060 | swiping: _this.swiping
|
1061 | });
|
1062 | _this._setStyle(deltaX);
|
1063 | }
|
1064 | };
|
1065 | _this.onPanMove = function (e) {
|
1066 | var moveStatus = e.moveStatus;
|
1067 | var deltaX = moveStatus.x;
|
1068 |
|
1069 | if (!_this.swiping) {
|
1070 | return;
|
1071 | }
|
1072 | _this._setStyle(deltaX);
|
1073 | };
|
1074 | _this.onPanEnd = function (e) {
|
1075 | if (!_this.swiping) {
|
1076 | return;
|
1077 | }
|
1078 | var moveStatus = e.moveStatus;
|
1079 | var deltaX = moveStatus.x;
|
1080 |
|
1081 | var needOpenRight = _this.needShowRight && Math.abs(deltaX) > _this.btnsRightWidth / 2;
|
1082 | var needOpenLeft = _this.needShowLeft && Math.abs(deltaX) > _this.btnsLeftWidth / 2;
|
1083 | if (needOpenRight) {
|
1084 | _this.doOpenRight();
|
1085 | } else if (needOpenLeft) {
|
1086 | _this.doOpenLeft();
|
1087 | } else {
|
1088 | _this.close();
|
1089 | }
|
1090 | _this.swiping = false;
|
1091 | _this.setState({
|
1092 | swiping: _this.swiping
|
1093 | });
|
1094 | _this.needShowLeft = false;
|
1095 | _this.needShowRight = false;
|
1096 | };
|
1097 | _this.doOpenLeft = function () {
|
1098 | _this.open(_this.btnsLeftWidth, true, false);
|
1099 | };
|
1100 | _this.doOpenRight = function () {
|
1101 | _this.open(-_this.btnsRightWidth, true, false);
|
1102 | };
|
1103 |
|
1104 | _this._setStyle = function (value) {
|
1105 | var limit = value > 0 ? _this.btnsLeftWidth : -_this.btnsRightWidth;
|
1106 | var contentLeft = _this._getContentEasing(value, limit);
|
1107 | _this.content.style.left = contentLeft + 'px';
|
1108 | if (_this.cover) {
|
1109 | _this.cover.style.display = Math.abs(value) > 0 ? 'block' : 'none';
|
1110 | _this.cover.style.left = contentLeft + 'px';
|
1111 | }
|
1112 | };
|
1113 | _this.open = function (value, openedLeft, openedRight) {
|
1114 | if (!_this.openedLeft && !_this.openedRight && _this.props.onOpen) {
|
1115 | _this.props.onOpen();
|
1116 | }
|
1117 | _this.openedLeft = openedLeft;
|
1118 | _this.openedRight = openedRight;
|
1119 | _this._setStyle(value);
|
1120 | };
|
1121 | _this.close = function () {
|
1122 | if ((_this.openedLeft || _this.openedRight) && _this.props.onClose) {
|
1123 | _this.props.onClose();
|
1124 | }
|
1125 | _this._setStyle(0);
|
1126 | _this.openedLeft = false;
|
1127 | _this.openedRight = false;
|
1128 | };
|
1129 | _this.state = {
|
1130 | swiping: false
|
1131 | };
|
1132 | _this.openedLeft = false;
|
1133 | _this.openedRight = false;
|
1134 | return _this;
|
1135 | }
|
1136 |
|
1137 | __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Swipeout, [{
|
1138 | key: 'componentDidMount',
|
1139 | value: function componentDidMount() {
|
1140 | this.btnsLeftWidth = this.left ? this.left.offsetWidth : 0;
|
1141 | this.btnsRightWidth = this.right ? this.right.offsetWidth : 0;
|
1142 | document.body.addEventListener('touchstart', this.onCloseSwipe, true);
|
1143 | }
|
1144 | }, {
|
1145 | key: 'componentWillUnmount',
|
1146 | value: function componentWillUnmount() {
|
1147 | document.body.removeEventListener('touchstart', this.onCloseSwipe, true);
|
1148 | }
|
1149 |
|
1150 |
|
1151 | }, {
|
1152 | key: 'onBtnClick',
|
1153 | value: function onBtnClick(ev, btn) {
|
1154 | var onPress = btn.onPress;
|
1155 | if (onPress) {
|
1156 | onPress(ev);
|
1157 | }
|
1158 | if (this.props.autoClose) {
|
1159 | this.close();
|
1160 | }
|
1161 | }
|
1162 | }, {
|
1163 | key: '_getContentEasing',
|
1164 | value: function _getContentEasing(value, limit) {
|
1165 |
|
1166 | var delta = Math.abs(value) - Math.abs(limit);
|
1167 | var isOverflow = delta > 0;
|
1168 | var factor = limit > 0 ? 1 : -1;
|
1169 | if (isOverflow) {
|
1170 | value = limit + Math.pow(delta, 0.85) * factor;
|
1171 | return Math.abs(value) > Math.abs(limit) ? limit : value;
|
1172 | }
|
1173 | return value;
|
1174 | }
|
1175 | }, {
|
1176 | key: 'renderButtons',
|
1177 | value: function renderButtons(buttons, _ref) {
|
1178 | var _this2 = this;
|
1179 |
|
1180 | var prefixCls = this.props.prefixCls;
|
1181 | return buttons && buttons.length ? __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1182 | 'div',
|
1183 | { className: prefixCls + '-actions ' + prefixCls + '-actions-' + _ref, ref: function ref(el) {
|
1184 | return _this2[_ref] = el;
|
1185 | } },
|
1186 | buttons.map(function (btn, i) {
|
1187 | return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1188 | 'div',
|
1189 | { key: i, className: prefixCls + '-btn ' + (btn.hasOwnProperty('className') ? btn.className : ''), style: btn.style, role: 'button', onClick: function onClick(e) {
|
1190 | return _this2.onBtnClick(e, btn);
|
1191 | } },
|
1192 | __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1193 | 'div',
|
1194 | { className: prefixCls + '-btn-text' },
|
1195 | btn.text || 'Click'
|
1196 | )
|
1197 | );
|
1198 | })
|
1199 | ) : null;
|
1200 | }
|
1201 | }, {
|
1202 | key: 'render',
|
1203 | value: function render() {
|
1204 | var _this3 = this;
|
1205 |
|
1206 | var _a = this.props,
|
1207 | prefixCls = _a.prefixCls,
|
1208 | left = _a.left,
|
1209 | right = _a.right,
|
1210 | disabled = _a.disabled,
|
1211 | children = _a.children,
|
1212 | restProps = __rest(_a, ["prefixCls", "left", "right", "disabled", "children"]);
|
1213 | var autoClose = restProps.autoClose,
|
1214 | onOpen = restProps.onOpen,
|
1215 | onClose = restProps.onClose,
|
1216 | divProps = __rest(restProps, ["autoClose", "onOpen", "onClose"]);
|
1217 |
|
1218 | var cls = __WEBPACK_IMPORTED_MODULE_9_classnames___default()(prefixCls, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, prefixCls + '-swiping', this.state.swiping));
|
1219 | var refProps = {
|
1220 | ref: function ref(el) {
|
1221 | return _this3.content = __WEBPACK_IMPORTED_MODULE_7_react_dom___default.a.findDOMNode(el);
|
1222 | }
|
1223 | };
|
1224 | return (left.length || right.length) && !disabled ? __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1225 | 'div',
|
1226 | __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ className: cls }, divProps),
|
1227 | __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div', { className: prefixCls + '-cover', ref: function ref(el) {
|
1228 | return _this3.cover = el;
|
1229 | } }),
|
1230 | this.renderButtons(left, 'left'),
|
1231 | this.renderButtons(right, 'right'),
|
1232 | __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1233 | __WEBPACK_IMPORTED_MODULE_8_rc_gesture__["a" ],
|
1234 | __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ onPanStart: this.onPanStart, onPanMove: this.onPanMove, onPanEnd: this.onPanEnd, onPanCancel: this.onPanEnd, onSwipeLeft: this.doOpenRight, onSwipeRight: this.doOpenLeft, direction: 'horizontal' }, refProps),
|
1235 | __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1236 | 'div',
|
1237 | { className: prefixCls + '-content' },
|
1238 | children
|
1239 | )
|
1240 | )
|
1241 | ) : __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
|
1242 | 'div',
|
1243 | __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, refProps, divProps),
|
1244 | children
|
1245 | );
|
1246 | }
|
1247 | }]);
|
1248 |
|
1249 | return Swipeout;
|
1250 | }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
|
1251 |
|
1252 | __webpack_exports__["a"] = (Swipeout);
|
1253 |
|
1254 | Swipeout.defaultProps = {
|
1255 | prefixCls: 'rc-swipeout',
|
1256 | autoClose: false,
|
1257 | disabled: false,
|
1258 | left: [],
|
1259 | right: [],
|
1260 | onOpen: function onOpen() {},
|
1261 | onClose: function onClose() {}
|
1262 | };
|
1263 |
|
1264 | }),
|
1265 |
|
1266 | (function(module, __webpack_exports__, __webpack_require__) {
|
1267 |
|
1268 | "use strict";
|
1269 | var __WEBPACK_IMPORTED_MODULE_0__Swipeout__ = __webpack_require__(51);
|
1270 | __webpack_require__.d(__webpack_exports__, "a", function() { return __WEBPACK_IMPORTED_MODULE_0__Swipeout__["a"]; });
|
1271 |
|
1272 |
|
1273 | }),
|
1274 |
|
1275 | (function(module, exports, __webpack_require__) {
|
1276 |
|
1277 | module.exports = { "default": __webpack_require__(60), __esModule: true };
|
1278 |
|
1279 | }),
|
1280 |
|
1281 | (function(module, exports, __webpack_require__) {
|
1282 |
|
1283 | module.exports = { "default": __webpack_require__(61), __esModule: true };
|
1284 |
|
1285 | }),
|
1286 |
|
1287 | (function(module, exports, __webpack_require__) {
|
1288 |
|
1289 | module.exports = { "default": __webpack_require__(63), __esModule: true };
|
1290 |
|
1291 | }),
|
1292 |
|
1293 | (function(module, exports, __webpack_require__) {
|
1294 |
|
1295 | module.exports = { "default": __webpack_require__(64), __esModule: true };
|
1296 |
|
1297 | }),
|
1298 |
|
1299 | (function(module, exports, __webpack_require__) {
|
1300 |
|
1301 | module.exports = { "default": __webpack_require__(65), __esModule: true };
|
1302 |
|
1303 | }),
|
1304 |
|
1305 | (function(module, exports, __webpack_require__) {
|
1306 |
|
1307 | "use strict";
|
1308 |
|
1309 |
|
1310 | exports.__esModule = true;
|
1311 |
|
1312 | var _defineProperty = __webpack_require__(29);
|
1313 |
|
1314 | var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
1315 |
|
1316 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
1317 |
|
1318 | exports.default = function (obj, key, value) {
|
1319 | if (key in obj) {
|
1320 | (0, _defineProperty2.default)(obj, key, {
|
1321 | value: value,
|
1322 | enumerable: true,
|
1323 | configurable: true,
|
1324 | writable: true
|
1325 | });
|
1326 | } else {
|
1327 | obj[key] = value;
|
1328 | }
|
1329 |
|
1330 | return obj;
|
1331 | };
|
1332 |
|
1333 | }),
|
1334 |
|
1335 | (function(module, exports, __webpack_require__) {
|
1336 |
|
1337 | var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; |
1338 |
|
1339 |
|
1340 |
|
1341 |
|
1342 |
|
1343 |
|
1344 | (function () {
|
1345 | 'use strict';
|
1346 |
|
1347 | var hasOwn = {}.hasOwnProperty;
|
1348 |
|
1349 | function classNames () {
|
1350 | var classes = [];
|
1351 |
|
1352 | for (var i = 0; i < arguments.length; i++) {
|
1353 | var arg = arguments[i];
|
1354 | if (!arg) continue;
|
1355 |
|
1356 | var argType = typeof arg;
|
1357 |
|
1358 | if (argType === 'string' || argType === 'number') {
|
1359 | classes.push(arg);
|
1360 | } else if (Array.isArray(arg)) {
|
1361 | classes.push(classNames.apply(null, arg));
|
1362 | } else if (argType === 'object') {
|
1363 | for (var key in arg) {
|
1364 | if (hasOwn.call(arg, key) && arg[key]) {
|
1365 | classes.push(key);
|
1366 | }
|
1367 | }
|
1368 | }
|
1369 | }
|
1370 |
|
1371 | return classes.join(' ');
|
1372 | }
|
1373 |
|
1374 | if (typeof module !== 'undefined' && module.exports) {
|
1375 | module.exports = classNames;
|
1376 | } else if (true) {
|
1377 |
|
1378 | !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {
|
1379 | return classNames;
|
1380 | }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
1381 | __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
1382 | } else {
|
1383 | window.classNames = classNames;
|
1384 | }
|
1385 | }());
|
1386 |
|
1387 |
|
1388 | }),
|
1389 |
|
1390 | (function(module, exports, __webpack_require__) {
|
1391 |
|
1392 | __webpack_require__(84);
|
1393 | module.exports = __webpack_require__(1).Object.assign;
|
1394 |
|
1395 |
|
1396 | }),
|
1397 |
|
1398 | (function(module, exports, __webpack_require__) {
|
1399 |
|
1400 | __webpack_require__(85);
|
1401 | var $Object = __webpack_require__(1).Object;
|
1402 | module.exports = function create(P, D) {
|
1403 | return $Object.create(P, D);
|
1404 | };
|
1405 |
|
1406 |
|
1407 | }),
|
1408 |
|
1409 | (function(module, exports, __webpack_require__) {
|
1410 |
|
1411 | __webpack_require__(86);
|
1412 | var $Object = __webpack_require__(1).Object;
|
1413 | module.exports = function defineProperty(it, key, desc) {
|
1414 | return $Object.defineProperty(it, key, desc);
|
1415 | };
|
1416 |
|
1417 |
|
1418 | }),
|
1419 |
|
1420 | (function(module, exports, __webpack_require__) {
|
1421 |
|
1422 | __webpack_require__(87);
|
1423 | module.exports = __webpack_require__(1).Object.setPrototypeOf;
|
1424 |
|
1425 |
|
1426 | }),
|
1427 |
|
1428 | (function(module, exports, __webpack_require__) {
|
1429 |
|
1430 | __webpack_require__(90);
|
1431 | __webpack_require__(88);
|
1432 | __webpack_require__(91);
|
1433 | __webpack_require__(92);
|
1434 | module.exports = __webpack_require__(1).Symbol;
|
1435 |
|
1436 |
|
1437 | }),
|
1438 |
|
1439 | (function(module, exports, __webpack_require__) {
|
1440 |
|
1441 | __webpack_require__(89);
|
1442 | __webpack_require__(93);
|
1443 | module.exports = __webpack_require__(28).f('iterator');
|
1444 |
|
1445 |
|
1446 | }),
|
1447 |
|
1448 | (function(module, exports) {
|
1449 |
|
1450 | module.exports = function (it) {
|
1451 | if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
1452 | return it;
|
1453 | };
|
1454 |
|
1455 |
|
1456 | }),
|
1457 |
|
1458 | (function(module, exports) {
|
1459 |
|
1460 | module.exports = function () { };
|
1461 |
|
1462 |
|
1463 | }),
|
1464 |
|
1465 | (function(module, exports, __webpack_require__) {
|
1466 |
|
1467 |
|
1468 |
|
1469 | var toIObject = __webpack_require__(7);
|
1470 | var toLength = __webpack_require__(82);
|
1471 | var toAbsoluteIndex = __webpack_require__(81);
|
1472 | module.exports = function (IS_INCLUDES) {
|
1473 | return function ($this, el, fromIndex) {
|
1474 | var O = toIObject($this);
|
1475 | var length = toLength(O.length);
|
1476 | var index = toAbsoluteIndex(fromIndex, length);
|
1477 | var value;
|
1478 |
|
1479 |
|
1480 | if (IS_INCLUDES && el != el) while (length > index) {
|
1481 | value = O[index++];
|
1482 |
|
1483 | if (value != value) return true;
|
1484 |
|
1485 | } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
1486 | if (O[index] === el) return IS_INCLUDES || index || 0;
|
1487 | } return !IS_INCLUDES && -1;
|
1488 | };
|
1489 | };
|
1490 |
|
1491 |
|
1492 | }),
|
1493 |
|
1494 | (function(module, exports, __webpack_require__) {
|
1495 |
|
1496 |
|
1497 | var getKeys = __webpack_require__(12);
|
1498 | var gOPS = __webpack_require__(21);
|
1499 | var pIE = __webpack_require__(13);
|
1500 | module.exports = function (it) {
|
1501 | var result = getKeys(it);
|
1502 | var getSymbols = gOPS.f;
|
1503 | if (getSymbols) {
|
1504 | var symbols = getSymbols(it);
|
1505 | var isEnum = pIE.f;
|
1506 | var i = 0;
|
1507 | var key;
|
1508 | while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
1509 | } return result;
|
1510 | };
|
1511 |
|
1512 |
|
1513 | }),
|
1514 |
|
1515 | (function(module, exports, __webpack_require__) {
|
1516 |
|
1517 | var document = __webpack_require__(0).document;
|
1518 | module.exports = document && document.documentElement;
|
1519 |
|
1520 |
|
1521 | }),
|
1522 |
|
1523 | (function(module, exports, __webpack_require__) {
|
1524 |
|
1525 |
|
1526 | var cof = __webpack_require__(36);
|
1527 | module.exports = Array.isArray || function isArray(arg) {
|
1528 | return cof(arg) == 'Array';
|
1529 | };
|
1530 |
|
1531 |
|
1532 | }),
|
1533 |
|
1534 | (function(module, exports, __webpack_require__) {
|
1535 |
|
1536 | "use strict";
|
1537 |
|
1538 | var create = __webpack_require__(20);
|
1539 | var descriptor = __webpack_require__(14);
|
1540 | var setToStringTag = __webpack_require__(22);
|
1541 | var IteratorPrototype = {};
|
1542 |
|
1543 |
|
1544 | __webpack_require__(6)(IteratorPrototype, __webpack_require__(8)('iterator'), function () { return this; });
|
1545 |
|
1546 | module.exports = function (Constructor, NAME, next) {
|
1547 | Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
1548 | setToStringTag(Constructor, NAME + ' Iterator');
|
1549 | };
|
1550 |
|
1551 |
|
1552 | }),
|
1553 |
|
1554 | (function(module, exports) {
|
1555 |
|
1556 | module.exports = function (done, value) {
|
1557 | return { value: value, done: !!done };
|
1558 | };
|
1559 |
|
1560 |
|
1561 | }),
|
1562 |
|
1563 | (function(module, exports, __webpack_require__) {
|
1564 |
|
1565 | var META = __webpack_require__(15)('meta');
|
1566 | var isObject = __webpack_require__(11);
|
1567 | var has = __webpack_require__(3);
|
1568 | var setDesc = __webpack_require__(4).f;
|
1569 | var id = 0;
|
1570 | var isExtensible = Object.isExtensible || function () {
|
1571 | return true;
|
1572 | };
|
1573 | var FREEZE = !__webpack_require__(10)(function () {
|
1574 | return isExtensible(Object.preventExtensions({}));
|
1575 | });
|
1576 | var setMeta = function (it) {
|
1577 | setDesc(it, META, { value: {
|
1578 | i: 'O' + ++id,
|
1579 | w: {}
|
1580 | } });
|
1581 | };
|
1582 | var fastKey = function (it, create) {
|
1583 |
|
1584 | if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
1585 | if (!has(it, META)) {
|
1586 |
|
1587 | if (!isExtensible(it)) return 'F';
|
1588 |
|
1589 | if (!create) return 'E';
|
1590 |
|
1591 | setMeta(it);
|
1592 |
|
1593 | } return it[META].i;
|
1594 | };
|
1595 | var getWeak = function (it, create) {
|
1596 | if (!has(it, META)) {
|
1597 |
|
1598 | if (!isExtensible(it)) return true;
|
1599 |
|
1600 | if (!create) return false;
|
1601 |
|
1602 | setMeta(it);
|
1603 |
|
1604 | } return it[META].w;
|
1605 | };
|
1606 |
|
1607 | var onFreeze = function (it) {
|
1608 | if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
1609 | return it;
|
1610 | };
|
1611 | var meta = module.exports = {
|
1612 | KEY: META,
|
1613 | NEED: false,
|
1614 | fastKey: fastKey,
|
1615 | getWeak: getWeak,
|
1616 | onFreeze: onFreeze
|
1617 | };
|
1618 |
|
1619 |
|
1620 | }),
|
1621 |
|
1622 | (function(module, exports, __webpack_require__) {
|
1623 |
|
1624 | "use strict";
|
1625 |
|
1626 |
|
1627 | var getKeys = __webpack_require__(12);
|
1628 | var gOPS = __webpack_require__(21);
|
1629 | var pIE = __webpack_require__(13);
|
1630 | var toObject = __webpack_require__(46);
|
1631 | var IObject = __webpack_require__(40);
|
1632 | var $assign = Object.assign;
|
1633 |
|
1634 |
|
1635 | module.exports = !$assign || __webpack_require__(10)(function () {
|
1636 | var A = {};
|
1637 | var B = {};
|
1638 |
|
1639 | var S = Symbol();
|
1640 | var K = 'abcdefghijklmnopqrst';
|
1641 | A[S] = 7;
|
1642 | K.split('').forEach(function (k) { B[k] = k; });
|
1643 | return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
1644 | }) ? function assign(target, source) {
|
1645 | var T = toObject(target);
|
1646 | var aLen = arguments.length;
|
1647 | var index = 1;
|
1648 | var getSymbols = gOPS.f;
|
1649 | var isEnum = pIE.f;
|
1650 | while (aLen > index) {
|
1651 | var S = IObject(arguments[index++]);
|
1652 | var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
1653 | var length = keys.length;
|
1654 | var j = 0;
|
1655 | var key;
|
1656 | while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
|
1657 | } return T;
|
1658 | } : $assign;
|
1659 |
|
1660 |
|
1661 | }),
|
1662 |
|
1663 | (function(module, exports, __webpack_require__) {
|
1664 |
|
1665 | var dP = __webpack_require__(4);
|
1666 | var anObject = __webpack_require__(9);
|
1667 | var getKeys = __webpack_require__(12);
|
1668 |
|
1669 | module.exports = __webpack_require__(2) ? Object.defineProperties : function defineProperties(O, Properties) {
|
1670 | anObject(O);
|
1671 | var keys = getKeys(Properties);
|
1672 | var length = keys.length;
|
1673 | var i = 0;
|
1674 | var P;
|
1675 | while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
1676 | return O;
|
1677 | };
|
1678 |
|
1679 |
|
1680 | }),
|
1681 |
|
1682 | (function(module, exports, __webpack_require__) {
|
1683 |
|
1684 |
|
1685 | var toIObject = __webpack_require__(7);
|
1686 | var gOPN = __webpack_require__(43).f;
|
1687 | var toString = {}.toString;
|
1688 |
|
1689 | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
1690 | ? Object.getOwnPropertyNames(window) : [];
|
1691 |
|
1692 | var getWindowNames = function (it) {
|
1693 | try {
|
1694 | return gOPN(it);
|
1695 | } catch (e) {
|
1696 | return windowNames.slice();
|
1697 | }
|
1698 | };
|
1699 |
|
1700 | module.exports.f = function getOwnPropertyNames(it) {
|
1701 | return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
1702 | };
|
1703 |
|
1704 |
|
1705 | }),
|
1706 |
|
1707 | (function(module, exports, __webpack_require__) {
|
1708 |
|
1709 |
|
1710 | var has = __webpack_require__(3);
|
1711 | var toObject = __webpack_require__(46);
|
1712 | var IE_PROTO = __webpack_require__(23)('IE_PROTO');
|
1713 | var ObjectProto = Object.prototype;
|
1714 |
|
1715 | module.exports = Object.getPrototypeOf || function (O) {
|
1716 | O = toObject(O);
|
1717 | if (has(O, IE_PROTO)) return O[IE_PROTO];
|
1718 | if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
1719 | return O.constructor.prototype;
|
1720 | } return O instanceof Object ? ObjectProto : null;
|
1721 | };
|
1722 |
|
1723 |
|
1724 | }),
|
1725 |
|
1726 | (function(module, exports, __webpack_require__) {
|
1727 |
|
1728 |
|
1729 |
|
1730 | var isObject = __webpack_require__(11);
|
1731 | var anObject = __webpack_require__(9);
|
1732 | var check = function (O, proto) {
|
1733 | anObject(O);
|
1734 | if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
|
1735 | };
|
1736 | module.exports = {
|
1737 | set: Object.setPrototypeOf || ('__proto__' in {} ?
|
1738 | function (test, buggy, set) {
|
1739 | try {
|
1740 | set = __webpack_require__(37)(Function.call, __webpack_require__(42).f(Object.prototype, '__proto__').set, 2);
|
1741 | set(test, []);
|
1742 | buggy = !(test instanceof Array);
|
1743 | } catch (e) { buggy = true; }
|
1744 | return function setPrototypeOf(O, proto) {
|
1745 | check(O, proto);
|
1746 | if (buggy) O.__proto__ = proto;
|
1747 | else set(O, proto);
|
1748 | return O;
|
1749 | };
|
1750 | }({}, false) : undefined),
|
1751 | check: check
|
1752 | };
|
1753 |
|
1754 |
|
1755 | }),
|
1756 |
|
1757 | (function(module, exports, __webpack_require__) {
|
1758 |
|
1759 | var toInteger = __webpack_require__(25);
|
1760 | var defined = __webpack_require__(16);
|
1761 |
|
1762 |
|
1763 | module.exports = function (TO_STRING) {
|
1764 | return function (that, pos) {
|
1765 | var s = String(defined(that));
|
1766 | var i = toInteger(pos);
|
1767 | var l = s.length;
|
1768 | var a, b;
|
1769 | if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
|
1770 | a = s.charCodeAt(i);
|
1771 | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
1772 | ? TO_STRING ? s.charAt(i) : a
|
1773 | : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
1774 | };
|
1775 | };
|
1776 |
|
1777 |
|
1778 | }),
|
1779 |
|
1780 | (function(module, exports, __webpack_require__) {
|
1781 |
|
1782 | var toInteger = __webpack_require__(25);
|
1783 | var max = Math.max;
|
1784 | var min = Math.min;
|
1785 | module.exports = function (index, length) {
|
1786 | index = toInteger(index);
|
1787 | return index < 0 ? max(index + length, 0) : min(index, length);
|
1788 | };
|
1789 |
|
1790 |
|
1791 | }),
|
1792 |
|
1793 | (function(module, exports, __webpack_require__) {
|
1794 |
|
1795 |
|
1796 | var toInteger = __webpack_require__(25);
|
1797 | var min = Math.min;
|
1798 | module.exports = function (it) {
|
1799 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0;
|
1800 | };
|
1801 |
|
1802 |
|
1803 | }),
|
1804 |
|
1805 | (function(module, exports, __webpack_require__) {
|
1806 |
|
1807 | "use strict";
|
1808 |
|
1809 | var addToUnscopables = __webpack_require__(67);
|
1810 | var step = __webpack_require__(73);
|
1811 | var Iterators = __webpack_require__(18);
|
1812 | var toIObject = __webpack_require__(7);
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 | module.exports = __webpack_require__(41)(Array, 'Array', function (iterated, kind) {
|
1819 | this._t = toIObject(iterated);
|
1820 | this._i = 0;
|
1821 | this._k = kind;
|
1822 |
|
1823 | }, function () {
|
1824 | var O = this._t;
|
1825 | var kind = this._k;
|
1826 | var index = this._i++;
|
1827 | if (!O || index >= O.length) {
|
1828 | this._t = undefined;
|
1829 | return step(1);
|
1830 | }
|
1831 | if (kind == 'keys') return step(0, index);
|
1832 | if (kind == 'values') return step(0, O[index]);
|
1833 | return step(0, [index, O[index]]);
|
1834 | }, 'values');
|
1835 |
|
1836 |
|
1837 | Iterators.Arguments = Iterators.Array;
|
1838 |
|
1839 | addToUnscopables('keys');
|
1840 | addToUnscopables('values');
|
1841 | addToUnscopables('entries');
|
1842 |
|
1843 |
|
1844 | }),
|
1845 |
|
1846 | (function(module, exports, __webpack_require__) {
|
1847 |
|
1848 |
|
1849 | var $export = __webpack_require__(5);
|
1850 |
|
1851 | $export($export.S + $export.F, 'Object', { assign: __webpack_require__(75) });
|
1852 |
|
1853 |
|
1854 | }),
|
1855 |
|
1856 | (function(module, exports, __webpack_require__) {
|
1857 |
|
1858 | var $export = __webpack_require__(5);
|
1859 |
|
1860 | $export($export.S, 'Object', { create: __webpack_require__(20) });
|
1861 |
|
1862 |
|
1863 | }),
|
1864 |
|
1865 | (function(module, exports, __webpack_require__) {
|
1866 |
|
1867 | var $export = __webpack_require__(5);
|
1868 |
|
1869 | $export($export.S + $export.F * !__webpack_require__(2), 'Object', { defineProperty: __webpack_require__(4).f });
|
1870 |
|
1871 |
|
1872 | }),
|
1873 |
|
1874 | (function(module, exports, __webpack_require__) {
|
1875 |
|
1876 |
|
1877 | var $export = __webpack_require__(5);
|
1878 | $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(79).set });
|
1879 |
|
1880 |
|
1881 | }),
|
1882 |
|
1883 | (function(module, exports) {
|
1884 |
|
1885 |
|
1886 |
|
1887 | }),
|
1888 |
|
1889 | (function(module, exports, __webpack_require__) {
|
1890 |
|
1891 | "use strict";
|
1892 |
|
1893 | var $at = __webpack_require__(80)(true);
|
1894 |
|
1895 |
|
1896 | __webpack_require__(41)(String, 'String', function (iterated) {
|
1897 | this._t = String(iterated);
|
1898 | this._i = 0;
|
1899 |
|
1900 | }, function () {
|
1901 | var O = this._t;
|
1902 | var index = this._i;
|
1903 | var point;
|
1904 | if (index >= O.length) return { value: undefined, done: true };
|
1905 | point = $at(O, index);
|
1906 | this._i += point.length;
|
1907 | return { value: point, done: false };
|
1908 | });
|
1909 |
|
1910 |
|
1911 | }),
|
1912 |
|
1913 | (function(module, exports, __webpack_require__) {
|
1914 |
|
1915 | "use strict";
|
1916 |
|
1917 |
|
1918 | var global = __webpack_require__(0);
|
1919 | var has = __webpack_require__(3);
|
1920 | var DESCRIPTORS = __webpack_require__(2);
|
1921 | var $export = __webpack_require__(5);
|
1922 | var redefine = __webpack_require__(45);
|
1923 | var META = __webpack_require__(74).KEY;
|
1924 | var $fails = __webpack_require__(10);
|
1925 | var shared = __webpack_require__(24);
|
1926 | var setToStringTag = __webpack_require__(22);
|
1927 | var uid = __webpack_require__(15);
|
1928 | var wks = __webpack_require__(8);
|
1929 | var wksExt = __webpack_require__(28);
|
1930 | var wksDefine = __webpack_require__(27);
|
1931 | var enumKeys = __webpack_require__(69);
|
1932 | var isArray = __webpack_require__(71);
|
1933 | var anObject = __webpack_require__(9);
|
1934 | var toIObject = __webpack_require__(7);
|
1935 | var toPrimitive = __webpack_require__(26);
|
1936 | var createDesc = __webpack_require__(14);
|
1937 | var _create = __webpack_require__(20);
|
1938 | var gOPNExt = __webpack_require__(77);
|
1939 | var $GOPD = __webpack_require__(42);
|
1940 | var $DP = __webpack_require__(4);
|
1941 | var $keys = __webpack_require__(12);
|
1942 | var gOPD = $GOPD.f;
|
1943 | var dP = $DP.f;
|
1944 | var gOPN = gOPNExt.f;
|
1945 | var $Symbol = global.Symbol;
|
1946 | var $JSON = global.JSON;
|
1947 | var _stringify = $JSON && $JSON.stringify;
|
1948 | var PROTOTYPE = 'prototype';
|
1949 | var HIDDEN = wks('_hidden');
|
1950 | var TO_PRIMITIVE = wks('toPrimitive');
|
1951 | var isEnum = {}.propertyIsEnumerable;
|
1952 | var SymbolRegistry = shared('symbol-registry');
|
1953 | var AllSymbols = shared('symbols');
|
1954 | var OPSymbols = shared('op-symbols');
|
1955 | var ObjectProto = Object[PROTOTYPE];
|
1956 | var USE_NATIVE = typeof $Symbol == 'function';
|
1957 | var QObject = global.QObject;
|
1958 |
|
1959 | var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
1960 |
|
1961 |
|
1962 | var setSymbolDesc = DESCRIPTORS && $fails(function () {
|
1963 | return _create(dP({}, 'a', {
|
1964 | get: function () { return dP(this, 'a', { value: 7 }).a; }
|
1965 | })).a != 7;
|
1966 | }) ? function (it, key, D) {
|
1967 | var protoDesc = gOPD(ObjectProto, key);
|
1968 | if (protoDesc) delete ObjectProto[key];
|
1969 | dP(it, key, D);
|
1970 | if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
|
1971 | } : dP;
|
1972 |
|
1973 | var wrap = function (tag) {
|
1974 | var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
1975 | sym._k = tag;
|
1976 | return sym;
|
1977 | };
|
1978 |
|
1979 | var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
1980 | return typeof it == 'symbol';
|
1981 | } : function (it) {
|
1982 | return it instanceof $Symbol;
|
1983 | };
|
1984 |
|
1985 | var $defineProperty = function defineProperty(it, key, D) {
|
1986 | if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
|
1987 | anObject(it);
|
1988 | key = toPrimitive(key, true);
|
1989 | anObject(D);
|
1990 | if (has(AllSymbols, key)) {
|
1991 | if (!D.enumerable) {
|
1992 | if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
|
1993 | it[HIDDEN][key] = true;
|
1994 | } else {
|
1995 | if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
|
1996 | D = _create(D, { enumerable: createDesc(0, false) });
|
1997 | } return setSymbolDesc(it, key, D);
|
1998 | } return dP(it, key, D);
|
1999 | };
|
2000 | var $defineProperties = function defineProperties(it, P) {
|
2001 | anObject(it);
|
2002 | var keys = enumKeys(P = toIObject(P));
|
2003 | var i = 0;
|
2004 | var l = keys.length;
|
2005 | var key;
|
2006 | while (l > i) $defineProperty(it, key = keys[i++], P[key]);
|
2007 | return it;
|
2008 | };
|
2009 | var $create = function create(it, P) {
|
2010 | return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
2011 | };
|
2012 | var $propertyIsEnumerable = function propertyIsEnumerable(key) {
|
2013 | var E = isEnum.call(this, key = toPrimitive(key, true));
|
2014 | if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
|
2015 | return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
2016 | };
|
2017 | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
|
2018 | it = toIObject(it);
|
2019 | key = toPrimitive(key, true);
|
2020 | if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
|
2021 | var D = gOPD(it, key);
|
2022 | if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
|
2023 | return D;
|
2024 | };
|
2025 | var $getOwnPropertyNames = function getOwnPropertyNames(it) {
|
2026 | var names = gOPN(toIObject(it));
|
2027 | var result = [];
|
2028 | var i = 0;
|
2029 | var key;
|
2030 | while (names.length > i) {
|
2031 | if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
|
2032 | } return result;
|
2033 | };
|
2034 | var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
2035 | var IS_OP = it === ObjectProto;
|
2036 | var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
|
2037 | var result = [];
|
2038 | var i = 0;
|
2039 | var key;
|
2040 | while (names.length > i) {
|
2041 | if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
|
2042 | } return result;
|
2043 | };
|
2044 |
|
2045 |
|
2046 | if (!USE_NATIVE) {
|
2047 | $Symbol = function Symbol() {
|
2048 | if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
|
2049 | var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
2050 | var $set = function (value) {
|
2051 | if (this === ObjectProto) $set.call(OPSymbols, value);
|
2052 | if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
2053 | setSymbolDesc(this, tag, createDesc(1, value));
|
2054 | };
|
2055 | if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
|
2056 | return wrap(tag);
|
2057 | };
|
2058 | redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
2059 | return this._k;
|
2060 | });
|
2061 |
|
2062 | $GOPD.f = $getOwnPropertyDescriptor;
|
2063 | $DP.f = $defineProperty;
|
2064 | __webpack_require__(43).f = gOPNExt.f = $getOwnPropertyNames;
|
2065 | __webpack_require__(13).f = $propertyIsEnumerable;
|
2066 | __webpack_require__(21).f = $getOwnPropertySymbols;
|
2067 |
|
2068 | if (DESCRIPTORS && !__webpack_require__(19)) {
|
2069 | redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
2070 | }
|
2071 |
|
2072 | wksExt.f = function (name) {
|
2073 | return wrap(wks(name));
|
2074 | };
|
2075 | }
|
2076 |
|
2077 | $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
|
2078 |
|
2079 | for (var es6Symbols = (
|
2080 |
|
2081 | 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
2082 | ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
|
2083 |
|
2084 | for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
|
2085 |
|
2086 | $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
2087 |
|
2088 | 'for': function (key) {
|
2089 | return has(SymbolRegistry, key += '')
|
2090 | ? SymbolRegistry[key]
|
2091 | : SymbolRegistry[key] = $Symbol(key);
|
2092 | },
|
2093 |
|
2094 | keyFor: function keyFor(sym) {
|
2095 | if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
|
2096 | for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
2097 | },
|
2098 | useSetter: function () { setter = true; },
|
2099 | useSimple: function () { setter = false; }
|
2100 | });
|
2101 |
|
2102 | $export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
2103 |
|
2104 | create: $create,
|
2105 |
|
2106 | defineProperty: $defineProperty,
|
2107 |
|
2108 | defineProperties: $defineProperties,
|
2109 |
|
2110 | getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
2111 |
|
2112 | getOwnPropertyNames: $getOwnPropertyNames,
|
2113 |
|
2114 | getOwnPropertySymbols: $getOwnPropertySymbols
|
2115 | });
|
2116 |
|
2117 |
|
2118 | $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
|
2119 | var S = $Symbol();
|
2120 |
|
2121 |
|
2122 |
|
2123 | return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
|
2124 | })), 'JSON', {
|
2125 | stringify: function stringify(it) {
|
2126 | if (it === undefined || isSymbol(it)) return;
|
2127 | var args = [it];
|
2128 | var i = 1;
|
2129 | var replacer, $replacer;
|
2130 | while (arguments.length > i) args.push(arguments[i++]);
|
2131 | replacer = args[1];
|
2132 | if (typeof replacer == 'function') $replacer = replacer;
|
2133 | if ($replacer || !isArray(replacer)) replacer = function (key, value) {
|
2134 | if ($replacer) value = $replacer.call(this, key, value);
|
2135 | if (!isSymbol(value)) return value;
|
2136 | };
|
2137 | args[1] = replacer;
|
2138 | return _stringify.apply($JSON, args);
|
2139 | }
|
2140 | });
|
2141 |
|
2142 |
|
2143 | $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(6)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
2144 |
|
2145 | setToStringTag($Symbol, 'Symbol');
|
2146 |
|
2147 | setToStringTag(Math, 'Math', true);
|
2148 |
|
2149 | setToStringTag(global.JSON, 'JSON', true);
|
2150 |
|
2151 |
|
2152 | }),
|
2153 |
|
2154 | (function(module, exports, __webpack_require__) {
|
2155 |
|
2156 | __webpack_require__(27)('asyncIterator');
|
2157 |
|
2158 |
|
2159 | }),
|
2160 |
|
2161 | (function(module, exports, __webpack_require__) {
|
2162 |
|
2163 | __webpack_require__(27)('observable');
|
2164 |
|
2165 |
|
2166 | }),
|
2167 |
|
2168 | (function(module, exports, __webpack_require__) {
|
2169 |
|
2170 | __webpack_require__(83);
|
2171 | var global = __webpack_require__(0);
|
2172 | var hide = __webpack_require__(6);
|
2173 | var Iterators = __webpack_require__(18);
|
2174 | var TO_STRING_TAG = __webpack_require__(8)('toStringTag');
|
2175 |
|
2176 | var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
|
2177 | 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
|
2178 | 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' +
|
2179 | 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' +
|
2180 | 'TextTrackList,TouchList').split(',');
|
2181 |
|
2182 | for (var i = 0; i < DOMIterables.length; i++) {
|
2183 | var NAME = DOMIterables[i];
|
2184 | var Collection = global[NAME];
|
2185 | var proto = Collection && Collection.prototype;
|
2186 | if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
2187 | Iterators[NAME] = Iterators.Array;
|
2188 | }
|
2189 |
|
2190 |
|
2191 | }),
|
2192 |
|
2193 | (function(module, __webpack_exports__, __webpack_require__) {
|
2194 |
|
2195 | "use strict";
|
2196 | var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(32);
|
2197 | var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
|
2198 | var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(30);
|
2199 | var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
|
2200 | var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(31);
|
2201 | var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
|
2202 | var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(34);
|
2203 | var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
|
2204 | var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(33);
|
2205 | var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
|
2206 | var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(48);
|
2207 | var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
|
2208 | var __WEBPACK_IMPORTED_MODULE_6__util__ = __webpack_require__(95);
|
2209 | var __WEBPACK_IMPORTED_MODULE_7__config__ = __webpack_require__(47);
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 | ;
|
2220 | ;
|
2221 | var directionMap = {
|
2222 | all: __WEBPACK_IMPORTED_MODULE_7__config__["a" ],
|
2223 | vertical: __WEBPACK_IMPORTED_MODULE_7__config__["b" ],
|
2224 | horizontal: __WEBPACK_IMPORTED_MODULE_7__config__["c" ]
|
2225 | };
|
2226 |
|
2227 | var Gesture = function (_Component) {
|
2228 | __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(Gesture, _Component);
|
2229 |
|
2230 | function Gesture(props) {
|
2231 | __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Gesture);
|
2232 |
|
2233 | var _this = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Gesture.__proto__ || Object.getPrototypeOf(Gesture)).call(this, props));
|
2234 |
|
2235 | _this.state = {};
|
2236 | _this.triggerEvent = function (name) {
|
2237 | for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
2238 | args[_key - 1] = arguments[_key];
|
2239 | }
|
2240 |
|
2241 | var cb = _this.props[name];
|
2242 | if (typeof cb === 'function') {
|
2243 |
|
2244 | cb.apply(undefined, [_this.getGestureState()].concat(args));
|
2245 | }
|
2246 | };
|
2247 | _this.triggerCombineEvent = function (mainEventName, eventStatus) {
|
2248 | for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
2249 | args[_key2 - 2] = arguments[_key2];
|
2250 | }
|
2251 |
|
2252 | _this.triggerEvent.apply(_this, [mainEventName].concat(args));
|
2253 | _this.triggerSubEvent.apply(_this, [mainEventName, eventStatus].concat(args));
|
2254 | };
|
2255 | _this.triggerSubEvent = function (mainEventName, eventStatus) {
|
2256 | for (var _len3 = arguments.length, args = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {
|
2257 | args[_key3 - 2] = arguments[_key3];
|
2258 | }
|
2259 |
|
2260 | if (eventStatus) {
|
2261 | var subEventName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" ])(mainEventName, eventStatus);
|
2262 | _this.triggerEvent.apply(_this, [subEventName].concat(args));
|
2263 | }
|
2264 | };
|
2265 | _this.triggerPinchEvent = function (mainEventName, eventStatus) {
|
2266 | for (var _len4 = arguments.length, args = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {
|
2267 | args[_key4 - 2] = arguments[_key4];
|
2268 | }
|
2269 |
|
2270 | var scale = _this.gesture.scale;
|
2271 |
|
2272 | if (eventStatus === 'move' && typeof scale === 'number') {
|
2273 | if (scale > 1) {
|
2274 | _this.triggerEvent('onPinchOut');
|
2275 | }
|
2276 | if (scale < 1) {
|
2277 | _this.triggerEvent('onPinchIn');
|
2278 | }
|
2279 | }
|
2280 | _this.triggerCombineEvent.apply(_this, [mainEventName, eventStatus].concat(args));
|
2281 | };
|
2282 | _this.initPressTimer = function () {
|
2283 | _this.cleanPressTimer();
|
2284 | _this.pressTimer = setTimeout(function () {
|
2285 | _this.setGestureState({
|
2286 | press: true
|
2287 | });
|
2288 | _this.triggerEvent('onPress');
|
2289 | }, __WEBPACK_IMPORTED_MODULE_7__config__["d" ].time);
|
2290 | };
|
2291 | _this.cleanPressTimer = function () {
|
2292 |
|
2293 | _this.pressTimer && clearTimeout(_this.pressTimer);
|
2294 | };
|
2295 | _this.setGestureState = function (params) {
|
2296 | if (!_this.gesture) {
|
2297 | _this.gesture = {};
|
2298 | }
|
2299 |
|
2300 | if (_this.gesture.touches) {
|
2301 | _this.gesture.preTouches = _this.gesture.touches;
|
2302 | }
|
2303 | _this.gesture = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, _this.gesture, params);
|
2304 | };
|
2305 | _this.getGestureState = function () {
|
2306 | if (!_this.gesture) {
|
2307 | return _this.gesture;
|
2308 | } else {
|
2309 |
|
2310 | return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, _this.gesture);
|
2311 | }
|
2312 | };
|
2313 | _this.cleanGestureState = function () {
|
2314 | delete _this.gesture;
|
2315 | };
|
2316 | _this.getTouches = function (e) {
|
2317 | return Array.prototype.slice.call(e.touches).map(function (item) {
|
2318 | return {
|
2319 | x: item.screenX,
|
2320 | y: item.screenY
|
2321 | };
|
2322 | });
|
2323 | };
|
2324 | _this.triggerUserCb = function (status, e) {
|
2325 | var cbName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["a" ])('onTouch', status);
|
2326 | if (cbName in _this.props) {
|
2327 | _this.props[cbName](e);
|
2328 | }
|
2329 | };
|
2330 | _this._handleTouchStart = function (e) {
|
2331 | _this.triggerUserCb('start', e);
|
2332 | _this.event = e;
|
2333 | if (e.touches.length > 1) {
|
2334 | e.preventDefault();
|
2335 | }
|
2336 | _this.initGestureStatus(e);
|
2337 | _this.initPressTimer();
|
2338 | _this.checkIfMultiTouchStart();
|
2339 | };
|
2340 | _this.initGestureStatus = function (e) {
|
2341 | _this.cleanGestureState();
|
2342 |
|
2343 | var startTouches = _this.getTouches(e);
|
2344 | var startTime = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["b" ])();
|
2345 | var startMutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" ])(startTouches);
|
2346 | _this.setGestureState({
|
2347 | startTime: startTime,
|
2348 | startTouches: startTouches,
|
2349 | startMutliFingerStatus: startMutliFingerStatus,
|
2350 |
|
2351 | time: startTime,
|
2352 | touches: startTouches,
|
2353 | mutliFingerStatus: startMutliFingerStatus
|
2354 | });
|
2355 | };
|
2356 | _this.checkIfMultiTouchStart = function () {
|
2357 | var _this$props = _this.props,
|
2358 | enablePinch = _this$props.enablePinch,
|
2359 | enableRotate = _this$props.enableRotate;
|
2360 | var touches = _this.gesture.touches;
|
2361 |
|
2362 | if (touches.length > 1 && (enablePinch || enableRotate)) {
|
2363 | if (enablePinch) {
|
2364 | var startMutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" ])(touches);
|
2365 | _this.setGestureState({
|
2366 | startMutliFingerStatus: startMutliFingerStatus,
|
2367 |
|
2368 | pinch: true,
|
2369 | scale: 1
|
2370 | });
|
2371 | _this.triggerCombineEvent('onPinch', 'start');
|
2372 | }
|
2373 | if (enableRotate) {
|
2374 | _this.setGestureState({
|
2375 |
|
2376 | rotate: true,
|
2377 | rotation: 0
|
2378 | });
|
2379 | _this.triggerCombineEvent('onRotate', 'start');
|
2380 | }
|
2381 | }
|
2382 | };
|
2383 | _this._handleTouchMove = function (e) {
|
2384 | _this.triggerUserCb('move', e);
|
2385 | _this.event = e;
|
2386 | if (!_this.gesture) {
|
2387 |
|
2388 |
|
2389 | return;
|
2390 | }
|
2391 |
|
2392 | _this.cleanPressTimer();
|
2393 | _this.updateGestureStatus(e);
|
2394 | _this.checkIfSingleTouchMove();
|
2395 | _this.checkIfMultiTouchMove();
|
2396 | };
|
2397 | _this.checkIfMultiTouchMove = function () {
|
2398 | var _this$gesture = _this.gesture,
|
2399 | pinch = _this$gesture.pinch,
|
2400 | rotate = _this$gesture.rotate,
|
2401 | touches = _this$gesture.touches,
|
2402 | startMutliFingerStatus = _this$gesture.startMutliFingerStatus,
|
2403 | mutliFingerStatus = _this$gesture.mutliFingerStatus;
|
2404 |
|
2405 | if (!pinch && !rotate) {
|
2406 | return;
|
2407 | }
|
2408 | if (touches.length < 2) {
|
2409 | _this.setGestureState({
|
2410 | pinch: false,
|
2411 | rotate: false
|
2412 | });
|
2413 |
|
2414 | pinch && _this.triggerCombineEvent('onPinch', 'cancel');
|
2415 | rotate && _this.triggerCombineEvent('onRotate', 'cancel');
|
2416 | return;
|
2417 | }
|
2418 | if (pinch) {
|
2419 | var scale = mutliFingerStatus.z / startMutliFingerStatus.z;
|
2420 | _this.setGestureState({
|
2421 | scale: scale
|
2422 | });
|
2423 | _this.triggerPinchEvent('onPinch', 'move');
|
2424 | }
|
2425 | if (rotate) {
|
2426 | var rotation = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["d" ])(startMutliFingerStatus, mutliFingerStatus);
|
2427 | _this.setGestureState({
|
2428 | rotation: rotation
|
2429 | });
|
2430 | _this.triggerCombineEvent('onRotate', 'move');
|
2431 | }
|
2432 | };
|
2433 | _this.allowGesture = function () {
|
2434 | return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["e" ])(_this.gesture.direction, _this.directionSetting);
|
2435 | };
|
2436 | _this.checkIfSingleTouchMove = function () {
|
2437 | var _this$gesture2 = _this.gesture,
|
2438 | pan = _this$gesture2.pan,
|
2439 | touches = _this$gesture2.touches,
|
2440 | moveStatus = _this$gesture2.moveStatus,
|
2441 | preTouches = _this$gesture2.preTouches;
|
2442 |
|
2443 | if (touches.length > 1) {
|
2444 | _this.setGestureState({
|
2445 | pan: false
|
2446 | });
|
2447 |
|
2448 | pan && _this.triggerCombineEvent('onPan', 'cancel');
|
2449 | return;
|
2450 | }
|
2451 |
|
2452 | _this.event.preventDefault();
|
2453 | if (moveStatus) {
|
2454 | var direction = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["f" ])(preTouches[0], touches[0]);
|
2455 | _this.setGestureState({
|
2456 | direction: direction
|
2457 | });
|
2458 | var eventName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["g" ])(direction);
|
2459 | if (!_this.allowGesture()) {
|
2460 | return;
|
2461 | }
|
2462 | if (!pan) {
|
2463 | _this.triggerCombineEvent('onPan', 'start');
|
2464 | _this.setGestureState({
|
2465 | pan: true
|
2466 | });
|
2467 | } else {
|
2468 | _this.triggerCombineEvent('onPan', eventName);
|
2469 | _this.triggerSubEvent('onPan', 'move');
|
2470 | }
|
2471 | }
|
2472 | };
|
2473 | _this.checkIfMultiTouchEnd = function (status) {
|
2474 | var _this$gesture3 = _this.gesture,
|
2475 | pinch = _this$gesture3.pinch,
|
2476 | rotate = _this$gesture3.rotate;
|
2477 |
|
2478 | if (pinch) {
|
2479 | _this.triggerCombineEvent('onPinch', status);
|
2480 | }
|
2481 | if (rotate) {
|
2482 | _this.triggerCombineEvent('onRotate', status);
|
2483 | }
|
2484 | };
|
2485 | _this.updateGestureStatus = function (e) {
|
2486 | var time = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["b" ])();
|
2487 | _this.setGestureState({
|
2488 | time: time
|
2489 | });
|
2490 | if (!e.touches || !e.touches.length) {
|
2491 | return;
|
2492 | }
|
2493 | var _this$gesture4 = _this.gesture,
|
2494 | startTime = _this$gesture4.startTime,
|
2495 | startTouches = _this$gesture4.startTouches,
|
2496 | pinch = _this$gesture4.pinch,
|
2497 | rotate = _this$gesture4.rotate;
|
2498 |
|
2499 | var touches = _this.getTouches(e);
|
2500 | var moveStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["h" ])(startTouches, touches, time - startTime);
|
2501 | var mutliFingerStatus = void 0;
|
2502 | if (pinch || rotate) {
|
2503 | mutliFingerStatus = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["c" ])(touches);
|
2504 | }
|
2505 | _this.setGestureState({
|
2506 |
|
2507 | touches: touches,
|
2508 | mutliFingerStatus: mutliFingerStatus,
|
2509 |
|
2510 | moveStatus: moveStatus
|
2511 | });
|
2512 | };
|
2513 | _this._handleTouchEnd = function (e) {
|
2514 | _this.triggerUserCb('end', e);
|
2515 | _this.event = e;
|
2516 | if (!_this.gesture) {
|
2517 | return;
|
2518 | }
|
2519 | _this.cleanPressTimer();
|
2520 | _this.updateGestureStatus(e);
|
2521 | _this.doSingleTouchEnd('end');
|
2522 | _this.checkIfMultiTouchEnd('end');
|
2523 | };
|
2524 | _this._handleTouchCancel = function (e) {
|
2525 | _this.triggerUserCb('cancel', e);
|
2526 | _this.event = e;
|
2527 |
|
2528 | if (!_this.gesture) {
|
2529 | return;
|
2530 | }
|
2531 | _this.cleanPressTimer();
|
2532 | _this.updateGestureStatus(e);
|
2533 | _this.doSingleTouchEnd('cancel');
|
2534 | _this.checkIfMultiTouchEnd('cancel');
|
2535 | };
|
2536 | _this.triggerAllowEvent = function (type, status) {
|
2537 | if (_this.allowGesture()) {
|
2538 | _this.triggerCombineEvent(type, status);
|
2539 | } else {
|
2540 | _this.triggerSubEvent(type, status);
|
2541 | }
|
2542 | };
|
2543 | _this.doSingleTouchEnd = function (status) {
|
2544 | var _this$gesture5 = _this.gesture,
|
2545 | moveStatus = _this$gesture5.moveStatus,
|
2546 | pinch = _this$gesture5.pinch,
|
2547 | rotate = _this$gesture5.rotate,
|
2548 | press = _this$gesture5.press,
|
2549 | pan = _this$gesture5.pan,
|
2550 | direction = _this$gesture5.direction;
|
2551 |
|
2552 | if (pinch || rotate) {
|
2553 | return;
|
2554 | }
|
2555 | if (moveStatus) {
|
2556 | var z = moveStatus.z,
|
2557 | velocity = moveStatus.velocity;
|
2558 |
|
2559 | var swipe = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["i" ])(z, velocity);
|
2560 | _this.setGestureState({
|
2561 | swipe: swipe
|
2562 | });
|
2563 | if (pan) {
|
2564 |
|
2565 |
|
2566 | _this.triggerAllowEvent('onPan', status);
|
2567 | }
|
2568 | if (swipe) {
|
2569 | var directionEvName = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_6__util__["g" ])(direction);
|
2570 |
|
2571 | _this.triggerAllowEvent('onSwipe', directionEvName);
|
2572 | return;
|
2573 | }
|
2574 | }
|
2575 | if (press) {
|
2576 | _this.triggerEvent('onPressUp');
|
2577 | return;
|
2578 | }
|
2579 | _this.triggerEvent('onTap');
|
2580 | };
|
2581 | _this.getTouchAction = function () {
|
2582 | var _this$props2 = _this.props,
|
2583 | enablePinch = _this$props2.enablePinch,
|
2584 | enableRotate = _this$props2.enableRotate;
|
2585 | var directionSetting = _this.directionSetting;
|
2586 |
|
2587 | if (enablePinch || enableRotate || directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["a" ]) {
|
2588 | return 'pan-x pan-y';
|
2589 | }
|
2590 | if (directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["b" ]) {
|
2591 | return 'pan-x';
|
2592 | }
|
2593 | if (directionSetting === __WEBPACK_IMPORTED_MODULE_7__config__["c" ]) {
|
2594 | return 'pan-y';
|
2595 | }
|
2596 | return 'auto';
|
2597 | };
|
2598 | _this.directionSetting = directionMap[props.direction];
|
2599 | return _this;
|
2600 | }
|
2601 |
|
2602 | __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(Gesture, [{
|
2603 | key: 'componentWillUnmount',
|
2604 | value: function componentWillUnmount() {
|
2605 | this.cleanPressTimer();
|
2606 | }
|
2607 | }, {
|
2608 | key: 'render',
|
2609 | value: function render() {
|
2610 | var children = this.props.children;
|
2611 |
|
2612 | var child = __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.only(children);
|
2613 | var touchAction = this.getTouchAction();
|
2614 | var events = {
|
2615 | onTouchStart: this._handleTouchStart,
|
2616 | onTouchMove: this._handleTouchMove,
|
2617 | onTouchCancel: this._handleTouchCancel,
|
2618 | onTouchEnd: this._handleTouchEnd
|
2619 | };
|
2620 | return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, events, { style: __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({ touchAction: touchAction }, child.props.style || {}) }));
|
2621 | }
|
2622 | }]);
|
2623 |
|
2624 | return Gesture;
|
2625 | }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
|
2626 |
|
2627 | __webpack_exports__["a"] = (Gesture);
|
2628 |
|
2629 | Gesture.defaultProps = {
|
2630 | enableRotate: false,
|
2631 | enablePinch: false,
|
2632 | direction: 'all'
|
2633 | };
|
2634 |
|
2635 | }),
|
2636 |
|
2637 | (function(module, __webpack_exports__, __webpack_require__) {
|
2638 |
|
2639 | "use strict";
|
2640 | __webpack_exports__["b"] = now;
|
2641 | __webpack_exports__["c"] = calcMutliFingerStatus;
|
2642 | __webpack_exports__["h"] = calcMoveStatus;
|
2643 | __webpack_exports__["d"] = calcRotation;
|
2644 | __webpack_exports__["a"] = getEventName;
|
2645 | __webpack_exports__["i"] = shouldTriggerSwipe;
|
2646 | __webpack_exports__["e"] = shouldTriggerDirection;
|
2647 |
|
2648 | __webpack_exports__["f"] = getMovingDirection;
|
2649 | __webpack_exports__["g"] = getDirectionEventName;
|
2650 | var __WEBPACK_IMPORTED_MODULE_0__config__ = __webpack_require__(47);
|
2651 |
|
2652 |
|
2653 | function _calcTriangleDistance(x, y) {
|
2654 | return Math.sqrt(x * x + y * y);
|
2655 | }
|
2656 | function _calcAngle(x, y) {
|
2657 | var radian = Math.atan2(y, x);
|
2658 | return 180 / (Math.PI / radian);
|
2659 | }
|
2660 | function now() {
|
2661 | return Date.now();
|
2662 | }
|
2663 | function calcMutliFingerStatus(touches) {
|
2664 | if (touches.length < 2) {
|
2665 | return;
|
2666 | }
|
2667 | var _touches$ = touches[0],
|
2668 | x1 = _touches$.x,
|
2669 | y1 = _touches$.y;
|
2670 | var _touches$2 = touches[1],
|
2671 | x2 = _touches$2.x,
|
2672 | y2 = _touches$2.y;
|
2673 |
|
2674 | var deltaX = x2 - x1;
|
2675 | var deltaY = y2 - y1;
|
2676 | return {
|
2677 | x: deltaX,
|
2678 | y: deltaY,
|
2679 | z: _calcTriangleDistance(deltaX, deltaY),
|
2680 | angle: _calcAngle(deltaX, deltaY)
|
2681 | };
|
2682 | }
|
2683 | function calcMoveStatus(startTouches, touches, time) {
|
2684 | var _startTouches$ = startTouches[0],
|
2685 | x1 = _startTouches$.x,
|
2686 | y1 = _startTouches$.y;
|
2687 | var _touches$3 = touches[0],
|
2688 | x2 = _touches$3.x,
|
2689 | y2 = _touches$3.y;
|
2690 |
|
2691 | var deltaX = x2 - x1;
|
2692 | var deltaY = y2 - y1;
|
2693 | var deltaZ = _calcTriangleDistance(deltaX, deltaY);
|
2694 | return {
|
2695 | x: deltaX,
|
2696 | y: deltaY,
|
2697 | z: deltaZ,
|
2698 | time: time,
|
2699 | velocity: deltaZ / time,
|
2700 | angle: _calcAngle(deltaX, deltaY)
|
2701 | };
|
2702 | }
|
2703 | function calcRotation(startMutliFingerStatus, mutliFingerStatus) {
|
2704 | var startAngle = startMutliFingerStatus.angle;
|
2705 | var angle = mutliFingerStatus.angle;
|
2706 |
|
2707 | return angle - startAngle;
|
2708 | }
|
2709 | function getEventName(prefix, status) {
|
2710 | return prefix + status[0].toUpperCase() + status.slice(1);
|
2711 | }
|
2712 | function shouldTriggerSwipe(delta, velocity) {
|
2713 | return Math.abs(delta) >= __WEBPACK_IMPORTED_MODULE_0__config__["e" ].threshold && Math.abs(velocity) > __WEBPACK_IMPORTED_MODULE_0__config__["e" ].velocity;
|
2714 | }
|
2715 | function shouldTriggerDirection(direction, directionSetting) {
|
2716 | if (directionSetting & direction) {
|
2717 | return true;
|
2718 | }
|
2719 | return false;
|
2720 | }
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 |
|
2727 |
|
2728 |
|
2729 | function getDirection(x, y) {
|
2730 | if (x === y) {
|
2731 | return __WEBPACK_IMPORTED_MODULE_0__config__["f" ];
|
2732 | }
|
2733 | if (Math.abs(x) >= Math.abs(y)) {
|
2734 | return x < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["g" ] : __WEBPACK_IMPORTED_MODULE_0__config__["h" ];
|
2735 | }
|
2736 | return y < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["i" ] : __WEBPACK_IMPORTED_MODULE_0__config__["j" ];
|
2737 | }
|
2738 |
|
2739 |
|
2740 |
|
2741 |
|
2742 |
|
2743 |
|
2744 |
|
2745 |
|
2746 | function getMovingDirection(point1, point2) {
|
2747 | var x1 = point1.x,
|
2748 | y1 = point1.y;
|
2749 | var x2 = point2.x,
|
2750 | y2 = point2.y;
|
2751 |
|
2752 | var deltaX = x2 - x1;
|
2753 | var deltaY = y2 - y1;
|
2754 | if (deltaX === 0 && deltaY === 0) {
|
2755 | return __WEBPACK_IMPORTED_MODULE_0__config__["f" ];
|
2756 | }
|
2757 | if (Math.abs(deltaX) >= Math.abs(deltaY)) {
|
2758 | return deltaX < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["g" ] : __WEBPACK_IMPORTED_MODULE_0__config__["h" ];
|
2759 | }
|
2760 | return deltaY < 0 ? __WEBPACK_IMPORTED_MODULE_0__config__["i" ] : __WEBPACK_IMPORTED_MODULE_0__config__["j" ];
|
2761 | }
|
2762 | function getDirectionEventName(direction) {
|
2763 | var name = void 0;
|
2764 | switch (direction) {
|
2765 | case __WEBPACK_IMPORTED_MODULE_0__config__["f" ]:
|
2766 | break;
|
2767 | case __WEBPACK_IMPORTED_MODULE_0__config__["g" ]:
|
2768 | name = 'left';
|
2769 | break;
|
2770 | case __WEBPACK_IMPORTED_MODULE_0__config__["h" ]:
|
2771 | name = 'right';
|
2772 | break;
|
2773 | case __WEBPACK_IMPORTED_MODULE_0__config__["i" ]:
|
2774 | name = 'up';
|
2775 | break;
|
2776 | case __WEBPACK_IMPORTED_MODULE_0__config__["j" ]:
|
2777 | name = 'down';
|
2778 | break;
|
2779 | default:
|
2780 | }
|
2781 | return name;
|
2782 | }
|
2783 |
|
2784 | }),
|
2785 |
|
2786 | (function(module, exports) {
|
2787 |
|
2788 | module.exports = __WEBPACK_EXTERNAL_MODULE_96__;
|
2789 |
|
2790 | }),
|
2791 |
|
2792 | (function(module, exports, __webpack_require__) {
|
2793 |
|
2794 | __webpack_require__(49);
|
2795 | module.exports = __webpack_require__(50);
|
2796 |
|
2797 |
|
2798 | })
|
2799 | ]);
|
2800 | });
|
2801 |
|
\ | No newline at end of file |