@kmkf-fe-packages/services-components 0.24.1-alpha.8 → 0.24.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.
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from "../../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
declare class ExpressCode implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
10
|
align: ALignType;
|
|
11
11
|
width: number;
|
|
12
12
|
isCombinationComponent: boolean;
|
|
13
13
|
formField: string;
|
|
14
14
|
canSort: boolean;
|
|
15
15
|
children: ComponentInterface[];
|
|
16
|
-
dataType: ComponentInterface[
|
|
16
|
+
dataType: ComponentInterface["dataType"];
|
|
17
17
|
parentName: string;
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
renderClient: () => null;
|
|
@@ -23,12 +23,13 @@ declare class ExpressCode implements ComponentInterface {
|
|
|
23
23
|
renderExport: (value: string, record: Record) => any;
|
|
24
24
|
editRender: () => null;
|
|
25
25
|
filterConfig: (item: ColumnConfig) => {
|
|
26
|
-
searchDefaultConditions: "
|
|
26
|
+
searchDefaultConditions: "in";
|
|
27
27
|
type: string;
|
|
28
28
|
id: string;
|
|
29
29
|
name: string;
|
|
30
|
-
filterComponentType: "
|
|
30
|
+
filterComponentType: "SelectInput";
|
|
31
31
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
32
|
+
formatFilterValue: (value: any) => any;
|
|
32
33
|
};
|
|
33
34
|
}
|
|
34
35
|
export default ExpressCode;
|
|
@@ -11,16 +11,16 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from "react";
|
|
15
15
|
import { BsExpressRender } from "../../Common";
|
|
16
|
-
import { isNull, filterFn as _filterFn } from
|
|
17
|
-
import { SYMBOL } from "../../../constant";
|
|
16
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
17
|
+
import { SYMBOL, batchInput } from "../../../constant";
|
|
18
18
|
var typeMap = {
|
|
19
19
|
BS_LOGISTICS: {
|
|
20
|
-
key:
|
|
20
|
+
key: "bsLogisticsItem"
|
|
21
21
|
},
|
|
22
22
|
WLN_LOGISTICS: {
|
|
23
|
-
key:
|
|
23
|
+
key: "wlnLogisticsItem"
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
@@ -45,7 +45,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
45
45
|
return null;
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
-
var _this$id$split = _this.id.split(
|
|
48
|
+
var _this$id$split = _this.id.split("_"),
|
|
49
49
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
50
50
|
key = _this$id$split2[0],
|
|
51
51
|
parentKey = _this$id$split2[1],
|
|
@@ -55,7 +55,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
55
55
|
}
|
|
56
56
|
return /*#__PURE__*/React.createElement(BsExpressRender, {
|
|
57
57
|
list: record === null || record === void 0 ? void 0 : record["".concat(key, "_").concat(parentKey, "_").concat(typeMap[_this.type].key)],
|
|
58
|
-
showField:
|
|
58
|
+
showField: "code"
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "renderLog", function (r) {
|
|
@@ -67,7 +67,7 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
67
67
|
});
|
|
68
68
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
69
|
var _record;
|
|
70
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record :
|
|
70
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
71
71
|
});
|
|
72
72
|
_defineProperty(this, "editRender", function () {
|
|
73
73
|
return null;
|
|
@@ -75,15 +75,22 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
75
75
|
_defineProperty(this, "filterConfig", function (item) {
|
|
76
76
|
var subKey = item.subKey;
|
|
77
77
|
return {
|
|
78
|
-
searchDefaultConditions: SYMBOL.
|
|
78
|
+
searchDefaultConditions: SYMBOL.in,
|
|
79
79
|
type: item.type,
|
|
80
80
|
id: "".concat(item.id, "_").concat(subKey),
|
|
81
81
|
name: "".concat(_this.parentName, "\u7269\u6D41\u5355\u53F7"),
|
|
82
|
-
filterComponentType:
|
|
82
|
+
filterComponentType: "SelectInput",
|
|
83
83
|
filterFn: function filterFn(value) {
|
|
84
84
|
return function (i) {
|
|
85
|
-
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
85
|
+
return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "logisticsCode"), value);
|
|
86
86
|
};
|
|
87
|
+
},
|
|
88
|
+
formatFilterValue: function formatFilterValue(value) {
|
|
89
|
+
if (value.type === "keywords") {
|
|
90
|
+
return batchInput(value.keywords);
|
|
91
|
+
} else {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
};
|
|
89
96
|
});
|
|
@@ -98,14 +105,14 @@ var ExpressCode = /*#__PURE__*/_createClass(function ExpressCode(options) {
|
|
|
98
105
|
if (/^[0-9a-zA-Z]*$/.test(value)) {
|
|
99
106
|
return Promise.resolve();
|
|
100
107
|
}
|
|
101
|
-
return Promise.reject(new Error(
|
|
108
|
+
return Promise.reject(new Error("只能输入数字和字母"));
|
|
102
109
|
}
|
|
103
110
|
}] : [];
|
|
104
|
-
this.align =
|
|
111
|
+
this.align = "left";
|
|
105
112
|
this.width = (options === null || options === void 0 ? void 0 : options.width) || 150;
|
|
106
113
|
this.isCombinationComponent = false;
|
|
107
114
|
this.canSort = false;
|
|
108
|
-
this.dataType =
|
|
115
|
+
this.dataType = "string";
|
|
109
116
|
this.children = [];
|
|
110
117
|
this.parentName = options === null || options === void 0 ? void 0 : options.parentName;
|
|
111
118
|
});
|
|
@@ -85,7 +85,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
85
85
|
required: false,
|
|
86
86
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
87
87
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({
|
|
88
|
-
isSingleRow: _this.platform
|
|
88
|
+
isSingleRow: _this.platform !== 'pc'
|
|
89
89
|
}, _this.componentConfig, {
|
|
90
90
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
91
91
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ItemEnCode | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.24.1
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "^0.24.1
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.24.1
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "^0.24.1",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.24.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1574e8b0d511d79bf4a92f7d614a226b67fc8640",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|