@kmkf-fe-packages/services-components 2.3.1 → 2.3.2

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.
@@ -113,6 +113,7 @@ function Logistics(options) {
113
113
  name: _this.id,
114
114
  rules: _this.rules,
115
115
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
116
+ display: p === null || p === void 0 ? void 0 : p.display,
116
117
  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,
117
118
  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 : "",
118
119
  component: /*#__PURE__*/React.createElement(LogisticsMoreInterception, _extends({}, _this.componentConfig, {
@@ -19,53 +19,17 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
19
19
  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); }
20
20
  import React from "react";
21
21
  import { Table } from "antd";
22
- import { SubForm as SubFormComponent, renderMap } from "@kmkf-fe-packages/basic-components";
22
+ import { SubForm as SubFormComponent, renderMap, renderSplitMap } from "@kmkf-fe-packages/basic-components";
23
23
  import { BsHeaderChild } from "../BS/common";
24
24
  import HeaderChildFile from "./children/HeaderChildFile";
25
25
  import HeaderChildPic from "./children/HeaderChildPic";
26
+ import Express from "../Express";
26
27
  import GetFormItem from "../GetFormItem";
27
28
  import ItemView from "../../commonComponents/ItemView";
28
29
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
29
30
  import { difference } from "lodash";
30
31
  import { SYMBOL } from "../../constant";
31
32
  var ChildrenMap = {
32
- INPUT: {
33
- component: BsHeaderChild
34
- },
35
- TEXTAREA: {
36
- component: BsHeaderChild
37
- },
38
- SELECT: {
39
- component: BsHeaderChild
40
- },
41
- RADIO: {
42
- component: BsHeaderChild
43
- // transformValue: (value: any) => {
44
- // if (!value?.value) return null;
45
- // return `${value?.value}
46
- // ${
47
- // value?.value &&
48
- // typeof value.value === "string" &&
49
- // value?.value?.indexOf("其他") > -1 &&
50
- // value?.other
51
- // ? `(${value?.other})`
52
- // : ""
53
- // }`;
54
- // },
55
- // renderExport: (value: any) => {
56
- // if (!value?.value) return null;
57
- // return `${value?.value}
58
- // ${
59
- // value?.value &&
60
- // typeof value.value === "string" &&
61
- // value?.value?.indexOf("其他") > -1 &&
62
- // value?.other
63
- // ? `(${value?.other})`
64
- // : ""
65
- // }`;
66
- // },
67
- },
68
-
69
33
  CHECKBOX: {
70
34
  component: BsHeaderChild,
71
35
  transformValue: function transformValue(value) {
@@ -93,6 +57,23 @@ var ChildrenMap = {
93
57
  },
94
58
  FILE: {
95
59
  component: HeaderChildFile
60
+ },
61
+ jbCFrJV4m7_trajectoryCompany: {
62
+ component: Express
63
+ },
64
+ "0qFEv9GEyd_returnLogisticsCompany": {
65
+ component: Express
66
+ }
67
+ };
68
+ var getChildComponent = function getChildComponent(item) {
69
+ try {
70
+ return ChildrenMap[item.workOrderComponentType] || ChildrenMap[item.key] || {
71
+ component: BsHeaderChild
72
+ };
73
+ } catch (e) {
74
+ return {
75
+ component: BsHeaderChild
76
+ };
96
77
  }
97
78
  };
98
79
  var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
@@ -152,12 +133,23 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
152
133
  ellipsis: true,
153
134
  width: item.width,
154
135
  render: function render(val) {
155
- return renderMap[item.workOrderComponentType] ? /*#__PURE__*/React.createElement("div", {
156
- style: {
157
- width: "100%",
158
- overflow: "auto"
159
- }
160
- }, renderMap[item.workOrderComponentType](val)) : /*#__PURE__*/React.createElement("span", null, val);
136
+ if (renderMap[item.workOrderComponentType]) {
137
+ return /*#__PURE__*/React.createElement("div", {
138
+ style: {
139
+ width: "100%",
140
+ overflow: "auto"
141
+ }
142
+ }, renderMap[item.workOrderComponentType](val));
143
+ } else if (renderSplitMap[item.key]) {
144
+ return /*#__PURE__*/React.createElement("div", {
145
+ style: {
146
+ width: "100%",
147
+ overflow: "auto"
148
+ }
149
+ }, renderSplitMap[item.key](val));
150
+ } else {
151
+ return /*#__PURE__*/React.createElement("span", null, val);
152
+ }
161
153
  }
162
154
  };
163
155
  })) || []));
@@ -268,9 +260,9 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
268
260
  this.isCombinationComponent = true;
269
261
  this.canSort = false;
270
262
  this.children = (this.getNewTableHeader() || []).map(function (item) {
271
- var _ChildrenMap$item$wor = ChildrenMap[item.workOrderComponentType],
272
- component = _ChildrenMap$item$wor.component,
273
- other = _objectWithoutProperties(_ChildrenMap$item$wor, _excluded);
263
+ var _getChildComponent = getChildComponent(item),
264
+ component = _getChildComponent.component,
265
+ other = _objectWithoutProperties(_getChildComponent, _excluded);
274
266
  return new component(_objectSpread(_objectSpread({}, options), {}, {
275
267
  name: item.name,
276
268
  id: "".concat(options.id, "_productList_").concat(item.key)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  ]
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "2.3.1",
24
+ "@kmkf-fe-packages/basic-components": "2.3.2",
25
25
  "@kmkf-fe-packages/kmkf-utils": "2.3.1",
26
26
  "b64-to-blob": "^1.2.19",
27
27
  "html2canvas": "^1.4.1",
@@ -41,7 +41,7 @@
41
41
  "publishConfig": {
42
42
  "access": "public"
43
43
  },
44
- "gitHead": "5e401c5bd1fa841ebda32cefb830feb1f608205d",
44
+ "gitHead": "6db37a878558212d358a2be5253d4d2a6aa3f7d5",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }