@lingk/sync 0.1.75 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/css/lightningStyles.css +0 -13
- package/build/css/lingkStyles.css +13 -9
- package/build/css/main.css +33 -1
- package/build/lightning.js +38 -37
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +5 -4
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/main.js +1278 -217
- package/build/main.js.map +1 -1
- package/build/reducer.js.map +1 -1
- package/package.json +2 -1
package/build/main.js
CHANGED
|
@@ -629,7 +629,7 @@ module.exports =
|
|
|
629
629
|
/***/ function(module, exports, __webpack_require__) {
|
|
630
630
|
|
|
631
631
|
var dP = __webpack_require__(18)
|
|
632
|
-
, createDesc = __webpack_require__(
|
|
632
|
+
, createDesc = __webpack_require__(35);
|
|
633
633
|
module.exports = __webpack_require__(9) ? function(object, key, value){
|
|
634
634
|
return dP.f(object, key, createDesc(1, value));
|
|
635
635
|
} : function(object, key, value){
|
|
@@ -711,7 +711,7 @@ module.exports =
|
|
|
711
711
|
/***/ function(module, exports, __webpack_require__) {
|
|
712
712
|
|
|
713
713
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
714
|
-
var IObject = __webpack_require__(
|
|
714
|
+
var IObject = __webpack_require__(32)
|
|
715
715
|
, defined = __webpack_require__(16);
|
|
716
716
|
module.exports = function(it){
|
|
717
717
|
return IObject(defined(it));
|
|
@@ -928,8 +928,8 @@ module.exports =
|
|
|
928
928
|
/* 25 */
|
|
929
929
|
/***/ function(module, exports, __webpack_require__) {
|
|
930
930
|
|
|
931
|
-
var shared = __webpack_require__(
|
|
932
|
-
, uid = __webpack_require__(
|
|
931
|
+
var shared = __webpack_require__(36)('keys')
|
|
932
|
+
, uid = __webpack_require__(38);
|
|
933
933
|
module.exports = function(key){
|
|
934
934
|
return shared[key] || (shared[key] = uid(key));
|
|
935
935
|
};
|
|
@@ -1499,6 +1499,42 @@ module.exports =
|
|
|
1499
1499
|
|
|
1500
1500
|
/***/ },
|
|
1501
1501
|
/* 27 */
|
|
1502
|
+
/***/ function(module, exports, __webpack_require__) {
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Copyright 2013-present, Facebook, Inc.
|
|
1506
|
+
* All rights reserved.
|
|
1507
|
+
*
|
|
1508
|
+
* This source code is licensed under the BSD-style license found in the
|
|
1509
|
+
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1510
|
+
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1511
|
+
*/
|
|
1512
|
+
|
|
1513
|
+
if (false) {
|
|
1514
|
+
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
|
1515
|
+
Symbol.for &&
|
|
1516
|
+
Symbol.for('react.element')) ||
|
|
1517
|
+
0xeac7;
|
|
1518
|
+
|
|
1519
|
+
var isValidElement = function(object) {
|
|
1520
|
+
return typeof object === 'object' &&
|
|
1521
|
+
object !== null &&
|
|
1522
|
+
object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1526
|
+
// http://fb.me/prop-types-in-prod
|
|
1527
|
+
var throwOnDirectAccess = true;
|
|
1528
|
+
module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
|
|
1529
|
+
} else {
|
|
1530
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1531
|
+
// http://fb.me/prop-types-in-prod
|
|
1532
|
+
module.exports = __webpack_require__(176)();
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
/***/ },
|
|
1537
|
+
/* 28 */
|
|
1502
1538
|
/***/ function(module, exports, __webpack_require__) {
|
|
1503
1539
|
|
|
1504
1540
|
'use strict';
|
|
@@ -1511,15 +1547,15 @@ module.exports =
|
|
|
1511
1547
|
|
|
1512
1548
|
var _react2 = _interopRequireDefault(_react);
|
|
1513
1549
|
|
|
1514
|
-
var _propTypes = __webpack_require__(
|
|
1550
|
+
var _propTypes = __webpack_require__(27);
|
|
1515
1551
|
|
|
1516
1552
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
1517
1553
|
|
|
1518
|
-
var _TransitionGroup = __webpack_require__(
|
|
1554
|
+
var _TransitionGroup = __webpack_require__(204);
|
|
1519
1555
|
|
|
1520
1556
|
var _TransitionGroup2 = _interopRequireDefault(_TransitionGroup);
|
|
1521
1557
|
|
|
1522
|
-
var _CSSTransitionGroupChild = __webpack_require__(
|
|
1558
|
+
var _CSSTransitionGroupChild = __webpack_require__(203);
|
|
1523
1559
|
|
|
1524
1560
|
var _CSSTransitionGroupChild2 = _interopRequireDefault(_CSSTransitionGroupChild);
|
|
1525
1561
|
|
|
@@ -1597,7 +1633,7 @@ module.exports =
|
|
|
1597
1633
|
module.exports = exports['default'];
|
|
1598
1634
|
|
|
1599
1635
|
/***/ },
|
|
1600
|
-
/*
|
|
1636
|
+
/* 29 */
|
|
1601
1637
|
/***/ function(module, exports) {
|
|
1602
1638
|
|
|
1603
1639
|
var toString = {}.toString;
|
|
@@ -1607,7 +1643,7 @@ module.exports =
|
|
|
1607
1643
|
};
|
|
1608
1644
|
|
|
1609
1645
|
/***/ },
|
|
1610
|
-
/*
|
|
1646
|
+
/* 30 */
|
|
1611
1647
|
/***/ function(module, exports, __webpack_require__) {
|
|
1612
1648
|
|
|
1613
1649
|
var isObject = __webpack_require__(14)
|
|
@@ -1619,7 +1655,7 @@ module.exports =
|
|
|
1619
1655
|
};
|
|
1620
1656
|
|
|
1621
1657
|
/***/ },
|
|
1622
|
-
/*
|
|
1658
|
+
/* 31 */
|
|
1623
1659
|
/***/ function(module, exports) {
|
|
1624
1660
|
|
|
1625
1661
|
// IE 8- don't enum bug keys
|
|
@@ -1628,30 +1664,30 @@ module.exports =
|
|
|
1628
1664
|
).split(',');
|
|
1629
1665
|
|
|
1630
1666
|
/***/ },
|
|
1631
|
-
/*
|
|
1667
|
+
/* 32 */
|
|
1632
1668
|
/***/ function(module, exports, __webpack_require__) {
|
|
1633
1669
|
|
|
1634
1670
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
1635
|
-
var cof = __webpack_require__(
|
|
1671
|
+
var cof = __webpack_require__(29);
|
|
1636
1672
|
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
|
1637
1673
|
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
1638
1674
|
};
|
|
1639
1675
|
|
|
1640
1676
|
/***/ },
|
|
1641
|
-
/*
|
|
1642
|
-
/*
|
|
1677
|
+
/* 33 */,
|
|
1678
|
+
/* 34 */
|
|
1643
1679
|
/***/ function(module, exports, __webpack_require__) {
|
|
1644
1680
|
|
|
1645
1681
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
1646
1682
|
var $keys = __webpack_require__(46)
|
|
1647
|
-
, enumBugKeys = __webpack_require__(
|
|
1683
|
+
, enumBugKeys = __webpack_require__(31);
|
|
1648
1684
|
|
|
1649
1685
|
module.exports = Object.keys || function keys(O){
|
|
1650
1686
|
return $keys(O, enumBugKeys);
|
|
1651
1687
|
};
|
|
1652
1688
|
|
|
1653
1689
|
/***/ },
|
|
1654
|
-
/*
|
|
1690
|
+
/* 35 */
|
|
1655
1691
|
/***/ function(module, exports) {
|
|
1656
1692
|
|
|
1657
1693
|
module.exports = function(bitmap, value){
|
|
@@ -1664,7 +1700,7 @@ module.exports =
|
|
|
1664
1700
|
};
|
|
1665
1701
|
|
|
1666
1702
|
/***/ },
|
|
1667
|
-
/*
|
|
1703
|
+
/* 36 */
|
|
1668
1704
|
/***/ function(module, exports, __webpack_require__) {
|
|
1669
1705
|
|
|
1670
1706
|
var global = __webpack_require__(6)
|
|
@@ -1675,7 +1711,7 @@ module.exports =
|
|
|
1675
1711
|
};
|
|
1676
1712
|
|
|
1677
1713
|
/***/ },
|
|
1678
|
-
/*
|
|
1714
|
+
/* 37 */
|
|
1679
1715
|
/***/ function(module, exports, __webpack_require__) {
|
|
1680
1716
|
|
|
1681
1717
|
// 7.1.13 ToObject(argument)
|
|
@@ -1685,7 +1721,7 @@ module.exports =
|
|
|
1685
1721
|
};
|
|
1686
1722
|
|
|
1687
1723
|
/***/ },
|
|
1688
|
-
/*
|
|
1724
|
+
/* 38 */
|
|
1689
1725
|
/***/ function(module, exports) {
|
|
1690
1726
|
|
|
1691
1727
|
var id = 0
|
|
@@ -1695,7 +1731,7 @@ module.exports =
|
|
|
1695
1731
|
};
|
|
1696
1732
|
|
|
1697
1733
|
/***/ },
|
|
1698
|
-
/*
|
|
1734
|
+
/* 39 */
|
|
1699
1735
|
/***/ function(module, exports, __webpack_require__) {
|
|
1700
1736
|
|
|
1701
1737
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
@@ -1748,42 +1784,6 @@ module.exports =
|
|
|
1748
1784
|
}());
|
|
1749
1785
|
|
|
1750
1786
|
|
|
1751
|
-
/***/ },
|
|
1752
|
-
/* 39 */
|
|
1753
|
-
/***/ function(module, exports, __webpack_require__) {
|
|
1754
|
-
|
|
1755
|
-
/**
|
|
1756
|
-
* Copyright 2013-present, Facebook, Inc.
|
|
1757
|
-
* All rights reserved.
|
|
1758
|
-
*
|
|
1759
|
-
* This source code is licensed under the BSD-style license found in the
|
|
1760
|
-
* LICENSE file in the root directory of this source tree. An additional grant
|
|
1761
|
-
* of patent rights can be found in the PATENTS file in the same directory.
|
|
1762
|
-
*/
|
|
1763
|
-
|
|
1764
|
-
if (false) {
|
|
1765
|
-
var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
|
|
1766
|
-
Symbol.for &&
|
|
1767
|
-
Symbol.for('react.element')) ||
|
|
1768
|
-
0xeac7;
|
|
1769
|
-
|
|
1770
|
-
var isValidElement = function(object) {
|
|
1771
|
-
return typeof object === 'object' &&
|
|
1772
|
-
object !== null &&
|
|
1773
|
-
object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1774
|
-
};
|
|
1775
|
-
|
|
1776
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
1777
|
-
// http://fb.me/prop-types-in-prod
|
|
1778
|
-
var throwOnDirectAccess = true;
|
|
1779
|
-
module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);
|
|
1780
|
-
} else {
|
|
1781
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
1782
|
-
// http://fb.me/prop-types-in-prod
|
|
1783
|
-
module.exports = __webpack_require__(176)();
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
1787
|
/***/ },
|
|
1788
1788
|
/* 40 */
|
|
1789
1789
|
/***/ function(module, exports) {
|
|
@@ -1903,7 +1903,7 @@ module.exports =
|
|
|
1903
1903
|
/***/ function(module, exports, __webpack_require__) {
|
|
1904
1904
|
|
|
1905
1905
|
module.exports = !__webpack_require__(9) && !__webpack_require__(12)(function(){
|
|
1906
|
-
return Object.defineProperty(__webpack_require__(
|
|
1906
|
+
return Object.defineProperty(__webpack_require__(30)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
|
1907
1907
|
});
|
|
1908
1908
|
|
|
1909
1909
|
/***/ },
|
|
@@ -2648,7 +2648,7 @@ module.exports =
|
|
|
2648
2648
|
|
|
2649
2649
|
if (sourceResource && nestedSourceProp.property && destinationResource && destinationProperty) {
|
|
2650
2650
|
mappings = mappings.concat(Object.assign({ // add to mappings obj
|
|
2651
|
-
resourceFromLabel: singleMapping.dataSourceIsDestinationEntity ? sourceResource.type + '_' + targetProvider : sourceResource.type + '_' + sourceProvider,
|
|
2651
|
+
resourceFromLabel: singleMapping.dataSourceIsDestinationEntity ? sourceResource.type + '_' + targetProvider.toLowerCase() : sourceResource.type + '_' + sourceProvider.toLowerCase(),
|
|
2652
2652
|
resourceFromName: sourceResource.type,
|
|
2653
2653
|
propertyFromName: nestedSourceProp.property
|
|
2654
2654
|
}, nestedSourceProp.parentsArray && nestedSourceProp.parentsArray.length > 0 && { propertyFromParents: nestedSourceProp.parentsArray }, {
|
|
@@ -4623,7 +4623,7 @@ module.exports =
|
|
|
4623
4623
|
|
|
4624
4624
|
var _react2 = _interopRequireDefault(_react);
|
|
4625
4625
|
|
|
4626
|
-
var _propTypes = __webpack_require__(
|
|
4626
|
+
var _propTypes = __webpack_require__(27);
|
|
4627
4627
|
|
|
4628
4628
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
4629
4629
|
|
|
@@ -6785,6 +6785,10 @@ module.exports =
|
|
|
6785
6785
|
|
|
6786
6786
|
var _reduxForm = __webpack_require__(2);
|
|
6787
6787
|
|
|
6788
|
+
var _reactDropzone = __webpack_require__(201);
|
|
6789
|
+
|
|
6790
|
+
var _reactDropzone2 = _interopRequireDefault(_reactDropzone);
|
|
6791
|
+
|
|
6788
6792
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6789
6793
|
|
|
6790
6794
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -6867,8 +6871,8 @@ module.exports =
|
|
|
6867
6871
|
onGenerateUrl: function onGenerateUrl(urlType) {
|
|
6868
6872
|
return getOauthUrl(urlType, mode);
|
|
6869
6873
|
},
|
|
6870
|
-
mode: mode, inputs: inputs, checking: checking }) : isSFTP ? _react2.default.createElement(SFTP, { step: step, wizard: wizard, onCheck: check,
|
|
6871
|
-
mode: mode,
|
|
6874
|
+
mode: mode, inputs: inputs, checking: checking }) : isSFTP ? _react2.default.createElement(SFTP, { step: step, wizard: wizard, onCheck: check,
|
|
6875
|
+
mode: mode, checking: checking }) : _react2.default.createElement(
|
|
6872
6876
|
'div',
|
|
6873
6877
|
null,
|
|
6874
6878
|
_react2.default.createElement(
|
|
@@ -6961,34 +6965,63 @@ module.exports =
|
|
|
6961
6965
|
var _this = _possibleConstructorReturn(this, (SFTP.__proto__ || Object.getPrototypeOf(SFTP)).call(this));
|
|
6962
6966
|
|
|
6963
6967
|
_this.state = {
|
|
6964
|
-
|
|
6968
|
+
files: []
|
|
6965
6969
|
};
|
|
6966
6970
|
return _this;
|
|
6967
6971
|
}
|
|
6968
6972
|
|
|
6969
6973
|
_createClass(SFTP, [{
|
|
6970
|
-
key: '
|
|
6971
|
-
value: function
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
// split on tab (coming out of google sheets or excel... maybe check for commas too?)
|
|
6975
|
-
var rows = txt.split('\t');
|
|
6976
|
-
console.log(rows);
|
|
6977
|
-
}
|
|
6978
|
-
});
|
|
6974
|
+
key: 'onDrop',
|
|
6975
|
+
value: function onDrop(files) {
|
|
6976
|
+
console.log(files);
|
|
6977
|
+
this.setState({ files: files });
|
|
6979
6978
|
}
|
|
6980
6979
|
}, {
|
|
6981
6980
|
key: 'render',
|
|
6982
6981
|
value: function render() {
|
|
6983
|
-
var
|
|
6982
|
+
var files = this.state.files;
|
|
6984
6983
|
|
|
6985
|
-
var
|
|
6984
|
+
var hasFile = files && files.length > 0;
|
|
6986
6985
|
return _react2.default.createElement(
|
|
6987
6986
|
'div',
|
|
6988
6987
|
null,
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6988
|
+
_react2.default.createElement(
|
|
6989
|
+
'div',
|
|
6990
|
+
{ style: { display: 'inline-block' } },
|
|
6991
|
+
_react2.default.createElement(
|
|
6992
|
+
_reactDropzone2.default,
|
|
6993
|
+
{ onDrop: this.onDrop.bind(this),
|
|
6994
|
+
className: 'dropzone' },
|
|
6995
|
+
_react2.default.createElement(
|
|
6996
|
+
'p',
|
|
6997
|
+
null,
|
|
6998
|
+
'Drop one or more files here, or click to select files to upload.'
|
|
6999
|
+
)
|
|
7000
|
+
)
|
|
7001
|
+
),
|
|
7002
|
+
_react2.default.createElement(
|
|
7003
|
+
'aside',
|
|
7004
|
+
{ style: { marginLeft: 30 } },
|
|
7005
|
+
_react2.default.createElement(
|
|
7006
|
+
'h3',
|
|
7007
|
+
{ style: { marginTop: 10 } },
|
|
7008
|
+
'Dropped files'
|
|
7009
|
+
),
|
|
7010
|
+
_react2.default.createElement(
|
|
7011
|
+
'ul',
|
|
7012
|
+
null,
|
|
7013
|
+
files.map(function (f) {
|
|
7014
|
+
return _react2.default.createElement(
|
|
7015
|
+
'li',
|
|
7016
|
+
{ key: f.name },
|
|
7017
|
+
f.name,
|
|
7018
|
+
' - ',
|
|
7019
|
+
f.size,
|
|
7020
|
+
' bytes'
|
|
7021
|
+
);
|
|
7022
|
+
})
|
|
7023
|
+
)
|
|
7024
|
+
)
|
|
6992
7025
|
);
|
|
6993
7026
|
}
|
|
6994
7027
|
}]);
|
|
@@ -7189,7 +7222,7 @@ module.exports =
|
|
|
7189
7222
|
|
|
7190
7223
|
var _react2 = _interopRequireDefault(_react);
|
|
7191
7224
|
|
|
7192
|
-
var _CSSTransitionGroup = __webpack_require__(
|
|
7225
|
+
var _CSSTransitionGroup = __webpack_require__(28);
|
|
7193
7226
|
|
|
7194
7227
|
var _CSSTransitionGroup2 = _interopRequireDefault(_CSSTransitionGroup);
|
|
7195
7228
|
|
|
@@ -8149,7 +8182,7 @@ module.exports =
|
|
|
8149
8182
|
|
|
8150
8183
|
var _react2 = _interopRequireDefault(_react);
|
|
8151
8184
|
|
|
8152
|
-
var _CSSTransitionGroup = __webpack_require__(
|
|
8185
|
+
var _CSSTransitionGroup = __webpack_require__(28);
|
|
8153
8186
|
|
|
8154
8187
|
var _CSSTransitionGroup2 = _interopRequireDefault(_CSSTransitionGroup);
|
|
8155
8188
|
|
|
@@ -8325,7 +8358,6 @@ module.exports =
|
|
|
8325
8358
|
leftClicked = _props3.leftClicked,
|
|
8326
8359
|
sourceSchema = _props3.sourceSchema,
|
|
8327
8360
|
destinationSchema = _props3.destinationSchema,
|
|
8328
|
-
overflowHidden = _props3.overflowHidden,
|
|
8329
8361
|
showOverflow = _props3.showOverflow,
|
|
8330
8362
|
step = _props3.step,
|
|
8331
8363
|
isReverse = _props3.isReverse,
|
|
@@ -8395,7 +8427,6 @@ module.exports =
|
|
|
8395
8427
|
'div',
|
|
8396
8428
|
{ style: {
|
|
8397
8429
|
background: 'white', width: 720, minHeight: 245,
|
|
8398
|
-
overflow: overflowHidden ? 'hidden' : 'visible',
|
|
8399
8430
|
border: '1px solid rgb(204, 205, 207)', position: 'relative',
|
|
8400
8431
|
height: groupResourcesLength * 60 + 84 + 78
|
|
8401
8432
|
} },
|
|
@@ -8429,31 +8460,32 @@ module.exports =
|
|
|
8429
8460
|
return rsc.parentNameAndProvider.toLowerCase() === (gr.name + '_' + gr.provider).toLowerCase();
|
|
8430
8461
|
});
|
|
8431
8462
|
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8463
|
+
if (primaryResource) {
|
|
8464
|
+
var primaryResourceSchema = primaryResource && primaryResource.provider.toLowerCase() === step.destinationProvider.toLowerCase() ? destinationSchema : sourceSchema;
|
|
8465
|
+
primaryRscVals = primaryResourceSchema && primaryResourceSchema.find(function (defaultRsc) {
|
|
8466
|
+
return defaultRsc.name === primaryResource.name;
|
|
8467
|
+
}) && [primaryResourceSchema.find(function (defaultRsc) {
|
|
8468
|
+
return defaultRsc.name === primaryResource.name;
|
|
8469
|
+
}).properties.filter(function (f) {
|
|
8470
|
+
return !f.fake;
|
|
8471
|
+
})];
|
|
8472
|
+
|
|
8473
|
+
var primaryHasParameters = primaryResource.parentRef && primaryResource.parentRef.length > 0 && primaryResource.parentRef.some(function (pr) {
|
|
8474
|
+
return pr.foreignKeyFields && pr.foreignKeyFields.length > 0;
|
|
8475
|
+
});
|
|
8445
8476
|
|
|
8446
|
-
|
|
8477
|
+
primaryRscSectionLabels = [primaryResource.name];
|
|
8447
8478
|
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8479
|
+
if (primaryHasParameters) {
|
|
8480
|
+
primaryResource.parentRef.forEach(function (pr) {
|
|
8481
|
+
var params = [];
|
|
8482
|
+
primaryRscSectionLabels.push(pr.ref.split('/')[2]);
|
|
8483
|
+
pr.foreignKeyFields.forEach(function (fkf) {
|
|
8484
|
+
params.push({ label: fkf });
|
|
8485
|
+
});
|
|
8486
|
+
primaryRscVals.push(params);
|
|
8454
8487
|
});
|
|
8455
|
-
|
|
8456
|
-
});
|
|
8488
|
+
}
|
|
8457
8489
|
}
|
|
8458
8490
|
}
|
|
8459
8491
|
|
|
@@ -8543,7 +8575,7 @@ module.exports =
|
|
|
8543
8575
|
disabled: hasChildren },
|
|
8544
8576
|
_react2.default.createElement(
|
|
8545
8577
|
'div',
|
|
8546
|
-
{ style: { position: 'relative', zIndex:
|
|
8578
|
+
{ style: { position: 'relative', zIndex: _this3.state.zIndexes[i] } },
|
|
8547
8579
|
_react2.default.createElement(LevelArrows, { hasChildren: hasChildren,
|
|
8548
8580
|
onChange: function onChange(c) {
|
|
8549
8581
|
return changeEntityLevel(resourceGroupIndex, i, rsc.level + c);
|
|
@@ -8553,14 +8585,16 @@ module.exports =
|
|
|
8553
8585
|
_react2.default.createElement(
|
|
8554
8586
|
'div',
|
|
8555
8587
|
{ className: 'schema-panel',
|
|
8556
|
-
style: { zIndex: _this3.state.zIndexes[i], marginLeft: rsc.level * 18 },
|
|
8557
8588
|
onClick: function onClick() {
|
|
8558
8589
|
return _this3.raiseUp(i);
|
|
8590
|
+
},
|
|
8591
|
+
style: { marginLeft: rsc.level * 18, borderRadius: 4,
|
|
8592
|
+
border: '1px solid rgb(\n ' + (0 + rsc.level * 10) + ',\n ' + (50 + rsc.level * 15) + ',\n ' + (100 + rsc.level * 20) + ')'
|
|
8559
8593
|
} },
|
|
8560
8594
|
_react2.default.createElement(
|
|
8561
8595
|
'div',
|
|
8562
8596
|
{ className: 'schema-panel-header', style: {
|
|
8563
|
-
background: 'rgb(50
|
|
8597
|
+
background: 'rgb(\n ' + (50 + rsc.level * 10) + ',\n ' + (120 + rsc.level * 15) + ',\n ' + (180 + rsc.level * 25) + ')'
|
|
8564
8598
|
} },
|
|
8565
8599
|
_react2.default.createElement(
|
|
8566
8600
|
'div',
|
|
@@ -8582,7 +8616,7 @@ module.exports =
|
|
|
8582
8616
|
display: 'inline-block' } },
|
|
8583
8617
|
_react2.default.createElement(
|
|
8584
8618
|
'span',
|
|
8585
|
-
{ style: { maxWidth: 260, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', display: 'inline-block' } },
|
|
8619
|
+
{ style: { maxWidth: 260 - rsc.level * 20, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap', display: 'inline-block' } },
|
|
8586
8620
|
rscName
|
|
8587
8621
|
),
|
|
8588
8622
|
hasParameters && _react2.default.createElement(
|
|
@@ -8616,11 +8650,12 @@ module.exports =
|
|
|
8616
8650
|
),
|
|
8617
8651
|
_react2.default.createElement(
|
|
8618
8652
|
'div',
|
|
8619
|
-
{
|
|
8653
|
+
{ className: 'accordion-panel-toggle' + (rsc.joinKeyName && rsc.primaryKeyName ? ' join-ok' : '') },
|
|
8620
8654
|
i !== 0 ? _react2.default.createElement(
|
|
8621
8655
|
Button,
|
|
8622
|
-
{ type: 'brand',
|
|
8623
|
-
|
|
8656
|
+
{ type: 'brand', iconAlign: 'right',
|
|
8657
|
+
icon: isSelected ? 'chevronup' : 'chevrondown',
|
|
8658
|
+
style: { paddingRight: 38 },
|
|
8624
8659
|
onClick: function onClick() {
|
|
8625
8660
|
_this3.props.pickEntity({
|
|
8626
8661
|
name: rsc.name,
|
|
@@ -8715,7 +8750,7 @@ module.exports =
|
|
|
8715
8750
|
_react2.default.createElement(
|
|
8716
8751
|
Tooltip,
|
|
8717
8752
|
{ nubbin: 'right-top', popStyle: { width: 300, right: 46 },
|
|
8718
|
-
wrapStyle: { left: 60, top: 2, zIndex:
|
|
8753
|
+
wrapStyle: { left: 60, top: 2, zIndex: 9003, position: 'relative' } },
|
|
8719
8754
|
_react2.default.createElement(
|
|
8720
8755
|
'p',
|
|
8721
8756
|
null,
|
|
@@ -8751,7 +8786,7 @@ module.exports =
|
|
|
8751
8786
|
onSelect: function onSelect(v, i, entity) {
|
|
8752
8787
|
return addDefaultEntity(v, i, entity, resourceGroupIndex);
|
|
8753
8788
|
},
|
|
8754
|
-
type: 'neutral', inputs: inputs
|
|
8789
|
+
type: 'neutral', inputs: inputs, wrapClass: 'larger-dropdown'
|
|
8755
8790
|
//selectedValues={resourceGroups && resourceGroups[resourceGroupIndex] &&
|
|
8756
8791
|
//resourceGroups[resourceGroupIndex].resources}
|
|
8757
8792
|
, values: !isReverse ? [sourceSchema, destinationSchema] : [destinationSchema, sourceSchema],
|
|
@@ -8817,6 +8852,11 @@ module.exports =
|
|
|
8817
8852
|
) : null
|
|
8818
8853
|
)
|
|
8819
8854
|
),
|
|
8855
|
+
_react2.default.createElement('div', { style: {
|
|
8856
|
+
background: '#eCeFeF', width: 245, minHeight: 245, left: 719, top: 0, zIndex: 99999,
|
|
8857
|
+
height: groupResourcesLength * 60 + 84 + 78, borderLeft: '1px solid rgb(204, 205, 207)',
|
|
8858
|
+
display: 'inline-block', position: 'absolute'
|
|
8859
|
+
} }),
|
|
8820
8860
|
_react2.default.createElement(
|
|
8821
8861
|
'div',
|
|
8822
8862
|
{ className: 'parameter-modal' },
|
|
@@ -8850,7 +8890,7 @@ module.exports =
|
|
|
8850
8890
|
_react2.default.createElement(
|
|
8851
8891
|
'div',
|
|
8852
8892
|
{ className: 'schema-panel-resource-arrow' },
|
|
8853
|
-
canMoveLeft &&
|
|
8893
|
+
canMoveLeft && _react2.default.createElement(
|
|
8854
8894
|
'svg',
|
|
8855
8895
|
{ height: '18', viewBox: '0 0 24 24', width: '18',
|
|
8856
8896
|
onClick: function onClick() {
|
|
@@ -8859,7 +8899,7 @@ module.exports =
|
|
|
8859
8899
|
_react2.default.createElement('path', { d: 'M0 0h24v24H0z', fill: 'none' }),
|
|
8860
8900
|
_react2.default.createElement('path', { d: 'M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z' })
|
|
8861
8901
|
),
|
|
8862
|
-
canMoveRight &&
|
|
8902
|
+
canMoveRight && _react2.default.createElement(
|
|
8863
8903
|
'svg',
|
|
8864
8904
|
{ height: '18', viewBox: '0 0 24 24', width: '18',
|
|
8865
8905
|
onClick: function onClick() {
|
|
@@ -9626,7 +9666,7 @@ module.exports =
|
|
|
9626
9666
|
|
|
9627
9667
|
var _moment2 = _interopRequireDefault(_moment);
|
|
9628
9668
|
|
|
9629
|
-
__webpack_require__(
|
|
9669
|
+
__webpack_require__(212);
|
|
9630
9670
|
|
|
9631
9671
|
__webpack_require__(171);
|
|
9632
9672
|
|
|
@@ -9872,7 +9912,7 @@ module.exports =
|
|
|
9872
9912
|
|
|
9873
9913
|
var _previewTabContent = __webpack_require__(52);
|
|
9874
9914
|
|
|
9875
|
-
var _CSSTransitionGroup = __webpack_require__(
|
|
9915
|
+
var _CSSTransitionGroup = __webpack_require__(28);
|
|
9876
9916
|
|
|
9877
9917
|
var _CSSTransitionGroup2 = _interopRequireDefault(_CSSTransitionGroup);
|
|
9878
9918
|
|
|
@@ -9911,15 +9951,8 @@ module.exports =
|
|
|
9911
9951
|
newEnvName: ''
|
|
9912
9952
|
};
|
|
9913
9953
|
_this.check = _this.check.bind(_this);
|
|
9914
|
-
_this.seeFields = _this.seeFields.bind(_this);
|
|
9915
|
-
_this.getOauthUrl = _this.getOauthUrl.bind(_this);
|
|
9916
|
-
_this.clickDirection = _this.clickDirection.bind(_this);
|
|
9917
|
-
_this.selectProvider = _this.selectProvider.bind(_this);
|
|
9918
|
-
//this.saveEnvironment = this.saveEnvironment.bind(this)
|
|
9919
|
-
_this.selectEnvironment = _this.selectEnvironment.bind(_this);
|
|
9920
9954
|
_this.tryGetCredentialAndCheck = _this.tryGetCredentialAndCheck.bind(_this);
|
|
9921
|
-
_this.
|
|
9922
|
-
_this.changeEnvName = _this.changeEnvName.bind(_this);
|
|
9955
|
+
_this.selectProvider = _this.selectProvider.bind(_this);
|
|
9923
9956
|
return _this;
|
|
9924
9957
|
}
|
|
9925
9958
|
|
|
@@ -10176,7 +10209,7 @@ module.exports =
|
|
|
10176
10209
|
style: { minWidth: 200, textAlign: 'left' },
|
|
10177
10210
|
values: wizard.environments,
|
|
10178
10211
|
title: 'Choose Environment', inputs: inputs, sectionLabelSuffix: '',
|
|
10179
|
-
onSelect: this.selectEnvironment,
|
|
10212
|
+
onSelect: this.selectEnvironment.bind(this),
|
|
10180
10213
|
selectedValues: [formValues['environment'] ? { name: formValues['environment'] } : {}],
|
|
10181
10214
|
disabled: wizard.environments && wizard.environments.length > 0 ? false : true
|
|
10182
10215
|
})
|
|
@@ -10188,9 +10221,11 @@ module.exports =
|
|
|
10188
10221
|
'div',
|
|
10189
10222
|
{ style: { width: 200, display: 'inline-block' } },
|
|
10190
10223
|
_react2.default.createElement(Input, { type: 'text', label: 'New Environment', value: newEnvName,
|
|
10191
|
-
onChange: this.changeEnvName, style: { width: 200 },
|
|
10224
|
+
onChange: this.changeEnvName.bind(this), style: { width: 200 },
|
|
10192
10225
|
onKeyPress: function onKeyPress(e) {
|
|
10193
|
-
if (e.key === 'Enter' && !disableCreateEnv)
|
|
10226
|
+
if (e.key === 'Enter' && !disableCreateEnv) {
|
|
10227
|
+
_this5.createEnvironment(newEnvName).bind(_this5);
|
|
10228
|
+
}
|
|
10194
10229
|
},
|
|
10195
10230
|
inputRef: function inputRef(ref) {
|
|
10196
10231
|
return _this5.envNameInput = ref;
|
|
@@ -10273,9 +10308,10 @@ module.exports =
|
|
|
10273
10308
|
'div',
|
|
10274
10309
|
{ className: 'env-creds' },
|
|
10275
10310
|
_react2.default.createElement(_envSections2.default, { config: step[m + 'Config'], mode: m, checking: checking,
|
|
10276
|
-
wizard: wizard, getOauthUrl: _this5.getOauthUrl,
|
|
10277
|
-
|
|
10278
|
-
|
|
10311
|
+
wizard: wizard, getOauthUrl: _this5.getOauthUrl.bind(_this5),
|
|
10312
|
+
formValues: formValues,
|
|
10313
|
+
clickDirection: _this5.clickDirection.bind(_this5), inputs: inputs, step: step,
|
|
10314
|
+
seeFields: _this5.seeFields.bind(_this5), check: _this5.check })
|
|
10279
10315
|
)
|
|
10280
10316
|
)
|
|
10281
10317
|
);
|
|
@@ -10286,7 +10322,7 @@ module.exports =
|
|
|
10286
10322
|
return _this5.setState({ showResources: null });
|
|
10287
10323
|
},
|
|
10288
10324
|
mode: this.state.showResources, wizard: wizard, step: step, inputs: inputs,
|
|
10289
|
-
seeFields: this.seeFields, isReverse: formValues.direction === 'reverse' }),
|
|
10325
|
+
seeFields: this.seeFields.bind(this), isReverse: formValues.direction === 'reverse' }),
|
|
10290
10326
|
_react2.default.createElement('br', null),
|
|
10291
10327
|
_react2.default.createElement('br', null),
|
|
10292
10328
|
_react2.default.createElement(_navButtons2.default, { nextDisabled: notAllMetadata || !formValues['environment'],
|
|
@@ -10945,7 +10981,7 @@ module.exports =
|
|
|
10945
10981
|
|
|
10946
10982
|
var _loadData2 = _interopRequireDefault(_loadData);
|
|
10947
10983
|
|
|
10948
|
-
var _CSSTransitionGroup = __webpack_require__(
|
|
10984
|
+
var _CSSTransitionGroup = __webpack_require__(28);
|
|
10949
10985
|
|
|
10950
10986
|
var _CSSTransitionGroup2 = _interopRequireDefault(_CSSTransitionGroup);
|
|
10951
10987
|
|
|
@@ -12292,6 +12328,7 @@ module.exports =
|
|
|
12292
12328
|
rsc.level = newLevel;
|
|
12293
12329
|
change('resourceGroups', resourceGroups);
|
|
12294
12330
|
this.assignAllParents(groupIndex);
|
|
12331
|
+
this.forceUpdate();
|
|
12295
12332
|
}
|
|
12296
12333
|
}, {
|
|
12297
12334
|
key: 'changeEntityOrder',
|
|
@@ -12345,9 +12382,12 @@ module.exports =
|
|
|
12345
12382
|
eachR.primaryKeyName = null;
|
|
12346
12383
|
eachR.primaryKeyParents = null;
|
|
12347
12384
|
}
|
|
12385
|
+
if (eachI === 0 && eachR.level !== 0) {
|
|
12386
|
+
eachR.level = 0;
|
|
12387
|
+
}
|
|
12348
12388
|
});
|
|
12349
12389
|
change('resourceGroups', resourceGroups);
|
|
12350
|
-
this.forceUpdate()
|
|
12390
|
+
//this.forceUpdate()
|
|
12351
12391
|
}
|
|
12352
12392
|
}, {
|
|
12353
12393
|
key: 'refreshAllPrimaryKeys',
|
|
@@ -12595,7 +12635,7 @@ module.exports =
|
|
|
12595
12635
|
|
|
12596
12636
|
var _nestExpand2 = _interopRequireDefault(_nestExpand);
|
|
12597
12637
|
|
|
12598
|
-
var _CSSTransitionGroup = __webpack_require__(
|
|
12638
|
+
var _CSSTransitionGroup = __webpack_require__(28);
|
|
12599
12639
|
|
|
12600
12640
|
var _CSSTransitionGroup2 = _interopRequireDefault(_CSSTransitionGroup);
|
|
12601
12641
|
|
|
@@ -13475,7 +13515,7 @@ module.exports =
|
|
|
13475
13515
|
|
|
13476
13516
|
var _react2 = _interopRequireDefault(_react);
|
|
13477
13517
|
|
|
13478
|
-
var _redux = __webpack_require__(
|
|
13518
|
+
var _redux = __webpack_require__(213);
|
|
13479
13519
|
|
|
13480
13520
|
var _reactRedux = __webpack_require__(65);
|
|
13481
13521
|
|
|
@@ -13718,11 +13758,11 @@ module.exports =
|
|
|
13718
13758
|
|
|
13719
13759
|
'use strict';
|
|
13720
13760
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
13721
|
-
var getKeys = __webpack_require__(
|
|
13761
|
+
var getKeys = __webpack_require__(34)
|
|
13722
13762
|
, gOPS = __webpack_require__(146)
|
|
13723
13763
|
, pIE = __webpack_require__(148)
|
|
13724
|
-
, toObject = __webpack_require__(
|
|
13725
|
-
, IObject = __webpack_require__(
|
|
13764
|
+
, toObject = __webpack_require__(37)
|
|
13765
|
+
, IObject = __webpack_require__(32)
|
|
13726
13766
|
, $assign = Object.assign;
|
|
13727
13767
|
|
|
13728
13768
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -16440,7 +16480,7 @@ module.exports =
|
|
|
16440
16480
|
|
|
16441
16481
|
var _moment2 = _interopRequireDefault(_moment);
|
|
16442
16482
|
|
|
16443
|
-
var _classnames = __webpack_require__(
|
|
16483
|
+
var _classnames = __webpack_require__(39);
|
|
16444
16484
|
|
|
16445
16485
|
var _classnames2 = _interopRequireDefault(_classnames);
|
|
16446
16486
|
|
|
@@ -16626,7 +16666,7 @@ module.exports =
|
|
|
16626
16666
|
|
|
16627
16667
|
var _reactDom2 = _interopRequireDefault(_reactDom);
|
|
16628
16668
|
|
|
16629
|
-
var _classnames3 = __webpack_require__(
|
|
16669
|
+
var _classnames3 = __webpack_require__(39);
|
|
16630
16670
|
|
|
16631
16671
|
var _classnames4 = _interopRequireDefault(_classnames3);
|
|
16632
16672
|
|
|
@@ -18097,101 +18137,1122 @@ module.exports =
|
|
|
18097
18137
|
module.exports = exports['default'];
|
|
18098
18138
|
|
|
18099
18139
|
/***/ },
|
|
18100
|
-
/* 201
|
|
18101
|
-
/* 202 */
|
|
18140
|
+
/* 201 */
|
|
18102
18141
|
/***/ function(module, exports, __webpack_require__) {
|
|
18103
18142
|
|
|
18104
|
-
|
|
18105
|
-
|
|
18106
|
-
|
|
18107
|
-
|
|
18108
|
-
|
|
18109
|
-
|
|
18110
|
-
|
|
18111
|
-
|
|
18112
|
-
|
|
18113
|
-
|
|
18114
|
-
|
|
18143
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
18144
|
+
if(true)
|
|
18145
|
+
module.exports = factory(__webpack_require__(1), __webpack_require__(27));
|
|
18146
|
+
else if(typeof define === 'function' && define.amd)
|
|
18147
|
+
define(["react", "prop-types"], factory);
|
|
18148
|
+
else if(typeof exports === 'object')
|
|
18149
|
+
exports["Dropzone"] = factory(require("react"), require("prop-types"));
|
|
18150
|
+
else
|
|
18151
|
+
root["Dropzone"] = factory(root["react"], root["prop-types"]);
|
|
18152
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {
|
|
18153
|
+
return /******/ (function(modules) { // webpackBootstrap
|
|
18154
|
+
/******/ // The module cache
|
|
18155
|
+
/******/ var installedModules = {};
|
|
18156
|
+
/******/
|
|
18157
|
+
/******/ // The require function
|
|
18158
|
+
/******/ function __webpack_require__(moduleId) {
|
|
18159
|
+
/******/
|
|
18160
|
+
/******/ // Check if module is in cache
|
|
18161
|
+
/******/ if(installedModules[moduleId]) {
|
|
18162
|
+
/******/ return installedModules[moduleId].exports;
|
|
18163
|
+
/******/ }
|
|
18164
|
+
/******/ // Create a new module (and put it into the cache)
|
|
18165
|
+
/******/ var module = installedModules[moduleId] = {
|
|
18166
|
+
/******/ i: moduleId,
|
|
18167
|
+
/******/ l: false,
|
|
18168
|
+
/******/ exports: {}
|
|
18169
|
+
/******/ };
|
|
18170
|
+
/******/
|
|
18171
|
+
/******/ // Execute the module function
|
|
18172
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
18173
|
+
/******/
|
|
18174
|
+
/******/ // Flag the module as loaded
|
|
18175
|
+
/******/ module.l = true;
|
|
18176
|
+
/******/
|
|
18177
|
+
/******/ // Return the exports of the module
|
|
18178
|
+
/******/ return module.exports;
|
|
18179
|
+
/******/ }
|
|
18180
|
+
/******/
|
|
18181
|
+
/******/
|
|
18182
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
18183
|
+
/******/ __webpack_require__.m = modules;
|
|
18184
|
+
/******/
|
|
18185
|
+
/******/ // expose the module cache
|
|
18186
|
+
/******/ __webpack_require__.c = installedModules;
|
|
18187
|
+
/******/
|
|
18188
|
+
/******/ // define getter function for harmony exports
|
|
18189
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
18190
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
18191
|
+
/******/ Object.defineProperty(exports, name, {
|
|
18192
|
+
/******/ configurable: false,
|
|
18193
|
+
/******/ enumerable: true,
|
|
18194
|
+
/******/ get: getter
|
|
18195
|
+
/******/ });
|
|
18196
|
+
/******/ }
|
|
18197
|
+
/******/ };
|
|
18198
|
+
/******/
|
|
18199
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
18200
|
+
/******/ __webpack_require__.n = function(module) {
|
|
18201
|
+
/******/ var getter = module && module.__esModule ?
|
|
18202
|
+
/******/ function getDefault() { return module['default']; } :
|
|
18203
|
+
/******/ function getModuleExports() { return module; };
|
|
18204
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
18205
|
+
/******/ return getter;
|
|
18206
|
+
/******/ };
|
|
18207
|
+
/******/
|
|
18208
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
18209
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
18210
|
+
/******/
|
|
18211
|
+
/******/ // __webpack_public_path__
|
|
18212
|
+
/******/ __webpack_require__.p = "";
|
|
18213
|
+
/******/
|
|
18214
|
+
/******/ // Load entry module and return exports
|
|
18215
|
+
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
|
18216
|
+
/******/ })
|
|
18217
|
+
/************************************************************************/
|
|
18218
|
+
/******/ ([
|
|
18219
|
+
/* 0 */
|
|
18220
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
18115
18221
|
|
|
18116
|
-
|
|
18222
|
+
"use strict";
|
|
18223
|
+
/* WEBPACK VAR INJECTION */(function(process) {
|
|
18117
18224
|
|
|
18118
|
-
|
|
18225
|
+
Object.defineProperty(exports, "__esModule", {
|
|
18226
|
+
value: true
|
|
18227
|
+
});
|
|
18119
18228
|
|
|
18120
|
-
var
|
|
18229
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
18121
18230
|
|
|
18122
|
-
var
|
|
18231
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
18123
18232
|
|
|
18124
|
-
var _react = __webpack_require__(
|
|
18233
|
+
var _react = __webpack_require__(2);
|
|
18125
18234
|
|
|
18126
18235
|
var _react2 = _interopRequireDefault(_react);
|
|
18127
18236
|
|
|
18128
|
-
var _propTypes = __webpack_require__(
|
|
18237
|
+
var _propTypes = __webpack_require__(3);
|
|
18129
18238
|
|
|
18130
18239
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
18131
18240
|
|
|
18132
|
-
var
|
|
18241
|
+
var _utils = __webpack_require__(4);
|
|
18133
18242
|
|
|
18134
|
-
var
|
|
18243
|
+
var _styles = __webpack_require__(6);
|
|
18244
|
+
|
|
18245
|
+
var _styles2 = _interopRequireDefault(_styles);
|
|
18135
18246
|
|
|
18136
18247
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18137
18248
|
|
|
18249
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
|
18250
|
+
|
|
18251
|
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
18252
|
+
|
|
18138
18253
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18139
18254
|
|
|
18140
18255
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
18141
18256
|
|
|
18142
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
18257
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint prefer-template: 0 */
|
|
18143
18258
|
|
|
18144
|
-
var
|
|
18145
|
-
|
|
18146
|
-
if (_properties.animationEnd) events.push(_properties.animationEnd);
|
|
18259
|
+
var Dropzone = function (_React$Component) {
|
|
18260
|
+
_inherits(Dropzone, _React$Component);
|
|
18147
18261
|
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
events.forEach(function (e) {
|
|
18151
|
-
return node.addEventListener(e, listener, false);
|
|
18152
|
-
});
|
|
18153
|
-
} else {
|
|
18154
|
-
setTimeout(listener, 0);
|
|
18155
|
-
}
|
|
18262
|
+
function Dropzone(props, context) {
|
|
18263
|
+
_classCallCheck(this, Dropzone);
|
|
18156
18264
|
|
|
18157
|
-
|
|
18158
|
-
if (!events.length) return;
|
|
18159
|
-
events.forEach(function (e) {
|
|
18160
|
-
return node.removeEventListener(e, listener, false);
|
|
18161
|
-
});
|
|
18162
|
-
};
|
|
18163
|
-
}
|
|
18265
|
+
var _this = _possibleConstructorReturn(this, (Dropzone.__proto__ || Object.getPrototypeOf(Dropzone)).call(this, props, context));
|
|
18164
18266
|
|
|
18165
|
-
|
|
18166
|
-
|
|
18167
|
-
|
|
18267
|
+
_this.renderChildren = function (children, isDragActive, isDragAccept, isDragReject) {
|
|
18268
|
+
if (typeof children === 'function') {
|
|
18269
|
+
return children(_extends({}, _this.state, {
|
|
18270
|
+
isDragActive: isDragActive,
|
|
18271
|
+
isDragAccept: isDragAccept,
|
|
18272
|
+
isDragReject: isDragReject
|
|
18273
|
+
}));
|
|
18274
|
+
}
|
|
18275
|
+
return children;
|
|
18276
|
+
};
|
|
18168
18277
|
|
|
18169
|
-
|
|
18170
|
-
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18278
|
+
_this.composeHandlers = _this.composeHandlers.bind(_this);
|
|
18279
|
+
_this.onClick = _this.onClick.bind(_this);
|
|
18280
|
+
_this.onDocumentDrop = _this.onDocumentDrop.bind(_this);
|
|
18281
|
+
_this.onDragEnter = _this.onDragEnter.bind(_this);
|
|
18282
|
+
_this.onDragLeave = _this.onDragLeave.bind(_this);
|
|
18283
|
+
_this.onDragOver = _this.onDragOver.bind(_this);
|
|
18284
|
+
_this.onDragStart = _this.onDragStart.bind(_this);
|
|
18285
|
+
_this.onDrop = _this.onDrop.bind(_this);
|
|
18286
|
+
_this.onFileDialogCancel = _this.onFileDialogCancel.bind(_this);
|
|
18287
|
+
_this.onInputElementClick = _this.onInputElementClick.bind(_this);
|
|
18179
18288
|
|
|
18180
|
-
|
|
18181
|
-
|
|
18289
|
+
_this.setRef = _this.setRef.bind(_this);
|
|
18290
|
+
_this.setRefs = _this.setRefs.bind(_this);
|
|
18182
18291
|
|
|
18183
|
-
|
|
18184
|
-
var _temp, _this, _ret;
|
|
18292
|
+
_this.isFileDialogActive = false;
|
|
18185
18293
|
|
|
18186
|
-
|
|
18294
|
+
_this.state = {
|
|
18295
|
+
draggedFiles: [],
|
|
18296
|
+
acceptedFiles: [],
|
|
18297
|
+
rejectedFiles: []
|
|
18298
|
+
};
|
|
18299
|
+
return _this;
|
|
18300
|
+
}
|
|
18187
18301
|
|
|
18188
|
-
|
|
18189
|
-
|
|
18190
|
-
|
|
18302
|
+
_createClass(Dropzone, [{
|
|
18303
|
+
key: 'componentDidMount',
|
|
18304
|
+
value: function componentDidMount() {
|
|
18305
|
+
var preventDropOnDocument = this.props.preventDropOnDocument;
|
|
18191
18306
|
|
|
18192
|
-
|
|
18193
|
-
|
|
18194
|
-
|
|
18307
|
+
this.dragTargets = [];
|
|
18308
|
+
|
|
18309
|
+
if (preventDropOnDocument) {
|
|
18310
|
+
document.addEventListener('dragover', _utils.onDocumentDragOver, false);
|
|
18311
|
+
document.addEventListener('drop', this.onDocumentDrop, false);
|
|
18312
|
+
}
|
|
18313
|
+
this.fileInputEl.addEventListener('click', this.onInputElementClick, false);
|
|
18314
|
+
// Tried implementing addEventListener, but didn't work out
|
|
18315
|
+
document.body.onfocus = this.onFileDialogCancel;
|
|
18316
|
+
}
|
|
18317
|
+
}, {
|
|
18318
|
+
key: 'componentWillUnmount',
|
|
18319
|
+
value: function componentWillUnmount() {
|
|
18320
|
+
var preventDropOnDocument = this.props.preventDropOnDocument;
|
|
18321
|
+
|
|
18322
|
+
if (preventDropOnDocument) {
|
|
18323
|
+
document.removeEventListener('dragover', _utils.onDocumentDragOver);
|
|
18324
|
+
document.removeEventListener('drop', this.onDocumentDrop);
|
|
18325
|
+
}
|
|
18326
|
+
this.fileInputEl.removeEventListener('click', this.onInputElementClick, false);
|
|
18327
|
+
// Can be replaced with removeEventListener, if addEventListener works
|
|
18328
|
+
document.body.onfocus = null;
|
|
18329
|
+
}
|
|
18330
|
+
}, {
|
|
18331
|
+
key: 'composeHandlers',
|
|
18332
|
+
value: function composeHandlers(handler) {
|
|
18333
|
+
if (this.props.disabled) {
|
|
18334
|
+
return null;
|
|
18335
|
+
}
|
|
18336
|
+
|
|
18337
|
+
return handler;
|
|
18338
|
+
}
|
|
18339
|
+
}, {
|
|
18340
|
+
key: 'onDocumentDrop',
|
|
18341
|
+
value: function onDocumentDrop(evt) {
|
|
18342
|
+
if (this.node.contains(evt.target)) {
|
|
18343
|
+
// if we intercepted an event for our instance, let it propagate down to the instance's onDrop handler
|
|
18344
|
+
return;
|
|
18345
|
+
}
|
|
18346
|
+
evt.preventDefault();
|
|
18347
|
+
this.dragTargets = [];
|
|
18348
|
+
}
|
|
18349
|
+
}, {
|
|
18350
|
+
key: 'onDragStart',
|
|
18351
|
+
value: function onDragStart(evt) {
|
|
18352
|
+
if (this.props.onDragStart) {
|
|
18353
|
+
this.props.onDragStart.call(this, evt);
|
|
18354
|
+
}
|
|
18355
|
+
}
|
|
18356
|
+
}, {
|
|
18357
|
+
key: 'onDragEnter',
|
|
18358
|
+
value: function onDragEnter(evt) {
|
|
18359
|
+
evt.preventDefault();
|
|
18360
|
+
|
|
18361
|
+
// Count the dropzone and any children that are entered.
|
|
18362
|
+
if (this.dragTargets.indexOf(evt.target) === -1) {
|
|
18363
|
+
this.dragTargets.push(evt.target);
|
|
18364
|
+
}
|
|
18365
|
+
|
|
18366
|
+
this.setState({
|
|
18367
|
+
isDragActive: true, // Do not rely on files for the drag state. It doesn't work in Safari.
|
|
18368
|
+
draggedFiles: (0, _utils.getDataTransferItems)(evt)
|
|
18369
|
+
});
|
|
18370
|
+
|
|
18371
|
+
if (this.props.onDragEnter) {
|
|
18372
|
+
this.props.onDragEnter.call(this, evt);
|
|
18373
|
+
}
|
|
18374
|
+
}
|
|
18375
|
+
}, {
|
|
18376
|
+
key: 'onDragOver',
|
|
18377
|
+
value: function onDragOver(evt) {
|
|
18378
|
+
// eslint-disable-line class-methods-use-this
|
|
18379
|
+
evt.preventDefault();
|
|
18380
|
+
evt.stopPropagation();
|
|
18381
|
+
try {
|
|
18382
|
+
evt.dataTransfer.dropEffect = 'copy'; // eslint-disable-line no-param-reassign
|
|
18383
|
+
} catch (err) {
|
|
18384
|
+
// continue regardless of error
|
|
18385
|
+
}
|
|
18386
|
+
|
|
18387
|
+
if (this.props.onDragOver) {
|
|
18388
|
+
this.props.onDragOver.call(this, evt);
|
|
18389
|
+
}
|
|
18390
|
+
return false;
|
|
18391
|
+
}
|
|
18392
|
+
}, {
|
|
18393
|
+
key: 'onDragLeave',
|
|
18394
|
+
value: function onDragLeave(evt) {
|
|
18395
|
+
var _this2 = this;
|
|
18396
|
+
|
|
18397
|
+
evt.preventDefault();
|
|
18398
|
+
|
|
18399
|
+
// Only deactivate once the dropzone and all children have been left.
|
|
18400
|
+
this.dragTargets = this.dragTargets.filter(function (el) {
|
|
18401
|
+
return el !== evt.target && _this2.node.contains(el);
|
|
18402
|
+
});
|
|
18403
|
+
if (this.dragTargets.length > 0) {
|
|
18404
|
+
return;
|
|
18405
|
+
}
|
|
18406
|
+
|
|
18407
|
+
// Clear dragging files state
|
|
18408
|
+
this.setState({
|
|
18409
|
+
isDragActive: false,
|
|
18410
|
+
draggedFiles: []
|
|
18411
|
+
});
|
|
18412
|
+
|
|
18413
|
+
if (this.props.onDragLeave) {
|
|
18414
|
+
this.props.onDragLeave.call(this, evt);
|
|
18415
|
+
}
|
|
18416
|
+
}
|
|
18417
|
+
}, {
|
|
18418
|
+
key: 'onDrop',
|
|
18419
|
+
value: function onDrop(evt) {
|
|
18420
|
+
var _this3 = this;
|
|
18421
|
+
|
|
18422
|
+
var _props = this.props,
|
|
18423
|
+
onDrop = _props.onDrop,
|
|
18424
|
+
onDropAccepted = _props.onDropAccepted,
|
|
18425
|
+
onDropRejected = _props.onDropRejected,
|
|
18426
|
+
multiple = _props.multiple,
|
|
18427
|
+
disablePreview = _props.disablePreview,
|
|
18428
|
+
accept = _props.accept;
|
|
18429
|
+
|
|
18430
|
+
var fileList = (0, _utils.getDataTransferItems)(evt);
|
|
18431
|
+
var acceptedFiles = [];
|
|
18432
|
+
var rejectedFiles = [];
|
|
18433
|
+
|
|
18434
|
+
// Stop default browser behavior
|
|
18435
|
+
evt.preventDefault();
|
|
18436
|
+
|
|
18437
|
+
// Reset the counter along with the drag on a drop.
|
|
18438
|
+
this.dragTargets = [];
|
|
18439
|
+
this.isFileDialogActive = false;
|
|
18440
|
+
|
|
18441
|
+
fileList.forEach(function (file) {
|
|
18442
|
+
if (!disablePreview) {
|
|
18443
|
+
try {
|
|
18444
|
+
file.preview = window.URL.createObjectURL(file); // eslint-disable-line no-param-reassign
|
|
18445
|
+
} catch (err) {
|
|
18446
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
18447
|
+
console.error('Failed to generate preview for file', file, err); // eslint-disable-line no-console
|
|
18448
|
+
}
|
|
18449
|
+
}
|
|
18450
|
+
}
|
|
18451
|
+
|
|
18452
|
+
if ((0, _utils.fileAccepted)(file, accept) && (0, _utils.fileMatchSize)(file, _this3.props.maxSize, _this3.props.minSize)) {
|
|
18453
|
+
acceptedFiles.push(file);
|
|
18454
|
+
} else {
|
|
18455
|
+
rejectedFiles.push(file);
|
|
18456
|
+
}
|
|
18457
|
+
});
|
|
18458
|
+
|
|
18459
|
+
if (!multiple) {
|
|
18460
|
+
// if not in multi mode add any extra accepted files to rejected.
|
|
18461
|
+
// This will allow end users to easily ignore a multi file drop in "single" mode.
|
|
18462
|
+
rejectedFiles.push.apply(rejectedFiles, _toConsumableArray(acceptedFiles.splice(1)));
|
|
18463
|
+
}
|
|
18464
|
+
|
|
18465
|
+
if (onDrop) {
|
|
18466
|
+
onDrop.call(this, acceptedFiles, rejectedFiles, evt);
|
|
18467
|
+
}
|
|
18468
|
+
|
|
18469
|
+
if (rejectedFiles.length > 0 && onDropRejected) {
|
|
18470
|
+
onDropRejected.call(this, rejectedFiles, evt);
|
|
18471
|
+
}
|
|
18472
|
+
|
|
18473
|
+
if (acceptedFiles.length > 0 && onDropAccepted) {
|
|
18474
|
+
onDropAccepted.call(this, acceptedFiles, evt);
|
|
18475
|
+
}
|
|
18476
|
+
|
|
18477
|
+
// Clear files value
|
|
18478
|
+
this.draggedFiles = null;
|
|
18479
|
+
|
|
18480
|
+
// Reset drag state
|
|
18481
|
+
this.setState({
|
|
18482
|
+
isDragActive: false,
|
|
18483
|
+
draggedFiles: [],
|
|
18484
|
+
acceptedFiles: acceptedFiles,
|
|
18485
|
+
rejectedFiles: rejectedFiles
|
|
18486
|
+
});
|
|
18487
|
+
}
|
|
18488
|
+
}, {
|
|
18489
|
+
key: 'onClick',
|
|
18490
|
+
value: function onClick(evt) {
|
|
18491
|
+
var _props2 = this.props,
|
|
18492
|
+
onClick = _props2.onClick,
|
|
18493
|
+
disableClick = _props2.disableClick;
|
|
18494
|
+
|
|
18495
|
+
if (!disableClick) {
|
|
18496
|
+
evt.stopPropagation();
|
|
18497
|
+
|
|
18498
|
+
if (onClick) {
|
|
18499
|
+
onClick.call(this, evt);
|
|
18500
|
+
}
|
|
18501
|
+
|
|
18502
|
+
// in IE11/Edge the file-browser dialog is blocking, ensure this is behind setTimeout
|
|
18503
|
+
// this is so react can handle state changes in the onClick prop above above
|
|
18504
|
+
// see: https://github.com/react-dropzone/react-dropzone/issues/450
|
|
18505
|
+
setTimeout(this.open.bind(this), 0);
|
|
18506
|
+
}
|
|
18507
|
+
}
|
|
18508
|
+
}, {
|
|
18509
|
+
key: 'onInputElementClick',
|
|
18510
|
+
value: function onInputElementClick(evt) {
|
|
18511
|
+
evt.stopPropagation();
|
|
18512
|
+
if (this.props.inputProps && this.props.inputProps.onClick) {
|
|
18513
|
+
this.props.inputProps.onClick();
|
|
18514
|
+
}
|
|
18515
|
+
}
|
|
18516
|
+
}, {
|
|
18517
|
+
key: 'onFileDialogCancel',
|
|
18518
|
+
value: function onFileDialogCancel() {
|
|
18519
|
+
// timeout will not recognize context of this method
|
|
18520
|
+
var onFileDialogCancel = this.props.onFileDialogCancel;
|
|
18521
|
+
var fileInputEl = this.fileInputEl;
|
|
18522
|
+
var isFileDialogActive = this.isFileDialogActive;
|
|
18523
|
+
// execute the timeout only if the onFileDialogCancel is defined and FileDialog
|
|
18524
|
+
// is opened in the browser
|
|
18525
|
+
|
|
18526
|
+
if (onFileDialogCancel && isFileDialogActive) {
|
|
18527
|
+
setTimeout(function () {
|
|
18528
|
+
// Returns an object as FileList
|
|
18529
|
+
var FileList = fileInputEl.files;
|
|
18530
|
+
if (!FileList.length) {
|
|
18531
|
+
isFileDialogActive = false;
|
|
18532
|
+
onFileDialogCancel();
|
|
18533
|
+
}
|
|
18534
|
+
}, 300);
|
|
18535
|
+
}
|
|
18536
|
+
}
|
|
18537
|
+
}, {
|
|
18538
|
+
key: 'setRef',
|
|
18539
|
+
value: function setRef(ref) {
|
|
18540
|
+
this.node = ref;
|
|
18541
|
+
}
|
|
18542
|
+
}, {
|
|
18543
|
+
key: 'setRefs',
|
|
18544
|
+
value: function setRefs(ref) {
|
|
18545
|
+
this.fileInputEl = ref;
|
|
18546
|
+
}
|
|
18547
|
+
/**
|
|
18548
|
+
* Open system file upload dialog.
|
|
18549
|
+
*
|
|
18550
|
+
* @public
|
|
18551
|
+
*/
|
|
18552
|
+
|
|
18553
|
+
}, {
|
|
18554
|
+
key: 'open',
|
|
18555
|
+
value: function open() {
|
|
18556
|
+
this.isFileDialogActive = true;
|
|
18557
|
+
this.fileInputEl.value = null;
|
|
18558
|
+
this.fileInputEl.click();
|
|
18559
|
+
}
|
|
18560
|
+
}, {
|
|
18561
|
+
key: 'render',
|
|
18562
|
+
value: function render() {
|
|
18563
|
+
var _props3 = this.props,
|
|
18564
|
+
accept = _props3.accept,
|
|
18565
|
+
acceptClassName = _props3.acceptClassName,
|
|
18566
|
+
activeClassName = _props3.activeClassName,
|
|
18567
|
+
children = _props3.children,
|
|
18568
|
+
disabled = _props3.disabled,
|
|
18569
|
+
disabledClassName = _props3.disabledClassName,
|
|
18570
|
+
inputProps = _props3.inputProps,
|
|
18571
|
+
multiple = _props3.multiple,
|
|
18572
|
+
name = _props3.name,
|
|
18573
|
+
rejectClassName = _props3.rejectClassName,
|
|
18574
|
+
rest = _objectWithoutProperties(_props3, ['accept', 'acceptClassName', 'activeClassName', 'children', 'disabled', 'disabledClassName', 'inputProps', 'multiple', 'name', 'rejectClassName']);
|
|
18575
|
+
|
|
18576
|
+
var acceptStyle = rest.acceptStyle,
|
|
18577
|
+
activeStyle = rest.activeStyle,
|
|
18578
|
+
className = rest.className,
|
|
18579
|
+
disabledStyle = rest.disabledStyle,
|
|
18580
|
+
rejectStyle = rest.rejectStyle,
|
|
18581
|
+
style = rest.style,
|
|
18582
|
+
props = _objectWithoutProperties(rest, ['acceptStyle', 'activeStyle', 'className', 'disabledStyle', 'rejectStyle', 'style']);
|
|
18583
|
+
|
|
18584
|
+
var _state = this.state,
|
|
18585
|
+
isDragActive = _state.isDragActive,
|
|
18586
|
+
draggedFiles = _state.draggedFiles;
|
|
18587
|
+
|
|
18588
|
+
var filesCount = draggedFiles.length;
|
|
18589
|
+
var isMultipleAllowed = multiple || filesCount <= 1;
|
|
18590
|
+
var isDragAccept = filesCount > 0 && (0, _utils.allFilesAccepted)(draggedFiles, this.props.accept);
|
|
18591
|
+
var isDragReject = filesCount > 0 && (!isDragAccept || !isMultipleAllowed);
|
|
18592
|
+
className = className || '';
|
|
18593
|
+
var noStyles = !className && !style && !activeStyle && !acceptStyle && !rejectStyle && !disabledStyle;
|
|
18594
|
+
|
|
18595
|
+
if (isDragActive && activeClassName) {
|
|
18596
|
+
className += ' ' + activeClassName;
|
|
18597
|
+
}
|
|
18598
|
+
if (isDragAccept && acceptClassName) {
|
|
18599
|
+
className += ' ' + acceptClassName;
|
|
18600
|
+
}
|
|
18601
|
+
if (isDragReject && rejectClassName) {
|
|
18602
|
+
className += ' ' + rejectClassName;
|
|
18603
|
+
}
|
|
18604
|
+
if (disabled && disabledClassName) {
|
|
18605
|
+
className += ' ' + disabledClassName;
|
|
18606
|
+
}
|
|
18607
|
+
|
|
18608
|
+
if (noStyles) {
|
|
18609
|
+
style = _styles2.default.default;
|
|
18610
|
+
activeStyle = _styles2.default.active;
|
|
18611
|
+
acceptStyle = style.active;
|
|
18612
|
+
rejectStyle = _styles2.default.rejected;
|
|
18613
|
+
disabledStyle = _styles2.default.disabled;
|
|
18614
|
+
}
|
|
18615
|
+
|
|
18616
|
+
var appliedStyle = _extends({}, style);
|
|
18617
|
+
if (activeStyle && isDragActive) {
|
|
18618
|
+
appliedStyle = _extends({}, style, activeStyle);
|
|
18619
|
+
}
|
|
18620
|
+
if (acceptStyle && isDragAccept) {
|
|
18621
|
+
appliedStyle = _extends({}, appliedStyle, acceptStyle);
|
|
18622
|
+
}
|
|
18623
|
+
if (rejectStyle && isDragReject) {
|
|
18624
|
+
appliedStyle = _extends({}, appliedStyle, rejectStyle);
|
|
18625
|
+
}
|
|
18626
|
+
if (disabledStyle && disabled) {
|
|
18627
|
+
appliedStyle = _extends({}, style, disabledStyle);
|
|
18628
|
+
}
|
|
18629
|
+
|
|
18630
|
+
var inputAttributes = {
|
|
18631
|
+
accept: accept,
|
|
18632
|
+
disabled: disabled,
|
|
18633
|
+
type: 'file',
|
|
18634
|
+
style: { display: 'none' },
|
|
18635
|
+
multiple: _utils.supportMultiple && multiple,
|
|
18636
|
+
ref: this.setRefs,
|
|
18637
|
+
onChange: this.onDrop,
|
|
18638
|
+
autoComplete: 'off'
|
|
18639
|
+
};
|
|
18640
|
+
|
|
18641
|
+
if (name && name.length) {
|
|
18642
|
+
inputAttributes.name = name;
|
|
18643
|
+
}
|
|
18644
|
+
|
|
18645
|
+
// Remove custom properties before passing them to the wrapper div element
|
|
18646
|
+
var customProps = ['acceptedFiles', 'preventDropOnDocument', 'disablePreview', 'disableClick', 'activeClassName', 'acceptClassName', 'rejectClassName', 'disabledClassName', 'onDropAccepted', 'onDropRejected', 'onFileDialogCancel', 'maxSize', 'minSize'];
|
|
18647
|
+
var divProps = _extends({}, props);
|
|
18648
|
+
customProps.forEach(function (prop) {
|
|
18649
|
+
return delete divProps[prop];
|
|
18650
|
+
});
|
|
18651
|
+
|
|
18652
|
+
return _react2.default.createElement(
|
|
18653
|
+
'div',
|
|
18654
|
+
_extends({
|
|
18655
|
+
className: className,
|
|
18656
|
+
style: appliedStyle
|
|
18657
|
+
}, divProps /* expand user provided props first so event handlers are never overridden */, {
|
|
18658
|
+
onClick: this.composeHandlers(this.onClick),
|
|
18659
|
+
onDragStart: this.composeHandlers(this.onDragStart),
|
|
18660
|
+
onDragEnter: this.composeHandlers(this.onDragEnter),
|
|
18661
|
+
onDragOver: this.composeHandlers(this.onDragOver),
|
|
18662
|
+
onDragLeave: this.composeHandlers(this.onDragLeave),
|
|
18663
|
+
onDrop: this.composeHandlers(this.onDrop),
|
|
18664
|
+
ref: this.setRef,
|
|
18665
|
+
'aria-disabled': disabled
|
|
18666
|
+
}),
|
|
18667
|
+
this.renderChildren(children, isDragActive, isDragAccept, isDragReject),
|
|
18668
|
+
_react2.default.createElement('input', _extends({}, inputProps /* expand user provided inputProps first so inputAttributes override them */, inputAttributes))
|
|
18669
|
+
);
|
|
18670
|
+
}
|
|
18671
|
+
}]);
|
|
18672
|
+
|
|
18673
|
+
return Dropzone;
|
|
18674
|
+
}(_react2.default.Component);
|
|
18675
|
+
|
|
18676
|
+
exports.default = Dropzone;
|
|
18677
|
+
|
|
18678
|
+
|
|
18679
|
+
Dropzone.propTypes = {
|
|
18680
|
+
/**
|
|
18681
|
+
* Allow specific types of files. See https://github.com/okonet/attr-accept for more information.
|
|
18682
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
18683
|
+
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
18684
|
+
* Windows. In some cases there might not be a mime type set at all.
|
|
18685
|
+
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
|
18686
|
+
*/
|
|
18687
|
+
accept: _propTypes2.default.string,
|
|
18688
|
+
|
|
18689
|
+
/**
|
|
18690
|
+
* Contents of the dropzone
|
|
18691
|
+
*/
|
|
18692
|
+
children: _propTypes2.default.oneOfType([_propTypes2.default.node, _propTypes2.default.func]),
|
|
18693
|
+
|
|
18694
|
+
/**
|
|
18695
|
+
* Disallow clicking on the dropzone container to open file dialog
|
|
18696
|
+
*/
|
|
18697
|
+
disableClick: _propTypes2.default.bool,
|
|
18698
|
+
|
|
18699
|
+
/**
|
|
18700
|
+
* Enable/disable the dropzone entirely
|
|
18701
|
+
*/
|
|
18702
|
+
disabled: _propTypes2.default.bool,
|
|
18703
|
+
|
|
18704
|
+
/**
|
|
18705
|
+
* Enable/disable preview generation
|
|
18706
|
+
*/
|
|
18707
|
+
disablePreview: _propTypes2.default.bool,
|
|
18708
|
+
|
|
18709
|
+
/**
|
|
18710
|
+
* If false, allow dropped items to take over the current browser window
|
|
18711
|
+
*/
|
|
18712
|
+
preventDropOnDocument: _propTypes2.default.bool,
|
|
18713
|
+
|
|
18714
|
+
/**
|
|
18715
|
+
* Pass additional attributes to the `<input type="file"/>` tag
|
|
18716
|
+
*/
|
|
18717
|
+
inputProps: _propTypes2.default.object,
|
|
18718
|
+
|
|
18719
|
+
/**
|
|
18720
|
+
* Allow dropping multiple files
|
|
18721
|
+
*/
|
|
18722
|
+
multiple: _propTypes2.default.bool,
|
|
18723
|
+
|
|
18724
|
+
/**
|
|
18725
|
+
* `name` attribute for the input tag
|
|
18726
|
+
*/
|
|
18727
|
+
name: _propTypes2.default.string,
|
|
18728
|
+
|
|
18729
|
+
/**
|
|
18730
|
+
* Maximum file size
|
|
18731
|
+
*/
|
|
18732
|
+
maxSize: _propTypes2.default.number,
|
|
18733
|
+
|
|
18734
|
+
/**
|
|
18735
|
+
* Minimum file size
|
|
18736
|
+
*/
|
|
18737
|
+
minSize: _propTypes2.default.number,
|
|
18738
|
+
|
|
18739
|
+
/**
|
|
18740
|
+
* className
|
|
18741
|
+
*/
|
|
18742
|
+
className: _propTypes2.default.string,
|
|
18743
|
+
|
|
18744
|
+
/**
|
|
18745
|
+
* className for active state
|
|
18746
|
+
*/
|
|
18747
|
+
activeClassName: _propTypes2.default.string,
|
|
18748
|
+
|
|
18749
|
+
/**
|
|
18750
|
+
* className for accepted state
|
|
18751
|
+
*/
|
|
18752
|
+
acceptClassName: _propTypes2.default.string,
|
|
18753
|
+
|
|
18754
|
+
/**
|
|
18755
|
+
* className for rejected state
|
|
18756
|
+
*/
|
|
18757
|
+
rejectClassName: _propTypes2.default.string,
|
|
18758
|
+
|
|
18759
|
+
/**
|
|
18760
|
+
* className for disabled state
|
|
18761
|
+
*/
|
|
18762
|
+
disabledClassName: _propTypes2.default.string,
|
|
18763
|
+
|
|
18764
|
+
/**
|
|
18765
|
+
* CSS styles to apply
|
|
18766
|
+
*/
|
|
18767
|
+
style: _propTypes2.default.object,
|
|
18768
|
+
|
|
18769
|
+
/**
|
|
18770
|
+
* CSS styles to apply when drag is active
|
|
18771
|
+
*/
|
|
18772
|
+
activeStyle: _propTypes2.default.object,
|
|
18773
|
+
|
|
18774
|
+
/**
|
|
18775
|
+
* CSS styles to apply when drop will be accepted
|
|
18776
|
+
*/
|
|
18777
|
+
acceptStyle: _propTypes2.default.object,
|
|
18778
|
+
|
|
18779
|
+
/**
|
|
18780
|
+
* CSS styles to apply when drop will be rejected
|
|
18781
|
+
*/
|
|
18782
|
+
rejectStyle: _propTypes2.default.object,
|
|
18783
|
+
|
|
18784
|
+
/**
|
|
18785
|
+
* CSS styles to apply when dropzone is disabled
|
|
18786
|
+
*/
|
|
18787
|
+
disabledStyle: _propTypes2.default.object,
|
|
18788
|
+
|
|
18789
|
+
/**
|
|
18790
|
+
* onClick callback
|
|
18791
|
+
* @param {Event} event
|
|
18792
|
+
*/
|
|
18793
|
+
onClick: _propTypes2.default.func,
|
|
18794
|
+
|
|
18795
|
+
/**
|
|
18796
|
+
* onDrop callback
|
|
18797
|
+
*/
|
|
18798
|
+
onDrop: _propTypes2.default.func,
|
|
18799
|
+
|
|
18800
|
+
/**
|
|
18801
|
+
* onDropAccepted callback
|
|
18802
|
+
*/
|
|
18803
|
+
onDropAccepted: _propTypes2.default.func,
|
|
18804
|
+
|
|
18805
|
+
/**
|
|
18806
|
+
* onDropRejected callback
|
|
18807
|
+
*/
|
|
18808
|
+
onDropRejected: _propTypes2.default.func,
|
|
18809
|
+
|
|
18810
|
+
/**
|
|
18811
|
+
* onDragStart callback
|
|
18812
|
+
*/
|
|
18813
|
+
onDragStart: _propTypes2.default.func,
|
|
18814
|
+
|
|
18815
|
+
/**
|
|
18816
|
+
* onDragEnter callback
|
|
18817
|
+
*/
|
|
18818
|
+
onDragEnter: _propTypes2.default.func,
|
|
18819
|
+
|
|
18820
|
+
/**
|
|
18821
|
+
* onDragOver callback
|
|
18822
|
+
*/
|
|
18823
|
+
onDragOver: _propTypes2.default.func,
|
|
18824
|
+
|
|
18825
|
+
/**
|
|
18826
|
+
* onDragLeave callback
|
|
18827
|
+
*/
|
|
18828
|
+
onDragLeave: _propTypes2.default.func,
|
|
18829
|
+
|
|
18830
|
+
/**
|
|
18831
|
+
* Provide a callback on clicking the cancel button of the file dialog
|
|
18832
|
+
*/
|
|
18833
|
+
onFileDialogCancel: _propTypes2.default.func
|
|
18834
|
+
};
|
|
18835
|
+
|
|
18836
|
+
Dropzone.defaultProps = {
|
|
18837
|
+
preventDropOnDocument: true,
|
|
18838
|
+
disabled: false,
|
|
18839
|
+
disablePreview: false,
|
|
18840
|
+
disableClick: false,
|
|
18841
|
+
multiple: true,
|
|
18842
|
+
maxSize: Infinity,
|
|
18843
|
+
minSize: 0
|
|
18844
|
+
};
|
|
18845
|
+
module.exports = exports['default'];
|
|
18846
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))
|
|
18847
|
+
|
|
18848
|
+
/***/ }),
|
|
18849
|
+
/* 1 */
|
|
18850
|
+
/***/ (function(module, exports) {
|
|
18851
|
+
|
|
18852
|
+
// shim for using process in browser
|
|
18853
|
+
var process = module.exports = {};
|
|
18854
|
+
|
|
18855
|
+
// cached from whatever global is present so that test runners that stub it
|
|
18856
|
+
// don't break things. But we need to wrap it in a try catch in case it is
|
|
18857
|
+
// wrapped in strict mode code which doesn't define any globals. It's inside a
|
|
18858
|
+
// function because try/catches deoptimize in certain engines.
|
|
18859
|
+
|
|
18860
|
+
var cachedSetTimeout;
|
|
18861
|
+
var cachedClearTimeout;
|
|
18862
|
+
|
|
18863
|
+
function defaultSetTimout() {
|
|
18864
|
+
throw new Error('setTimeout has not been defined');
|
|
18865
|
+
}
|
|
18866
|
+
function defaultClearTimeout () {
|
|
18867
|
+
throw new Error('clearTimeout has not been defined');
|
|
18868
|
+
}
|
|
18869
|
+
(function () {
|
|
18870
|
+
try {
|
|
18871
|
+
if (typeof setTimeout === 'function') {
|
|
18872
|
+
cachedSetTimeout = setTimeout;
|
|
18873
|
+
} else {
|
|
18874
|
+
cachedSetTimeout = defaultSetTimout;
|
|
18875
|
+
}
|
|
18876
|
+
} catch (e) {
|
|
18877
|
+
cachedSetTimeout = defaultSetTimout;
|
|
18878
|
+
}
|
|
18879
|
+
try {
|
|
18880
|
+
if (typeof clearTimeout === 'function') {
|
|
18881
|
+
cachedClearTimeout = clearTimeout;
|
|
18882
|
+
} else {
|
|
18883
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
18884
|
+
}
|
|
18885
|
+
} catch (e) {
|
|
18886
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
18887
|
+
}
|
|
18888
|
+
} ())
|
|
18889
|
+
function runTimeout(fun) {
|
|
18890
|
+
if (cachedSetTimeout === setTimeout) {
|
|
18891
|
+
//normal enviroments in sane situations
|
|
18892
|
+
return setTimeout(fun, 0);
|
|
18893
|
+
}
|
|
18894
|
+
// if setTimeout wasn't available but was latter defined
|
|
18895
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
18896
|
+
cachedSetTimeout = setTimeout;
|
|
18897
|
+
return setTimeout(fun, 0);
|
|
18898
|
+
}
|
|
18899
|
+
try {
|
|
18900
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
18901
|
+
return cachedSetTimeout(fun, 0);
|
|
18902
|
+
} catch(e){
|
|
18903
|
+
try {
|
|
18904
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
18905
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
18906
|
+
} catch(e){
|
|
18907
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
|
|
18908
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
18909
|
+
}
|
|
18910
|
+
}
|
|
18911
|
+
|
|
18912
|
+
|
|
18913
|
+
}
|
|
18914
|
+
function runClearTimeout(marker) {
|
|
18915
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
18916
|
+
//normal enviroments in sane situations
|
|
18917
|
+
return clearTimeout(marker);
|
|
18918
|
+
}
|
|
18919
|
+
// if clearTimeout wasn't available but was latter defined
|
|
18920
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
18921
|
+
cachedClearTimeout = clearTimeout;
|
|
18922
|
+
return clearTimeout(marker);
|
|
18923
|
+
}
|
|
18924
|
+
try {
|
|
18925
|
+
// when when somebody has screwed with setTimeout but no I.E. maddness
|
|
18926
|
+
return cachedClearTimeout(marker);
|
|
18927
|
+
} catch (e){
|
|
18928
|
+
try {
|
|
18929
|
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
|
|
18930
|
+
return cachedClearTimeout.call(null, marker);
|
|
18931
|
+
} catch (e){
|
|
18932
|
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
|
|
18933
|
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
|
|
18934
|
+
return cachedClearTimeout.call(this, marker);
|
|
18935
|
+
}
|
|
18936
|
+
}
|
|
18937
|
+
|
|
18938
|
+
|
|
18939
|
+
|
|
18940
|
+
}
|
|
18941
|
+
var queue = [];
|
|
18942
|
+
var draining = false;
|
|
18943
|
+
var currentQueue;
|
|
18944
|
+
var queueIndex = -1;
|
|
18945
|
+
|
|
18946
|
+
function cleanUpNextTick() {
|
|
18947
|
+
if (!draining || !currentQueue) {
|
|
18948
|
+
return;
|
|
18949
|
+
}
|
|
18950
|
+
draining = false;
|
|
18951
|
+
if (currentQueue.length) {
|
|
18952
|
+
queue = currentQueue.concat(queue);
|
|
18953
|
+
} else {
|
|
18954
|
+
queueIndex = -1;
|
|
18955
|
+
}
|
|
18956
|
+
if (queue.length) {
|
|
18957
|
+
drainQueue();
|
|
18958
|
+
}
|
|
18959
|
+
}
|
|
18960
|
+
|
|
18961
|
+
function drainQueue() {
|
|
18962
|
+
if (draining) {
|
|
18963
|
+
return;
|
|
18964
|
+
}
|
|
18965
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
18966
|
+
draining = true;
|
|
18967
|
+
|
|
18968
|
+
var len = queue.length;
|
|
18969
|
+
while(len) {
|
|
18970
|
+
currentQueue = queue;
|
|
18971
|
+
queue = [];
|
|
18972
|
+
while (++queueIndex < len) {
|
|
18973
|
+
if (currentQueue) {
|
|
18974
|
+
currentQueue[queueIndex].run();
|
|
18975
|
+
}
|
|
18976
|
+
}
|
|
18977
|
+
queueIndex = -1;
|
|
18978
|
+
len = queue.length;
|
|
18979
|
+
}
|
|
18980
|
+
currentQueue = null;
|
|
18981
|
+
draining = false;
|
|
18982
|
+
runClearTimeout(timeout);
|
|
18983
|
+
}
|
|
18984
|
+
|
|
18985
|
+
process.nextTick = function (fun) {
|
|
18986
|
+
var args = new Array(arguments.length - 1);
|
|
18987
|
+
if (arguments.length > 1) {
|
|
18988
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
18989
|
+
args[i - 1] = arguments[i];
|
|
18990
|
+
}
|
|
18991
|
+
}
|
|
18992
|
+
queue.push(new Item(fun, args));
|
|
18993
|
+
if (queue.length === 1 && !draining) {
|
|
18994
|
+
runTimeout(drainQueue);
|
|
18995
|
+
}
|
|
18996
|
+
};
|
|
18997
|
+
|
|
18998
|
+
// v8 likes predictible objects
|
|
18999
|
+
function Item(fun, array) {
|
|
19000
|
+
this.fun = fun;
|
|
19001
|
+
this.array = array;
|
|
19002
|
+
}
|
|
19003
|
+
Item.prototype.run = function () {
|
|
19004
|
+
this.fun.apply(null, this.array);
|
|
19005
|
+
};
|
|
19006
|
+
process.title = 'browser';
|
|
19007
|
+
process.browser = true;
|
|
19008
|
+
process.env = {};
|
|
19009
|
+
process.argv = [];
|
|
19010
|
+
process.version = ''; // empty string to avoid regexp issues
|
|
19011
|
+
process.versions = {};
|
|
19012
|
+
|
|
19013
|
+
function noop() {}
|
|
19014
|
+
|
|
19015
|
+
process.on = noop;
|
|
19016
|
+
process.addListener = noop;
|
|
19017
|
+
process.once = noop;
|
|
19018
|
+
process.off = noop;
|
|
19019
|
+
process.removeListener = noop;
|
|
19020
|
+
process.removeAllListeners = noop;
|
|
19021
|
+
process.emit = noop;
|
|
19022
|
+
process.prependListener = noop;
|
|
19023
|
+
process.prependOnceListener = noop;
|
|
19024
|
+
|
|
19025
|
+
process.listeners = function (name) { return [] }
|
|
19026
|
+
|
|
19027
|
+
process.binding = function (name) {
|
|
19028
|
+
throw new Error('process.binding is not supported');
|
|
19029
|
+
};
|
|
19030
|
+
|
|
19031
|
+
process.cwd = function () { return '/' };
|
|
19032
|
+
process.chdir = function (dir) {
|
|
19033
|
+
throw new Error('process.chdir is not supported');
|
|
19034
|
+
};
|
|
19035
|
+
process.umask = function() { return 0; };
|
|
19036
|
+
|
|
19037
|
+
|
|
19038
|
+
/***/ }),
|
|
19039
|
+
/* 2 */
|
|
19040
|
+
/***/ (function(module, exports) {
|
|
19041
|
+
|
|
19042
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_2__;
|
|
19043
|
+
|
|
19044
|
+
/***/ }),
|
|
19045
|
+
/* 3 */
|
|
19046
|
+
/***/ (function(module, exports) {
|
|
19047
|
+
|
|
19048
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_3__;
|
|
19049
|
+
|
|
19050
|
+
/***/ }),
|
|
19051
|
+
/* 4 */
|
|
19052
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
19053
|
+
|
|
19054
|
+
"use strict";
|
|
19055
|
+
|
|
19056
|
+
|
|
19057
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19058
|
+
value: true
|
|
19059
|
+
});
|
|
19060
|
+
exports.supportMultiple = undefined;
|
|
19061
|
+
exports.getDataTransferItems = getDataTransferItems;
|
|
19062
|
+
exports.fileAccepted = fileAccepted;
|
|
19063
|
+
exports.fileMatchSize = fileMatchSize;
|
|
19064
|
+
exports.allFilesAccepted = allFilesAccepted;
|
|
19065
|
+
exports.onDocumentDragOver = onDocumentDragOver;
|
|
19066
|
+
|
|
19067
|
+
var _attrAccept = __webpack_require__(5);
|
|
19068
|
+
|
|
19069
|
+
var _attrAccept2 = _interopRequireDefault(_attrAccept);
|
|
19070
|
+
|
|
19071
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19072
|
+
|
|
19073
|
+
var supportMultiple = exports.supportMultiple = typeof document !== 'undefined' && document && document.createElement ? 'multiple' in document.createElement('input') : true;
|
|
19074
|
+
|
|
19075
|
+
function getDataTransferItems(event) {
|
|
19076
|
+
var dataTransferItemsList = [];
|
|
19077
|
+
if (event.dataTransfer) {
|
|
19078
|
+
var dt = event.dataTransfer;
|
|
19079
|
+
if (dt.files && dt.files.length) {
|
|
19080
|
+
dataTransferItemsList = dt.files;
|
|
19081
|
+
} else if (dt.items && dt.items.length) {
|
|
19082
|
+
// During the drag even the dataTransfer.files is null
|
|
19083
|
+
// but Chrome implements some drag store, which is accesible via dataTransfer.items
|
|
19084
|
+
dataTransferItemsList = dt.items;
|
|
19085
|
+
}
|
|
19086
|
+
} else if (event.target && event.target.files) {
|
|
19087
|
+
dataTransferItemsList = event.target.files;
|
|
19088
|
+
}
|
|
19089
|
+
// Convert from DataTransferItemsList to the native Array
|
|
19090
|
+
return Array.prototype.slice.call(dataTransferItemsList);
|
|
19091
|
+
}
|
|
19092
|
+
|
|
19093
|
+
// Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with
|
|
19094
|
+
// that MIME type will always be accepted
|
|
19095
|
+
function fileAccepted(file, accept) {
|
|
19096
|
+
return file.type === 'application/x-moz-file' || (0, _attrAccept2.default)(file, accept);
|
|
19097
|
+
}
|
|
19098
|
+
|
|
19099
|
+
function fileMatchSize(file, maxSize, minSize) {
|
|
19100
|
+
return file.size <= maxSize && file.size >= minSize;
|
|
19101
|
+
}
|
|
19102
|
+
|
|
19103
|
+
function allFilesAccepted(files, accept) {
|
|
19104
|
+
return files.every(function (file) {
|
|
19105
|
+
return fileAccepted(file, accept);
|
|
19106
|
+
});
|
|
19107
|
+
}
|
|
19108
|
+
|
|
19109
|
+
// allow the entire document to be a drag target
|
|
19110
|
+
function onDocumentDragOver(evt) {
|
|
19111
|
+
evt.preventDefault();
|
|
19112
|
+
}
|
|
19113
|
+
|
|
19114
|
+
/***/ }),
|
|
19115
|
+
/* 5 */
|
|
19116
|
+
/***/ (function(module, exports) {
|
|
19117
|
+
|
|
19118
|
+
module.exports=function(t){function n(e){if(r[e])return r[e].exports;var o=r[e]={exports:{},id:e,loaded:!1};return t[e].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=t,n.c=r,n.p="",n(0)}([function(t,n,r){"use strict";n.__esModule=!0,r(8),r(9),n["default"]=function(t,n){if(t&&n){var r=function(){var r=Array.isArray(n)?n:n.split(","),e=t.name||"",o=t.type||"",i=o.replace(/\/.*$/,"");return{v:r.some(function(t){var n=t.trim();return"."===n.charAt(0)?e.toLowerCase().endsWith(n.toLowerCase()):/\/\*$/.test(n)?i===n.replace(/\/.*$/,""):o===n})}}();if("object"==typeof r)return r.v}return!0},t.exports=n["default"]},function(t,n){var r=t.exports={version:"1.2.2"};"number"==typeof __e&&(__e=r)},function(t,n){var r=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},function(t,n,r){var e=r(2),o=r(1),i=r(4),u=r(19),c="prototype",f=function(t,n){return function(){return t.apply(n,arguments)}},s=function(t,n,r){var a,p,l,y,d=t&s.G,h=t&s.P,v=d?e:t&s.S?e[n]||(e[n]={}):(e[n]||{})[c],x=d?o:o[n]||(o[n]={});d&&(r=n);for(a in r)p=!(t&s.F)&&v&&a in v,l=(p?v:r)[a],y=t&s.B&&p?f(l,e):h&&"function"==typeof l?f(Function.call,l):l,v&&!p&&u(v,a,l),x[a]!=l&&i(x,a,y),h&&((x[c]||(x[c]={}))[a]=l)};e.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,t.exports=s},function(t,n,r){var e=r(5),o=r(18);t.exports=r(22)?function(t,n,r){return e.setDesc(t,n,o(1,r))}:function(t,n,r){return t[n]=r,t}},function(t,n){var r=Object;t.exports={create:r.create,getProto:r.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:r.getOwnPropertyDescriptor,setDesc:r.defineProperty,setDescs:r.defineProperties,getKeys:r.keys,getNames:r.getOwnPropertyNames,getSymbols:r.getOwnPropertySymbols,each:[].forEach}},function(t,n){var r=0,e=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++r+e).toString(36))}},function(t,n,r){var e=r(20)("wks"),o=r(2).Symbol;t.exports=function(t){return e[t]||(e[t]=o&&o[t]||(o||r(6))("Symbol."+t))}},function(t,n,r){r(26),t.exports=r(1).Array.some},function(t,n,r){r(25),t.exports=r(1).String.endsWith},function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,n){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,n,r){var e=r(10);t.exports=function(t,n,r){if(e(t),void 0===n)return t;switch(r){case 1:return function(r){return t.call(n,r)};case 2:return function(r,e){return t.call(n,r,e)};case 3:return function(r,e,o){return t.call(n,r,e,o)}}return function(){return t.apply(n,arguments)}}},function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,n,r){t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r(7)("match")]=!1,!"/./"[t](n)}catch(o){}}return!0}},function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},function(t,n){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,n,r){var e=r(16),o=r(11),i=r(7)("match");t.exports=function(t){var n;return e(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},function(t,n,r){var e=r(2),o=r(4),i=r(6)("src"),u="toString",c=Function[u],f=(""+c).split(u);r(1).inspectSource=function(t){return c.call(t)},(t.exports=function(t,n,r,u){"function"==typeof r&&(o(r,i,t[n]?""+t[n]:f.join(String(n))),"name"in r||(r.name=n)),t===e?t[n]=r:(u||delete t[n],o(t,n,r))})(Function.prototype,u,function(){return"function"==typeof this&&this[i]||c.call(this)})},function(t,n,r){var e=r(2),o="__core-js_shared__",i=e[o]||(e[o]={});t.exports=function(t){return i[t]||(i[t]={})}},function(t,n,r){var e=r(17),o=r(13);t.exports=function(t,n,r){if(e(n))throw TypeError("String#"+r+" doesn't accept regex!");return String(o(t))}},function(t,n,r){t.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,n){var r=Math.ceil,e=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?e:r)(t)}},function(t,n,r){var e=r(23),o=Math.min;t.exports=function(t){return t>0?o(e(t),9007199254740991):0}},function(t,n,r){"use strict";var e=r(3),o=r(24),i=r(21),u="endsWith",c=""[u];e(e.P+e.F*r(14)(u),"String",{endsWith:function(t){var n=i(this,t,u),r=arguments,e=r.length>1?r[1]:void 0,f=o(n.length),s=void 0===e?f:Math.min(o(e),f),a=String(t);return c?c.call(n,a,s):n.slice(s-a.length,s)===a}})},function(t,n,r){var e=r(5),o=r(3),i=r(1).Array||Array,u={},c=function(t,n){e.each.call(t.split(","),function(t){void 0==n&&t in i?u[t]=i[t]:t in[]&&(u[t]=r(12)(Function.call,[][t],n))})};c("pop,reverse,shift,keys,values,entries",1),c("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3),c("join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill"),o(o.S,"Array",u)}]);
|
|
19119
|
+
|
|
19120
|
+
/***/ }),
|
|
19121
|
+
/* 6 */
|
|
19122
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
19123
|
+
|
|
19124
|
+
"use strict";
|
|
19125
|
+
|
|
19126
|
+
|
|
19127
|
+
Object.defineProperty(exports, "__esModule", {
|
|
19128
|
+
value: true
|
|
19129
|
+
});
|
|
19130
|
+
exports.default = {
|
|
19131
|
+
rejected: {
|
|
19132
|
+
borderStyle: 'solid',
|
|
19133
|
+
borderColor: '#c66',
|
|
19134
|
+
backgroundColor: '#eee'
|
|
19135
|
+
},
|
|
19136
|
+
disabled: {
|
|
19137
|
+
opacity: 0.5
|
|
19138
|
+
},
|
|
19139
|
+
active: {
|
|
19140
|
+
borderStyle: 'solid',
|
|
19141
|
+
borderColor: '#6c6',
|
|
19142
|
+
backgroundColor: '#eee'
|
|
19143
|
+
},
|
|
19144
|
+
default: {
|
|
19145
|
+
width: 200,
|
|
19146
|
+
height: 200,
|
|
19147
|
+
borderWidth: 2,
|
|
19148
|
+
borderColor: '#666',
|
|
19149
|
+
borderStyle: 'dashed',
|
|
19150
|
+
borderRadius: 5
|
|
19151
|
+
}
|
|
19152
|
+
};
|
|
19153
|
+
module.exports = exports['default'];
|
|
19154
|
+
|
|
19155
|
+
/***/ })
|
|
19156
|
+
/******/ ]);
|
|
19157
|
+
});
|
|
19158
|
+
//# sourceMappingURL=index.js.map
|
|
19159
|
+
|
|
19160
|
+
/***/ },
|
|
19161
|
+
/* 202 */,
|
|
19162
|
+
/* 203 */
|
|
19163
|
+
/***/ function(module, exports, __webpack_require__) {
|
|
19164
|
+
|
|
19165
|
+
'use strict';
|
|
19166
|
+
|
|
19167
|
+
exports.__esModule = true;
|
|
19168
|
+
|
|
19169
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
19170
|
+
|
|
19171
|
+
var _addClass = __webpack_require__(205);
|
|
19172
|
+
|
|
19173
|
+
var _addClass2 = _interopRequireDefault(_addClass);
|
|
19174
|
+
|
|
19175
|
+
var _removeClass = __webpack_require__(207);
|
|
19176
|
+
|
|
19177
|
+
var _removeClass2 = _interopRequireDefault(_removeClass);
|
|
19178
|
+
|
|
19179
|
+
var _requestAnimationFrame = __webpack_require__(209);
|
|
19180
|
+
|
|
19181
|
+
var _requestAnimationFrame2 = _interopRequireDefault(_requestAnimationFrame);
|
|
19182
|
+
|
|
19183
|
+
var _properties = __webpack_require__(208);
|
|
19184
|
+
|
|
19185
|
+
var _react = __webpack_require__(1);
|
|
19186
|
+
|
|
19187
|
+
var _react2 = _interopRequireDefault(_react);
|
|
19188
|
+
|
|
19189
|
+
var _propTypes = __webpack_require__(27);
|
|
19190
|
+
|
|
19191
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
19192
|
+
|
|
19193
|
+
var _reactDom = __webpack_require__(10);
|
|
19194
|
+
|
|
19195
|
+
var _PropTypes = __webpack_require__(64);
|
|
19196
|
+
|
|
19197
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19198
|
+
|
|
19199
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19200
|
+
|
|
19201
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
19202
|
+
|
|
19203
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
19204
|
+
|
|
19205
|
+
var events = [];
|
|
19206
|
+
if (_properties.transitionEnd) events.push(_properties.transitionEnd);
|
|
19207
|
+
if (_properties.animationEnd) events.push(_properties.animationEnd);
|
|
19208
|
+
|
|
19209
|
+
function addEndListener(node, listener) {
|
|
19210
|
+
if (events.length) {
|
|
19211
|
+
events.forEach(function (e) {
|
|
19212
|
+
return node.addEventListener(e, listener, false);
|
|
19213
|
+
});
|
|
19214
|
+
} else {
|
|
19215
|
+
setTimeout(listener, 0);
|
|
19216
|
+
}
|
|
19217
|
+
|
|
19218
|
+
return function () {
|
|
19219
|
+
if (!events.length) return;
|
|
19220
|
+
events.forEach(function (e) {
|
|
19221
|
+
return node.removeEventListener(e, listener, false);
|
|
19222
|
+
});
|
|
19223
|
+
};
|
|
19224
|
+
}
|
|
19225
|
+
|
|
19226
|
+
var propTypes = {
|
|
19227
|
+
children: _propTypes2.default.node,
|
|
19228
|
+
name: _PropTypes.nameShape.isRequired,
|
|
19229
|
+
|
|
19230
|
+
// Once we require timeouts to be specified, we can remove the
|
|
19231
|
+
// boolean flags (appear etc.) and just accept a number
|
|
19232
|
+
// or a bool for the timeout flags (appearTimeout etc.)
|
|
19233
|
+
appear: _propTypes2.default.bool,
|
|
19234
|
+
enter: _propTypes2.default.bool,
|
|
19235
|
+
leave: _propTypes2.default.bool,
|
|
19236
|
+
appearTimeout: _propTypes2.default.number,
|
|
19237
|
+
enterTimeout: _propTypes2.default.number,
|
|
19238
|
+
leaveTimeout: _propTypes2.default.number
|
|
19239
|
+
};
|
|
19240
|
+
|
|
19241
|
+
var CSSTransitionGroupChild = function (_React$Component) {
|
|
19242
|
+
_inherits(CSSTransitionGroupChild, _React$Component);
|
|
19243
|
+
|
|
19244
|
+
function CSSTransitionGroupChild() {
|
|
19245
|
+
var _temp, _this, _ret;
|
|
19246
|
+
|
|
19247
|
+
_classCallCheck(this, CSSTransitionGroupChild);
|
|
19248
|
+
|
|
19249
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
19250
|
+
args[_key] = arguments[_key];
|
|
19251
|
+
}
|
|
19252
|
+
|
|
19253
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.componentWillAppear = function (done) {
|
|
19254
|
+
if (_this.props.appear) {
|
|
19255
|
+
_this.transition('appear', done, _this.props.appearTimeout);
|
|
18195
19256
|
} else {
|
|
18196
19257
|
done();
|
|
18197
19258
|
}
|
|
@@ -18332,7 +19393,7 @@ module.exports =
|
|
|
18332
19393
|
module.exports = exports['default'];
|
|
18333
19394
|
|
|
18334
19395
|
/***/ },
|
|
18335
|
-
/*
|
|
19396
|
+
/* 204 */
|
|
18336
19397
|
/***/ function(module, exports, __webpack_require__) {
|
|
18337
19398
|
|
|
18338
19399
|
'use strict';
|
|
@@ -18349,15 +19410,15 @@ module.exports =
|
|
|
18349
19410
|
|
|
18350
19411
|
var _react2 = _interopRequireDefault(_react);
|
|
18351
19412
|
|
|
18352
|
-
var _propTypes = __webpack_require__(
|
|
19413
|
+
var _propTypes = __webpack_require__(27);
|
|
18353
19414
|
|
|
18354
19415
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
|
18355
19416
|
|
|
18356
|
-
var _warning = __webpack_require__(
|
|
19417
|
+
var _warning = __webpack_require__(211);
|
|
18357
19418
|
|
|
18358
19419
|
var _warning2 = _interopRequireDefault(_warning);
|
|
18359
19420
|
|
|
18360
|
-
var _ChildMapping = __webpack_require__(
|
|
19421
|
+
var _ChildMapping = __webpack_require__(210);
|
|
18361
19422
|
|
|
18362
19423
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18363
19424
|
|
|
@@ -18609,7 +19670,7 @@ module.exports =
|
|
|
18609
19670
|
module.exports = exports['default'];
|
|
18610
19671
|
|
|
18611
19672
|
/***/ },
|
|
18612
|
-
/*
|
|
19673
|
+
/* 205 */
|
|
18613
19674
|
/***/ function(module, exports, __webpack_require__) {
|
|
18614
19675
|
|
|
18615
19676
|
'use strict';
|
|
@@ -18619,7 +19680,7 @@ module.exports =
|
|
|
18619
19680
|
});
|
|
18620
19681
|
exports.default = addClass;
|
|
18621
19682
|
|
|
18622
|
-
var _hasClass = __webpack_require__(
|
|
19683
|
+
var _hasClass = __webpack_require__(206);
|
|
18623
19684
|
|
|
18624
19685
|
var _hasClass2 = _interopRequireDefault(_hasClass);
|
|
18625
19686
|
|
|
@@ -18631,7 +19692,7 @@ module.exports =
|
|
|
18631
19692
|
module.exports = exports['default'];
|
|
18632
19693
|
|
|
18633
19694
|
/***/ },
|
|
18634
|
-
/*
|
|
19695
|
+
/* 206 */
|
|
18635
19696
|
/***/ function(module, exports) {
|
|
18636
19697
|
|
|
18637
19698
|
"use strict";
|
|
@@ -18646,7 +19707,7 @@ module.exports =
|
|
|
18646
19707
|
module.exports = exports["default"];
|
|
18647
19708
|
|
|
18648
19709
|
/***/ },
|
|
18649
|
-
/*
|
|
19710
|
+
/* 207 */
|
|
18650
19711
|
/***/ function(module, exports) {
|
|
18651
19712
|
|
|
18652
19713
|
'use strict';
|
|
@@ -18656,7 +19717,7 @@ module.exports =
|
|
|
18656
19717
|
};
|
|
18657
19718
|
|
|
18658
19719
|
/***/ },
|
|
18659
|
-
/*
|
|
19720
|
+
/* 208 */
|
|
18660
19721
|
/***/ function(module, exports, __webpack_require__) {
|
|
18661
19722
|
|
|
18662
19723
|
'use strict';
|
|
@@ -18771,7 +19832,7 @@ module.exports =
|
|
|
18771
19832
|
}
|
|
18772
19833
|
|
|
18773
19834
|
/***/ },
|
|
18774
|
-
/*
|
|
19835
|
+
/* 209 */
|
|
18775
19836
|
/***/ function(module, exports, __webpack_require__) {
|
|
18776
19837
|
|
|
18777
19838
|
'use strict';
|
|
@@ -18829,7 +19890,7 @@ module.exports =
|
|
|
18829
19890
|
module.exports = exports['default'];
|
|
18830
19891
|
|
|
18831
19892
|
/***/ },
|
|
18832
|
-
/*
|
|
19893
|
+
/* 210 */
|
|
18833
19894
|
/***/ function(module, exports, __webpack_require__) {
|
|
18834
19895
|
|
|
18835
19896
|
'use strict';
|
|
@@ -18925,7 +19986,7 @@ module.exports =
|
|
|
18925
19986
|
}
|
|
18926
19987
|
|
|
18927
19988
|
/***/ },
|
|
18928
|
-
/*
|
|
19989
|
+
/* 211 */
|
|
18929
19990
|
/***/ function(module, exports, __webpack_require__) {
|
|
18930
19991
|
|
|
18931
19992
|
/**
|
|
@@ -18991,13 +20052,13 @@ module.exports =
|
|
|
18991
20052
|
|
|
18992
20053
|
|
|
18993
20054
|
/***/ },
|
|
18994
|
-
/*
|
|
20055
|
+
/* 212 */
|
|
18995
20056
|
/***/ function(module, exports) {
|
|
18996
20057
|
|
|
18997
20058
|
module.exports = require("moment-timezone");
|
|
18998
20059
|
|
|
18999
20060
|
/***/ },
|
|
19000
|
-
/*
|
|
20061
|
+
/* 213 */
|
|
19001
20062
|
/***/ function(module, exports) {
|
|
19002
20063
|
|
|
19003
20064
|
module.exports = require("redux");
|