@kmkf-fe-packages/services-components 0.8.15-alpha.0 → 0.8.15-alpha.2
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.
|
@@ -14,7 +14,6 @@ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
|
14
14
|
import get from 'lodash/get';
|
|
15
15
|
import { SYMBOL } from "../../constant";
|
|
16
16
|
var typeMap = {
|
|
17
|
-
BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
|
|
18
17
|
RADIO: 'radio'
|
|
19
18
|
};
|
|
20
19
|
var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
|
|
@@ -6,7 +6,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
8
|
rules: any[];
|
|
9
|
-
componentConfig: ComponentInterface[
|
|
9
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
10
10
|
isCombinationComponent: boolean;
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
@@ -14,6 +14,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
14
14
|
dataType: ComponentInterface['dataType'];
|
|
15
15
|
options: ComponentInterface['options'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
|
+
getKeyByComponentType: (type: string) => any;
|
|
17
18
|
editRender: (p: any) => React.JSX.Element;
|
|
18
19
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
20
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -12,6 +12,10 @@ import GetFormItem from "../GetFormItem";
|
|
|
12
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
13
|
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import { SYMBOL } from "../../constant";
|
|
15
|
+
var typeMap = {
|
|
16
|
+
BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
|
|
17
|
+
SELECT: 'select'
|
|
18
|
+
};
|
|
15
19
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
16
20
|
var _this = this,
|
|
17
21
|
_this$componentConfig3;
|
|
@@ -28,6 +32,9 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
28
32
|
_defineProperty(this, "children", void 0);
|
|
29
33
|
_defineProperty(this, "dataType", void 0);
|
|
30
34
|
_defineProperty(this, "options", void 0);
|
|
35
|
+
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
36
|
+
return typeMap[type] || '';
|
|
37
|
+
});
|
|
31
38
|
_defineProperty(this, "editRender", function (p) {
|
|
32
39
|
var _this$componentConfig, _this$componentConfig2;
|
|
33
40
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
@@ -52,25 +59,30 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
52
59
|
});
|
|
53
60
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
54
61
|
var _record;
|
|
55
|
-
|
|
62
|
+
var type = _this.type;
|
|
63
|
+
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
|
|
56
64
|
});
|
|
57
65
|
_defineProperty(this, "renderLog", function (r) {
|
|
58
|
-
|
|
66
|
+
var type = _this.type;
|
|
67
|
+
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
|
|
59
68
|
return _this.renderPc(undefined, r);
|
|
60
69
|
});
|
|
61
70
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
62
|
-
|
|
71
|
+
var type = _this.type;
|
|
72
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
|
|
63
73
|
});
|
|
64
74
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
65
75
|
var _record2;
|
|
66
|
-
|
|
76
|
+
var type = _this.type;
|
|
77
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
67
78
|
});
|
|
68
79
|
_defineProperty(this, "filterConfig", function (item) {
|
|
69
80
|
var _item$config;
|
|
81
|
+
var key = _this.getKeyByComponentType(item.type);
|
|
70
82
|
return {
|
|
71
83
|
searchDefaultConditions: SYMBOL.in,
|
|
72
84
|
type: item.type,
|
|
73
|
-
id: "".concat(item.id, "
|
|
85
|
+
id: "".concat(item.id, "_").concat(key),
|
|
74
86
|
// 过滤组件id
|
|
75
87
|
name: item.name,
|
|
76
88
|
// 过滤组件名称
|
|
@@ -80,15 +92,15 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
80
92
|
},
|
|
81
93
|
filterFn: function filterFn(value) {
|
|
82
94
|
return function (i) {
|
|
83
|
-
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id,
|
|
95
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, key));
|
|
84
96
|
};
|
|
85
97
|
} // 第一个为选中值,第二个参数为表格行记录值
|
|
86
98
|
};
|
|
87
99
|
});
|
|
88
100
|
this.name = options.name;
|
|
89
101
|
this.id = options.id;
|
|
90
|
-
this.sortField = "".concat(options.id, "
|
|
91
|
-
this.formField = "".concat(options.id, "
|
|
102
|
+
this.sortField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
|
|
103
|
+
this.formField = "".concat(options.id, "_").concat(this.getKeyByComponentType(options.type));
|
|
92
104
|
this.type = options.type;
|
|
93
105
|
this.componentConfig = options.componentConfig;
|
|
94
106
|
this.rules = [];
|
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, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, Handler, CompletedUser, LogisticsInterception, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue } 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) => 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 | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsExchange | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
|
package/dist/esm/factory.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.8.15-alpha.
|
|
3
|
+
"version": "0.8.15-alpha.2",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.8.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.8.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.8.15-alpha.1",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.8.15-alpha.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "df18be404ad2cdf504f587b5c375d980bff1f8f7"
|
|
44
44
|
}
|