@kmkf-fe-packages/services-components 2.10.9-beta.44 → 2.10.9-beta.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.
- package/dist/esm/components/LogisticsInterception/index.d.ts +1 -1
- package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.d.ts +6 -3
- package/dist/esm/components/LogisticsInterception/interceptLogisticsCustomerCode.js +14 -15
- package/dist/esm/components/LogisticsMoreInterception/interceptLogisticsCustomerCode.js +2 -9
- package/package.json +4 -4
|
@@ -62,7 +62,7 @@ declare class Logistics implements ComponentInterface {
|
|
|
62
62
|
interceptSnapshot: any;
|
|
63
63
|
interceptState: any;
|
|
64
64
|
interceptApiStatusReason: any;
|
|
65
|
-
interceptLogisticsCustomerCode:
|
|
65
|
+
interceptLogisticsCustomerCode: string;
|
|
66
66
|
};
|
|
67
67
|
renderPc: () => null;
|
|
68
68
|
renderExport: () => null;
|
|
@@ -16,12 +16,15 @@ declare class InterceptLogisticsCustomerCode implements ComponentInterface {
|
|
|
16
16
|
children: ComponentInterface[];
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
18
|
options: ComponentInterface["options"];
|
|
19
|
+
optionsMap: {
|
|
20
|
+
[key: string]: string;
|
|
21
|
+
};
|
|
19
22
|
constructor(options: PickOption);
|
|
20
|
-
getComponentValue: (record: Record) =>
|
|
23
|
+
getComponentValue: (record: Record) => string;
|
|
21
24
|
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
|
-
renderPc: (_value: any, record: Record) =>
|
|
25
|
+
renderPc: (_value: any, record: Record) => string;
|
|
23
26
|
renderLog: (record: Record) => any;
|
|
24
|
-
renderExport: (_value: any, record: Record) =>
|
|
27
|
+
renderExport: (_value: any, record: Record) => string;
|
|
25
28
|
editRender: () => null;
|
|
26
29
|
filterConfig: (item: ColumnConfig) => {
|
|
27
30
|
searchDefaultConditions: "in";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -7,7 +9,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
9
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
10
|
import React from "react";
|
|
9
11
|
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
-
import { filterFn as _filterFn, isNull, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
|
+
import { filterFn as _filterFn, getJdCustomerCodeOptions, isNull, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
13
|
import { SYMBOL } from "../../constant";
|
|
12
14
|
var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
|
|
13
15
|
var _this = this;
|
|
@@ -27,26 +29,27 @@ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function Intercep
|
|
|
27
29
|
_defineProperty(this, "children", void 0);
|
|
28
30
|
_defineProperty(this, "dataType", void 0);
|
|
29
31
|
_defineProperty(this, "options", void 0);
|
|
32
|
+
_defineProperty(this, "optionsMap", void 0);
|
|
30
33
|
_defineProperty(this, "getComponentValue", function (record) {
|
|
31
|
-
return record === null || record === void 0 ? void 0 : record[_this.id];
|
|
34
|
+
return _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]];
|
|
32
35
|
});
|
|
33
36
|
_defineProperty(this, "renderClient", function (record) {
|
|
34
37
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
35
38
|
id: _this.id,
|
|
36
39
|
label: _this.name,
|
|
37
|
-
value: record[_this.id]
|
|
40
|
+
value: _this.optionsMap[record[_this.id]]
|
|
38
41
|
}) : null;
|
|
39
42
|
});
|
|
40
43
|
_defineProperty(this, "renderPc", function (_value, record) {
|
|
41
|
-
var
|
|
42
|
-
return (
|
|
44
|
+
var _this$optionsMap$reco;
|
|
45
|
+
return (_this$optionsMap$reco = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco !== void 0 ? _this$optionsMap$reco : "--";
|
|
43
46
|
});
|
|
44
47
|
_defineProperty(this, "renderLog", function (record) {
|
|
45
48
|
return isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? null : record[_this.id];
|
|
46
49
|
});
|
|
47
50
|
_defineProperty(this, "renderExport", function (_value, record) {
|
|
48
|
-
var
|
|
49
|
-
return (
|
|
51
|
+
var _this$optionsMap$reco2;
|
|
52
|
+
return (_this$optionsMap$reco2 = _this.optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]]) !== null && _this$optionsMap$reco2 !== void 0 ? _this$optionsMap$reco2 : "--";
|
|
50
53
|
});
|
|
51
54
|
_defineProperty(this, "editRender", function () {
|
|
52
55
|
return null;
|
|
@@ -91,13 +94,9 @@ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function Intercep
|
|
|
91
94
|
this.children = [];
|
|
92
95
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
93
96
|
this.dataType = "string";
|
|
94
|
-
this.options = (LogisticsAddressData.getInstance().getAddressData() || [])
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
label: item.remark ? "".concat(item.customerCode, "\uFF08").concat(item.remark, "\uFF09") : item.customerCode,
|
|
99
|
-
value: item.customerCode
|
|
100
|
-
};
|
|
101
|
-
});
|
|
97
|
+
this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
|
|
98
|
+
this.optionsMap = (this.options || []).reduce(function (cur, nxt) {
|
|
99
|
+
return _objectSpread(_objectSpread({}, cur), {}, _defineProperty({}, nxt.value, nxt.label));
|
|
100
|
+
}, {});
|
|
102
101
|
});
|
|
103
102
|
export default InterceptLogisticsCustomerCode;
|
|
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
8
|
import React from "react";
|
|
9
|
-
import { filterFn as _filterFn, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
9
|
+
import { filterFn as _filterFn, getJdCustomerCodeOptions, LogisticsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
10
|
import { SYMBOL } from "../../constant";
|
|
11
11
|
var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function InterceptLogisticsCustomerCode(options) {
|
|
12
12
|
var _this = this;
|
|
@@ -96,13 +96,6 @@ var InterceptLogisticsCustomerCode = /*#__PURE__*/_createClass(function Intercep
|
|
|
96
96
|
this.children = [];
|
|
97
97
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
98
98
|
this.dataType = "string";
|
|
99
|
-
this.options = (LogisticsAddressData.getInstance().getAddressData() || [])
|
|
100
|
-
return item.cpCode === "JD" && item.customerCode;
|
|
101
|
-
}).map(function (item) {
|
|
102
|
-
return {
|
|
103
|
-
label: item.remark ? "".concat(item.customerCode, "\uFF08").concat(item.remark, "\uFF09") : item.customerCode,
|
|
104
|
-
value: item.customerCode
|
|
105
|
-
};
|
|
106
|
-
});
|
|
99
|
+
this.options = getJdCustomerCodeOptions(LogisticsAddressData.getInstance().getAddressData() || []);
|
|
107
100
|
});
|
|
108
101
|
export default InterceptLogisticsCustomerCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "2.10.9-beta.
|
|
3
|
+
"version": "2.10.9-beta.46",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "2.10.9-beta.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "2.10.9-beta.46",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "2.10.9-beta.46",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
28
28
|
"react-pdf-js": "^5.1.0"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "245beb0ea7f8e6f7c83ddeceefaaf46662c2cf33",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|