@kmkf-fe-packages/services-components 1.19.4-beta.7 → 1.19.4-beta.8
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.
|
@@ -13,6 +13,7 @@ declare class BasicSelect implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface["dataType"];
|
|
15
15
|
options: ComponentInterface["options"];
|
|
16
|
+
optionsMap: ComponentInterface['optionsMap'];
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
getKeyByComponentType: (type: string) => any;
|
|
18
19
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -26,7 +26,8 @@ var typeMap = {
|
|
|
26
26
|
};
|
|
27
27
|
var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
28
28
|
var _this = this,
|
|
29
|
-
_this$componentConfig5
|
|
29
|
+
_this$componentConfig5,
|
|
30
|
+
_this$options;
|
|
30
31
|
_classCallCheck(this, BasicSelect);
|
|
31
32
|
_defineProperty(this, "name", void 0);
|
|
32
33
|
_defineProperty(this, "id", void 0);
|
|
@@ -40,6 +41,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
40
41
|
_defineProperty(this, "children", void 0);
|
|
41
42
|
_defineProperty(this, "dataType", void 0);
|
|
42
43
|
_defineProperty(this, "options", void 0);
|
|
44
|
+
_defineProperty(this, "optionsMap", void 0);
|
|
43
45
|
_defineProperty(this, "getKeyByComponentType", function (type) {
|
|
44
46
|
return typeMap[type].key || "";
|
|
45
47
|
});
|
|
@@ -61,16 +63,20 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
61
63
|
});
|
|
62
64
|
});
|
|
63
65
|
_defineProperty(this, "renderClient", function (record) {
|
|
66
|
+
var _this$optionsMap;
|
|
67
|
+
var label = (_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[record === null || record === void 0 ? void 0 : record[_this.id]];
|
|
64
68
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
65
69
|
id: _this.id,
|
|
66
70
|
label: _this.name,
|
|
67
|
-
value:
|
|
71
|
+
value: label || ""
|
|
68
72
|
}) : null;
|
|
69
73
|
});
|
|
70
74
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
71
|
-
var
|
|
75
|
+
var _this$optionsMap2;
|
|
72
76
|
var type = _this.type;
|
|
73
|
-
|
|
77
|
+
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
78
|
+
var label = ((_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[key]) || '';
|
|
79
|
+
return /*#__PURE__*/React.createElement("span", null, label !== null && label !== void 0 ? label : "--");
|
|
74
80
|
});
|
|
75
81
|
_defineProperty(this, "renderLog", function (r) {
|
|
76
82
|
var type = _this.type;
|
|
@@ -82,9 +88,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
82
88
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
83
89
|
});
|
|
84
90
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
85
|
-
var
|
|
91
|
+
var _this$optionsMap3;
|
|
86
92
|
var type = _this.type;
|
|
87
|
-
|
|
93
|
+
var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
|
|
94
|
+
var label = ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || '';
|
|
95
|
+
return label !== null && label !== void 0 ? label : "--";
|
|
88
96
|
});
|
|
89
97
|
_defineProperty(this, "filterConfig", function (item) {
|
|
90
98
|
var _item$config;
|
|
@@ -119,5 +127,9 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
|
|
|
119
127
|
this.children = [];
|
|
120
128
|
this.dataType = "string";
|
|
121
129
|
this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
|
|
130
|
+
this.optionsMap = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.reduce(function (prev, next) {
|
|
131
|
+
prev[next.value] = next.label;
|
|
132
|
+
return prev;
|
|
133
|
+
}, {});
|
|
122
134
|
});
|
|
123
135
|
export default BasicSelect;
|
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, SubForm, CommonDataTime, TradeId, ShopName, 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, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, KmErpSendGood, AfterSalesOrderId, BsE3Goods } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => ActualPayment |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicPicture | BasicSelect | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicRadio | BasicTextArea | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | KmErpSendGood | AfterSalesOrderId;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export interface ComponentInterface {
|
|
|
50
50
|
dataType: "string" | "number" | "boolean" | "array" | "range" | "object" | "weakenArray" | "arrayObject";
|
|
51
51
|
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
|
|
52
52
|
options?: Array<any>;
|
|
53
|
+
optionsMap?: Record;
|
|
53
54
|
templateId?: string;
|
|
54
55
|
flowTemplateKey?: string;
|
|
55
56
|
workOrderUniqueKey?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.19.4-beta.
|
|
3
|
+
"version": "1.19.4-beta.8",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.19.4-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.19.4-beta.8",
|
|
25
25
|
"@kmkf-fe-packages/kmkf-utils": "1.19.4-beta.7",
|
|
26
26
|
"b64-to-blob": "^1.2.19",
|
|
27
27
|
"html2canvas": "^1.4.1",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "c34a35404bcdb337d537ab96cccdf70f3c116919",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|