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

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 (45) hide show
  1. package/dist/esm/commonComponents/QueryLogisticsTrack/index.js +23 -21
  2. package/dist/esm/components/BS/BsExchange/index.d.ts +4 -3
  3. package/dist/esm/components/BS/BsExchange/index.js +194 -16
  4. package/dist/esm/components/BS/BsGoods/index.d.ts +4 -4
  5. package/dist/esm/components/BS/BsGoods/index.js +55 -22
  6. package/dist/esm/components/BS/BsLogistics/index.d.ts +7 -7
  7. package/dist/esm/components/BS/BsLogistics/index.js +14 -14
  8. package/dist/esm/components/BS/BsReissue/index.d.ts +4 -8
  9. package/dist/esm/components/BS/BsReissue/index.js +83 -24
  10. package/dist/esm/components/BS/common/BsHeaderCode.d.ts +25 -0
  11. package/dist/esm/components/BS/common/BsHeaderCode.js +71 -0
  12. package/dist/esm/components/BS/common/BsHeaderMoney.d.ts +25 -0
  13. package/dist/esm/components/BS/common/BsHeaderMoney.js +71 -0
  14. package/dist/esm/components/BS/common/BsHeaderName.d.ts +25 -0
  15. package/dist/esm/components/BS/common/BsHeaderName.js +71 -0
  16. package/dist/esm/components/BS/common/BsHeaderNumber.d.ts +25 -0
  17. package/dist/esm/components/BS/common/BsHeaderNumber.js +71 -0
  18. package/dist/esm/components/BS/common/BsHeaderPic.d.ts +25 -0
  19. package/dist/esm/components/BS/common/BsHeaderPic.js +72 -0
  20. package/dist/esm/components/BS/common/BsHeaderShare.d.ts +25 -0
  21. package/dist/esm/components/BS/common/BsHeaderShare.js +71 -0
  22. package/dist/esm/components/BS/common/BsHeaderSku.d.ts +25 -0
  23. package/dist/esm/components/BS/common/BsHeaderSku.js +71 -0
  24. package/dist/esm/components/BS/common/BsHeaderType.d.ts +25 -0
  25. package/dist/esm/components/BS/common/BsHeaderType.js +71 -0
  26. package/dist/esm/components/BS/common/index.d.ts +10 -0
  27. package/dist/esm/components/BS/common/index.js +10 -0
  28. package/dist/esm/components/Cascader/index.js +1 -1
  29. package/dist/esm/components/Common/index.d.ts +1 -0
  30. package/dist/esm/components/Common/index.js +11 -1
  31. package/dist/esm/components/DataTime/ApaasDate.d.ts +2 -2
  32. package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
  33. package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
  34. package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
  35. package/dist/esm/components/ExpressCompany/index.d.ts +2 -2
  36. package/dist/esm/components/LogisticsTrajectory/index.d.ts +0 -2
  37. package/dist/esm/components/LogisticsTrajectory/trajectoryCode.js +5 -4
  38. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.d.ts +0 -1
  39. package/dist/esm/components/LogisticsTrajectory/trajectoryCompany.js +2 -8
  40. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.d.ts +0 -1
  41. package/dist/esm/components/LogisticsTrajectory/trajectorySnapshot.js +3 -9
  42. package/dist/esm/components/Popover/index.d.ts +2 -2
  43. package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
  44. package/dist/esm/type.d.ts +1 -0
  45. package/package.json +4 -4
@@ -1,8 +1,5 @@
1
1
  import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../../type";
2
2
  import React from "react";
3
- import BsGoodImage from "../common/BsGoodImage";
4
- import BsType from "../common/BsType";
5
- import BsMemo from "../common/BsMemo";
6
3
  declare class BsReissue implements ComponentInterface {
7
4
  name: string;
8
5
  id: string;
@@ -16,13 +13,10 @@ declare class BsReissue implements ComponentInterface {
16
13
  canSort: boolean;
17
14
  children: ComponentInterface[];
18
15
  dataType: ComponentInterface["dataType"];
19
- goodImage: BsGoodImage;
20
- bsType: BsType;
21
- bsMemo: BsMemo;
22
16
  constructor(options: PickOption);
23
17
  renderClient: (record: any) => React.JSX.Element | null;
24
- renderPc: (value: unknown, record: Record) => any;
25
- renderLog: (r: Record) => any;
18
+ renderPc: () => null;
19
+ renderLog: (r: Record) => null;
26
20
  getComponentValue: (r: Record) => any;
27
21
  renderExport: () => null;
28
22
  editRender: (p: any) => React.JSX.Element;
@@ -42,6 +36,8 @@ declare class BsReissue implements ComponentInterface {
42
36
  id: string;
43
37
  name: string;
44
38
  filterComponentType: "Input";
39
+ props?: undefined;
40
+ filterFn?: undefined;
45
41
  })[];
46
42
  }
47
43
  export default BsReissue;
@@ -1,6 +1,12 @@
1
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
2
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4
10
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
11
  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); } }
6
12
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
@@ -12,13 +18,47 @@ import React from "react";
12
18
  import GetFormItem from "../../GetFormItem";
13
19
  import { GoodImage } from "../../Common";
14
20
  import ItemView from "../../../commonComponents/ItemView";
15
- import { isNull } from "@kmkf-fe-packages/kmkf-utils";
21
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
22
  import { BsReissue as Reissue } from "@kmkf-fe-packages/basic-components";
17
- import BsGoodImage from "../common/BsGoodImage";
18
- import BsType from "../common/BsType";
19
- import BsMemo from "../common/BsMemo";
23
+ import { SYMBOL } from "../../../constant";
24
+ import { BsType, BsMemo, BsHeaderPic, BsHeaderName, BsHeaderCode, BsHeaderSku, BsHeaderMoney, BsHeaderNumber, BsHeaderShare, BsHeaderType } from "../common/index";
25
+ var childHeaderMap = {
26
+ pic: {
27
+ component: BsHeaderPic,
28
+ name: "图片"
29
+ },
30
+ name: {
31
+ component: BsHeaderName,
32
+ name: "名称"
33
+ },
34
+ code: {
35
+ component: BsHeaderCode,
36
+ name: "编码"
37
+ },
38
+ sku: {
39
+ component: BsHeaderSku,
40
+ name: "sku编码"
41
+ },
42
+ money: {
43
+ component: BsHeaderMoney,
44
+ name: "实付金额"
45
+ },
46
+ number: {
47
+ component: BsHeaderNumber,
48
+ name: "数量"
49
+ },
50
+ share: {
51
+ component: BsHeaderShare,
52
+ name: "分摊价"
53
+ },
54
+ type: {
55
+ component: BsHeaderType,
56
+ name: "赠品类型"
57
+ }
58
+ };
20
59
  var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
21
60
  var _this = this,
61
+ _options$componentCon,
22
62
  _this$componentConfig2;
23
63
  _classCallCheck(this, BsReissue);
24
64
  _defineProperty(this, "name", void 0);
@@ -33,9 +73,6 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
33
73
  _defineProperty(this, "canSort", void 0);
34
74
  _defineProperty(this, "children", void 0);
35
75
  _defineProperty(this, "dataType", void 0);
36
- _defineProperty(this, "goodImage", void 0);
37
- _defineProperty(this, "bsType", void 0);
38
- _defineProperty(this, "bsMemo", void 0);
39
76
  _defineProperty(this, "renderClient", function (record) {
40
77
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
41
78
  id: _this.id,
@@ -46,12 +83,11 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
46
83
  })
47
84
  }) : null;
48
85
  });
49
- _defineProperty(this, "renderPc", function (value, record) {
50
- return _this.goodImage.renderPc(value, record);
86
+ _defineProperty(this, "renderPc", function () {
87
+ return null;
51
88
  });
52
89
  _defineProperty(this, "renderLog", function (r) {
53
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")])) return null;
54
- return _this.renderPc(undefined, r);
90
+ return null;
55
91
  });
56
92
  _defineProperty(this, "getComponentValue", function (r) {
57
93
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_bsReissueGoods")];
@@ -76,29 +112,52 @@ var BsReissue = /*#__PURE__*/_createClass(function BsReissue(options) {
76
112
  });
77
113
  });
78
114
  _defineProperty(this, "filterConfig", function (item) {
79
- return [_this.bsType.filterConfig(item), _this.goodImage.filterConfig(item)];
115
+ var _item$config;
116
+ return [{
117
+ searchDefaultConditions: SYMBOL.eq,
118
+ type: item.type,
119
+ id: "".concat(item.id, "_bsReissueType"),
120
+ name: "".concat(item.name, "-\u6362\u8D27\u7C7B\u578B"),
121
+ filterComponentType: "Cascader",
122
+ props: {
123
+ options: item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.reasonList
124
+ },
125
+ filterFn: function filterFn(value) {
126
+ return function (i) {
127
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "bsReissueType"), value);
128
+ };
129
+ }
130
+ }, {
131
+ searchDefaultConditions: SYMBOL.like,
132
+ type: item.type,
133
+ id: "".concat(item.id, "_bsReissueGoods"),
134
+ name: "".concat(_this.name),
135
+ filterComponentType: "Input"
136
+ }];
80
137
  });
81
138
  this.name = options.name;
82
139
  this.id = options.id;
83
- this.sortField = "".concat(options.id, "_bsReissueGoods");
84
- this.formField = "".concat(options.id, "_bsReissueGoods");
140
+ this.sortField = "".concat(options.id);
141
+ this.formField = "".concat(options.id);
85
142
  this.type = options.type;
86
143
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
87
- this.isCombinationComponent = false;
144
+ this.isCombinationComponent = true;
88
145
  this.canSort = false;
89
- this.goodImage = new BsGoodImage(_objectSpread(_objectSpread({}, options), {}, {
90
- id: "".concat(options.id, "_bsReissueGoods"),
91
- name: "补发商品"
92
- }));
93
- this.bsType = new BsType(_objectSpread(_objectSpread({}, options), {}, {
146
+ this.children = [new BsType(_objectSpread(_objectSpread({}, options), {}, {
94
147
  id: "".concat(options.id, "_bsReissueType"),
95
148
  name: "补发类型"
96
- }));
97
- this.bsMemo = new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
149
+ })), new BsMemo(_objectSpread(_objectSpread({}, options), {}, {
98
150
  id: "".concat(options.id, "_bsReissueType"),
99
151
  name: "补发备注"
100
- }));
101
- this.children = [this.goodImage, this.bsType, this.bsMemo];
152
+ }))].concat(_toConsumableArray(((options === null || options === void 0 ? void 0 : (_options$componentCon = options.componentConfig) === null || _options$componentCon === void 0 ? void 0 : _options$componentCon.showHeader) || []).reduce(function (prv, next) {
153
+ if (childHeaderMap[next]) {
154
+ prv.push(new childHeaderMap[next].component(_objectSpread(_objectSpread({}, options), {}, {
155
+ name: childHeaderMap[next].name,
156
+ id: "".concat(options.id, "_bsReissueGoods")
157
+ })));
158
+ }
159
+ return prv;
160
+ }, [])));
102
161
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
103
162
  this.rules = this !== null && this !== void 0 && (_this$componentConfig2 = this.componentConfig) !== null && _this$componentConfig2 !== void 0 && _this$componentConfig2.required ? [{
104
163
  required: true,
@@ -0,0 +1,25 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class BsChildCode implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
+ renderLog: (r: Record) => React.JSX.Element | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: () => never[];
24
+ }
25
+ export default BsChildCode;
@@ -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 BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsChildCode);
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["code"] && prv.push(next["code"]);
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 BsChildCode;
@@ -0,0 +1,25 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class BsChildMoney implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
+ renderLog: (r: Record) => React.JSX.Element | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: () => never[];
24
+ }
25
+ export default BsChildMoney;
@@ -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 BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsChildMoney);
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["money"] && prv.push(next["money"]);
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 BsChildMoney;
@@ -0,0 +1,25 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class BsChildName implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
+ renderLog: (r: Record) => React.JSX.Element | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: () => never[];
24
+ }
25
+ export default BsChildName;
@@ -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 BsChildName = /*#__PURE__*/_createClass(function BsChildName(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsChildName);
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["name"] && prv.push(next["name"]);
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 BsChildName;
@@ -0,0 +1,25 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
2
+ import React from "react";
3
+ declare class BsChildCode implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface["componentConfig"];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface["dataType"];
16
+ constructor(options: PickOption);
17
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element;
19
+ renderLog: (r: Record) => React.JSX.Element | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: () => never[];
24
+ }
25
+ export default BsChildCode;
@@ -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 BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, BsChildCode);
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["number"] && prv.push(next["number"]);
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 BsChildCode;
@@ -0,0 +1,25 @@
1
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
2
+ import React from 'react';
3
+ declare class BsChildPic implements ComponentInterface {
4
+ name: string;
5
+ id: string;
6
+ sortField: string;
7
+ type: string;
8
+ componentConfig: ComponentInterface['componentConfig'];
9
+ align: ALignType;
10
+ width: number;
11
+ isCombinationComponent: boolean;
12
+ formField: string;
13
+ canSort: boolean;
14
+ children: ComponentInterface[];
15
+ dataType: ComponentInterface['dataType'];
16
+ constructor(options: PickOption);
17
+ renderClient: (record: any) => React.JSX.Element | null;
18
+ renderPc: (value: unknown, record: Record) => React.JSX.Element[];
19
+ renderLog: (r: Record) => React.JSX.Element[] | null;
20
+ getComponentValue: (r: Record) => any;
21
+ renderExport: (value: string, record: Record) => any;
22
+ editRender: () => null;
23
+ filterConfig: () => never[];
24
+ }
25
+ export default BsChildPic;