@kmkf-fe-packages/services-components 1.22.1-beta.45 → 1.22.1-beta.47

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.
@@ -26,6 +26,7 @@ declare class EItemEncode implements ComponentInterface {
26
26
  }[];
27
27
  constructor(options: PickOption);
28
28
  getSortChildFields: () => any;
29
+ getShowHeader: (showHeader: any) => any[];
29
30
  renderClient: (record: any) => React.JSX.Element | null;
30
31
  renderPc: (value: unknown, record: Record) => React.JSX.Element | null;
31
32
  renderLog: (r: Record) => React.JSX.Element | null;
@@ -39,16 +39,8 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
39
39
  _defineProperty(this, "platform", void 0);
40
40
  _defineProperty(this, "sortChildField", void 0);
41
41
  _defineProperty(this, "getSortChildFields", function () {
42
- // const mapping = {
43
- // title: "商品名称",
44
- // outerId: "商品编码",
45
- // numIid: "商品id",
46
- // skuId: "skuId",
47
- // outerSkuId: "sku编码",
48
- // propertiesName: "sku信息",
49
- // };
50
42
  return columnsGoodsList.filter(function (item) {
51
- return item.dataIndex !== "picUrl";
43
+ return !["picUrl", "num"].includes(item.dataIndex);
52
44
  }).map(function (item) {
53
45
  return {
54
46
  name: item.title,
@@ -57,14 +49,22 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
57
49
  disabled: !_this.showHeader.includes(item.dataIndex)
58
50
  };
59
51
  });
60
- // return Object.keys(mapping).map((item) => {
61
- // return {
62
- // name: mapping[item as keyof typeof mapping],
63
- // key: `${this.id}_${item}`,
64
- // dataType: "arrayObject",
65
- // disabled: !this.showHeader.includes(item),
66
- // };
67
- // });
52
+ });
53
+ _defineProperty(this, "getShowHeader", function (showHeader) {
54
+ if (!Array.isArray(showHeader)) {
55
+ return columnsGoodsList.map(function (item) {
56
+ return item.dataIndex;
57
+ });
58
+ }
59
+ var isStringArray = Array.isArray(showHeader) && typeof showHeader[0] === "string";
60
+ var isObjectArray = Array.isArray(showHeader) && Object.prototype.toString.call(showHeader[0]) === "[object Object]";
61
+ if (isStringArray) return showHeader;
62
+ if (isObjectArray) return showHeader.filter(function (item) {
63
+ return item.show !== false;
64
+ }).map(function (item) {
65
+ return item.dataIndex;
66
+ });
67
+ return [];
68
68
  });
69
69
  _defineProperty(this, "renderClient", function (record) {
70
70
  if (isNull(record === null || record === void 0 ? void 0 : record[_this.id])) return null;
@@ -145,9 +145,7 @@ var EItemEncode = /*#__PURE__*/_createClass(function EItemEncode(options) {
145
145
  this.type = options.type;
146
146
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
147
147
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
148
- this.showHeader = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader) || columnsGoodsList.map(function (item) {
149
- return item.dataIndex;
150
- });
148
+ this.showHeader = this.getShowHeader((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.showHeader);
151
149
  this.isCombinationComponent = true;
152
150
  this.canSort = false;
153
151
  this.goods = new BsHeaderGood(_objectSpread(_objectSpread({}, options), {}, {
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, 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) => BsLogistics | CommonSystemOrder | ItemEnCode | JstSendGood | MsgStatus | ReissueLogistics | 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 | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | ItemEnCode | JstSendGood | MsgStatus | ReissueLogistics | 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 | 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.22.1-beta.45",
3
+ "version": "1.22.1-beta.47",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "50944b2e6bf7112f956f7bb10fd0a0a8d097d487",
44
+ "gitHead": "a9a9344bdcdb9a93a4346db31ed5d1060eb7d07a",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }