gis-common 2.2.9 → 2.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/resource.min.js +106 -106
  2. package/package.json +1 -1
@@ -115,6 +115,7 @@ __webpack_require__.d(__webpack_exports__, "FileUtils", function() { return /* r
115
115
  __webpack_require__.d(__webpack_exports__, "MathUtils", function() { return /* reexport */ MathUtils; });
116
116
  __webpack_require__.d(__webpack_exports__, "OptimizeUtils", function() { return /* reexport */ OptimizeUtils; });
117
117
  __webpack_require__.d(__webpack_exports__, "StringUtils", function() { return /* reexport */ StringUtils; });
118
+ __webpack_require__.d(__webpack_exports__, "AssertUtils", function() { return /* reexport */ AssertUtils; });
118
119
  __webpack_require__.d(__webpack_exports__, "Utils", function() { return /* reexport */ CommUtils; });
119
120
  __webpack_require__.d(__webpack_exports__, "EventType", function() { return /* reexport */ EventTypeConstant; });
120
121
  __webpack_require__.d(__webpack_exports__, "ErrorType", function() { return /* reexport */ ErrorTypeConstant; });
@@ -129,7 +130,6 @@ __webpack_require__.d(__webpack_exports__, "HashMap", function() { return /* ree
129
130
  __webpack_require__.d(__webpack_exports__, "WebSocketClient", function() { return /* reexport */ core_WebSocketClient; });
130
131
  __webpack_require__.d(__webpack_exports__, "WebStorage", function() { return /* reexport */ core_WebStorage; });
131
132
  __webpack_require__.d(__webpack_exports__, "DevicePixelRatio", function() { return /* reexport */ core_DevicePixelRatio; });
132
- __webpack_require__.d(__webpack_exports__, "Assert", function() { return /* reexport */ Assert; });
133
133
 
134
134
  // CONCATENATED MODULE: ./src/utils/AnimateUtils.js
135
135
  /* harmony default export */ var AnimateUtils = ({
@@ -1906,6 +1906,110 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1906
1906
  }
1907
1907
  }
1908
1908
  });
1909
+ // CONCATENATED MODULE: ./src/utils/AssertUtils.js
1910
+
1911
+
1912
+
1913
+
1914
+ /* harmony default export */ var AssertUtils = ({
1915
+ notNull: function notNull(data) {
1916
+ if (CommUtils.isEmpty()) {
1917
+ throw Error('不能为空:>>>' + data);
1918
+ }
1919
+ },
1920
+ legalLnglat: function legalLnglat(lng, lat) {
1921
+ if (!GeoUtils.isLnglat(lng, lat)) {
1922
+ throw Error(ErrorTypeConstant.COORDINATE_ERROR);
1923
+ }
1924
+ },
1925
+
1926
+ verify: {
1927
+ array: function array(data) {
1928
+ if (CommUtils.getDataType(data) !== 'Array') {
1929
+ throw Error(ErrorTypeConstant.PARAMETER_ERROR_ARRAY + ':>>>' + data);
1930
+ }
1931
+ },
1932
+ function: function _function(data) {
1933
+ if (CommUtils.getDataType(data) !== 'Function') {
1934
+ throw Error(ErrorTypeConstant.PARAMETER_ERROR_FUNCTION + ':>>>' + data);
1935
+ }
1936
+ },
1937
+ object: function object(data) {
1938
+ if (CommUtils.getDataType(data) !== 'Object') {
1939
+ throw Error(ErrorTypeConstant.PARAMETER_ERROR_OBJECT + ':>>>' + data);
1940
+ }
1941
+ }
1942
+ },
1943
+ legalJSON: function legalJSON(data) {
1944
+ try {
1945
+ JSON.parse(data);
1946
+ } catch (err) {
1947
+ throw Error(ErrorTypeConstant.JSON_PARSE_ERROR + ':>>>' + data);
1948
+ }
1949
+ },
1950
+ legalData: function legalData(data, type) {
1951
+ var bool = StringUtils.checkStr(data, type);
1952
+ var typename = '';
1953
+ switch (type) {
1954
+ case 'phone':
1955
+ typename = '电话';
1956
+ break;
1957
+ case 'tel':
1958
+ typename = '座机';
1959
+ break;
1960
+ case 'card':
1961
+ typename = '身份证';
1962
+ break;
1963
+ case 'pwd':
1964
+ typename = '密码';
1965
+ break;
1966
+ case 'postal':
1967
+ typename = '邮政编码';
1968
+ break;
1969
+ case 'QQ':
1970
+ typename = 'QQ';
1971
+ break;
1972
+ case 'email':
1973
+ typename = '邮箱';
1974
+ break;
1975
+ case 'money':
1976
+ typename = '金额';
1977
+ break;
1978
+ case 'URL':
1979
+ typename = '网址';
1980
+ break;
1981
+ case 'IP':
1982
+ typename = 'IP';
1983
+ break;
1984
+ case 'date':
1985
+ typename = '日期时间';
1986
+ break;
1987
+ case 'number':
1988
+ typename = '数字';
1989
+ break;
1990
+ case 'english':
1991
+ typename = '英文';
1992
+ break;
1993
+ case 'chinese':
1994
+ typename = '中文';
1995
+ break;
1996
+ case 'lower':
1997
+ typename = '小写';
1998
+ break;
1999
+ case 'upper':
2000
+ typename = '大写';
2001
+ break;
2002
+ case 'HTML':
2003
+ typename = 'HTML标记';
2004
+ break;
2005
+ default:
2006
+ break;
2007
+ }
2008
+ if (!bool) {
2009
+ throw Error(ErrorTypeConstant.PARAMETER_ERROR + ':>>>不是' + typename);
2010
+ }
2011
+ }
2012
+ });
1909
2013
  // CONCATENATED MODULE: ./src/utils/index.js
1910
2014
 
1911
2015
 
@@ -1920,6 +2024,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1920
2024
 
1921
2025
 
1922
2026
 
2027
+
1923
2028
  // CONCATENATED MODULE: ./src/core/AudioPlayer.js
1924
2029
  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; }; }();
1925
2030
 
@@ -2699,110 +2804,6 @@ var DevicePixelRatio = function () {
2699
2804
  }();
2700
2805
 
2701
2806
  /* harmony default export */ var core_DevicePixelRatio = (DevicePixelRatio);
2702
- // CONCATENATED MODULE: ./src/core/Assert.js
2703
-
2704
-
2705
-
2706
-
2707
- /* harmony default export */ var Assert = ({
2708
- notNull: function notNull(data) {
2709
- if (CommUtils.isEmpty()) {
2710
- throw Error('不能为空:>>>' + data);
2711
- }
2712
- },
2713
- legalLnglat: function legalLnglat(lng, lat) {
2714
- if (!GeoUtils.isLnglat(lng, lat)) {
2715
- throw Error(ErrorTypeConstant.COORDINATE_ERROR);
2716
- }
2717
- },
2718
-
2719
- verify: {
2720
- array: function array(data) {
2721
- if (CommUtils.getDataType(data) !== 'Array') {
2722
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_ARRAY + ':>>>' + data);
2723
- }
2724
- },
2725
- function: function _function(data) {
2726
- if (CommUtils.getDataType(data) !== 'Function') {
2727
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_FUNCTION + ':>>>' + data);
2728
- }
2729
- },
2730
- object: function object(data) {
2731
- if (CommUtils.getDataType(data) !== 'Object') {
2732
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_OBJECT + ':>>>' + data);
2733
- }
2734
- }
2735
- },
2736
- legalJSON: function legalJSON(data) {
2737
- try {
2738
- JSON.parse(data);
2739
- } catch (err) {
2740
- throw Error(ErrorTypeConstant.JSON_PARSE_ERROR + ':>>>' + data);
2741
- }
2742
- },
2743
- legalData: function legalData(data, type) {
2744
- var bool = StringUtils.checkStr(data, type);
2745
- var typename = '';
2746
- switch (type) {
2747
- case 'phone':
2748
- typename = '电话';
2749
- break;
2750
- case 'tel':
2751
- typename = '座机';
2752
- break;
2753
- case 'card':
2754
- typename = '身份证';
2755
- break;
2756
- case 'pwd':
2757
- typename = '密码';
2758
- break;
2759
- case 'postal':
2760
- typename = '邮政编码';
2761
- break;
2762
- case 'QQ':
2763
- typename = 'QQ';
2764
- break;
2765
- case 'email':
2766
- typename = '邮箱';
2767
- break;
2768
- case 'money':
2769
- typename = '金额';
2770
- break;
2771
- case 'URL':
2772
- typename = '网址';
2773
- break;
2774
- case 'IP':
2775
- typename = 'IP';
2776
- break;
2777
- case 'date':
2778
- typename = '日期时间';
2779
- break;
2780
- case 'number':
2781
- typename = '数字';
2782
- break;
2783
- case 'english':
2784
- typename = '英文';
2785
- break;
2786
- case 'chinese':
2787
- typename = '中文';
2788
- break;
2789
- case 'lower':
2790
- typename = '小写';
2791
- break;
2792
- case 'upper':
2793
- typename = '大写';
2794
- break;
2795
- case 'HTML':
2796
- typename = 'HTML标记';
2797
- break;
2798
- default:
2799
- break;
2800
- }
2801
- if (!bool) {
2802
- throw Error(ErrorTypeConstant.PARAMETER_ERROR + ':>>>不是' + typename);
2803
- }
2804
- }
2805
- });
2806
2807
  // CONCATENATED MODULE: ./src/index.js
2807
2808
 
2808
2809
 
@@ -2815,7 +2816,6 @@ var DevicePixelRatio = function () {
2815
2816
 
2816
2817
 
2817
2818
 
2818
-
2819
2819
  /***/ })
2820
2820
  /******/ ]);
2821
2821
  });
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "gis-common",
3
3
  "description": "gis-common",
4
4
  "main": "dist/resource.min.js",
5
- "version": "2.2.9",
5
+ "version": "2.2.10",
6
6
  "author": "Guo.Yan <luv02@vip.qq.com>",
7
7
  "license": "MIT",
8
8
  "private": false,