@kmkf-fe-packages/services-components 0.6.0-alpha.0 → 0.6.0-alpha.1

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.
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, DataType, Record } from "../../type";
3
3
  declare type Value = {
4
4
  buyerNick?: string;
5
5
  };
@@ -8,12 +8,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
12
- import { BuyerNick } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { BuyerNick } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
15
  import PlatBuyer from "../../commonComponents/PlatBuyer";
16
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
18
18
  var _this = this,
19
19
  _this$componentConfig3;
@@ -87,12 +87,13 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
87
87
  this.canFilter = true;
88
88
  this.canGroup = false;
89
89
  this.canHidden = true;
90
- this.dataType = 'string';
90
+ this.dataType = "string";
91
91
  this.showContains = false;
92
+ this.componentConfig = options.componentConfig;
92
93
  this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
93
94
  validator: function validator(_, value) {
94
95
  if (!(value !== null && value !== void 0 && value.buyerNick)) {
95
- return Promise.reject(new Error('请输入买家昵称'));
96
+ return Promise.reject(new Error("请输入买家昵称"));
96
97
  }
97
98
  return Promise.resolve();
98
99
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ComponentInterface, PickOption, DataType, Record } from '../../type';
2
+ import { ComponentInterface, PickOption, DataType, Record } from "../../type";
3
3
  declare class EItemSelect implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -8,12 +8,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
8
8
  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; }
9
9
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
10
10
  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); }
11
- import React from 'react';
11
+ import React from "react";
12
12
  import GetFormItem from "../GetFormItem";
13
13
  import ItemSelect from "./ItemSelect";
14
14
  import { GoodImage } from "../Common";
15
15
  import ItemView from "../../commonComponents/ItemView";
16
- import { isNull } from '@kmkf-fe-packages/kmkf-utils';
16
+ import { isNull } from "@kmkf-fe-packages/kmkf-utils";
17
17
  var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
18
18
  var _this = this;
19
19
  _classCallCheck(this, EItemSelect);
@@ -52,17 +52,17 @@ var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
52
52
  var _ref;
53
53
  return (_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_itemList")]) || []) === null || _ref === void 0 ? void 0 : _ref.map(function (i) {
54
54
  return i.numIid;
55
- }).join('\n');
55
+ }).join("\n");
56
56
  });
57
57
  _defineProperty(this, "editRender", function () {
58
- var _this$componentConfig, _this$effects, _this$effects2;
58
+ var _this$componentConfig, _this$componentConfig2, _this$componentConfig3, _this$effects, _this$effects2;
59
59
  return /*#__PURE__*/React.createElement(GetFormItem, {
60
60
  title: _this.name,
61
61
  name: _this.id,
62
62
  rules: _this.rules,
63
- required: false,
63
+ 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,
64
64
  component: /*#__PURE__*/React.createElement(ItemSelect, _extends({}, _this.componentConfig, {
65
- maxLength: ((_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.maxLength) || 20,
65
+ maxLength: ((_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.maxLength) || 20,
66
66
  shopId: (_this$effects = _this.effects) === null || _this$effects === void 0 ? void 0 : _this$effects.shopId,
67
67
  shopList: ((_this$effects2 = _this.effects) === null || _this$effects2 === void 0 ? void 0 : _this$effects2.shopList) || [],
68
68
  width: "90%"
@@ -75,7 +75,6 @@ var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
75
75
  title: _this.name,
76
76
  renderExport: _this.renderExport
77
77
  });
78
- ;
79
78
  });
80
79
  this.name = options.name;
81
80
  this.id = options.id;
@@ -84,7 +83,7 @@ var EItemSelect = /*#__PURE__*/_createClass(function EItemSelect(options) {
84
83
  this.canGroup = false;
85
84
  this.canHidden = true;
86
85
  this.showContains = false;
87
- this.dataType = 'array';
86
+ this.dataType = "array";
88
87
  this.effects = options === null || options === void 0 ? void 0 : options.effects;
89
88
  this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
90
89
  this.rules = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.6.0-alpha.0",
3
+ "version": "0.6.0-alpha.1",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -21,7 +21,7 @@
21
21
  "father": "^4.1.7"
22
22
  },
23
23
  "dependencies": {
24
- "@kmkf-fe-packages/basic-components": "^0.6.0-alpha.0",
24
+ "@kmkf-fe-packages/basic-components": "^0.6.0-alpha.1",
25
25
  "@kmkf-fe-packages/kmkf-utils": "^0.6.0-alpha.0"
26
26
  },
27
27
  "peerDependencies": {
@@ -35,5 +35,5 @@
35
35
  "gitHooks": {
36
36
  "pre-commit": "lint-staged"
37
37
  },
38
- "gitHead": "a441519e5057b050524e0fa910e13def451138a0"
38
+ "gitHead": "ffacd4ef83d8b0e323d65b183e4ab0d0da9ae732"
39
39
  }