@kmkf-fe-packages/services-components 1.25.0 → 1.25.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.
|
@@ -25,6 +25,7 @@ declare class EItemEncode implements ComponentInterface {
|
|
|
25
25
|
}[];
|
|
26
26
|
constructor(options: PickOption);
|
|
27
27
|
getSortChildFields: () => any;
|
|
28
|
+
getShowHeader: (showHeader: any) => any[];
|
|
28
29
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
29
30
|
renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
|
|
30
31
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -39,12 +39,12 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
39
39
|
_defineProperty(this, "sortChildField", void 0);
|
|
40
40
|
_defineProperty(this, "getSortChildFields", function () {
|
|
41
41
|
var mapping = {
|
|
42
|
-
title:
|
|
43
|
-
outerId:
|
|
44
|
-
numIid:
|
|
45
|
-
skuId:
|
|
46
|
-
outerSkuId:
|
|
47
|
-
propertiesName:
|
|
42
|
+
title: "商品名称",
|
|
43
|
+
outerId: "商品编码",
|
|
44
|
+
numIid: "商品id",
|
|
45
|
+
skuId: "skuId",
|
|
46
|
+
outerSkuId: "sku编码",
|
|
47
|
+
propertiesName: "sku信息"
|
|
48
48
|
};
|
|
49
49
|
return Object.keys(mapping).map(function (item) {
|
|
50
50
|
return {
|
|
@@ -55,6 +55,34 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
55
55
|
};
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
|
+
_defineProperty(this, "getShowHeader", function (showHeader) {
|
|
59
|
+
if (!Array.isArray(showHeader)) {
|
|
60
|
+
return ["title",
|
|
61
|
+
// 商品名称
|
|
62
|
+
"outerId",
|
|
63
|
+
// 商品编码
|
|
64
|
+
"picUrl",
|
|
65
|
+
// 图片
|
|
66
|
+
"numIid",
|
|
67
|
+
// 商品id
|
|
68
|
+
"skuId",
|
|
69
|
+
// skuId
|
|
70
|
+
"outerSkuId",
|
|
71
|
+
// sku编码
|
|
72
|
+
"propertiesName" // sku 信息
|
|
73
|
+
];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
|
|
77
|
+
var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
|
|
78
|
+
if (isStringArray) return showHeader;
|
|
79
|
+
if (isObjectArray) return showHeader.filter(function (item) {
|
|
80
|
+
return item.show !== false;
|
|
81
|
+
}).map(function (item) {
|
|
82
|
+
return item.dataIndex;
|
|
83
|
+
});
|
|
84
|
+
return [];
|
|
85
|
+
});
|
|
58
86
|
_defineProperty(this, "renderClient", function (record) {
|
|
59
87
|
if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
|
|
60
88
|
return /*#__PURE__*/React.createElement(ItemView, {
|
|
@@ -105,9 +133,9 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
105
133
|
required: false,
|
|
106
134
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
107
135
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
108
|
-
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip :
|
|
136
|
+
tooltip: (_this$componentConfig = _this.componentConfig) !== null && _this$componentConfig !== void 0 && _this$componentConfig.showTooltip ? (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.tooltip : "",
|
|
109
137
|
component: /*#__PURE__*/React.createElement(ItemEncode, _extends({
|
|
110
|
-
isSingleRow: _this.platform !==
|
|
138
|
+
isSingleRow: _this.platform !== "pc"
|
|
111
139
|
}, _this.componentConfig, {
|
|
112
140
|
shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
|
|
113
141
|
shopList: (_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList,
|
|
@@ -134,21 +162,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
|
|
|
134
162
|
this.type = options.type;
|
|
135
163
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
136
164
|
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
137
|
-
this.showHeader = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader)
|
|
138
|
-
// 商品名称
|
|
139
|
-
"outerId",
|
|
140
|
-
// 商品编码
|
|
141
|
-
"picUrl",
|
|
142
|
-
// 图片
|
|
143
|
-
"numIid",
|
|
144
|
-
// 商品id
|
|
145
|
-
"skuId",
|
|
146
|
-
// skuId
|
|
147
|
-
"outerSkuId",
|
|
148
|
-
// sku编码
|
|
149
|
-
"propertiesName" // sku 信息
|
|
150
|
-
];
|
|
151
|
-
|
|
165
|
+
this.showHeader = this.getShowHeader((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader);
|
|
152
166
|
this.isCombinationComponent = true;
|
|
153
167
|
this.canSort = false;
|
|
154
168
|
this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
|
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, AfterSalesOrderId, BsE3Goods, BsE3Reissue, MemberLevel } 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) => BsLogistics | ItemEnCode | JstLogistics | JstSendGood | MsgStatus | 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 | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstItemSelect | JstSupply | BsSystemOrder | BsGoods | BsE3Goods | BsE3Reissue | 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 | MemberLevel | AfterSalesOrderId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.1",
|
|
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.25.
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.25.1",
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "1.25.1",
|
|
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": "fe8404f42c30b927e372cba3eac352b365da758a",
|
|
45
45
|
"gitHooks": {
|
|
46
46
|
"pre-commit": "lint-staged"
|
|
47
47
|
}
|