diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..6273fd5 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,17 @@ +{ + "extends": "airbnb", + "parser": "babel-eslint", + "env": { + "browser": true + }, + "rules": { + "import/no-extraneous-dependencies": "off", + "no-param-reassign": "warn", + "react/prop-types": "off", + "no-underscore-dangle": "warn", + "global-require": "warn", + "react/jsx-filename-extension": "off", + "react/require-default-props": "off", + "react/forbid-prop-types": "off" + } +} \ No newline at end of file diff --git a/lib/components/Control/index.js b/lib/components/Control/index.js index 5a7818a..a8f0024 100644 --- a/lib/components/Control/index.js +++ b/lib/components/Control/index.js @@ -65,7 +65,9 @@ var Control = function (_BaseControl) { key: 'initialize', value: function initialize() { // // 创建一个DOM元素 - var container = this.container = document.createElement('div'); + var container = document.createElement('div'); + this.container = container; + if (this.render) { (0, _reactDom.render)(this.render(), container); } diff --git a/lib/components/Lib/CurveLine.js b/lib/components/Lib/CurveLine.js index fb5eebd..a4a2da0 100644 --- a/lib/components/Lib/CurveLine.js +++ b/lib/components/Lib/CurveLine.js @@ -6,7 +6,14 @@ Object.defineProperty(exports, "__esModule", { 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; }; }(); -var _class; +var _class; /* eslint-disable */ + +/* eslint-enable */ + + +var _bmaplib = require('bmaplib.curveline'); + +var _bmaplib2 = _interopRequireDefault(_bmaplib); var _BaseOverlay2 = require('../Overlay/BaseOverlay'); @@ -18,10 +25,6 @@ var _ReactComponent = require('../ReactComponent'); var _ReactComponent2 = _interopRequireDefault(_ReactComponent); -var _bmaplib = require('bmaplib.curveline'); - -var _bmaplib2 = _interopRequireDefault(_bmaplib); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } diff --git a/lib/components/Lib/DrawingManager.js b/lib/components/Lib/DrawingManager.js index ee2909c..392b6fb 100644 --- a/lib/components/Lib/DrawingManager.js +++ b/lib/components/Lib/DrawingManager.js @@ -46,12 +46,12 @@ var DrawingManager = (0, _ReactComponent2.default)(_class = function (_BaseOverl key: 'init', value: function init() { var defaultStyle = { - strokeColor: "red", //边线颜色。 - fillColor: "red", //填充颜色。当参数为空时,圆形将没有填充效果。 - strokeWeight: 3, //边线的宽度,以像素为单位。 - strokeOpacity: 0.8, //边线透明度,取值范围0 - 1。 - fillOpacity: 0.6, //填充的透明度,取值范围0 - 1。 - strokeStyle: 'solid' //边线的样式,solid或dashed。 + strokeColor: 'red', // 边线颜色。 + fillColor: 'red', // 填充颜色。当参数为空时,圆形将没有填充效果。 + strokeWeight: 3, // 边线的宽度,以像素为单位。 + strokeOpacity: 0.8, // 边线透明度,取值范围0 - 1。 + fillOpacity: 0.6, // 填充的透明度,取值范围0 - 1。 + strokeStyle: 'solid' // 边线的样式,solid或dashed。 }; var _props = this.props, diff --git a/lib/components/Lib/Heatmap.js b/lib/components/Lib/Heatmap.js index ea2ede2..ba1c443 100644 --- a/lib/components/Lib/Heatmap.js +++ b/lib/components/Lib/Heatmap.js @@ -6,7 +6,14 @@ Object.defineProperty(exports, "__esModule", { 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; }; }(); -var _class; +var _class; /* eslint-disable */ + +/* eslint-enable */ + + +var _bmaplib = require('bmaplib.heatmap'); + +var _bmaplib2 = _interopRequireDefault(_bmaplib); var _BaseOverlay2 = require('../Overlay/BaseOverlay'); @@ -18,10 +25,6 @@ var _ReactComponent = require('../ReactComponent'); var _ReactComponent2 = _interopRequireDefault(_ReactComponent); -var _bmaplib = require('bmaplib.heatmap'); - -var _bmaplib2 = _interopRequireDefault(_bmaplib); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } diff --git a/lib/components/Lib/MarkerClusterer.js b/lib/components/Lib/MarkerClusterer.js index e9ba32a..30ebd33 100644 --- a/lib/components/Lib/MarkerClusterer.js +++ b/lib/components/Lib/MarkerClusterer.js @@ -6,7 +6,14 @@ Object.defineProperty(exports, "__esModule", { 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; }; }(); -var _class; +var _class; /* eslint-disable */ + +/* eslint-enable */ + + +var _bmaplib = require('bmaplib.markerclusterer'); + +var _bmaplib2 = _interopRequireDefault(_bmaplib); var _BaseOverlay2 = require('../Overlay/BaseOverlay'); @@ -18,10 +25,6 @@ var _ReactComponent = require('../ReactComponent'); var _ReactComponent2 = _interopRequireDefault(_ReactComponent); -var _bmaplib = require('bmaplib.markerclusterer'); - -var _bmaplib2 = _interopRequireDefault(_bmaplib); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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; } @@ -56,8 +59,9 @@ var MarkerClusterer = (0, _ReactComponent2.default)(_class = function (_BaseOver var childrenMakers = children && !Array.isArray(children) ? [children] : children; var markers = []; - var Marker = global.BMap.Marker; - childrenMakers.map(function (m) { + var Marker = global.BMap.Marker.Marker; + + childrenMakers.forEach(function (m) { var _m$props = m.props, point = _m$props.point, markerOpts = _objectWithoutProperties(_m$props, ['point']); diff --git a/lib/components/Map/index.js b/lib/components/Map/index.js index 7271ab6..64331b4 100644 --- a/lib/components/Map/index.js +++ b/lib/components/Map/index.js @@ -44,9 +44,9 @@ var Map = (_temp = _class = function (_React$Component) { _initialiseProps.call(_this); - _this.defaultCenter = { lng: 116.404, lat: 39.915 - // React 16 - };if (_react2.default.createRef) { + _this.defaultCenter = { lng: 116.404, lat: 39.915 }; + // React 16 + if (_react2.default.createRef) { _this.mapContainerRef = _react2.default.createRef(); } else { _this.mapContainerRef = function (ref) { @@ -79,18 +79,22 @@ var Map = (_temp = _class = function (_React$Component) { this.processMapOptions(props); this.processContextMenu(props.contextMenu); (0, _util.unBindEvents)(map); - props.events && (0, _util.bindEvents)(map, 'MAP', props.events); + if (props.events) (0, _util.bindEvents)(map, 'MAP', props.events); } } }, { key: 'processProps', value: function processProps(nextProps) { + var _props = this.props, + center = _props.center, + zoom = _props.zoom; + var props = Object.assign({}, nextProps); - if (JSON.stringify(props.center) === JSON.stringify(this.props.center)) { + if (JSON.stringify(props.center) === JSON.stringify(center)) { delete props.center; } - if (props.zoom === this.props.zoom) { + if (props.zoom === zoom) { delete props.zoom; } return props; @@ -158,29 +162,32 @@ var Map = (_temp = _class = function (_React$Component) { var _this2 = this; this.init = function (BMap) { - var _props = _this2.props, - highResolution = _props.highResolution, - autoResize = _props.autoResize, - mapClick = _props.mapClick, - mapMounted = _props.mapMounted, - contextMenu = _props.contextMenu, - resetProps = _objectWithoutProperties(_props, ['highResolution', 'autoResize', 'mapClick', 'mapMounted', 'contextMenu']); + var _props2 = _this2.props, + highResolution = _props2.highResolution, + autoResize = _props2.autoResize, + mapClick = _props2.mapClick, + mapMounted = _props2.mapMounted, + contextMenu = _props2.contextMenu, + events = _props2.events, + resetProps = _objectWithoutProperties(_props2, ['highResolution', 'autoResize', 'mapClick', 'mapMounted', 'contextMenu', 'events']); _this2.mapContainer = _this2.mapContainer || _this2.mapContainerRef.current; - var map = _this2.map = new BMap.Map(_this2.mapContainer, { + var map = new BMap.Map(_this2.mapContainer, { enableHighResolution: highResolution, enableAutoResize: autoResize, enableMapClick: mapClick }); + + _this2.map = map; // 当初始化center为string时,保证地图正常渲染,用默认center处理centerAndZoom - if (typeof resetProps.center === "string") { + if (typeof resetProps.center === 'string') { map.centerAndZoom(_this2.defaultCenter, resetProps.zoom); } _this2.processContextMenu(contextMenu); global.bMapInstance = map; _this2.processMapOptions(resetProps); - (0, _util.bindEvents)(map, 'MAP', _this2.props.events); + (0, _util.bindEvents)(map, 'MAP', events); // 地图配置完成后,强制刷新,渲染子组件 _this2.forceUpdate(function () { @@ -207,7 +214,8 @@ var Map = (_temp = _class = function (_React$Component) { (0, _util.processBooleanOptions)(map, 'MAP_BOOLEAN_OPTIONS', props); if (props.center) { - var center = props.center; + var center = props.center.center; + if ((0, _util.isPoint)(center)) { center = (0, _util.getPoint)(center.lng, center.lat); } @@ -228,7 +236,9 @@ var Map = (_temp = _class = function (_React$Component) { global.BMap = global.BMap || {}; if (Object.keys(global.BMap).length === 0) { - global.BMap._preloader = new Promise(function (resolve, reject) { + global.BMap._preloader = new Promise(function (resolve) { + var $script = document.createElement('script'); + global.document.body.appendChild($script); global._initBaiduMap = function initBaiduMap() { resolve(global.BMap); global.document.body.removeChild($script); @@ -236,13 +246,11 @@ var Map = (_temp = _class = function (_React$Component) { global._initBaiduMap = null; }; - var $script = document.createElement('script'); - global.document.body.appendChild($script); $script.src = 'https://api.map.baidu.com/api?v=3.0&ak=' + ak + '&callback=_initBaiduMap'; }); return global.BMap._preloader; - } else if (!global.BMap._preloader) { + }if (!global.BMap._preloader) { return Promise.resolve(global.BMap); } return global.BMap._preloader; diff --git a/lib/components/Overlay/BaseOverlay.js b/lib/components/Overlay/BaseOverlay.js index 665dcb1..0d4c5a5 100644 --- a/lib/components/Overlay/BaseOverlay.js +++ b/lib/components/Overlay/BaseOverlay.js @@ -8,8 +8,6 @@ var _createClass = function () { function defineProperties(target, props) { for var _reactDom = require('react-dom'); -var _util = require('../_base/util'); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var BaseOverlay = function () { diff --git a/lib/components/Overlay/Boundary.js b/lib/components/Overlay/Boundary.js index ddffdd8..86ef878 100644 --- a/lib/components/Overlay/Boundary.js +++ b/lib/components/Overlay/Boundary.js @@ -48,7 +48,7 @@ var Boundary = (0, _ReactComponent2.default)(_class = function (_BaseOverlay) { autoViewport = _props.autoViewport, polygonOpts = _objectWithoutProperties(_props, ['name', 'onError', 'autoViewport']); - this.getBoundary(name).then(function (points) { + this.getBoundary().then(function (points) { polygonOpts.points = points; _this2.instance = (0, _util.createPolygon)(polygonOpts); _this2.map.addOverlay(_this2.instance); @@ -66,14 +66,16 @@ var Boundary = (0, _ReactComponent2.default)(_class = function (_BaseOverlay) { } }, { key: 'getBoundary', - value: function getBoundary(name) { + value: function getBoundary() { + var name = this.props.name; + return new Promise(function (resolve, reject) { var boundary = new global.BMap.Boundary(); boundary.get(name, function (res) { var count = res.boundaries.length; if (count === 0) { - reject('未能获取当前输入行政区域'); + reject(); } var points = res.boundaries[0].split(';').map(function (item) { var pointArr = item.split(','); diff --git a/lib/components/Overlay/InfoWindow.js b/lib/components/Overlay/InfoWindow.js index 640f83c..5e1d8ed 100644 --- a/lib/components/Overlay/InfoWindow.js +++ b/lib/components/Overlay/InfoWindow.js @@ -69,7 +69,7 @@ var InfoWindow = (0, _ReactComponent2.default)(_class = function (_BaseOverlay) }; this.instance = new global.BMap.InfoWindow(content, opts); - this.map.openInfoWindow(this.instance, getPoint(point.lng, point.lat)); + this.map.openInfoWindow(this.instance, (0, _util.getPoint)(point.lng, point.lat)); (0, _util.bindEvents)(this.instance, 'INFO_WINDOW', events); } }]); diff --git a/lib/components/Overlay/PointCollection.js b/lib/components/Overlay/PointCollection.js index ea16a46..f37f9c1 100644 --- a/lib/components/Overlay/PointCollection.js +++ b/lib/components/Overlay/PointCollection.js @@ -51,9 +51,9 @@ var PointCollection = (0, _ReactComponent2.default)(_class = function (_BaseOver var opts = { - shape: shape && top[shape], + shape: shape && global[shape], color: color, - size: size && top[size] + size: size && global[size] }; var pList = []; diff --git a/lib/components/Overlay/Polyline.js b/lib/components/Overlay/Polyline.js index 0e91f2f..8070bb5 100644 --- a/lib/components/Overlay/Polyline.js +++ b/lib/components/Overlay/Polyline.js @@ -75,7 +75,7 @@ var Polyline = (0, _ReactComponent2.default)(_class = function (_BaseOverlay) { massClear: massClear, editing: editing }; - processBooleanOptions(this.instance, 'POLYLINE_BOOLEAN_OPTIONS', booleanOpts); + (0, _util.processBooleanOptions)(this.instance, 'POLYLINE_BOOLEAN_OPTIONS', booleanOpts); (0, _util.bindEvents)(this.instance, 'POLYLINE', events); } }]); diff --git a/lib/components/Overlay/index.js b/lib/components/Overlay/index.js index 05e0380..08c264d 100644 --- a/lib/components/Overlay/index.js +++ b/lib/components/Overlay/index.js @@ -26,7 +26,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen 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; } -var BOverlay = function BOverlay() {}; +var BOverlay = function Empty() {}; var Overlay = function (_BaseOverlay) { _inherits(Overlay, _BaseOverlay); @@ -57,7 +57,9 @@ var Overlay = function (_BaseOverlay) { pane = _props$pane === undefined ? _MapPane2.default.MARKER : _props$pane, zIndex = _props.zIndex; - var container = this.container = document.createElement('div'); + var container = document.createElement('div'); + this.container = container; + if (zIndex) { container.style.zIndex = zIndex; } @@ -73,7 +75,6 @@ var Overlay = function (_BaseOverlay) { value: function draw() { var container = this.container, props = this.props; - ; var point = props.point; var position = this.map.pointToOverlayPixel((0, _util.getPoint)(point.lng, point.lat)); diff --git a/lib/components/ReactComponent/index.js b/lib/components/ReactComponent/index.js index 455a37e..4c57f19 100644 --- a/lib/components/ReactComponent/index.js +++ b/lib/components/ReactComponent/index.js @@ -26,8 +26,10 @@ function ReactComponent(Wrapped) { var _this = _possibleConstructorReturn(this, (Proxy.__proto__ || Object.getPrototypeOf(Proxy)).call(this, props)); _this.getInstance = function () { - if (_this.props.getInstance) { - _this.props.getInstance(_this.wrapped.instance); + var getInstance = _this.props.getInstance; + + if (getInstance) { + getInstance(_this.wrapped.instance); } }; diff --git a/lib/components/Service/LocalSearch.js b/lib/components/Service/LocalSearch.js index 7a34a36..c558fc6 100644 --- a/lib/components/Service/LocalSearch.js +++ b/lib/components/Service/LocalSearch.js @@ -20,8 +20,6 @@ var _util = require('../_base/util'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } 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; } @@ -40,8 +38,6 @@ var LocalSearch = (0, _ReactComponent2.default)(_class = function (_BaseService) _createClass(LocalSearch, [{ key: 'init', value: function init() { - var _ref; - var _props = this.props, _props$location = _props.location, location = _props$location === undefined ? this.map : _props$location, @@ -61,15 +57,19 @@ var LocalSearch = (0, _ReactComponent2.default)(_class = function (_BaseService) _location = (0, _util.getPoint)(_location.lng, _location.lat); } - this.instance = new global.BMap.LocalSearch(_location, (_ref = { + this.instance = new global.BMap.LocalSearch(_location, { onMarkersSet: onMarkersSet, - onInfoHtmlSet: onInfoHtmlSet - }, _defineProperty(_ref, 'onInfoHtmlSet', onInfoHtmlSet), _defineProperty(_ref, 'onResultsHtmlSet', onResultsHtmlSet), _defineProperty(_ref, 'pageCapacity', pageCapacity), _defineProperty(_ref, 'onSearchComplete', onSearchComplete), _defineProperty(_ref, 'renderOptions', { - map: showInMap ? this.map : null, - panel: renderOptions.panel, - selectFirstResult: renderOptions.selectFirstResult, - autoViewport: renderOptions.autoViewport - }), _ref)); + onInfoHtmlSet: onInfoHtmlSet, + onResultsHtmlSet: onResultsHtmlSet, + pageCapacity: pageCapacity, + onSearchComplete: onSearchComplete, + renderOptions: { + map: showInMap ? this.map : null, + panel: renderOptions.panel, + selectFirstResult: renderOptions.selectFirstResult, + autoViewport: renderOptions.autoViewport + } + }); } }]); diff --git a/lib/components/_base/util.js b/lib/components/_base/util.js index 3c27cd6..9da926d 100644 --- a/lib/components/_base/util.js +++ b/lib/components/_base/util.js @@ -15,12 +15,12 @@ exports.getMapBounds = getMapBounds; exports.bindEvents = bindEvents; exports.unBindEvents = unBindEvents; exports.createIcon = createIcon; +exports.processSetOptions = processSetOptions; +exports.processBooleanOptions = processBooleanOptions; exports.createLabel = createLabel; exports.createSymbol = createSymbol; exports.createContextMenu = createContextMenu; exports.createPolygon = createPolygon; -exports.processSetOptions = processSetOptions; -exports.processBooleanOptions = processBooleanOptions; exports.isSupportContext = isSupportContext; exports.isSupportCanvas = isSupportCanvas; exports.appendCss = appendCss; @@ -99,7 +99,8 @@ function bindEvents(target, eventKey, events) { } function unBindEvents(target) { - var events = target.events; + var events = target.events.events; + if (events) { var eventNames = Object.keys(events); for (var i = 0; i < eventNames.length; i += 1) { @@ -119,7 +120,7 @@ function createIcon() { var iconSize = size && getSize(size.width, size.height); return new global.BMap.Icon(url, iconSize, { - anchor: opts.anchor && global[anchor], + anchor: opts.anchor && global[opts.anchor], imageSize: opts.imageSize && getSize(opts.imageSize.width, opts.imageSize.height), imageOffset: opts.imageOffset && getSize(opts.imageOffset.width, opts.imageOffset.height), infoWindowAnchor: opts.infoWindowAnchor && getSize(opts.infoWindowAnchor.width, opts.infoWindowAnchor.height), @@ -127,6 +128,28 @@ function createIcon() { }); } +function processSetOptions(target, optionKey, opts) { + OPTIONS[optionKey].forEach(function (key) { + if (opts[key] || typeof opts[key] === 'boolean') { + var upKey = replaceInitialToUpper(key); + target['set' + upKey](opts[key]); + } + }); +} + +function processBooleanOptions(target, optionKey, opts) { + OPTIONS[optionKey].forEach(function (key) { + if (opts[key] || typeof opts[key] === 'boolean') { + var upKey = replaceInitialToUpper(key); + var prefix = 'disable'; + if (opts[key]) { + prefix = 'enable'; + } + target['' + prefix + upKey](); + } + }); +} + function createLabel() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var content = options.content, @@ -176,7 +199,7 @@ function createContextMenu() { var menu = new global.BMap.ContextMenu(); items.forEach(function (item) { - var iconUrl = item.iconUrl === _ContextMenuIcon2.default.ZOOMIN || item.iconUrl === _ContextMenuIcon2.default.ZOOMOUT ? global[item.iconUrl] : iconUrl; + var iconUrl = item.iconUrl === _ContextMenuIcon2.default.ZOOMIN || item.iconUrl === _ContextMenuIcon2.default.ZOOMOUT ? global[item.iconUrl] : item.iconUrl; var itemOpts = { width: item.width, id: item.id, @@ -243,28 +266,6 @@ function createPolygon(props) { return instance; } -function processSetOptions(target, optionKey, opts) { - OPTIONS[optionKey].forEach(function (key) { - if (opts[key] || typeof opts[key] === "boolean") { - var upKey = replaceInitialToUpper(key); - target['set' + upKey](opts[key]); - } - }); -} - -function processBooleanOptions(target, optionKey, opts) { - OPTIONS[optionKey].forEach(function (key) { - if (opts[key] || typeof opts[key] === "boolean") { - var upKey = replaceInitialToUpper(key); - var prefix = 'disable'; - if (opts[key]) { - prefix = 'enable'; - } - target['' + prefix + upKey](); - } - }); -} - function isSupportContext() { return !!document.createElement('canvas').getContext; } @@ -276,18 +277,18 @@ function isSupportCanvas() { function appendCss() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var url = options.url, + id = options.id; - var url = options.url; - var id = options.id; - var node = document.createElement("link"); + var node = document.createElement('link'); - node.rel = "stylesheet"; - node.type = "text/css"; + node.rel = 'stylesheet'; + node.type = 'text/css'; node.href = url; - if (typeof id !== "undefined") { + if (typeof id !== 'undefined') { node.id = id; } - document.getElementsByTagName("head")[0].appendChild(node); + document.getElementsByTagName('head')[0].appendChild(node); } function getPoiByKeyword(keyword) { @@ -311,9 +312,9 @@ function convertPoint(points, from) { return new Promise(function (resolve) { var convert = new global.BMap.Convertor(); if (!Array.isArray(points)) { - point = [points]; + points = [points]; } - var pList = point.map(function (item) { + var pList = points.map(function (item) { return getPoint(item.lng, item.lat); }); convert.translate(pList, from, to, function (result) { diff --git a/package.json b/package.json index c314cc2..0fe539c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-bmap", - "version": "0.1.5", + "version": "0.1.6", "main": "lib/index.js", "typings": "types/index.d.ts", "repository": { @@ -35,11 +35,17 @@ "@types/react": "^16.4.9", "babel-cli": "^6.26.0", "babel-core": "^6.26.3", + "babel-eslint": "^8.2.6", "babel-loader": "^7.1.5", "babel-plugin-transform-decorators-legacy": "^1.3.5", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", + "eslint": "^5.3.0", + "eslint-config-airbnb": "^17.1.0", + "eslint-plugin-import": "^2.14.0", + "eslint-plugin-jsx-a11y": "^6.1.1", + "eslint-plugin-react": "^7.11.0", "react": "^16.4.1", "react-dom": "^16.4.1", "webpack": "^3.0.0", diff --git a/src/components/Control/Copyright.js b/src/components/Control/Copyright.js index f35cd22..f2506d9 100644 --- a/src/components/Control/Copyright.js +++ b/src/components/Control/Copyright.js @@ -24,7 +24,7 @@ class Copyright extends BaseControl { this.instance.addCopyright({ id: 1, content, - bounds: global.bMapInstance.getBounds() + bounds: global.bMapInstance.getBounds(), }); this.map.addControl(this.instance); } diff --git a/src/components/Control/Geolocation.js b/src/components/Control/Geolocation.js index c5c6fda..25e0c0b 100644 --- a/src/components/Control/Geolocation.js +++ b/src/components/Control/Geolocation.js @@ -18,7 +18,6 @@ class Geolocation extends BaseControl { events, } = this.props; - const opts = { anchor: global[anchor], offset: getSize(offset.width, offset.height), diff --git a/src/components/Control/MapType.js b/src/components/Control/MapType.js index 06832e1..47a4c49 100644 --- a/src/components/Control/MapType.js +++ b/src/components/Control/MapType.js @@ -18,15 +18,13 @@ class MapType extends BaseControl { mapTypes = [MAP_TYPE.NORMAL, MAP_TYPE.PERSPECTIVE, MAP_TYPE.SATELLITE, MAP_TYPE.HYBRID], } = this.props; - const types = mapTypes.map((item) => { - return global[item]; - }); - + const types = mapTypes.map(item => global[item]); + const opts = { anchor: global[anchor], offset: getSize(offset.width, offset.height), type: global[type], - mapTypes: types + mapTypes: types, }; this.instance = new global.BMap.MapTypeControl(opts); diff --git a/src/components/Control/Panorama.js b/src/components/Control/Panorama.js index 0f00f5f..71d915d 100644 --- a/src/components/Control/Panorama.js +++ b/src/components/Control/Panorama.js @@ -4,7 +4,7 @@ import ANCHOR from '../../constants/ControlAnchor'; import ReactComponent from '../ReactComponent'; @ReactComponent -class Panorama extends BaseControl{ +class Panorama extends BaseControl { init() { const { anchor = ANCHOR.TOP_RIGHT, diff --git a/src/components/Control/Scale.js b/src/components/Control/Scale.js index ff46578..0ec8254 100644 --- a/src/components/Control/Scale.js +++ b/src/components/Control/Scale.js @@ -6,7 +6,6 @@ import BaseControl from './BaseControl'; @ReactComponent class Scale extends BaseControl { - init() { const { anchor = CONTROL_ANCHOR.TOP_LEFT, diff --git a/src/components/Control/index.js b/src/components/Control/index.js index 1537a3a..2aaa1f6 100644 --- a/src/components/Control/index.js +++ b/src/components/Control/index.js @@ -3,13 +3,12 @@ import { getSize } from '../_base/util'; import BaseControl from './BaseControl'; import CONTROL_ANCHOR from '../../constants/ControlAnchor'; -const BaseCtrl = function(defaultAnchor, defaultOffset) { +const BaseCtrl = function (defaultAnchor, defaultOffset) { this.defaultAnchor = defaultAnchor; this.defaultOffset = defaultOffset; }; class Control extends BaseControl { - init() { const { anchor = CONTROL_ANCHOR.TOP_LEFT, @@ -30,7 +29,9 @@ class Control extends BaseControl { initialize() { // // 创建一个DOM元素 - const container = this.container = document.createElement('div'); + const container = document.createElement('div'); + this.container = container; + if (this.render) { reactRender(this.render(), container); } diff --git a/src/components/Lib/CurveLine.js b/src/components/Lib/CurveLine.js index 709cb21..16f65e2 100644 --- a/src/components/Lib/CurveLine.js +++ b/src/components/Lib/CurveLine.js @@ -1,11 +1,12 @@ +/* eslint-disable */ +import { default as BCurveLine } from 'bmaplib.curveline'; +/* eslint-enable */ import BaseOverlay from '../Overlay/BaseOverlay'; import { getPoint, bindEvents } from '../_base/util'; import ReactComponent from '../ReactComponent'; -import { default as BCurveLine } from 'bmaplib.curveline'; @ReactComponent class CurveLine extends BaseOverlay { - init() { const { points, @@ -31,11 +32,9 @@ class CurveLine extends BaseOverlay { let pList = []; if (points) { - pList = points.map((item) => { - return getPoint(item.lng, item.lat); - }); + pList = points.map(item => getPoint(item.lng, item.lat)); } - + this.instance = new BCurveLine(pList, opts); this.map.addOverlay(this.instance); diff --git a/src/components/Lib/DistanceTool.js b/src/components/Lib/DistanceTool.js index b7ed9ca..a5cffee 100644 --- a/src/components/Lib/DistanceTool.js +++ b/src/components/Lib/DistanceTool.js @@ -7,7 +7,7 @@ class DistanceTool extends BaseOverlay { init() { const { events, - ...opts, + ...opts } = this.props; const BDistanceTool = require('../../libs/DistanceTool.js'); diff --git a/src/components/Lib/DrawingManager.js b/src/components/Lib/DrawingManager.js index c43ea8d..0e6fd69 100644 --- a/src/components/Lib/DrawingManager.js +++ b/src/components/Lib/DrawingManager.js @@ -7,26 +7,26 @@ import ControlAnchor from '../../constants/ControlAnchor'; class DrawingManager extends BaseOverlay { constructor(props) { appendCss({ - url: 'http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css' + url: 'http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css', }); super(props); } init() { const defaultStyle = { - strokeColor:"red", //边线颜色。 - fillColor:"red", //填充颜色。当参数为空时,圆形将没有填充效果。 - strokeWeight: 3, //边线的宽度,以像素为单位。 - strokeOpacity: 0.8, //边线透明度,取值范围0 - 1。 - fillOpacity: 0.6, //填充的透明度,取值范围0 - 1。 - strokeStyle: 'solid' //边线的样式,solid或dashed。 + strokeColor: 'red', // 边线颜色。 + fillColor: 'red', // 填充颜色。当参数为空时,圆形将没有填充效果。 + strokeWeight: 3, // 边线的宽度,以像素为单位。 + strokeOpacity: 0.8, // 边线透明度,取值范围0 - 1。 + fillOpacity: 0.6, // 填充的透明度,取值范围0 - 1。 + strokeStyle: 'solid', // 边线的样式,solid或dashed。 }; const { anchor = ControlAnchor.TOP_RIGHT, offset = { width: 10, - height: 10 + height: 10, }, circleOptions = defaultStyle, polylineOptions = defaultStyle, diff --git a/src/components/Lib/Heatmap.js b/src/components/Lib/Heatmap.js index 51691a9..a5489bf 100644 --- a/src/components/Lib/Heatmap.js +++ b/src/components/Lib/Heatmap.js @@ -1,11 +1,12 @@ +/* eslint-disable */ +import { default as BHeatmap } from 'bmaplib.heatmap'; +/* eslint-enable */ import BaseOverlay from '../Overlay/BaseOverlay'; import { isSupportCanvas } from '../_base/util'; import ReactComponent from '../ReactComponent'; -import { default as BHeatmap } from 'bmaplib.heatmap'; @ReactComponent class Heatmap extends BaseOverlay { - init() { if (!isSupportCanvas()) { this.instance = null; @@ -25,7 +26,7 @@ class Heatmap extends BaseOverlay { radius, gradient, }; - + this.instance = new BHeatmap(opts); this.map.addOverlay(this.instance); diff --git a/src/components/Lib/MarkerClusterer.js b/src/components/Lib/MarkerClusterer.js index c9ca83f..47d52ed 100644 --- a/src/components/Lib/MarkerClusterer.js +++ b/src/components/Lib/MarkerClusterer.js @@ -1,11 +1,12 @@ +/* eslint-disable */ +import { default as BMarkerClusterer } from 'bmaplib.markerclusterer'; +/* eslint-enable */ import BaseOverlay from '../Overlay/BaseOverlay'; import { getSize, getPoint } from '../_base/util'; import ReactComponent from '../ReactComponent'; -import { default as BMarkerClusterer } from 'bmaplib.markerclusterer' @ReactComponent class MarkerClusterer extends BaseOverlay { - init() { const { children, @@ -17,8 +18,8 @@ class MarkerClusterer extends BaseOverlay { } = this.props; const childrenMakers = children && !Array.isArray(children) ? [children] : children; const markers = []; - const Marker = global.BMap.Marker; - childrenMakers.map((m) => { + const { Marker } = global.BMap.Marker; + childrenMakers.forEach((m) => { const { point, ...markerOpts } = m.props; markers.push(new Marker(getPoint(point.lng, point.lat), markerOpts)); }); @@ -27,14 +28,14 @@ class MarkerClusterer extends BaseOverlay { gridSize, maxZoom, minClusterSize, - styles: styles.map(item => { + styles: styles.map((item) => { item.size = getSize(item.size.width, item.size.height); return item; }), isAverageCenter: averageCenter, markers, }; - + this.instance = new BMarkerClusterer(this.map, opts); } diff --git a/src/components/Lib/TrafficControl.js b/src/components/Lib/TrafficControl.js index de1fe66..2bbf6d8 100644 --- a/src/components/Lib/TrafficControl.js +++ b/src/components/Lib/TrafficControl.js @@ -7,7 +7,7 @@ import BaseControl from '../Control/BaseControl'; class TrafficControl extends BaseControl { constructor(props) { appendCss({ - url: 'http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css' + url: 'http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.css', }); super(props); } @@ -19,7 +19,7 @@ class TrafficControl extends BaseControl { const BTrafficControl = require('../../libs/TrafficControl.js'); this.instance = new BTrafficControl({ - showPanel: false + showPanel: false, }); this.map.addControl(this.instance); diff --git a/src/components/Map/index.js b/src/components/Map/index.js index ed289be..2db4a67 100644 --- a/src/components/Map/index.js +++ b/src/components/Map/index.js @@ -1,22 +1,21 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { +import { getPoint, isPoint, bindEvents, processSetOptions, createContextMenu, processBooleanOptions, - unBindEvents + unBindEvents, } from '../_base/util'; const fillStyle = { width: '100%', - height: '100%' + height: '100%', }; export default class Map extends React.Component { - static defaultProps = { placeHolder: '地图加载中...', // 与官方文档保持一致 @@ -69,7 +68,7 @@ export default class Map extends React.Component { constructor(props) { super(props); - this.defaultCenter = { lng: 116.404, lat: 39.915 } + this.defaultCenter = { lng: 116.404, lat: 39.915 }; // React 16 if (React.createRef) { this.mapContainerRef = React.createRef(); @@ -80,24 +79,50 @@ export default class Map extends React.Component { } } + componentDidMount() { + const { ak } = this.props; + if (ak) { + this.getMapScript().then(this.init); + } else if (global.BMap) { + this.init(global.BMap); + } else { + console.warn('BMap is undefined'); + } + } + + componentWillReceiveProps(nextProps) { + const { map } = this; + if (map) { + const props = this.processProps(nextProps); + this.processMapOptions(props); + this.processContextMenu(props.contextMenu); + unBindEvents(map); + if (props.events) bindEvents(map, 'MAP', props.events); + } + } + init = (BMap) => { - const { highResolution, autoResize, mapClick, mapMounted, contextMenu, ...resetProps } = this.props; + const { + highResolution, autoResize, mapClick, mapMounted, contextMenu, events, ...resetProps + } = this.props; this.mapContainer = this.mapContainer || this.mapContainerRef.current; - const map = this.map = new BMap.Map(this.mapContainer, { + const map = new BMap.Map(this.mapContainer, { enableHighResolution: highResolution, enableAutoResize: autoResize, enableMapClick: mapClick, }); + + this.map = map; // 当初始化center为string时,保证地图正常渲染,用默认center处理centerAndZoom - if (typeof resetProps.center === "string") { + if (typeof resetProps.center === 'string') { map.centerAndZoom(this.defaultCenter, resetProps.zoom); } this.processContextMenu(contextMenu); global.bMapInstance = map; this.processMapOptions(resetProps); - bindEvents(map, 'MAP', this.props.events); - + bindEvents(map, 'MAP', events); + // 地图配置完成后,强制刷新,渲染子组件 this.forceUpdate(() => { if (mapMounted) { @@ -120,9 +145,9 @@ export default class Map extends React.Component { const { map } = this; processSetOptions(map, 'MAP_SET_OPTIONS', props); processBooleanOptions(map, 'MAP_BOOLEAN_OPTIONS', props); - + if (props.center) { - let center = props.center; + let { center } = props.center; if (isPoint(center)) { center = getPoint(center.lng, center.lat); } @@ -142,7 +167,9 @@ export default class Map extends React.Component { const { ak } = this.props; global.BMap = global.BMap || {}; if (Object.keys(global.BMap).length === 0) { - global.BMap._preloader = new Promise((resolve, reject) => { + global.BMap._preloader = new Promise((resolve) => { + const $script = document.createElement('script'); + global.document.body.appendChild($script); global._initBaiduMap = function initBaiduMap() { resolve(global.BMap); global.document.body.removeChild($script); @@ -150,48 +177,26 @@ export default class Map extends React.Component { global._initBaiduMap = null; }; - const $script = document.createElement('script'); - global.document.body.appendChild($script); $script.src = `https://api.map.baidu.com/api?v=3.0&ak=${ak}&callback=_initBaiduMap`; }); return global.BMap._preloader; - } else if (!global.BMap._preloader) { + } if (!global.BMap._preloader) { return Promise.resolve(global.BMap); } return global.BMap._preloader; } - componentDidMount() { - const { ak } = this.props; - if (ak) { - this.getMapScript().then(this.init); - } else if (global.BMap) { - this.init(global.BMap); - } else { - console.warn('BMap is undefined'); - } - } - - componentWillReceiveProps(nextProps) { - const { map } = this; - if (map) { - const props = this.processProps(nextProps); - this.processMapOptions(props); - this.processContextMenu(props.contextMenu); - unBindEvents(map); - props.events && bindEvents(map, 'MAP', props.events); - } - } processProps(nextProps) { - let props = Object.assign({}, nextProps); - if (JSON.stringify(props.center) === JSON.stringify(this.props.center)) { + const { center, zoom } = this.props; + const props = Object.assign({}, nextProps); + if (JSON.stringify(props.center) === JSON.stringify(center)) { delete props.center; } - if (props.zoom === this.props.zoom) { - delete props.zoom + if (props.zoom === zoom) { + delete props.zoom; } return props; } diff --git a/src/components/Overlay/BaseOverlay.js b/src/components/Overlay/BaseOverlay.js index c8d3133..c09f40a 100644 --- a/src/components/Overlay/BaseOverlay.js +++ b/src/components/Overlay/BaseOverlay.js @@ -1,6 +1,5 @@ import { render as reactRender } from 'react-dom'; -import { getPoint } from '../_base/util'; class BaseOverlay { constructor(props) { diff --git a/src/components/Overlay/Boundary.js b/src/components/Overlay/Boundary.js index ef5278b..0539ea6 100644 --- a/src/components/Overlay/Boundary.js +++ b/src/components/Overlay/Boundary.js @@ -9,39 +9,40 @@ class Boundary extends BaseOverlay { name, onError, autoViewport, - ...polygonOpts, + ...polygonOpts } = this.props; - this.getBoundary(name) - .then((points) => { - polygonOpts.points = points; - this.instance = createPolygon(polygonOpts) - this.map.addOverlay(this.instance); - if (autoViewport) { - points = points.map(item => getPoint(item.lng, item.lat)); - this.map.setViewport(points); - } - }).catch((msg) => { - if (onError) { - onError(msg); - } - }); + this.getBoundary() + .then((points) => { + polygonOpts.points = points; + this.instance = createPolygon(polygonOpts); + this.map.addOverlay(this.instance); + if (autoViewport) { + points = points.map(item => getPoint(item.lng, item.lat)); + this.map.setViewport(points); + } + }).catch((msg) => { + if (onError) { + onError(msg); + } + }); } - getBoundary(name) { + getBoundary() { + const { name } = this.props; return new Promise((resolve, reject) => { const boundary = new global.BMap.Boundary(); boundary.get(name, (res) => { const count = res.boundaries.length; if (count === 0) { - reject('未能获取当前输入行政区域'); + reject(); } const points = res.boundaries[0].split(';').map((item) => { const pointArr = item.split(','); return { lng: pointArr[0], - lat: pointArr[1] + lat: pointArr[1], }; }); resolve(points); diff --git a/src/components/Overlay/Circle.js b/src/components/Overlay/Circle.js index e4bff9f..9c577c9 100644 --- a/src/components/Overlay/Circle.js +++ b/src/components/Overlay/Circle.js @@ -34,12 +34,12 @@ class Circle extends BaseOverlay { this.instance = new global.BMap.Circle(getPoint(point.lng, point.lat), radius, opts); this.map.addOverlay(this.instance); - + const booleanOpts = { editing, massClear, }; - processBooleanOptions(this.instance, 'CIRCLE_BOOLEAN_OPTIONS', booleanOpts) + processBooleanOptions(this.instance, 'CIRCLE_BOOLEAN_OPTIONS', booleanOpts); bindEvents(this.instance, 'CIRCLE', events); } } diff --git a/src/components/Overlay/InfoWindow.js b/src/components/Overlay/InfoWindow.js index a85522b..20d1f0a 100644 --- a/src/components/Overlay/InfoWindow.js +++ b/src/components/Overlay/InfoWindow.js @@ -1,5 +1,5 @@ import BaseOverlay from './BaseOverlay'; -import { bindEvents, getSize } from '../_base/util'; +import { bindEvents, getSize, getPoint } from '../_base/util'; import ReactComponent from '../ReactComponent'; @ReactComponent diff --git a/src/components/Overlay/Marker.js b/src/components/Overlay/Marker.js index d4b810b..098fd1f 100644 --- a/src/components/Overlay/Marker.js +++ b/src/components/Overlay/Marker.js @@ -1,5 +1,7 @@ import BaseOverlay from './BaseOverlay'; -import { getPoint, getSize, bindEvents, createLabel, createIcon, processSetOptions, createContextMenu } from '../_base/util'; +import { + getPoint, getSize, bindEvents, createLabel, createIcon, processSetOptions, createContextMenu, +} from '../_base/util'; import ReactComponent from '../ReactComponent'; @ReactComponent @@ -9,7 +11,7 @@ class Marker extends BaseOverlay { point, offset = { width: 0, - height: 0 + height: 0, }, icon, massClear = true, @@ -39,7 +41,7 @@ class Marker extends BaseOverlay { rotation, title, }; - + this.instance = new global.BMap.Marker(oPoint, markerOpts); this.map.addOverlay(this.instance); @@ -68,7 +70,7 @@ class Marker extends BaseOverlay { } processContextMenu() { - const { contextMenu } = this.props + const { contextMenu } = this.props; if (contextMenu) { const menu = createContextMenu(contextMenu.items, contextMenu.events); this.instance.addContextMenu(menu); diff --git a/src/components/Overlay/PointCollection.js b/src/components/Overlay/PointCollection.js index 86291c1..17f0ba6 100644 --- a/src/components/Overlay/PointCollection.js +++ b/src/components/Overlay/PointCollection.js @@ -18,21 +18,19 @@ class PointCollection extends BaseOverlay { } = this.props; const opts = { - shape: shape && top[shape], + shape: shape && global[shape], color, - size: size && top[size], + size: size && global[size], }; let pList = []; if (points && Array.isArray(points)) { - pList = points.map((item) => { - return getPoint(item.lng, item.lat); - }); + pList = points.map(item => getPoint(item.lng, item.lat)); } - + this.instance = new global.BMap.PointCollection(pList, opts); this.map.addOverlay(this.instance); - + bindEvents(this.instance, 'POINT_COLLECTION', events); } } diff --git a/src/components/Overlay/Polyline.js b/src/components/Overlay/Polyline.js index 84d7c22..73bc477 100644 --- a/src/components/Overlay/Polyline.js +++ b/src/components/Overlay/Polyline.js @@ -27,11 +27,9 @@ class Polyline extends BaseOverlay { let pList = []; if (points) { - pList = points.map((item) => { - return getPoint(item.lng, item.lat); - }); + pList = points.map(item => getPoint(item.lng, item.lat)); } - + this.instance = new global.BMap.Polyline(pList, opts); this.map.addOverlay(this.instance); diff --git a/src/components/Overlay/Symbol.js b/src/components/Overlay/Symbol.js index 567481a..ef36cfc 100644 --- a/src/components/Overlay/Symbol.js +++ b/src/components/Overlay/Symbol.js @@ -18,7 +18,7 @@ class Symbol extends Marker { strokeColor, strokeOpacity, strokeWeight, - ...markerProps, + ...markerProps } = props; markerProps.icon = createSymbol({ @@ -32,9 +32,9 @@ class Symbol extends Marker { strokeColor, strokeOpacity, strokeWeight, - } + }, }); - + super(markerProps); } } diff --git a/src/components/Overlay/index.js b/src/components/Overlay/index.js index 518dd65..4e157e4 100644 --- a/src/components/Overlay/index.js +++ b/src/components/Overlay/index.js @@ -3,9 +3,8 @@ import BaseOverlay from './BaseOverlay'; import { getPoint } from '../_base/util'; import MAP_PANE from '../../constants/MapPane'; -const BOverlay = function() {} +const BOverlay = function Empty() {}; class Overlay extends BaseOverlay { - init() { if (!BOverlay.prototype.initialize) { BOverlay.prototype = new global.BMap.Overlay(); @@ -22,7 +21,9 @@ class Overlay extends BaseOverlay { pane = MAP_PANE.MARKER, zIndex, } = this.props; - const container = this.container = document.createElement('div'); + const container = document.createElement('div'); + this.container = container; + if (zIndex) { container.style.zIndex = zIndex; } @@ -35,7 +36,7 @@ class Overlay extends BaseOverlay { } draw() { - const { container, props } = this;; + const { container, props } = this; const { point } = props; const position = this.map.pointToOverlayPixel(getPoint(point.lng, point.lat)); container.style.left = `${position.x - (container.offsetWidth / 2)}px`; diff --git a/src/components/ReactComponent/index.js b/src/components/ReactComponent/index.js index a2b896e..25e8ec4 100644 --- a/src/components/ReactComponent/index.js +++ b/src/components/ReactComponent/index.js @@ -17,16 +17,17 @@ export default function ReactComponent(Wrapped) { } } - getInstance = () => { - if (this.props.getInstance) { - this.props.getInstance(this.wrapped.instance); - } - } - componentWillUnmount() { this.wrapped.destroy(); } + getInstance = () => { + const { getInstance } = this.props; + if (getInstance) { + getInstance(this.wrapped.instance); + } + } + render() { return null; } diff --git a/src/components/Service/LocalSearch.js b/src/components/Service/LocalSearch.js index 3877abb..4ab8f82 100644 --- a/src/components/Service/LocalSearch.js +++ b/src/components/Service/LocalSearch.js @@ -24,7 +24,6 @@ class LocalSearch extends BaseService { this.instance = new global.BMap.LocalSearch(_location, { onMarkersSet, onInfoHtmlSet, - onInfoHtmlSet, onResultsHtmlSet, pageCapacity, onSearchComplete, diff --git a/src/components/_base/events.js b/src/components/_base/events.js index ed10317..16de2c6 100644 --- a/src/components/_base/events.js +++ b/src/components/_base/events.js @@ -130,7 +130,7 @@ export const CONTEXT_MENU = [ export const AUTO_COMPLETE = [ 'onconfirm', - 'onhighlight' + 'onhighlight', ]; export const DRAWING_MANAGER = [ diff --git a/src/components/_base/util.js b/src/components/_base/util.js index 8be5755..8adb8f8 100644 --- a/src/components/_base/util.js +++ b/src/components/_base/util.js @@ -46,7 +46,7 @@ export function bindEvents(target, eventKey, events) { } export function unBindEvents(target) { - const events = target.events; + const { events } = target.events; if (events) { const eventNames = Object.keys(events); for (let i = 0; i < eventNames.length; i += 1) { @@ -59,23 +59,46 @@ export function unBindEvents(target) { export function createIcon(options = {}) { const { url, size, opts = {} } = options; - let iconSize = size && getSize(size.width, size.height); + const iconSize = size && getSize(size.width, size.height); return new global.BMap.Icon(url, iconSize, { - anchor: opts.anchor && global[anchor], + anchor: opts.anchor && global[opts.anchor], imageSize: opts.imageSize && getSize(opts.imageSize.width, opts.imageSize.height), imageOffset: opts.imageOffset && getSize(opts.imageOffset.width, opts.imageOffset.height), - infoWindowAnchor: opts.infoWindowAnchor && getSize(opts.infoWindowAnchor.width, opts.infoWindowAnchor.height), + infoWindowAnchor: opts.infoWindowAnchor + && getSize(opts.infoWindowAnchor.width, opts.infoWindowAnchor.height), printImageUrl: opts.printImageUrl, }); } +export function processSetOptions(target, optionKey, opts) { + OPTIONS[optionKey].forEach((key) => { + if (opts[key] || typeof opts[key] === 'boolean') { + const upKey = replaceInitialToUpper(key); + target[`set${upKey}`](opts[key]); + } + }); +} + +export function processBooleanOptions(target, optionKey, opts) { + OPTIONS[optionKey].forEach((key) => { + if (opts[key] || typeof opts[key] === 'boolean') { + const upKey = replaceInitialToUpper(key); + let prefix = 'disable'; + if (opts[key]) { + prefix = 'enable'; + } + target[`${prefix}${upKey}`](); + } + }); +} + export function createLabel(options = {}) { const { content, point, offset = { width: 0, - height: 0 + height: 0, }, massClear = true, title, @@ -83,13 +106,13 @@ export function createLabel(options = {}) { zIndex, style, } = options; - + const opts = { offset: offset && getSize(offset.width, offset.height), enableMassClear: massClear, position: point && getPoint(point.lng, point.lat), }; - const label = new global.BMap.Label(content, opts); + const label = new global.BMap.Label(content, opts); bindEvents(label, 'LABEL', events); const setOpts = { title, @@ -97,7 +120,7 @@ export function createLabel(options = {}) { style, }; processSetOptions(label, 'LABEL_SET_OPTIONS', setOpts); - return label + return label; } export function createSymbol(options = {}) { @@ -111,7 +134,8 @@ export function createSymbol(options = {}) { export function createContextMenu(items = [], events) { const menu = new global.BMap.ContextMenu(); items.forEach((item) => { - const iconUrl = (item.iconUrl === ContextMenuIcon.ZOOMIN) || (item.iconUrl === ContextMenuIcon.ZOOMOUT) ? global[item.iconUrl] : iconUrl; + const iconUrl = (item.iconUrl === ContextMenuIcon.ZOOMIN) + || (item.iconUrl === ContextMenuIcon.ZOOMOUT) ? global[item.iconUrl] : item.iconUrl; const itemOpts = { width: item.width, id: item.id, @@ -159,11 +183,9 @@ export function createPolygon(props) { let pList = []; if (points) { - pList = points.map((item) => { - return getPoint(item.lng, item.lat); - }); + pList = points.map(item => getPoint(item.lng, item.lat)); } - + const instance = new global.BMap.Polygon(pList, opts); const booleanOpts = { @@ -176,28 +198,6 @@ export function createPolygon(props) { return instance; } -export function processSetOptions(target, optionKey, opts) { - OPTIONS[optionKey].forEach((key) => { - if (opts[key] || typeof opts[key] === "boolean") { - const upKey = replaceInitialToUpper(key); - target[`set${upKey}`](opts[key]); - } - }); -} - -export function processBooleanOptions(target, optionKey, opts) { - OPTIONS[optionKey].forEach((key) => { - if (opts[key] || typeof opts[key] === "boolean") { - const upKey = replaceInitialToUpper(key); - let prefix = 'disable'; - if (opts[key]) { - prefix = 'enable'; - } - target[`${prefix}${upKey}`](); - } - }); -} - export function isSupportContext() { return !!(document.createElement('canvas').getContext); } @@ -208,17 +208,16 @@ export function isSupportCanvas() { } export function appendCss(options = {}) { - const url = options.url; - const id = options.id; - const node = document.createElement("link"); + const { url, id } = options; + const node = document.createElement('link'); - node.rel = "stylesheet"; - node.type = "text/css"; + node.rel = 'stylesheet'; + node.type = 'text/css'; node.href = url; - if( typeof id !== "undefined" ){ - node.id = id; + if (typeof id !== 'undefined') { + node.id = id; } - document.getElementsByTagName("head")[0].appendChild(node); + document.getElementsByTagName('head')[0].appendChild(node); } export function getPoiByKeyword(keyword) { @@ -230,7 +229,7 @@ export function getPoiByKeyword(keyword) { res = result.getPoi(0); } resolve(res); - } + }, }); local.search(keyword); }); @@ -240,9 +239,9 @@ export function convertPoint(points, from, to = 5) { return new Promise((resolve) => { const convert = new global.BMap.Convertor(); if (!Array.isArray(points)) { - point = [points]; + points = [points]; } - const pList = point.map(item => getPoint(item.lng, item.lat)); + const pList = points.map(item => getPoint(item.lng, item.lat)); convert.translate(pList, from, to, (result) => { resolve(result); }); diff --git a/src/index.js b/src/index.js index 8b911eb..3683f94 100644 --- a/src/index.js +++ b/src/index.js @@ -82,4 +82,6 @@ export { default as DrawingMode } from './constants/DrawingMode'; /** * 工具方法 */ -export { getMapBounds, getBounds, getPoiByKeyword, convertPoint } from './components/_base/util'; +export { + getMapBounds, getBounds, getPoiByKeyword, convertPoint, +} from './components/_base/util'; diff --git a/yarn.lock b/yarn.lock index 2bb9463..9fd513f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,82 @@ # yarn lockfile v1 +"@babel/code-frame@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" + dependencies: + "@babel/highlight" "7.0.0-beta.44" + +"@babel/generator@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/generator/download/@babel/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42" + dependencies: + "@babel/types" "7.0.0-beta.44" + jsesc "^2.5.1" + lodash "^4.2.0" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.44" + "@babel/template" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-get-function-arity@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/helper-split-export-declaration@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/helper-split-export-declaration/download/@babel/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc" + dependencies: + "@babel/types" "7.0.0-beta.44" + +"@babel/highlight@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/highlight/download/@babel/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/template@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/template/download/@babel/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + lodash "^4.2.0" + +"@babel/traverse@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/generator" "7.0.0-beta.44" + "@babel/helper-function-name" "7.0.0-beta.44" + "@babel/helper-split-export-declaration" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + debug "^3.1.0" + globals "^11.1.0" + invariant "^2.2.0" + lodash "^4.2.0" + +"@babel/types@7.0.0-beta.44": + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/@babel/types/download/@babel/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + "@types/prop-types@*": version "15.5.5" resolved "http://registry.npm.taobao.org/@types/prop-types/download/@types/prop-types-15.5.5.tgz#17038dd322c2325f5da650a94d5f9974943625e3" @@ -32,19 +108,25 @@ acorn-dynamic-import@^2.0.0: dependencies: acorn "^4.0.3" +acorn-jsx@^4.1.1: + version "4.1.1" + resolved "http://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" + dependencies: + acorn "^5.0.3" + acorn@^4.0.3: version "4.0.13" resolved "http://registry.npm.taobao.org/acorn/download/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0: +acorn@^5.0.0, acorn@^5.0.3, acorn@^5.6.0: version "5.7.1" resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" -ajv-keywords@^3.1.0: +ajv-keywords@^3.0.0, ajv-keywords@^3.1.0: version "3.2.0" resolved "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" -ajv@^6.1.0: +ajv@^6.0.1, ajv@^6.1.0, ajv@^6.5.0: version "6.5.2" resolved "http://registry.npm.taobao.org/ajv/download/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" dependencies: @@ -61,6 +143,10 @@ align-text@^0.1.1, align-text@^0.1.3: longest "^1.0.1" repeat-string "^1.5.2" +ansi-escapes@^3.0.0: + version "3.1.0" + resolved "http://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + ansi-html@0.0.7: version "0.0.7" resolved "http://registry.npm.taobao.org/ansi-html/download/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -77,6 +163,12 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +ansi-styles@^3.2.1: + version "3.2.1" + resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + dependencies: + color-convert "^1.9.0" + anymatch@^1.3.0: version "1.3.2" resolved "http://registry.npm.taobao.org/anymatch/download/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -102,6 +194,19 @@ are-we-there-yet@~1.1.2: delegates "^1.0.0" readable-stream "^2.0.6" +argparse@^1.0.7: + version "1.0.10" + resolved "http://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + dependencies: + sprintf-js "~1.0.2" + +aria-query@^3.0.0: + version "3.0.0" + resolved "http://registry.npm.taobao.org/aria-query/download/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" + dependencies: + ast-types-flow "0.0.7" + commander "^2.11.0" + arr-diff@^2.0.0: version "2.0.0" resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -157,6 +262,10 @@ array-unique@^0.3.2: version "0.3.2" resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" +arrify@^1.0.0: + version "1.0.1" + resolved "http://registry.npm.taobao.org/arrify/download/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + asap@~2.0.3: version "2.0.6" resolved "http://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -179,6 +288,10 @@ assign-symbols@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/assign-symbols/download/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" +ast-types-flow@0.0.7, ast-types-flow@^0.0.7: + version "0.0.7" + resolved "http://registry.npm.taobao.org/ast-types-flow/download/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + async-each@^1.0.0: version "1.0.1" resolved "http://registry.npm.taobao.org/async-each/download/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -197,6 +310,12 @@ atob@^2.1.1: version "2.1.1" resolved "http://registry.npm.taobao.org/atob/download/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" +axobject-query@^2.0.1: + version "2.0.1" + resolved "http://registry.npm.taobao.org/axobject-query/download/axobject-query-2.0.1.tgz#05dfa705ada8ad9db993fa6896f22d395b0b0a07" + dependencies: + ast-types-flow "0.0.7" + babel-cli@^6.26.0: version "6.26.0" resolved "http://registry.npm.taobao.org/babel-cli/download/babel-cli-6.26.0.tgz#502ab54874d7db88ad00b887a06383ce03d002f1" @@ -250,6 +369,17 @@ babel-core@^6.26.0, babel-core@^6.26.3: slash "^1.0.0" source-map "^0.5.7" +babel-eslint@^8.2.6: + version "8.2.6" + resolved "http://registry.npm.taobao.org/babel-eslint/download/babel-eslint-8.2.6.tgz#6270d0c73205628067c0f7ae1693a9e797acefd9" + dependencies: + "@babel/code-frame" "7.0.0-beta.44" + "@babel/traverse" "7.0.0-beta.44" + "@babel/types" "7.0.0-beta.44" + babylon "7.0.0-beta.44" + eslint-scope "3.7.1" + eslint-visitor-keys "^1.0.0" + babel-generator@^6.26.0: version "6.26.1" resolved "http://registry.npm.taobao.org/babel-generator/download/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" @@ -909,6 +1039,10 @@ babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" +babylon@7.0.0-beta.44: + version "7.0.0-beta.44" + resolved "http://registry.npm.taobao.org/babylon/download/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d" + babylon@^6.18.0: version "6.18.0" resolved "http://registry.npm.taobao.org/babylon/download/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -1122,6 +1256,16 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +caller-path@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/caller-path/download/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "http://registry.npm.taobao.org/callsites/download/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + camelcase-keys@^2.0.0: version "2.1.0" resolved "http://registry.npm.taobao.org/camelcase-keys/download/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -1162,6 +1306,18 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0, chalk@^2.1.0: + version "2.4.1" + resolved "http://registry.npm.taobao.org/chalk/download/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chardet@^0.4.0: + version "0.4.2" + resolved "http://registry.npm.taobao.org/chardet/download/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" + chokidar@^1.6.1: version "1.7.0" resolved "http://registry.npm.taobao.org/chokidar/download/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" @@ -1207,6 +1363,10 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" +circular-json@^0.3.1: + version "0.3.3" + resolved "http://registry.npm.taobao.org/circular-json/download/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" + class-utils@^0.3.5: version "0.3.6" resolved "http://registry.npm.taobao.org/class-utils/download/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" @@ -1216,6 +1376,16 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + dependencies: + restore-cursor "^2.0.0" + +cli-width@^2.0.0: + version "2.2.0" + resolved "http://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + cliui@^2.1.0: version "2.1.0" resolved "http://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" @@ -1243,6 +1413,16 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" +color-convert@^1.9.0: + version "1.9.2" + resolved "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + +color-name@1.1.1: + version "1.1.1" + resolved "http://registry.npm.taobao.org/color-name/download/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + commander@^2.11.0: version "2.17.0" resolved "http://registry.npm.taobao.org/commander/download/commander-2.17.0.tgz#9d07b25e2a6f198b76d8b756a0e8a9604a6a1a60" @@ -1295,6 +1475,10 @@ constants-browserify@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/constants-browserify/download/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" +contains-path@^0.1.0: + version "0.1.0" + resolved "http://registry.npm.taobao.org/contains-path/download/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + content-disposition@0.5.2: version "0.5.2" resolved "http://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" @@ -1367,6 +1551,16 @@ cross-spawn@^5.0.1: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + crypto-browserify@^3.11.0: version "3.12.0" resolved "http://registry.npm.taobao.org/crypto-browserify/download/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -1399,6 +1593,10 @@ d@1: dependencies: es5-ext "^0.10.9" +damerau-levenshtein@^1.0.4: + version "1.0.4" + resolved "http://registry.npm.taobao.org/damerau-levenshtein/download/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" + date-now@^0.1.4: version "0.1.4" resolved "http://registry.npm.taobao.org/date-now/download/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" @@ -1431,6 +1629,10 @@ deep-extend@^0.6.0: version "0.6.0" resolved "http://registry.npm.taobao.org/deep-extend/download/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" +deep-is@~0.1.3: + version "0.1.3" + resolved "http://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + define-properties@^1.1.2: version "1.1.2" resolved "http://registry.npm.taobao.org/define-properties/download/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" @@ -1457,6 +1659,18 @@ define-property@^2.0.2: is-descriptor "^1.0.2" isobject "^3.0.1" +del@^2.0.2: + version "2.2.2" + resolved "http://registry.npm.taobao.org/del/download/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + del@^3.0.0: version "3.0.0" resolved "http://registry.npm.taobao.org/del/download/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" @@ -1530,6 +1744,19 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" +doctrine@1.5.0: + version "1.5.0" + resolved "http://registry.npm.taobao.org/doctrine/download/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/doctrine/download/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + dependencies: + esutils "^2.0.2" + domain-browser@^1.1.1: version "1.2.0" resolved "http://registry.npm.taobao.org/domain-browser/download/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -1550,6 +1777,10 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^6.5.1: + version "6.5.1" + resolved "http://registry.npm.taobao.org/emoji-regex/download/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" + emojis-list@^2.0.0: version "2.1.0" resolved "http://registry.npm.taobao.org/emojis-list/download/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -1585,7 +1816,7 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.7.0: +es-abstract@^1.10.0, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.12.0" resolved "http://registry.npm.taobao.org/es-abstract/download/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: @@ -1660,7 +1891,7 @@ escape-html@~1.0.3: version "1.0.3" resolved "http://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" -escape-string-regexp@^1.0.2: +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1673,13 +1904,168 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-config-airbnb-base@^13.1.0: + version "13.1.0" + resolved "http://registry.npm.taobao.org/eslint-config-airbnb-base/download/eslint-config-airbnb-base-13.1.0.tgz#b5a1b480b80dfad16433d6c4ad84e6605052c05c" + dependencies: + eslint-restricted-globals "^0.1.1" + object.assign "^4.1.0" + object.entries "^1.0.4" + +eslint-config-airbnb@^17.1.0: + version "17.1.0" + resolved "http://registry.npm.taobao.org/eslint-config-airbnb/download/eslint-config-airbnb-17.1.0.tgz#3964ed4bc198240315ff52030bf8636f42bc4732" + dependencies: + eslint-config-airbnb-base "^13.1.0" + object.assign "^4.1.0" + object.entries "^1.0.4" + +eslint-import-resolver-node@^0.3.1: + version "0.3.2" + resolved "http://registry.npm.taobao.org/eslint-import-resolver-node/download/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" + dependencies: + debug "^2.6.9" + resolve "^1.5.0" + +eslint-module-utils@^2.2.0: + version "2.2.0" + resolved "http://registry.npm.taobao.org/eslint-module-utils/download/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" + dependencies: + debug "^2.6.8" + pkg-dir "^1.0.0" + +eslint-plugin-import@^2.14.0: + version "2.14.0" + resolved "http://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.14.0.tgz#6b17626d2e3e6ad52cfce8807a845d15e22111a8" + dependencies: + contains-path "^0.1.0" + debug "^2.6.8" + doctrine "1.5.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.2.0" + has "^1.0.1" + lodash "^4.17.4" + minimatch "^3.0.3" + read-pkg-up "^2.0.0" + resolve "^1.6.0" + +eslint-plugin-jsx-a11y@^6.1.1: + version "6.1.1" + resolved "http://registry.npm.taobao.org/eslint-plugin-jsx-a11y/download/eslint-plugin-jsx-a11y-6.1.1.tgz#7bf56dbe7d47d811d14dbb3ddff644aa656ce8e1" + dependencies: + aria-query "^3.0.0" + array-includes "^3.0.3" + ast-types-flow "^0.0.7" + axobject-query "^2.0.1" + damerau-levenshtein "^1.0.4" + emoji-regex "^6.5.1" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + +eslint-plugin-react@^7.11.0: + version "7.11.0" + resolved "http://registry.npm.taobao.org/eslint-plugin-react/download/eslint-plugin-react-7.11.0.tgz#b3124af974c4da978e62a57ea49a7bc26f11e76d" + dependencies: + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + prop-types "^15.6.2" + +eslint-restricted-globals@^0.1.1: + version "0.1.1" + resolved "http://registry.npm.taobao.org/eslint-restricted-globals/download/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" + +eslint-scope@3.7.1: + version "3.7.1" + resolved "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-scope@^4.0.0: + version "4.0.0" + resolved "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.3.1" + resolved "http://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + +eslint@^5.3.0: + version "5.3.0" + resolved "http://registry.npm.taobao.org/eslint/download/eslint-5.3.0.tgz#53695aca5213968aacdf970ccb231e42a2b285f8" + dependencies: + ajv "^6.5.0" + babel-code-frame "^6.26.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^3.1.0" + doctrine "^2.1.0" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.2" + imurmurhash "^0.1.4" + inquirer "^5.2.0" + is-resolvable "^1.1.0" + js-yaml "^3.11.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.5" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + regexpp "^2.0.0" + require-uncached "^1.0.3" + semver "^5.5.0" + string.prototype.matchall "^2.0.0" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^4.0.3" + text-table "^0.2.0" + +espree@^4.0.0: + version "4.0.0" + resolved "http://registry.npm.taobao.org/espree/download/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" + dependencies: + acorn "^5.6.0" + acorn-jsx "^4.1.1" + +esprima@^4.0.0: + version "4.0.1" + resolved "http://registry.npm.taobao.org/esprima/download/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + +esquery@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/esquery/download/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.2.1" resolved "http://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" dependencies: estraverse "^4.1.0" -estraverse@^4.1.0, estraverse@^4.1.1: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: version "4.2.0" resolved "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1803,6 +2189,14 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" +external-editor@^2.1.0: + version "2.2.0" + resolved "http://registry.npm.taobao.org/external-editor/download/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" + dependencies: + chardet "^0.4.0" + iconv-lite "^0.4.17" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -1830,6 +2224,10 @@ fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + faye-websocket@^0.10.0: version "0.10.0" resolved "http://registry.npm.taobao.org/faye-websocket/download/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" @@ -1854,6 +2252,19 @@ fbjs@^0.8.16: setimmediate "^1.0.5" ua-parser-js "^0.7.18" +figures@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/figures/download/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + filename-regex@^2.0.0: version "2.0.1" resolved "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -1910,6 +2321,15 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" +flat-cache@^1.2.1: + version "1.3.0" + resolved "http://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + follow-redirects@^1.0.0: version "1.5.2" resolved "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.5.2.tgz#5a9d80e0165957e5ef0c1210678fc5c4acb9fb03" @@ -1965,10 +2385,14 @@ fsevents@^1.0.0, fsevents@^1.2.2: nan "^2.9.2" node-pre-gyp "^0.10.0" -function-bind@^1.1.1: +function-bind@^1.1.0, function-bind@^1.1.1: version "1.1.1" resolved "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + gauge@~2.7.3: version "2.7.4" resolved "http://registry.npm.taobao.org/gauge/download/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -2029,10 +2453,25 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" +globals@^11.1.0, globals@^11.7.0: + version "11.7.0" + resolved "http://registry.npm.taobao.org/globals/download/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" + globals@^9.18.0: version "9.18.0" resolved "http://registry.npm.taobao.org/globals/download/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" +globby@^5.0.0: + version "5.0.0" + resolved "http://registry.npm.taobao.org/globby/download/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + globby@^6.1.0: version "6.1.0" resolved "http://registry.npm.taobao.org/globby/download/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" @@ -2065,6 +2504,10 @@ has-flag@^3.0.0: version "3.0.0" resolved "http://registry.npm.taobao.org/has-flag/download/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" +has-symbols@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/has-symbols/download/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + has-unicode@^2.0.0: version "2.0.1" resolved "http://registry.npm.taobao.org/has-unicode/download/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2096,7 +2539,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1: +has@^1.0.1, has@^1.0.3: version "1.0.3" resolved "http://registry.npm.taobao.org/has/download/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" dependencies: @@ -2199,7 +2642,7 @@ iconv-lite@0.4.19: version "0.4.19" resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.4, iconv-lite@~0.4.13: +iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.23" resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: @@ -2215,6 +2658,10 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" +ignore@^4.0.2: + version "4.0.6" + resolved "http://registry.npm.taobao.org/ignore/download/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + import-local@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/import-local/download/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" @@ -2222,6 +2669,10 @@ import-local@^1.0.0: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" +imurmurhash@^0.1.4: + version "0.1.4" + resolved "http://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + indent-string@^2.1.0: version "2.1.0" resolved "http://registry.npm.taobao.org/indent-string/download/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" @@ -2251,6 +2702,24 @@ ini@~1.3.0: version "1.3.5" resolved "http://registry.npm.taobao.org/ini/download/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" +inquirer@^5.2.0: + version "5.2.0" + resolved "http://registry.npm.taobao.org/inquirer/download/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.1.0" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^5.5.2" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" + internal-ip@1.2.0: version "1.2.0" resolved "http://registry.npm.taobao.org/internal-ip/download/internal-ip-1.2.0.tgz#ae9fbf93b984878785d50a8de1b356956058cf5c" @@ -2261,7 +2730,7 @@ interpret@^1.0.0: version "1.1.0" resolved "http://registry.npm.taobao.org/interpret/download/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" -invariant@^2.2.2: +invariant@^2.2.0, invariant@^2.2.2: version "2.2.4" resolved "http://registry.npm.taobao.org/invariant/download/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: @@ -2455,12 +2924,20 @@ is-primitive@^2.0.0: version "2.0.0" resolved "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-promise@^2.1.0: + version "2.1.0" + resolved "http://registry.npm.taobao.org/is-promise/download/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + is-regex@^1.0.4: version "1.0.4" resolved "http://registry.npm.taobao.org/is-regex/download/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" dependencies: has "^1.0.1" +is-resolvable@^1.1.0: + version "1.1.0" + resolved "http://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" + is-stream@^1.0.1, is-stream@^1.1.0: version "1.1.0" resolved "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -2506,18 +2983,29 @@ isomorphic-fetch@^2.1.1: node-fetch "^1.0.1" whatwg-fetch ">=0.10.0" +js-tokens@^3.0.0, js-tokens@^3.0.2: + version "3.0.2" + resolved "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + "js-tokens@^3.0.0 || ^4.0.0": version "4.0.0" resolved "http://registry.npm.taobao.org/js-tokens/download/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" -js-tokens@^3.0.2: - version "3.0.2" - resolved "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +js-yaml@^3.11.0: + version "3.12.0" + resolved "http://registry.npm.taobao.org/js-yaml/download/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" jsesc@^1.3.0: version "1.3.0" resolved "http://registry.npm.taobao.org/jsesc/download/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "http://registry.npm.taobao.org/jsesc/download/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "http://registry.npm.taobao.org/jsesc/download/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -2530,6 +3018,10 @@ json-schema-traverse@^0.4.1: version "0.4.1" resolved "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + json3@^3.3.2: version "3.3.2" resolved "http://registry.npm.taobao.org/json3/download/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" @@ -2538,6 +3030,12 @@ json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "http://registry.npm.taobao.org/json5/download/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" +jsx-ast-utils@^2.0.1: + version "2.0.1" + resolved "http://registry.npm.taobao.org/jsx-ast-utils/download/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" + dependencies: + array-includes "^3.0.3" + killable@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/killable/download/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" @@ -2572,6 +3070,13 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + load-json-file@^1.0.0: version "1.1.0" resolved "http://registry.npm.taobao.org/load-json-file/download/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -2614,7 +3119,7 @@ lodash.debounce@^4.0.8: version "4.0.8" resolved "http://registry.npm.taobao.org/lodash.debounce/download/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" -lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.4: +lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0: version "4.17.10" resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -2790,7 +3295,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "http://registry.npm.taobao.org/minimalistic-crypto-utils/download/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -minimatch@^3.0.2, minimatch@^3.0.4: +minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -2845,6 +3350,10 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" +mute-stream@0.0.7: + version "0.0.7" + resolved "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + nan@^2.9.2: version "2.10.0" resolved "http://registry.npm.taobao.org/nan/download/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" @@ -2865,6 +3374,10 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +natural-compare@^1.4.0: + version "1.4.0" + resolved "http://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + needle@^2.2.1: version "2.2.1" resolved "http://registry.npm.taobao.org/needle/download/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" @@ -2885,6 +3398,10 @@ next-tick@1: version "1.0.0" resolved "http://registry.npm.taobao.org/next-tick/download/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" +nice-try@^1.0.4: + version "1.0.4" + resolved "http://registry.npm.taobao.org/nice-try/download/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + node-fetch@^1.0.1: version "1.7.3" resolved "http://registry.npm.taobao.org/node-fetch/download/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -3003,7 +3520,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-keys@^1.0.8: +object-keys@^1.0.11, object-keys@^1.0.8: version "1.0.12" resolved "http://registry.npm.taobao.org/object-keys/download/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" @@ -3013,6 +3530,24 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" +object.assign@^4.1.0: + version "4.1.0" + resolved "http://registry.npm.taobao.org/object.assign/download/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.entries@^1.0.4: + version "1.0.4" + resolved "http://registry.npm.taobao.org/object.entries/download/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.6.1" + function-bind "^1.1.0" + has "^1.0.1" + object.omit@^2.0.0: version "2.0.1" resolved "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" @@ -3046,12 +3581,29 @@ once@^1.3.0: dependencies: wrappy "1" +onetime@^2.0.0: + version "2.0.1" + resolved "http://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" + opn@^5.1.0: version "5.3.0" resolved "http://registry.npm.taobao.org/opn/download/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" dependencies: is-wsl "^1.1.0" +optionator@^0.8.2: + version "0.8.2" + resolved "http://registry.npm.taobao.org/optionator/download/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + original@>=0.0.5: version "1.0.1" resolved "http://registry.npm.taobao.org/original/download/original-1.0.1.tgz#b0a53ff42ba997a8c9cd1fb5daaeb42b9d693190" @@ -3080,7 +3632,7 @@ os-locale@^2.0.0: lcid "^1.0.0" mem "^1.1.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -3182,14 +3734,18 @@ path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "http://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" -path-key@^2.0.0: +path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "http://registry.npm.taobao.org/path-key/download/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" +path-parse@^1.0.5: + version "1.0.6" + resolved "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + path-to-regexp@0.1.7: version "0.1.7" resolved "http://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -3236,12 +3792,22 @@ pinkie@^2.0.0: version "2.0.4" resolved "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + dependencies: + find-up "^1.0.0" + pkg-dir@^2.0.0: version "2.0.0" resolved "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" dependencies: find-up "^2.1.0" +pluralize@^7.0.0: + version "7.0.0" + resolved "http://registry.npm.taobao.org/pluralize/download/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" + portfinder@^1.0.9: version "1.0.13" resolved "http://registry.npm.taobao.org/portfinder/download/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9" @@ -3254,6 +3820,10 @@ posix-character-classes@^0.1.0: version "0.1.1" resolved "http://registry.npm.taobao.org/posix-character-classes/download/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" +prelude-ls@~1.1.2: + version "1.1.2" + resolved "http://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + preserve@^0.2.0: version "0.2.0" resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" @@ -3270,13 +3840,17 @@ process@^0.11.10: version "0.11.10" resolved "http://registry.npm.taobao.org/process/download/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" +progress@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/progress/download/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" + promise@^7.1.1: version "7.3.1" resolved "http://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" dependencies: asap "~2.0.3" -prop-types@^15.6.0: +prop-types@^15.6.0, prop-types@^15.6.2: version "15.6.2" resolved "http://registry.npm.taobao.org/prop-types/download/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102" dependencies: @@ -3488,6 +4062,16 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp.prototype.flags@^1.2.0: + version "1.2.0" + resolved "http://registry.npm.taobao.org/regexp.prototype.flags/download/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" + dependencies: + define-properties "^1.1.2" + +regexpp@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/regexpp/download/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" + regexpu-core@^2.0.0: version "2.0.0" resolved "http://registry.npm.taobao.org/regexpu-core/download/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" @@ -3532,6 +4116,13 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "http://registry.npm.taobao.org/require-main-filename/download/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" +require-uncached@^1.0.3: + version "1.0.3" + resolved "http://registry.npm.taobao.org/require-uncached/download/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + requires-port@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/requires-port/download/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -3542,6 +4133,10 @@ resolve-cwd@^2.0.0: dependencies: resolve-from "^3.0.0" +resolve-from@^1.0.0: + version "1.0.1" + resolved "http://registry.npm.taobao.org/resolve-from/download/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + resolve-from@^3.0.0: version "3.0.0" resolved "http://registry.npm.taobao.org/resolve-from/download/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -3550,6 +4145,19 @@ resolve-url@^0.2.1: version "0.2.1" resolved "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" +resolve@^1.5.0, resolve@^1.6.0: + version "1.8.1" + resolved "http://registry.npm.taobao.org/resolve/download/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + +restore-cursor@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + dependencies: + onetime "^2.0.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "http://registry.npm.taobao.org/ret/download/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -3573,6 +4181,18 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +run-async@^2.2.0: + version "2.3.0" + resolved "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + dependencies: + is-promise "^2.1.0" + +rxjs@^5.5.2: + version "5.5.11" + resolved "http://registry.npm.taobao.org/rxjs/download/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" + dependencies: + symbol-observable "1.0.1" + safe-buffer@5.1.1: version "5.1.1" resolved "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -3605,7 +4225,7 @@ selfsigned@^1.9.1: dependencies: node-forge "0.7.5" -"semver@2 || 3 || 4 || 5", semver@^5.3.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0: version "5.5.0" resolved "http://registry.npm.taobao.org/semver/download/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -3703,7 +4323,7 @@ shebang-regex@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -3711,6 +4331,12 @@ slash@^1.0.0: version "1.0.0" resolved "http://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slice-ansi@1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/slice-ansi/download/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "http://registry.npm.taobao.org/snapdragon-node/download/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -3780,7 +4406,7 @@ source-map-url@^0.4.0: version "0.4.0" resolved "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" -source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -3839,6 +4465,10 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" +sprintf-js@~1.0.2: + version "1.0.3" + resolved "http://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + static-extend@^0.1.1: version "0.1.2" resolved "http://registry.npm.taobao.org/static-extend/download/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -3879,13 +4509,23 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string.prototype.matchall@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/string.prototype.matchall/download/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + has-symbols "^1.0.0" + regexp.prototype.flags "^1.2.0" + string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -3924,7 +4564,7 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" -strip-json-comments@~2.0.1: +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -3938,12 +4578,27 @@ supports-color@^4.2.1: dependencies: has-flag "^2.0.0" -supports-color@^5.1.0: +supports-color@^5.1.0, supports-color@^5.3.0: version "5.4.0" resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" +symbol-observable@1.0.1: + version "1.0.1" + resolved "http://registry.npm.taobao.org/symbol-observable/download/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + +table@^4.0.3: + version "4.0.3" + resolved "http://registry.npm.taobao.org/table/download/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" + dependencies: + ajv "^6.0.1" + ajv-keywords "^3.0.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" + tapable@^0.2.7: version "0.2.8" resolved "http://registry.npm.taobao.org/tapable/download/tapable-0.2.8.tgz#99372a5c999bf2df160afc0d74bed4f47948cd22" @@ -3960,6 +4615,14 @@ tar@^4: safe-buffer "^5.1.2" yallist "^3.0.2" +text-table@^0.2.0: + version "0.2.0" + resolved "http://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through@^2.3.6: + version "2.3.8" + resolved "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + thunky@^1.0.2: version "1.0.2" resolved "http://registry.npm.taobao.org/thunky/download/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371" @@ -3974,6 +4637,12 @@ timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" +tmp@^0.0.33: + version "0.0.33" + resolved "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + to-arraybuffer@^1.0.0: version "1.0.1" resolved "http://registry.npm.taobao.org/to-arraybuffer/download/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" @@ -3982,6 +4651,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "http://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "http://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-object-path@^0.3.0: version "0.3.0" resolved "http://registry.npm.taobao.org/to-object-path/download/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -4016,6 +4689,12 @@ tty-browserify@0.0.0: version "0.0.0" resolved "http://registry.npm.taobao.org/tty-browserify/download/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" +type-check@~0.3.2: + version "0.3.2" + resolved "http://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + type-is@~1.6.15, type-is@~1.6.16: version "1.6.16" resolved "http://registry.npm.taobao.org/type-is/download/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" @@ -4284,6 +4963,10 @@ wordwrap@0.0.2: version "0.0.2" resolved "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" +wordwrap@~1.0.0: + version "1.0.0" + resolved "http://registry.npm.taobao.org/wordwrap/download/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + wrap-ansi@^2.0.0: version "2.1.0" resolved "http://registry.npm.taobao.org/wrap-ansi/download/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -4295,6 +4978,12 @@ wrappy@1: version "1.0.2" resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" +write@^0.2.1: + version "0.2.1" + resolved "http://registry.npm.taobao.org/write/download/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + xtend@^4.0.0: version "4.0.1" resolved "http://registry.npm.taobao.org/xtend/download/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"