gis-common 2.2.8 → 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 +117 -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 = ({
@@ -1089,6 +1089,17 @@ Date.prototype.addDate = function (interval, number) {
1089
1089
  }
1090
1090
  return intervalDes;
1091
1091
  },
1092
+ formatterCounter: function formatterCounter(times) {
1093
+ var checked = function checked(j) {
1094
+ return (j > 10 ? '' : '0') + (j || 0);
1095
+ };
1096
+ var houres = checked(Math.floor(times / 3600));
1097
+ var level1 = times % 3600;
1098
+ var minutes = checked(Math.floor(level1 / 60));
1099
+ var leave2 = level1 % 60;
1100
+ var seconds = checked(Math.round(leave2));
1101
+ return houres + ':' + minutes + ':' + seconds;
1102
+ },
1092
1103
  sleep: function sleep(d) {
1093
1104
  for (var t = Date.now(); Date.now() - t <= d;) {}
1094
1105
  }
@@ -1895,6 +1906,110 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1895
1906
  }
1896
1907
  }
1897
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
+ });
1898
2013
  // CONCATENATED MODULE: ./src/utils/index.js
1899
2014
 
1900
2015
 
@@ -1909,6 +2024,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1909
2024
 
1910
2025
 
1911
2026
 
2027
+
1912
2028
  // CONCATENATED MODULE: ./src/core/AudioPlayer.js
1913
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; }; }();
1914
2030
 
@@ -2688,110 +2804,6 @@ var DevicePixelRatio = function () {
2688
2804
  }();
2689
2805
 
2690
2806
  /* harmony default export */ var core_DevicePixelRatio = (DevicePixelRatio);
2691
- // CONCATENATED MODULE: ./src/core/Assert.js
2692
-
2693
-
2694
-
2695
-
2696
- /* harmony default export */ var Assert = ({
2697
- notNull: function notNull(data) {
2698
- if (CommUtils.isEmpty()) {
2699
- throw Error('不能为空:>>>' + data);
2700
- }
2701
- },
2702
- legalLnglat: function legalLnglat(lng, lat) {
2703
- if (!GeoUtils.isLnglat(lng, lat)) {
2704
- throw Error(ErrorTypeConstant.COORDINATE_ERROR);
2705
- }
2706
- },
2707
-
2708
- verify: {
2709
- array: function array(data) {
2710
- if (CommUtils.getDataType(data) !== 'Array') {
2711
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_ARRAY + ':>>>' + data);
2712
- }
2713
- },
2714
- function: function _function(data) {
2715
- if (CommUtils.getDataType(data) !== 'Function') {
2716
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_FUNCTION + ':>>>' + data);
2717
- }
2718
- },
2719
- object: function object(data) {
2720
- if (CommUtils.getDataType(data) !== 'Object') {
2721
- throw Error(ErrorTypeConstant.PARAMETER_ERROR_OBJECT + ':>>>' + data);
2722
- }
2723
- }
2724
- },
2725
- legalJSON: function legalJSON(data) {
2726
- try {
2727
- JSON.parse(data);
2728
- } catch (err) {
2729
- throw Error(ErrorTypeConstant.JSON_PARSE_ERROR + ':>>>' + data);
2730
- }
2731
- },
2732
- legalData: function legalData(data, type) {
2733
- var bool = StringUtils.checkStr(data, type);
2734
- var typename = '';
2735
- switch (type) {
2736
- case 'phone':
2737
- typename = '电话';
2738
- break;
2739
- case 'tel':
2740
- typename = '座机';
2741
- break;
2742
- case 'card':
2743
- typename = '身份证';
2744
- break;
2745
- case 'pwd':
2746
- typename = '密码';
2747
- break;
2748
- case 'postal':
2749
- typename = '邮政编码';
2750
- break;
2751
- case 'QQ':
2752
- typename = 'QQ';
2753
- break;
2754
- case 'email':
2755
- typename = '邮箱';
2756
- break;
2757
- case 'money':
2758
- typename = '金额';
2759
- break;
2760
- case 'URL':
2761
- typename = '网址';
2762
- break;
2763
- case 'IP':
2764
- typename = 'IP';
2765
- break;
2766
- case 'date':
2767
- typename = '日期时间';
2768
- break;
2769
- case 'number':
2770
- typename = '数字';
2771
- break;
2772
- case 'english':
2773
- typename = '英文';
2774
- break;
2775
- case 'chinese':
2776
- typename = '中文';
2777
- break;
2778
- case 'lower':
2779
- typename = '小写';
2780
- break;
2781
- case 'upper':
2782
- typename = '大写';
2783
- break;
2784
- case 'HTML':
2785
- typename = 'HTML标记';
2786
- break;
2787
- default:
2788
- break;
2789
- }
2790
- if (!bool) {
2791
- throw Error(ErrorTypeConstant.PARAMETER_ERROR + ':>>>不是' + typename);
2792
- }
2793
- }
2794
- });
2795
2807
  // CONCATENATED MODULE: ./src/index.js
2796
2808
 
2797
2809
 
@@ -2804,7 +2816,6 @@ var DevicePixelRatio = function () {
2804
2816
 
2805
2817
 
2806
2818
 
2807
-
2808
2819
  /***/ })
2809
2820
  /******/ ]);
2810
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.8",
5
+ "version": "2.2.10",
6
6
  "author": "Guo.Yan <luv02@vip.qq.com>",
7
7
  "license": "MIT",
8
8
  "private": false,