@kmkf-fe-packages/services-components 2.2.0 → 2.2.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,18 +1,19 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare class EBuyerNick implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
6
6
  sortField: string;
7
7
  type: string;
8
8
  rules: any[];
9
- componentConfig: ComponentInterface['componentConfig'];
10
- effects: ComponentInterface['effects'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
+ effects: ComponentInterface["effects"];
11
11
  isCombinationComponent: boolean;
12
12
  formField: string;
13
13
  canSort: boolean;
14
14
  children: ComponentInterface[];
15
- dataType: ComponentInterface['dataType'];
15
+ dataType: ComponentInterface["dataType"];
16
+ compoundConfig: ComponentInterface["compoundConfig"];
16
17
  constructor(options: PickOption);
17
18
  renderTaoBaoWangWang: (record: any, params: any) => React.JSX.Element;
18
19
  renderClient: (record: any, params: any) => React.JSX.Element | null;
@@ -6,12 +6,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
6
6
  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; }
7
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
8
  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); }
9
- import React from 'react';
10
- import { BuyerNick } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { BuyerNick } from "@kmkf-fe-packages/basic-components";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
13
  import PlatBuyer from "../../commonComponents/PlatBuyer";
14
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
14
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
15
15
  import { SYMBOL, batchInput, SEARCH_OPTIONS } from "../../constant";
16
16
  import wangImg from "../../commonComponents/Wangwang/img/wang.gif";
17
17
  var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
@@ -30,12 +30,13 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
30
30
  _defineProperty(this, "canSort", void 0);
31
31
  _defineProperty(this, "children", void 0);
32
32
  _defineProperty(this, "dataType", void 0);
33
+ _defineProperty(this, "compoundConfig", void 0);
33
34
  _defineProperty(this, "renderTaoBaoWangWang", function (record, params) {
34
35
  var _record$_this$id3;
35
36
  return /*#__PURE__*/React.createElement("span", {
36
37
  onClick: function onClick() {
37
38
  var _record$_this$id, _record$_this$id2;
38
- typeof params.openWangWang === 'function' && params.openWangWang(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.buyerNick, record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.buyerOpenUid);
39
+ typeof params.openWangWang === "function" && params.openWangWang(record === null || record === void 0 ? void 0 : (_record$_this$id = record[_this.id]) === null || _record$_this$id === void 0 ? void 0 : _record$_this$id.buyerNick, record === null || record === void 0 ? void 0 : (_record$_this$id2 = record[_this.id]) === null || _record$_this$id2 === void 0 ? void 0 : _record$_this$id2.buyerOpenUid);
39
40
  }
40
41
  }, /*#__PURE__*/React.createElement("img", {
41
42
  alt: "\u8BF7\u70B9\u51FB\u76F4\u63A5\u8BBF\u95EE",
@@ -49,7 +50,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
49
50
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
50
51
  id: _this.id,
51
52
  label: _this.name,
52
- value: (params === null || params === void 0 ? void 0 : params.platform) === 'tb' ? _this.renderTaoBaoWangWang(record, params) : record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.buyerNick
53
+ value: (params === null || params === void 0 ? void 0 : params.platform) === "tb" ? _this.renderTaoBaoWangWang(record, params) : record === null || record === void 0 ? void 0 : (_record$_this$id4 = record[_this.id]) === null || _record$_this$id4 === void 0 ? void 0 : _record$_this$id4.buyerNick
53
54
  }) : null;
54
55
  });
55
56
  _defineProperty(this, "renderPc", function (value, record) {
@@ -93,7 +94,7 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
93
94
  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,
94
95
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
95
96
  display: p === null || p === void 0 ? void 0 : p.display,
96
- 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 : '',
97
+ 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 : "",
97
98
  component: /*#__PURE__*/React.createElement(BuyerNick, _extends({}, _this.componentConfig, {
98
99
  shopId: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.shopId,
99
100
  shopList: (_this$effects4 = _this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.shopList,
@@ -112,17 +113,17 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
112
113
  // 过滤组件id
113
114
  name: item.name,
114
115
  // 过滤组件名称
115
- filterComponentType: 'SelectInput',
116
+ filterComponentType: "SelectInput",
116
117
  props: {
117
118
  filterOptions: SEARCH_OPTIONS
118
119
  },
119
120
  filterFn: function filterFn(value) {
120
121
  return function (i) {
121
- return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'buyerNick')).includes(value);
122
+ return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, "buyerNick")).includes(value);
122
123
  };
123
124
  },
124
125
  formatFilterValue: function formatFilterValue(value) {
125
- if (['in', 'anylike'].includes(value.type)) {
126
+ if (["in", "anylike"].includes(value.type)) {
126
127
  return batchInput(value.keywords);
127
128
  } else {
128
129
  return value;
@@ -138,17 +139,26 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
138
139
  this.isCombinationComponent = false;
139
140
  this.canSort = true;
140
141
  this.children = [];
141
- this.dataType = 'string';
142
+ this.dataType = "string";
142
143
  this.componentConfig = options.componentConfig;
143
144
  this.effects = options.effects;
144
145
  this.rules = (_this$componentConfig5 = this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required ? [{
145
146
  validator: function validator(_, value) {
146
147
  if (!(value !== null && value !== void 0 && value.buyerNick)) {
147
- return Promise.reject(new Error('请输入买家昵称'));
148
+ return Promise.reject(new Error("请输入买家昵称"));
148
149
  }
149
150
  return Promise.resolve();
150
151
  }
151
152
  }] : [];
153
+ this.compoundConfig = [{
154
+ name: options.name,
155
+ id: "".concat(options.id, "_buyerNick"),
156
+ standardDateType: "String"
157
+ }, {
158
+ name: "".concat(options.name, "(id)"),
159
+ id: "".concat(options.id, "_buyerOpenUid"),
160
+ standardDateType: "String"
161
+ }];
152
162
  }
153
163
  // 渲染淘宝端的时候需要亮灯
154
164
  );
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
3
  declare type Value = {
4
4
  value?: string[];
5
5
  other?: string;
@@ -15,8 +15,9 @@ declare class BasicCheckbox implements ComponentInterface {
15
15
  formField: string;
16
16
  canSort: boolean;
17
17
  children: ComponentInterface[];
18
- dataType: ComponentInterface['dataType'];
19
- options: ComponentInterface['options'];
18
+ dataType: ComponentInterface["dataType"];
19
+ options: ComponentInterface["options"];
20
+ compoundConfig: ComponentInterface["compoundConfig"];
20
21
  constructor(options: PickOption);
21
22
  getValues: (value: Value) => string | null | undefined;
22
23
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -5,17 +5,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
5
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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
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 intersection from 'lodash/intersection';
10
- import { ApaasCheckbox } from '@kmkf-fe-packages/basic-components';
8
+ import React from "react";
9
+ import intersection from "lodash/intersection";
10
+ import { ApaasCheckbox } from "@kmkf-fe-packages/basic-components";
11
11
  import GetFormItem from "../GetFormItem";
12
12
  import ItemView from "../../commonComponents/ItemView";
13
- import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
13
+ import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import { SYMBOL } from "../../constant";
15
15
  var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
16
16
  var _this = this,
17
17
  _options$componentCon,
18
- _this$componentConfig5;
18
+ _this$componentConfig5,
19
+ _this$componentConfig6;
19
20
  _classCallCheck(this, BasicCheckbox);
20
21
  _defineProperty(this, "name", void 0);
21
22
  _defineProperty(this, "id", void 0);
@@ -29,34 +30,35 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
29
30
  _defineProperty(this, "children", void 0);
30
31
  _defineProperty(this, "dataType", void 0);
31
32
  _defineProperty(this, "options", void 0);
33
+ _defineProperty(this, "compoundConfig", void 0);
32
34
  _defineProperty(this, "getValues", function (value) {
33
35
  var _value$value, _value$value2, _value$value3;
34
36
  if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
35
37
  var findIndex = value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.findIndex(function (item) {
36
- return item === '其他';
38
+ return item === "其他";
37
39
  });
38
40
  if (findIndex > -1 && value !== null && value !== void 0 && value.other) {
39
41
  // @ts-ignore
40
42
  value.value[findIndex] = "\u5176\u4ED6(".concat(value === null || value === void 0 ? void 0 : value.other, ")");
41
43
  }
42
- return value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.join('/');
44
+ return value === null || value === void 0 ? void 0 : (_value$value3 = value.value) === null || _value$value3 === void 0 ? void 0 : _value$value3.join("/");
43
45
  });
44
46
  _defineProperty(this, "renderPc", function (value, record) {
45
47
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined && (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) === undefined) {
46
48
  return /*#__PURE__*/React.createElement("span", null, "--");
47
49
  }
48
- return /*#__PURE__*/React.createElement("span", null, Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")].join('/') : record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")], (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) && /*#__PURE__*/React.createElement("br", null), (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || '');
50
+ return /*#__PURE__*/React.createElement("span", null, Array.isArray(record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) ? record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")].join("/") : record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")], (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) && /*#__PURE__*/React.createElement("br", null), (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || "");
49
51
  });
50
52
  _defineProperty(this, "renderLog", function (r) {
51
53
  var _r;
52
54
  if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkbox")]) && isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) return null;
53
55
  var restOtherOptions = (r === null || r === void 0 ? void 0 : (_r = r["".concat(_this.id, "_checkbox")]) === null || _r === void 0 ? void 0 : _r.filter(function (i) {
54
- return i !== '其他';
56
+ return i !== "其他";
55
57
  })) || [];
56
58
  if (!isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")])) {
57
- return (restOtherOptions === null || restOtherOptions === void 0 ? void 0 : restOtherOptions.length) > 0 ? restOtherOptions.join('/').concat("/\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")")) : "\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")");
59
+ return (restOtherOptions === null || restOtherOptions === void 0 ? void 0 : restOtherOptions.length) > 0 ? restOtherOptions.join("/").concat("/\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")")) : "\u5176\u4ED6(".concat(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_checkboxOther")], ")");
58
60
  }
59
- return restOtherOptions.join('/');
61
+ return restOtherOptions.join("/");
60
62
  });
61
63
  _defineProperty(this, "getComponentValue", function (r) {
62
64
  return {
@@ -67,15 +69,15 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
67
69
  _defineProperty(this, "renderExport", function (value, record) {
68
70
  var _ref;
69
71
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) === undefined) {
70
- return '--';
72
+ return "--";
71
73
  }
72
- return "".concat((_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) || []) === null || _ref === void 0 ? void 0 : _ref.join('/'), " ").concat((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || '');
74
+ return "".concat((_ref = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkbox")]) || []) === null || _ref === void 0 ? void 0 : _ref.join("/"), " ").concat((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_checkboxOther")]) || "");
73
75
  });
74
76
  _defineProperty(this, "renderClient", function (record) {
75
77
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
76
78
  id: _this.id,
77
79
  label: _this.name,
78
- value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
80
+ value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
79
81
  }) : null;
80
82
  });
81
83
  _defineProperty(this, "editRender", function (p) {
@@ -87,7 +89,7 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
87
89
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
88
90
  display: p === null || p === void 0 ? void 0 : p.display,
89
91
  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,
90
- 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 : '',
92
+ 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 : "",
91
93
  component: /*#__PURE__*/React.createElement(ApaasCheckbox, _this.componentConfig)
92
94
  });
93
95
  });
@@ -100,16 +102,16 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
100
102
  // 过滤组件id
101
103
  name: item.name,
102
104
  // 过滤组件名称
103
- filterComponentType: 'MultipleSelect',
105
+ filterComponentType: "MultipleSelect",
104
106
  props: {
105
107
  options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
106
- label: '其他',
107
- value: '其他'
108
+ label: "其他",
109
+ value: "其他"
108
110
  }) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || []
109
111
  },
110
112
  filterFn: function filterFn(value) {
111
113
  return function (i) {
112
- return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'checkbox')).length > 0;
114
+ return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "checkbox")).length > 0;
113
115
  };
114
116
  }
115
117
  };
@@ -135,7 +137,22 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
135
137
  return Promise.resolve();
136
138
  }
137
139
  }] : [];
138
- this.dataType = 'array';
140
+ this.dataType = "array";
139
141
  this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
142
+ this.compoundConfig = (_this$componentConfig6 = this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.showOther ? [{
143
+ name: options.name,
144
+ id: "".concat(options.id, "_checkbox"),
145
+ standardDateType: "Array",
146
+ exampleValue: '["选项1","选项2"]'
147
+ }, {
148
+ name: "".concat(options.name, "(\u5176\u4ED6)"),
149
+ id: "".concat(options.id, "_checkboxOther"),
150
+ standardDateType: "String"
151
+ }] : [{
152
+ name: options.name,
153
+ id: "".concat(options.id, "_checkbox"),
154
+ standardDateType: "Array",
155
+ exampleValue: '["选项1","选项2"]'
156
+ }];
140
157
  });
141
158
  export default BasicCheckbox;
@@ -13,6 +13,8 @@ declare class BasicFile implements ComponentInterface {
13
13
  children: ComponentInterface[];
14
14
  effects: ComponentInterface["effects"];
15
15
  dataType: ComponentInterface["dataType"];
16
+ exampleValue?: string;
17
+ standardDateType: ComponentInterface["standardDateType"];
16
18
  constructor(options: PickOption);
17
19
  renderPc: (value: any, record: Record) => any;
18
20
  renderLog: (r: Record) => any;
@@ -34,6 +34,8 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
34
34
  _defineProperty(this, "children", void 0);
35
35
  _defineProperty(this, "effects", void 0);
36
36
  _defineProperty(this, "dataType", void 0);
37
+ _defineProperty(this, "exampleValue", void 0);
38
+ _defineProperty(this, "standardDateType", void 0);
37
39
  _defineProperty(this, "renderPc", function (value, record) {
38
40
  var fileList = (record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_file")]) || [];
39
41
  if (!fileList.length) {
@@ -81,7 +83,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
81
83
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
82
84
  display: p === null || p === void 0 ? void 0 : p.display,
83
85
  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,
84
- 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 : '',
86
+ 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 : "",
85
87
  component: /*#__PURE__*/React.createElement(ApaasUploadFile, _extends({}, _this.componentConfig, {
86
88
  uniqueKey: _this.id,
87
89
  platform: p === null || p === void 0 ? void 0 : p.platform,
@@ -112,5 +114,7 @@ var BasicFile = /*#__PURE__*/_createClass(function BasicFile(options) {
112
114
  this.children = [];
113
115
  this.dataType = "array";
114
116
  this.effects = options.effects;
117
+ this.exampleValue = '[{"name":"c.jpeg","url":"https://kefu.kuaimai.com/pic/c.jpeg"}]';
118
+ this.standardDateType = "Array";
115
119
  });
116
120
  export default BasicFile;
@@ -14,6 +14,8 @@ declare class MsgStatus implements ComponentInterface {
14
14
  children: ComponentInterface[];
15
15
  dataType: ComponentInterface["dataType"];
16
16
  options: ComponentInterface["options"];
17
+ exampleValue?: string;
18
+ standardDateType: ComponentInterface["standardDateType"];
17
19
  constructor(options: PickOption);
18
20
  renderClient: (record: any) => React.JSX.Element | null;
19
21
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -74,6 +74,8 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
74
74
  _defineProperty(this, "children", void 0);
75
75
  _defineProperty(this, "dataType", void 0);
76
76
  _defineProperty(this, "options", void 0);
77
+ _defineProperty(this, "exampleValue", void 0);
78
+ _defineProperty(this, "standardDateType", void 0);
77
79
  _defineProperty(this, "renderClient", function (record) {
78
80
  var _typeMap$_this$type, _typeMap$_this$type2, _typeMap$_this$type3;
79
81
  var isShow = Array.isArray(record === null || record === void 0 ? void 0 : record[_this.id]) ? some(record === null || record === void 0 ? void 0 : record[_this.id], function (item) {
@@ -196,5 +198,7 @@ var MsgStatus = /*#__PURE__*/_createClass(function MsgStatus(options) {
196
198
  }] : [];
197
199
  this.align = "left";
198
200
  this.options = (_typeMap$options$type3 = typeMap[options.type]) === null || _typeMap$options$type3 === void 0 ? void 0 : _typeMap$options$type3.options;
201
+ this.exampleValue = '{"msgStatus4Search":"["1"]","msgStatusValues":"[{"jobUuid":"1","msgType":"1","msgRuleId":"1","statusKey":"1","ruleName":"1","failReason":"","msgReceivers":[],"status":"1"}]"}';
202
+ this.standardDateType = "Object";
199
203
  });
200
204
  export default MsgStatus;
@@ -13,6 +13,8 @@ declare class BasicMultSelect implements ComponentInterface {
13
13
  children: ComponentInterface[];
14
14
  dataType: ComponentInterface["dataType"];
15
15
  options: ComponentInterface["options"];
16
+ standardDateType: ComponentInterface["standardDateType"];
17
+ exampleValue: ComponentInterface["exampleValue"];
16
18
  constructor(options: PickOption);
17
19
  renderClient: (record: any) => React.JSX.Element | null;
18
20
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -29,6 +29,8 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
29
29
  _defineProperty(this, "children", void 0);
30
30
  _defineProperty(this, "dataType", void 0);
31
31
  _defineProperty(this, "options", void 0);
32
+ _defineProperty(this, "standardDateType", void 0);
33
+ _defineProperty(this, "exampleValue", void 0);
32
34
  _defineProperty(this, "renderClient", function (record) {
33
35
  var _record$_this$id;
34
36
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
@@ -67,7 +69,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
67
69
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
68
70
  display: p === null || p === void 0 ? void 0 : p.display,
69
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,
70
- 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 : '',
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 : "",
71
73
  component: /*#__PURE__*/React.createElement(ApaasMultipleSelect, _extends({}, _this.componentConfig, {
72
74
  placeholder: "\u8BF7\u8F93\u5165".concat(_this.name)
73
75
  }))
@@ -105,5 +107,7 @@ var BasicMultSelect = /*#__PURE__*/_createClass(function BasicMultSelect(options
105
107
  this.children = [];
106
108
  this.dataType = "array";
107
109
  this.options = ((_this$componentConfig5 = this.componentConfig) === null || _this$componentConfig5 === void 0 ? void 0 : _this$componentConfig5.options) || [];
110
+ this.standardDateType = "Array";
111
+ this.exampleValue = '["选项1","选项2"]';
108
112
  });
109
113
  export default BasicMultSelect;
@@ -17,6 +17,7 @@ declare class BasicRadio implements ComponentInterface {
17
17
  children: ComponentInterface[];
18
18
  dataType: ComponentInterface["dataType"];
19
19
  options: ComponentInterface["options"];
20
+ compoundConfig: ComponentInterface["compoundConfig"];
20
21
  constructor(options: PickOption);
21
22
  render: (value: Value) => React.JSX.Element;
22
23
  renderPc: (value: any, record: Record) => React.JSX.Element;
@@ -19,7 +19,8 @@ var typeMap = {
19
19
  var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
20
20
  var _this = this,
21
21
  _this$componentConfig5,
22
- _this$componentConfig6;
22
+ _this$componentConfig6,
23
+ _this$componentConfig7;
23
24
  _classCallCheck(this, BasicRadio);
24
25
  _defineProperty(this, "name", void 0);
25
26
  _defineProperty(this, "id", void 0);
@@ -33,6 +34,7 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
33
34
  _defineProperty(this, "children", void 0);
34
35
  _defineProperty(this, "dataType", void 0);
35
36
  _defineProperty(this, "options", void 0);
37
+ _defineProperty(this, "compoundConfig", void 0);
36
38
  _defineProperty(this, "render", function (value) {
37
39
  var _value$value;
38
40
  return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.value, (value === null || value === void 0 ? void 0 : value.value) && typeof value.value === "string" && (value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.indexOf("其他")) > -1 && (value === null || value === void 0 ? void 0 : value.other) && "(".concat(value === null || value === void 0 ? void 0 : value.other, ")"));
@@ -135,5 +137,18 @@ var BasicRadio = /*#__PURE__*/_createClass(function BasicRadio(options) {
135
137
  }] : [];
136
138
  this.dataType = "string";
137
139
  this.options = ((_this$componentConfig6 = this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.options) || [];
140
+ this.compoundConfig = (_this$componentConfig7 = this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.showOther ? [{
141
+ name: options.name,
142
+ id: "".concat(options.id, "_radio"),
143
+ standardDateType: "String"
144
+ }, {
145
+ name: "".concat(options.name, "(\u5176\u4ED6)"),
146
+ id: "".concat(options.id, "_radioOther"),
147
+ standardDateType: "String"
148
+ }] : [{
149
+ name: options.name,
150
+ id: "".concat(options.id, "_radio"),
151
+ standardDateType: "String"
152
+ }];
138
153
  });
139
154
  export default BasicRadio;
@@ -1,3 +1,3 @@
1
1
  import { ReissueLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicPicturePro, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, SubForm, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue, GyReissue, AfterSalesOrderId, BsE3Goods, PublicGoods, PublicReissueGoods, PublicExchange, GyGoods, BsE3Reissue, MemberLevel, GyReturn, AsyncSelect, WdtShopSelect, KmVideo } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => AfterSalesOrderId | BsGoods | BsLogistics | BsSystemOrder | BuyerNick | BasicCheckbox | CommonMultiStatus | CommonSystemOrder | ItemEnCode | BasicFile | FlowStatusSelect | GyGoods | GyReissue | GyReturn | BasicInput | JstSendGood | KmVideo | Label | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | MsgStatus | BasicMultSelect | BasicPicture | BasicPicturePro | BasicPosting | AsyncSelect | PublicExchange | PublicGoods | PublicReissueGoods | BasicRadio | ReceiverName | ReissueLogistics | ERemark | BasicSelect | ShopName | StatusSelect | BasicTextArea | ThirdItemSelect | BasicDataTime | TradeDateTime | TradeId | WdtShopSelect | WlnGoods | BasicAddress | BasicCascader | BasicGrade | BasicRate | SubForm | CommonDataTime | ReceiverMobile | ReceiverAddress | ReturnLogistics | ActualPayment | AliPay | ItemSelect | ItemId | SystemOrderNo | Ordinary | Payment | JstItemSelect | JstSupply | BsE3Goods | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | Calculation | NodeDeadLine | HandlerDeadLine | NodeStayDuration | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode | MemberLevel;
3
+ export declare const factory: (type: string, options: PickOption) => BsLogistics | BsSystemOrder | BuyerNick | BasicCheckbox | BasicFile | FlowTag | GyGoods | GyReissue | GyReturn | JstSendGood | MsgStatus | BasicMultSelect | PublicGoods | BasicRadio | BasicInput | BasicAddress | BasicCascader | BasicDataTime | BasicSelect | BasicTextArea | BasicPicture | BasicPicturePro | BasicGrade | BasicRate | BasicPosting | SubForm | CommonDataTime | TradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | ReissueLogistics | JstItemSelect | JstSupply | BsGoods | BsE3Goods | PublicReissueGoods | PublicExchange | BsE3Reissue | BsExchange | BsReissue | BsReturn | FlowStatusSelect | FlowMarkSelect | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | WdtShopSelect | KmVideo | CommonInput | PaymentVoucherCode | Label | MemberLevel | AfterSalesOrderId | AsyncSelect;
@@ -55,6 +55,7 @@ export interface ComponentInterface {
55
55
  width?: number;
56
56
  align?: ALignType;
57
57
  dataType: "string" | "number" | "boolean" | "array" | "range" | "object" | "weakenArray" | "arrayObject";
58
+ standardDateType?: "String" | "Number" | "Boolean" | "Array" | "Object";
58
59
  format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup" | "object";
59
60
  options?: Array<any>;
60
61
  optionsMap?: Record;
@@ -63,6 +64,13 @@ export interface ComponentInterface {
63
64
  workOrderUniqueKey?: string;
64
65
  platform?: PlatForm;
65
66
  parentName?: string;
67
+ exampleValue?: any;
68
+ compoundConfig?: Array<{
69
+ id: string;
70
+ standardDateType?: "String" | "Number" | "Boolean" | "Array" | "Object";
71
+ name: string;
72
+ exampleValue?: any;
73
+ }>;
66
74
  /**
67
75
  * @description 组件下标
68
76
  * @deprecated 已弃用字段,后续版本不在使用
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
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.0",
25
- "@kmkf-fe-packages/kmkf-utils": "2.1.12",
24
+ "@kmkf-fe-packages/basic-components": "2.2.1",
25
+ "@kmkf-fe-packages/kmkf-utils": "2.2.1",
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": "9f0036fd8a570e2d324d4409249343dc88266711",
44
+ "gitHead": "b37647c66086182f9995b97478b26a9c892f63b9",
45
45
  "gitHooks": {
46
46
  "pre-commit": "lint-staged"
47
47
  }