@kmkf-fe-packages/services-components 2.2.13-beta.53 → 2.2.13-beta.54

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.
@@ -16,6 +16,7 @@ declare class BasicSelect implements ComponentInterface {
16
16
  optionsMap: ComponentInterface["optionsMap"];
17
17
  constructor(options: PickOption);
18
18
  getKeyByComponentType: (type: string) => any;
19
+ getIsValue: () => boolean;
19
20
  editRender: (p: any) => React.JSX.Element;
20
21
  getLabel: (record: Record) => any;
21
22
  renderClient: (record: any) => React.JSX.Element | null;
@@ -41,7 +41,7 @@ var typeMap = {
41
41
  };
42
42
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
43
43
  var _this = this,
44
- _this$componentConfig8,
44
+ _this$componentConfig6,
45
45
  _this$options;
46
46
  _classCallCheck(this, BasicSelect);
47
47
  _defineProperty(this, "name", void 0);
@@ -60,16 +60,20 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
60
60
  _defineProperty(this, "getKeyByComponentType", function (type) {
61
61
  return typeMap[type].key || "";
62
62
  });
63
+ _defineProperty(this, "getIsValue", function () {
64
+ var _this$componentConfig;
65
+ return ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.webUniqueKey) === "PLATFORM_STATUS" || _this.type === "JST_OUTBOUND_STATUS";
66
+ });
63
67
  _defineProperty(this, "editRender", function (p) {
64
- var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$componentConfig4;
68
+ var _this$componentConfig2, _this$componentConfig3, _this$componentConfig4, _this$componentConfig5;
65
69
  return /*#__PURE__*/React.createElement(GetFormItem, {
66
70
  title: _this.name,
67
71
  name: _this.id,
68
72
  rules: _this.rules,
69
73
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
70
74
  display: p === null || p === void 0 ? void 0 : p.display,
71
- required: (_this$componentConfig = (_this$componentConfig2 = _this.componentConfig) === null || _this$componentConfig2 === void 0 ? void 0 : _this$componentConfig2.required) !== null && _this$componentConfig !== void 0 ? _this$componentConfig : false,
72
- tooltip: (_this$componentConfig3 = _this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.showTooltip ? (_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tooltip : "",
75
+ required: (_this$componentConfig2 = (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.required) !== null && _this$componentConfig2 !== void 0 ? _this$componentConfig2 : false,
76
+ tooltip: (_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.showTooltip ? (_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.tooltip : "",
73
77
  component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
74
78
  placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
75
79
  showSearch: true,
@@ -84,9 +88,10 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
84
88
  return ((_this$optionsMap = _this.optionsMap) === null || _this$optionsMap === void 0 ? void 0 : _this$optionsMap[key]) || key;
85
89
  });
86
90
  _defineProperty(this, "renderClient", function (record) {
87
- var _this$componentConfig5, _this$optionsMap2;
91
+ var _this$optionsMap2;
92
+ console.log("renderClient", record, _this.getIsValue());
88
93
  // 特殊自定义组件为平台状态时匹配出label
89
- var label = ((_this$componentConfig5 = _this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.webUniqueKey) === "PLATFORM_STATUS" ? (_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
94
+ var label = _this.getIsValue() ? (_this$optionsMap2 = _this.optionsMap) === null || _this$optionsMap2 === void 0 ? void 0 : _this$optionsMap2[record === null || record === void 0 ? void 0 : record[_this.id]] : record === null || record === void 0 ? void 0 : record[_this.id];
90
95
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
91
96
  id: _this.id,
92
97
  label: _this.name,
@@ -94,11 +99,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
94
99
  }) : null;
95
100
  });
96
101
  _defineProperty(this, "renderPc", function (value, record) {
97
- var _this$componentConfig6, _this$optionsMap3;
102
+ var _this$optionsMap3;
98
103
  var type = _this.type;
99
104
  var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
100
105
  // 特殊自定义组件为平台状态时匹配出label
101
- var label = ((_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.webUniqueKey) === "PLATFORM_STATUS" ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
106
+ var label = _this.getIsValue() ? ((_this$optionsMap3 = _this.optionsMap) === null || _this$optionsMap3 === void 0 ? void 0 : _this$optionsMap3[key]) || "" : key;
102
107
  return /*#__PURE__*/React.createElement("span", null, label !== null && label !== void 0 ? label : "--");
103
108
  });
104
109
  _defineProperty(this, "renderLog", function (r) {
@@ -111,11 +116,11 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
111
116
  return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
112
117
  });
113
118
  _defineProperty(this, "renderExport", function (value, record) {
114
- var _this$componentConfig7, _this$optionsMap4;
119
+ var _this$optionsMap4;
115
120
  var type = _this.type;
116
121
  var key = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)];
117
122
  // 特殊自定义组件为平台状态时匹配出label
118
- var label = ((_this$componentConfig7 = _this.componentConfig) === null || _this$componentConfig7 === void 0 ? void 0 : _this$componentConfig7.webUniqueKey) === "PLATFORM_STATUS" ? ((_this$optionsMap4 = _this.optionsMap) === null || _this$optionsMap4 === void 0 ? void 0 : _this$optionsMap4[key]) || "" : key;
123
+ var label = _this.getIsValue() ? ((_this$optionsMap4 = _this.optionsMap) === null || _this$optionsMap4 === void 0 ? void 0 : _this$optionsMap4[key]) || "" : key;
119
124
  return label !== null && label !== void 0 ? label : "--";
120
125
  });
121
126
  _defineProperty(this, "filterConfig", function (item) {
@@ -150,7 +155,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
150
155
  this.canSort = true;
151
156
  this.children = [];
152
157
  this.dataType = "string";
153
- this.options = ((_this$componentConfig8 = this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.options) || [];
158
+ this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
154
159
  this.optionsMap = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.reduce(function (prev, next) {
155
160
  prev[next.value] = next.label;
156
161
  return prev;
@@ -35,6 +35,7 @@ export var factory = function factory(type, options) {
35
35
  case "REFUND_TYPE":
36
36
  case "EXECUTE_ACTION_TYPE":
37
37
  case "ERP_ORDER_STATUS":
38
+ case "JST_OUTBOUND_STATUS":
38
39
  return new BasicSelect(options);
39
40
  case "PICTURE":
40
41
  return new BasicPicture(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.13-beta.53",
3
+ "version": "2.2.13-beta.54",
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": "2.2.13-beta.53",
25
- "@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.51",
24
+ "@kmkf-fe-packages/basic-components": "2.2.13-beta.54",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.13-beta.54",
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": "f42a16c7249fc7c7a9309a4f5a565c7b6a372614",
44
+ "gitHead": "e37202a60e71c34d255a190cc67417e9baa19327",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }