@kmkf-fe-packages/services-components 0.7.15-alpha.54 → 0.7.15-alpha.56

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,6 +14,10 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
14
14
  import React from "react";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
+ var componentType = {
18
+ BS_EXCHANGE_GOODS: "bsExchangeType",
19
+ BS_REISSUE_GOODS: "bsReissueType"
20
+ };
17
21
  var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
18
22
  var _this = this;
19
23
  _classCallCheck(this, BsMemo);
@@ -37,21 +41,21 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
37
41
  return "".concat(key, "_").concat(name);
38
42
  });
39
43
  _defineProperty(this, "renderClient", function (r) {
40
- var _ref, _r$key, _r$key2, _ref2, _r$key3, _r$key4, _find, _this$componentConfig;
44
+ var _r$key$componentType$, _r$key, _r$key$componentType$2, _r$key2, _r$key2$componentType, _find, _this$componentConfig, _find2;
41
45
  var _this$getParentId$spl = _this.getParentId().split("_"),
42
46
  _this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
43
47
  key = _this$getParentId$spl2[0];
44
- if (!isNull(r === null || r === void 0 ? void 0 : r[key])) {
48
+ if (!(r !== null && r !== void 0 && (_r$key$componentType$ = r[key][componentType[_this.type]]) !== null && _r$key$componentType$ !== void 0 && _r$key$componentType$.length)) {
45
49
  return null;
46
50
  }
47
- var type = r !== null && r !== void 0 && r[key] ? (_ref = (r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : _r$key.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : _r$key2.bsExchangeType)) === null || _ref === void 0 ? void 0 : _ref[0] : "";
48
- var memo = r !== null && r !== void 0 && r[key] ? (_ref2 = (r === null || r === void 0 ? void 0 : (_r$key3 = r[key]) === null || _r$key3 === void 0 ? void 0 : _r$key3.bsReissueType) || (r === null || r === void 0 ? void 0 : (_r$key4 = r[key]) === null || _r$key4 === void 0 ? void 0 : _r$key4.bsExchangeType)) === null || _ref2 === void 0 ? void 0 : _ref2[1] : "";
51
+ var type = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key = r[key]) === null || _r$key === void 0 ? void 0 : (_r$key$componentType$2 = _r$key[componentType[_this.type]]) === null || _r$key$componentType$2 === void 0 ? void 0 : _r$key$componentType$2[0] : "";
52
+ var memo = r !== null && r !== void 0 && r[key] ? r === null || r === void 0 ? void 0 : (_r$key2 = r[key]) === null || _r$key2 === void 0 ? void 0 : (_r$key2$componentType = _r$key2[componentType[_this.type]]) === null || _r$key2$componentType === void 0 ? void 0 : _r$key2$componentType[1] : "";
49
53
  var children = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
50
54
  return item.value === type;
51
55
  })) === null || _find === void 0 ? void 0 : _find.children;
52
- var text = (children || []).find(function (item) {
56
+ var text = (_find2 = (children || []).find(function (item) {
53
57
  return item.value === memo;
54
- }).label;
58
+ })) === null || _find2 === void 0 ? void 0 : _find2.label;
55
59
  return !isNull(r === null || r === void 0 ? void 0 : r[key]) ? /*#__PURE__*/React.createElement(ItemView, {
56
60
  id: _this.id,
57
61
  label: _this.name,
@@ -68,16 +72,16 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
68
72
  return _this.renderPc(undefined, r);
69
73
  });
70
74
  _defineProperty(this, "getComponentValue", function (r) {
71
- var _ref3, _ref4, _find2, _this$componentConfig2;
75
+ var _ref, _ref2, _find3, _this$componentConfig2, _find4;
72
76
  var id = _this.getParentId();
73
- var type = r !== null && r !== void 0 && r[id] ? (_ref3 = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref3 === void 0 ? void 0 : _ref3[0] : "";
74
- var memo = r !== null && r !== void 0 && r[_this.id] ? (_ref4 = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref4 === void 0 ? void 0 : _ref4[1] : "";
75
- var children = (_find2 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
77
+ var type = r !== null && r !== void 0 && r[id] ? (_ref = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref === void 0 ? void 0 : _ref[0] : "";
78
+ var memo = r !== null && r !== void 0 && r[_this.id] ? (_ref2 = (r === null || r === void 0 ? void 0 : r[id]) || (r === null || r === void 0 ? void 0 : r[id])) === null || _ref2 === void 0 ? void 0 : _ref2[1] : "";
79
+ var children = (_find3 = (((_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.reasonList) || []).find(function (item) {
76
80
  return item.value === type;
77
- })) === null || _find2 === void 0 ? void 0 : _find2.children;
78
- var text = (children || []).find(function (item) {
81
+ })) === null || _find3 === void 0 ? void 0 : _find3.children;
82
+ var text = (_find4 = (children || []).find(function (item) {
79
83
  return item.value === memo;
80
- }).label;
84
+ })) === null || _find4 === void 0 ? void 0 : _find4.label;
81
85
  return text;
82
86
  });
83
87
  _defineProperty(this, "renderExport", function (value, record) {
@@ -15,6 +15,10 @@ import React from "react";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
17
17
  import { SYMBOL } from "../../../constant";
18
+ var componentType = {
19
+ BS_EXCHANGE_GOODS: "bsExchangeType",
20
+ BS_REISSUE_GOODS: "bsReissueType"
21
+ };
18
22
  var BsType = /*#__PURE__*/_createClass(function BsType(options) {
19
23
  var _this = this;
20
24
  _classCallCheck(this, BsType);
@@ -38,16 +42,16 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
38
42
  return "".concat(key, "_").concat(name);
39
43
  });
40
44
  _defineProperty(this, "renderClient", function (record) {
41
- var _find, _this$componentConfig;
45
+ var _record$key$component, _find, _this$componentConfig;
42
46
  var _this$getParentId$spl = _this.getParentId().split("_"),
43
47
  _this$getParentId$spl2 = _slicedToArray(_this$getParentId$spl, 1),
44
48
  key = _this$getParentId$spl2[0];
45
- if (!isNull(record === null || record === void 0 ? void 0 : record[key])) {
49
+ if (!(record !== null && record !== void 0 && (_record$key$component = record[key][componentType[_this.type]]) !== null && _record$key$component !== void 0 && _record$key$component.length)) {
46
50
  return null;
47
51
  }
48
52
  var text = (_find = (((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.reasonList) || []).find(function (item) {
49
- var _record$key, _record$key$bsReissue, _record$key2, _record$key2$bsExchan;
50
- return item.value === ((_record$key = record[key]) === null || _record$key === void 0 ? void 0 : (_record$key$bsReissue = _record$key.bsReissueType) === null || _record$key$bsReissue === void 0 ? void 0 : _record$key$bsReissue[0]) || item.value === ((_record$key2 = record[key]) === null || _record$key2 === void 0 ? void 0 : (_record$key2$bsExchan = _record$key2.bsExchangeType) === null || _record$key2$bsExchan === void 0 ? void 0 : _record$key2$bsExchan[0]);
53
+ var _record$key, _record$key$component2;
54
+ return item.value === ((_record$key = record[key]) === null || _record$key === void 0 ? void 0 : (_record$key$component2 = _record$key[componentType[_this.type]]) === null || _record$key$component2 === void 0 ? void 0 : _record$key$component2[0]);
51
55
  })) === null || _find === void 0 ? void 0 : _find.label;
52
56
  return !isNull(record === null || record === void 0 ? void 0 : record[key]) ? /*#__PURE__*/React.createElement(ItemView, {
53
57
  id: _this.id,
@@ -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) => ActualPayment | BsExchange | 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 | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsReissue | FlowStatusSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Submitter | Handler | CompletedUser | FlowWorkOrderId;
3
+ export declare const factory: (type: string, options: PickOption) => ShopInput | 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 | Submitter | Handler | CompletedUser | FlowWorkOrderId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.54",
3
+ "version": "0.7.15-alpha.56",
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.7.15-alpha.54",
30
- "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.54"
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.56",
30
+ "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.56"
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": "6c0e32801a413f48ae0a0a4baf247a0995a9644e"
43
+ "gitHead": "87c92d90ef4c8365b2ed9b0f3689ac76cd972261"
44
44
  }