antd-management-fast-framework 1.12.43 → 1.12.46

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.
@@ -2,6 +2,10 @@ export function replace(source: any, pattern: any, replacement: any): string;
2
2
  export function trim(source: any): string;
3
3
  export function stringIsNullOrWhiteSpace(value: any): boolean;
4
4
  export function isBrowser(): boolean;
5
+ /**
6
+ * 检测目标是否在数组址之中
7
+ */
8
+ export function inCollection(collection: any, value: any): boolean;
5
9
  /**
6
10
  * 占位函数
7
11
  *
package/es/utils/core.js CHANGED
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.empty = empty;
7
+ exports.inCollection = inCollection;
7
8
  exports.isBrowser = isBrowser;
8
9
  exports.replace = replace;
9
10
  exports.stringIsNullOrWhiteSpace = stringIsNullOrWhiteSpace;
@@ -11,6 +12,8 @@ exports.trim = trim;
11
12
 
12
13
  var _lodash = require("lodash");
13
14
 
15
+ var _typeCheck = require("./typeCheck");
16
+
14
17
  function replace(source, pattern, replacement) {
15
18
  return (0, _lodash.replace)(source, pattern, replacement);
16
19
  }
@@ -26,6 +29,28 @@ function stringIsNullOrWhiteSpace(value) {
26
29
  function isBrowser() {
27
30
  return typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
28
31
  }
32
+ /**
33
+ * 检测目标是否在数组址之中
34
+ */
35
+
36
+
37
+ function inCollection(collection, value) {
38
+ var result = false;
39
+
40
+ if (!(0, _typeCheck.isArray)(collection)) {
41
+ return result;
42
+ }
43
+
44
+ collection.some(function (o) {
45
+ if (o === value) {
46
+ result = true;
47
+ return true;
48
+ }
49
+
50
+ return false;
51
+ });
52
+ return result;
53
+ }
29
54
  /**
30
55
  * 占位函数
31
56
  *
@@ -40,7 +40,7 @@ function recordLog(record, showMode) {
40
40
  var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants.logLevel.debug;
41
41
  var showModeModified = (showMode || null) == null || (0, _core.stringIsNullOrWhiteSpace)(showMode) ? _constants.logShowMode.unknown : showMode;
42
42
 
43
- if (!inCollection([_constants.logShowMode.unknown, _constants.logShowMode.text, _constants.logShowMode.object], showModeModified)) {
43
+ if (!(0, _core.inCollection)([_constants.logShowMode.unknown, _constants.logShowMode.text, _constants.logShowMode.object], showModeModified)) {
44
44
  throw new Error("\u65E0\u6548\u7684\u65E5\u5FD7\u663E\u793A\u6A21\u5F0F:".concat(showModeModified));
45
45
  }
46
46
 
@@ -650,13 +650,13 @@ export function notify({ type, placement: placementValue, message: messageValue,
650
650
  message: any;
651
651
  description: any;
652
652
  }): void;
653
- export function recordLog(record: any, showMode: any, level?: any): void;
653
+ export function recordLog(record: any, showMode: any, level?: string): void;
654
654
  export function recordWarn(record: any): void;
655
655
  export function recordInfo(record: any): void;
656
656
  export function recordDebug(record: any): void;
657
657
  export function recordError(record: any): void;
658
- export function recordText(record: any, level?: any): void;
659
- export function recordObject(record: any, level?: any): void;
658
+ export function recordText(record: any, level?: string): void;
659
+ export function recordObject(record: any, level?: string): void;
660
660
  export function checkFromConfig({ label, name, helper }: {
661
661
  label: any;
662
662
  name: any;
package/es/utils/tools.js CHANGED
@@ -575,21 +575,7 @@ function getGuid() {
575
575
 
576
576
 
577
577
  function inCollection(collection, value) {
578
- var result = false;
579
-
580
- if (!isArray(collection)) {
581
- return result;
582
- }
583
-
584
- collection.some(function (o) {
585
- if (o === value) {
586
- result = true;
587
- return true;
588
- }
589
-
590
- return false;
591
- });
592
- return result;
578
+ return (0, _core.inCollection)(collection, value);
593
579
  }
594
580
  /**
595
581
  * 格式化时间
@@ -1953,7 +1939,7 @@ function notify(_ref23) {
1953
1939
  }
1954
1940
 
1955
1941
  function recordLog(record, showMode) {
1956
- var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : logLevel.debug;
1942
+ var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _constants.logLevel.debug;
1957
1943
  (0, _developAssist.recordLog)(record, showMode, level);
1958
1944
  }
1959
1945
 
@@ -1974,12 +1960,12 @@ function recordError(record) {
1974
1960
  }
1975
1961
 
1976
1962
  function recordText(record) {
1977
- var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : logLevel.debug;
1963
+ var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.logLevel.debug;
1978
1964
  (0, _developAssist.recordText)(record, level);
1979
1965
  }
1980
1966
 
1981
1967
  function recordObject(record) {
1982
- var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : logLevel.debug;
1968
+ var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _constants.logLevel.debug;
1983
1969
  (0, _developAssist.recordObject)(record, level);
1984
1970
  }
1985
1971
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antd-management-fast-framework",
3
- "version": "1.12.43",
3
+ "version": "1.12.46",
4
4
  "description": "antd-management-fast-framework",
5
5
  "keywords": [
6
6
  "antd-management-fast-framework"
@@ -171,7 +171,7 @@
171
171
  "src/framework",
172
172
  "src/utils"
173
173
  ],
174
- "gitHead": "4c8e59c6d6c4f1401918a9bcdcc6f0f712aac10c",
174
+ "gitHead": "aa898b1d29770f4efd6f87598ada8cd2cb16e2a3",
175
175
  "gitHooks": {
176
176
  "pre-commit": "lint-staged"
177
177
  }