@kmkf-fe-packages/kmkf-utils 0.5.0 → 0.5.2-alpha.1

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.
@@ -11,6 +11,10 @@ export default class ExpressData {
11
11
  setExpressData: (val: OptionsItem[]) => OptionsItem[];
12
12
  getExpressNameByCode: (code: string | number) => string | number;
13
13
  getExpressNameByName: (name: string | number) => string | number;
14
+ getInterceptionTypeName: (company: string, type: string) => any;
15
+ getInterceptionStatusName: (company: string, status: string) => any;
16
+ isInterfaceCompany: (company: string) => any;
17
+ isShowNewAddress: (company: string, type: string) => any;
14
18
  static getInstance(): ExpressData;
15
19
  }
16
20
  export {};
@@ -48,6 +48,41 @@ var ExpressData = /*#__PURE__*/function () {
48
48
  });
49
49
  return item.length ? item[0].value : name;
50
50
  });
51
+ _defineProperty(this, "getInterceptionTypeName", function (company, type) {
52
+ var _find;
53
+ var item = (_this.expressData || []).find(function (item) {
54
+ return item.value === company;
55
+ });
56
+ var label = (_find = ((item === null || item === void 0 ? void 0 : item.interceptionTypeList) || []).find(function (t) {
57
+ return t.value === type;
58
+ })) === null || _find === void 0 ? void 0 : _find.label;
59
+ return label;
60
+ });
61
+ _defineProperty(this, "getInterceptionStatusName", function (company, status) {
62
+ var _find2;
63
+ var item = (_this.expressData || []).find(function (item) {
64
+ return item.value === company;
65
+ });
66
+ var label = (_find2 = ((item === null || item === void 0 ? void 0 : item.interceptionStatusList) || []).find(function (t) {
67
+ return t.value === status;
68
+ })) === null || _find2 === void 0 ? void 0 : _find2.label;
69
+ return label;
70
+ });
71
+ _defineProperty(this, "isInterfaceCompany", function (company) {
72
+ var item = (_this.expressData || []).find(function (item) {
73
+ return item.value === company;
74
+ });
75
+ return item === null || item === void 0 ? void 0 : item.isInterface;
76
+ });
77
+ _defineProperty(this, "isShowNewAddress", function (company, type) {
78
+ var _find3, _find3$config;
79
+ var item = (_this.expressData || []).find(function (item) {
80
+ return item.value === company;
81
+ });
82
+ return (_find3 = ((item === null || item === void 0 ? void 0 : item.interceptionTypeList) || []).find(function (t) {
83
+ return t.value === type;
84
+ })) === null || _find3 === void 0 ? void 0 : (_find3$config = _find3.config) === null || _find3$config === void 0 ? void 0 : _find3$config.showAddress;
85
+ });
51
86
  this.initData();
52
87
  }
53
88
  _createClass(ExpressData, null, [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/kmkf-utils",
3
- "version": "0.5.0",
3
+ "version": "0.5.2-alpha.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -30,5 +30,5 @@
30
30
  "gitHooks": {
31
31
  "pre-commit": "lint-staged"
32
32
  },
33
- "gitHead": "85deb302aadf2d5aa85ca370100ad52dffb9f902"
33
+ "gitHead": "a8f3f34d2f553a55c16f30dab39d3a74bf48f2d3"
34
34
  }