@kmkf-fe-packages/services-components 1.19.9 → 1.19.10
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.
|
@@ -20,12 +20,12 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
20
20
|
* @param value
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
|
-
getValues: (value: any) =>
|
|
23
|
+
getValues: (value: any) => any;
|
|
24
24
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
25
25
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
26
26
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
27
27
|
getComponentValue: (r: Record) => any;
|
|
28
|
-
renderExport: (value: any, record: Record) =>
|
|
28
|
+
renderExport: (value: any, record: Record) => any;
|
|
29
29
|
editRender: (p: any) => React.JSX.Element;
|
|
30
30
|
filterConfig: (item: ColumnConfig) => {
|
|
31
31
|
searchDefaultConditions: "in";
|
|
@@ -10,13 +10,13 @@ import React from "react";
|
|
|
10
10
|
import { Cascader } from "antd";
|
|
11
11
|
import intersection from "lodash/intersection";
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
|
-
import {
|
|
13
|
+
import { transMultSelectOptions, tree } from "@kmkf-fe-packages/kmkf-utils";
|
|
14
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
15
|
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
18
18
|
var _this = this,
|
|
19
|
-
_this$
|
|
19
|
+
_this$componentConfig6;
|
|
20
20
|
_classCallCheck(this, BasicCascader);
|
|
21
21
|
_defineProperty(this, "name", void 0);
|
|
22
22
|
_defineProperty(this, "id", void 0);
|
|
@@ -32,10 +32,13 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
32
32
|
_defineProperty(this, "format", void 0);
|
|
33
33
|
_defineProperty(this, "options", void 0);
|
|
34
34
|
_defineProperty(this, "getValues", function (value) {
|
|
35
|
-
var
|
|
36
|
-
return
|
|
35
|
+
var _value$map;
|
|
36
|
+
// return findLabelBySelectValue(value, this.componentConfig?.options)
|
|
37
|
+
// ?.map((i: { label: string; actived: boolean }) => i.label)
|
|
38
|
+
// ?.join(",");
|
|
39
|
+
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (i) {
|
|
37
40
|
return i.label;
|
|
38
|
-
})) === null ||
|
|
41
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.join(",");
|
|
39
42
|
});
|
|
40
43
|
_defineProperty(this, "renderClient", function (record) {
|
|
41
44
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -45,15 +48,25 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
45
48
|
}) : null;
|
|
46
49
|
});
|
|
47
50
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
-
var
|
|
51
|
+
var _ref, _ref$map;
|
|
49
52
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
|
|
50
53
|
return /*#__PURE__*/React.createElement("span", null, "--");
|
|
51
54
|
}
|
|
52
|
-
return /*#__PURE__*/React.createElement("span", null, (
|
|
53
|
-
return item.
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return /*#__PURE__*/React.createElement("span", null, (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref === void 0 ? void 0 : (_ref$map = _ref.map(function (item) {
|
|
56
|
+
return item === null || item === void 0 ? void 0 : item.label;
|
|
57
|
+
})) === null || _ref$map === void 0 ? void 0 : _ref$map.join(','));
|
|
58
|
+
// return (
|
|
59
|
+
// <span>
|
|
60
|
+
// {findLabelBySelectValue(
|
|
61
|
+
// (record?.[`${this.id}_multSelect`] || [])?.map(
|
|
62
|
+
// (item: any) => item.actived
|
|
63
|
+
// ),
|
|
64
|
+
// this.componentConfig?.options || []
|
|
65
|
+
// )
|
|
66
|
+
// ?.map((i: { label: string; actived: boolean }) => i.label)
|
|
67
|
+
// ?.join(",")}
|
|
68
|
+
// </span>
|
|
69
|
+
// );
|
|
57
70
|
});
|
|
58
71
|
_defineProperty(this, "renderLog", function (r) {
|
|
59
72
|
if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_multSelect")])) return null;
|
|
@@ -63,29 +76,35 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
63
76
|
return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_multSelect")];
|
|
64
77
|
});
|
|
65
78
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
66
|
-
var
|
|
79
|
+
var _ref2, _ref2$map;
|
|
67
80
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) === undefined) {
|
|
68
81
|
return "--";
|
|
69
82
|
}
|
|
70
|
-
return (
|
|
71
|
-
return item.
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
}
|
|
83
|
+
return (_ref2 = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_multSelect")]) || []) === null || _ref2 === void 0 ? void 0 : (_ref2$map = _ref2.map(function (item) {
|
|
84
|
+
return item === null || item === void 0 ? void 0 : item.label;
|
|
85
|
+
})) === null || _ref2$map === void 0 ? void 0 : _ref2$map.join(',');
|
|
86
|
+
// return findLabelBySelectValue(
|
|
87
|
+
// (record?.[`${this.id}_multSelect`] || [])?.map(
|
|
88
|
+
// (item: any) => item.actived
|
|
89
|
+
// ),
|
|
90
|
+
// this.componentConfig?.options || []
|
|
91
|
+
// )
|
|
92
|
+
// ?.map((i: { label: string; actived: boolean }) => i.label)
|
|
93
|
+
// ?.join(",");
|
|
75
94
|
});
|
|
76
95
|
_defineProperty(this, "editRender", function (p) {
|
|
77
|
-
var _this$
|
|
96
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
|
|
78
97
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
79
98
|
title: _this.name,
|
|
80
99
|
name: _this.id,
|
|
81
100
|
rules: _this.rules,
|
|
82
101
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
83
|
-
required: (_this$
|
|
102
|
+
required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
|
|
84
103
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
85
|
-
tooltip: (_this$
|
|
104
|
+
tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
|
|
86
105
|
component: /*#__PURE__*/React.createElement(Cascader, _extends({}, _this.componentConfig, {
|
|
87
106
|
placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
|
|
88
|
-
options: transMultSelectOptions(((_this$
|
|
107
|
+
options: transMultSelectOptions(((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || []),
|
|
89
108
|
fieldNames: {
|
|
90
109
|
label: "label",
|
|
91
110
|
value: "actived",
|
|
@@ -151,7 +170,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
151
170
|
this.canSort = true;
|
|
152
171
|
this.dataType = "array";
|
|
153
172
|
this.format = "cascader";
|
|
154
|
-
this.options = ((_this$
|
|
173
|
+
this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
|
|
155
174
|
}
|
|
156
175
|
|
|
157
176
|
/**
|
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 | BsLogistics | BsSystemOrder | BasicCascader | JstSendGood | KmErpSendGood | MsgStatus | BasicInput | BasicAddress | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | 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 | JstSupply | BsGoods | BsE3Goods | BsExchange | BsReissue | BsReturn | 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 | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.10",
|
|
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": "1.19.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.19.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.19.10",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.19.10",
|
|
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": "bff4020e7575d9c52239ac100cdcf4d44df91c83",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|