@kmkf-fe-packages/services-components 2.10.29 → 2.10.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.
@@ -14,7 +14,7 @@ import { BsGoodsTable } from "../../Common";
14
14
  import CommonHeaderGoods from "../../CommonHeaderGood";
15
15
  import ItemView from "../../../commonComponents/ItemView";
16
16
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
- import { CommonGoods as Goods, erpFormValidator } from "@kmkf-fe-packages/basic-components";
17
+ import { CommonGoods as Goods } from "@kmkf-fe-packages/basic-components";
18
18
  import { getGoodsSortChildFields } from "../../Common/constants/columnsBaseInfoMap";
19
19
  import { SYMBOL } from "../../../constant";
20
20
  var CONFIG_MAP = {
@@ -41,15 +41,7 @@ var CONFIG_MAP = {
41
41
  },
42
42
  DXD_SUPPLIERS: {
43
43
  name: "大希地供应商",
44
- key: "dxdSuppliers",
45
- validator: function validator(_rule, value, type, componentConfig) {
46
- if (!_rule.required) return Promise.resolve();
47
- var validatorResult = erpFormValidator(_rule, value, type, componentConfig);
48
- if (validatorResult) {
49
- return validatorResult;
50
- }
51
- return Promise.resolve();
52
- }
44
+ key: "dxdSuppliers"
53
45
  },
54
46
  TTX_GOODS: {
55
47
  name: "通天晓",
@@ -171,26 +163,17 @@ var PublicGoods = /*#__PURE__*/_createClass(function PublicGoods(options) {
171
163
  }));
172
164
  this.children = [this.headers];
173
165
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
174
- var isRequired = !!(this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required);
175
- this.rules = [{
176
- required: isRequired,
166
+ this.rules = this !== null && this !== void 0 && (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.required ? [{
167
+ required: true,
177
168
  validator: function validator(_, value) {
178
169
  var _value$key;
179
- if (isRequired && (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length))) {
170
+ if (!value || !(value !== null && value !== void 0 && (_value$key = value[key]) !== null && _value$key !== void 0 && _value$key.length)) {
180
171
  var _CONFIG_MAP$_this$typ6;
181
172
  return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat((_CONFIG_MAP$_this$typ6 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ6 === void 0 ? void 0 : _CONFIG_MAP$_this$typ6.name, "\u5546\u54C1")));
182
173
  }
183
174
  return Promise.resolve();
184
175
  }
185
- }, {
186
- required: isRequired,
187
- validator: function validator(_rule, value) {
188
- var _CONFIG_MAP$_this$typ7, _CONFIG_MAP$_this$typ8;
189
- return ((_CONFIG_MAP$_this$typ7 = CONFIG_MAP[_this.type]) === null || _CONFIG_MAP$_this$typ7 === void 0 ? void 0 : (_CONFIG_MAP$_this$typ8 = _CONFIG_MAP$_this$typ7.validator) === null || _CONFIG_MAP$_this$typ8 === void 0 ? void 0 : _CONFIG_MAP$_this$typ8.call(_CONFIG_MAP$_this$typ7, _rule, value, _this.type, _this.componentConfig)) || function () {
190
- return Promise.resolve();
191
- };
192
- }
193
- }];
176
+ }] : [];
194
177
  this.dataType = "object";
195
178
  this.sortChildField = this.getSortChildFields();
196
179
  this.exampleValue = ((_CONFIG_MAP$this$type2 = CONFIG_MAP[this.type]) === null || _CONFIG_MAP$this$type2 === void 0 ? void 0 : _CONFIG_MAP$this$type2.exampleValue) || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.10.29",
3
+ "version": "2.10.30",
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.10.29",
25
- "@kmkf-fe-packages/kmkf-utils": "2.10.29",
24
+ "@kmkf-fe-packages/basic-components": "2.10.30",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.10.30",
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": "bc7629679c5254fa413acb1b6bb74c06aae65cba",
44
+ "gitHead": "ea173c9a55b9b65711d6605fe5aa28d751b523b8",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }