@kmkf-fe-packages/services-components 0.7.15-alpha.3 → 0.7.15-alpha.4

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.
Files changed (27) hide show
  1. package/dist/esm/components/BS/BsExchange/index.d.ts +4 -3
  2. package/dist/esm/components/BS/BsExchange/index.js +133 -18
  3. package/dist/esm/components/BS/BsGoods/index.d.ts +1 -1
  4. package/dist/esm/components/BS/BsGoods/index.js +30 -6
  5. package/dist/esm/components/BS/BsReissue/index.d.ts +4 -8
  6. package/dist/esm/components/BS/BsReissue/index.js +57 -23
  7. package/dist/esm/components/BS/common/BsChildCode.d.ts +25 -0
  8. package/dist/esm/components/BS/common/BsChildCode.js +71 -0
  9. package/dist/esm/components/BS/common/BsChildMoney.d.ts +25 -0
  10. package/dist/esm/components/BS/common/BsChildMoney.js +71 -0
  11. package/dist/esm/components/BS/common/BsChildName.d.ts +25 -0
  12. package/dist/esm/components/BS/common/BsChildName.js +71 -0
  13. package/dist/esm/components/BS/common/BsChildNumber.d.ts +25 -0
  14. package/dist/esm/components/BS/common/BsChildNumber.js +71 -0
  15. package/dist/esm/components/BS/common/BsChildPic.d.ts +25 -0
  16. package/dist/esm/components/BS/common/BsChildPic.js +72 -0
  17. package/dist/esm/components/BS/common/BsChildShare.d.ts +25 -0
  18. package/dist/esm/components/BS/common/BsChildShare.js +71 -0
  19. package/dist/esm/components/BS/common/BsChildSku.d.ts +25 -0
  20. package/dist/esm/components/BS/common/BsChildSku.js +71 -0
  21. package/dist/esm/components/BS/common/BsChildType.d.ts +25 -0
  22. package/dist/esm/components/BS/common/BsChildType.js +71 -0
  23. package/dist/esm/components/BS/common/index.d.ts +10 -0
  24. package/dist/esm/components/BS/common/index.js +10 -0
  25. package/dist/esm/components/Common/index.d.ts +1 -0
  26. package/dist/esm/components/Common/index.js +11 -1
  27. package/package.json +3 -3
@@ -0,0 +1,71 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
3
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
4
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import React from "react";
9
+ import ItemView from "../../../commonComponents/ItemView";
10
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
11
+ var BsChildType = /*#__PURE__*/_createClass(function BsChildType(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsChildType);
14
+ _defineProperty(this, "name", void 0);
15
+ _defineProperty(this, "id", void 0);
16
+ _defineProperty(this, "sortField", void 0);
17
+ _defineProperty(this, "type", void 0);
18
+ _defineProperty(this, "componentConfig", void 0);
19
+ _defineProperty(this, "align", void 0);
20
+ _defineProperty(this, "width", void 0);
21
+ _defineProperty(this, "isCombinationComponent", void 0);
22
+ _defineProperty(this, "formField", void 0);
23
+ _defineProperty(this, "canSort", void 0);
24
+ _defineProperty(this, "children", void 0);
25
+ _defineProperty(this, "dataType", void 0);
26
+ _defineProperty(this, "renderClient", function (record) {
27
+ return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
28
+ id: _this.id,
29
+ label: _this.name,
30
+ value: _this.getComponentValue(record)
31
+ }) : null;
32
+ });
33
+ _defineProperty(this, "renderPc", function (value, record) {
34
+ var _this$getComponentVal;
35
+ return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : "--");
36
+ });
37
+ _defineProperty(this, "renderLog", function (r) {
38
+ if (isNull(r === null || r === void 0 ? void 0 : r[_this.id])) return null;
39
+ return _this.renderPc(undefined, r);
40
+ });
41
+ _defineProperty(this, "getComponentValue", function (r) {
42
+ var list = ((r === null || r === void 0 ? void 0 : r[_this.id]) || []).reduce(function (prv, next) {
43
+ next["type"] && prv.push(next["type"]);
44
+ return prv;
45
+ }, []);
46
+ return list.join(",");
47
+ });
48
+ _defineProperty(this, "renderExport", function (value, record) {
49
+ var _this$getComponentVal2;
50
+ return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : "--";
51
+ });
52
+ _defineProperty(this, "editRender", function () {
53
+ return null;
54
+ });
55
+ _defineProperty(this, "filterConfig", function () {
56
+ return [];
57
+ });
58
+ this.name = options.name;
59
+ this.id = options.id;
60
+ this.sortField = options.id;
61
+ this.formField = options.id;
62
+ this.type = options.type;
63
+ this.componentConfig = options.componentConfig;
64
+ this.align = "left";
65
+ this.width = 200;
66
+ this.isCombinationComponent = false;
67
+ this.canSort = true;
68
+ this.dataType = "string";
69
+ this.children = [];
70
+ });
71
+ export default BsChildType;
@@ -0,0 +1,10 @@
1
+ export { default as BsType } from "./BsType";
2
+ export { default as BsMemo } from "./BsMemo";
3
+ export { default as BsChildPic } from "./BsChildPic";
4
+ export { default as BsChildName } from "./BsChildName";
5
+ export { default as BsChildCode } from "./BsChildCode";
6
+ export { default as BsChildSku } from "./BsChildSku";
7
+ export { default as BsChildMoney } from "./BsChildMoney";
8
+ export { default as BsChildNumber } from "./BsChildNumber";
9
+ export { default as BsChildShare } from "./BsChildShare";
10
+ export { default as BsChildType } from "./BsChildType";
@@ -0,0 +1,10 @@
1
+ export { default as BsType } from "./BsType";
2
+ export { default as BsMemo } from "./BsMemo";
3
+ export { default as BsChildPic } from "./BsChildPic";
4
+ export { default as BsChildName } from "./BsChildName";
5
+ export { default as BsChildCode } from "./BsChildCode";
6
+ export { default as BsChildSku } from "./BsChildSku";
7
+ export { default as BsChildMoney } from "./BsChildMoney";
8
+ export { default as BsChildNumber } from "./BsChildNumber";
9
+ export { default as BsChildShare } from "./BsChildShare";
10
+ export { default as BsChildType } from "./BsChildType";
@@ -20,4 +20,5 @@ export declare const BsGoodImage: ({ item, index }: {
20
20
  index: number;
21
21
  }) => React.JSX.Element;
22
22
  export declare const BsExchangeList: ({ list }: any) => React.JSX.Element;
23
+ export declare const BsGoodPic: (list: string[]) => React.JSX.Element[];
23
24
  export {};
@@ -221,7 +221,7 @@ export var JstGoodImage = function JstGoodImage(_ref6) {
221
221
  }, "\u5305\u88F9".concat(index + 1), ":")), type === 1 ? /*#__PURE__*/React.createElement("span", null, company && item.logisticsCode ? [company, item.logisticsCode].join("/") : company ? company : item.logisticsCode) : null, type === 2 ? /*#__PURE__*/React.createElement("span", null, item.supplyName && item.supplyId ? [item.supplyId, item.supplyName].join("/") : item.supplyId ? item.supplyId : item.supplyName) : null, type === 3 ? /*#__PURE__*/React.createElement("span", null, item.sendName && item.sendId ? [item.sendId, item.sendName].join("/") : item.sendId ? item.sendId : item.sendName) : null));
222
222
  }) : null;
223
223
  };
224
- //bs商品展示
224
+ //bs商品展示 todo
225
225
  export var BsGoodImage = function BsGoodImage(_ref7) {
226
226
  var item = _ref7.item,
227
227
  index = _ref7.index;
@@ -254,6 +254,7 @@ export var BsGoodImage = function BsGoodImage(_ref7) {
254
254
  }) : null;
255
255
  })));
256
256
  };
257
+ //bs换货 todo
257
258
  export var BsExchangeList = function BsExchangeList(_ref8) {
258
259
  var list = _ref8.list;
259
260
  return /*#__PURE__*/React.createElement("div", {
@@ -275,4 +276,13 @@ export var BsExchangeList = function BsExchangeList(_ref8) {
275
276
  });
276
277
  })));
277
278
  }));
279
+ };
280
+ //bs图片展示
281
+ export var BsGoodPic = function BsGoodPic(list) {
282
+ return list.map(function (t) {
283
+ return /*#__PURE__*/React.createElement(Image, {
284
+ width: 60,
285
+ src: t
286
+ });
287
+ });
278
288
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.7.15-alpha.3",
3
+ "version": "0.7.15-alpha.4",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -26,7 +26,7 @@
26
26
  "father": "^4.1.7"
27
27
  },
28
28
  "dependencies": {
29
- "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.3",
29
+ "@kmkf-fe-packages/basic-components": "^0.7.15-alpha.4",
30
30
  "@kmkf-fe-packages/kmkf-utils": "^0.7.15-alpha.3"
31
31
  },
32
32
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "gitHooks": {
41
41
  "pre-commit": "lint-staged"
42
42
  },
43
- "gitHead": "ed7ac8d0c87afbda8f080748adc790cd6755c9e0"
43
+ "gitHead": "52277258146a461cd2fdcb41f672d825a88ef295"
44
44
  }