@kmkf-fe-packages/services-components 0.26.2-rc.2 → 0.26.2-rc.3

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.
@@ -29,16 +29,6 @@ declare class CommonInput implements ComponentInterface {
29
29
  id: string;
30
30
  name: string;
31
31
  filterComponentType: "Input";
32
- props?: undefined;
33
- } | {
34
- searchDefaultConditions: "in";
35
- type: string;
36
- id: string;
37
- name: string;
38
- filterComponentType: "MultipleSelect";
39
- props: {
40
- options: any;
41
- };
42
32
  };
43
33
  }
44
34
  export default CommonInput;
@@ -13,39 +13,10 @@ import ItemView from "../../commonComponents/ItemView";
13
13
  import { isNull } from "@kmkf-fe-packages/kmkf-utils";
14
14
  import { SYMBOL } from "../../constant";
15
15
  var INPUT_MAP = {
16
- NEW_PAYMENT_STATUS: {
17
- key: "newPaymentStatus",
18
- options: [{
19
- label: "未打款",
20
- value: "未打款"
21
- }, {
22
- label: "审核通过",
23
- value: "审核通过"
24
- }, {
25
- label: "标记已打款",
26
- value: "标记已打款"
27
- }, {
28
- label: "支付宝待付款",
29
- value: "支付宝待付款"
30
- }, {
31
- label: "支付宝打款成功",
32
- value: "支付宝打款成功"
33
- }, {
34
- label: "支付宝打款失败",
35
- value: "支付宝打款失败"
36
- }, {
37
- label: "支付宝打款关闭",
38
- value: "支付宝打款关闭"
39
- }],
40
- disabled: true,
41
- placeholder: "自动获取无需填写",
42
- filterType: "Select"
43
- },
44
16
  BUSINESS_ORDER_NO: {
45
17
  key: "businessOrderNo",
46
18
  disabled: true,
47
- placeholder: "自动获取无需填写",
48
- filterType: "Input"
19
+ placeholder: "自动获取无需填写"
49
20
  }
50
21
  };
51
22
  var CommonInput = /*#__PURE__*/_createClass(function CommonInput(options) {
@@ -106,7 +77,7 @@ var CommonInput = /*#__PURE__*/_createClass(function CommonInput(options) {
106
77
  });
107
78
  });
108
79
  _defineProperty(this, "filterConfig", function (item) {
109
- return INPUT_MAP[_this.type].filterType === "Input" ? {
80
+ return {
110
81
  searchDefaultConditions: SYMBOL.like,
111
82
  type: item.type,
112
83
  id: "".concat(item.id, "_").concat(INPUT_MAP[_this.type].key),
@@ -114,17 +85,6 @@ var CommonInput = /*#__PURE__*/_createClass(function CommonInput(options) {
114
85
  name: item.name,
115
86
  // 过滤组件名称
116
87
  filterComponentType: "Input"
117
- } : {
118
- searchDefaultConditions: SYMBOL.in,
119
- type: item.type,
120
- id: "".concat(item.id, "_").concat(INPUT_MAP[_this.type].key),
121
- // 过滤组件id
122
- name: item.name,
123
- // 过滤组件名称
124
- filterComponentType: "MultipleSelect",
125
- props: {
126
- options: INPUT_MAP[_this.type].options || []
127
- }
128
88
  };
129
89
  });
130
90
  this.name = options.name;
@@ -141,6 +101,5 @@ var CommonInput = /*#__PURE__*/_createClass(function CommonInput(options) {
141
101
  this.canSort = !!INPUT_MAP[options.type].canSort;
142
102
  this.children = [];
143
103
  this.dataType = "string";
144
- this.options = INPUT_MAP[options.type].options || [];
145
104
  });
146
105
  export default CommonInput;
@@ -1,18 +1,18 @@
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 BasicSelect 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'];
9
+ componentConfig: ComponentInterface["componentConfig"];
10
10
  isCombinationComponent: boolean;
11
11
  formField: string;
12
12
  canSort: boolean;
13
13
  children: ComponentInterface[];
14
- dataType: ComponentInterface['dataType'];
15
- options: ComponentInterface['options'];
14
+ dataType: ComponentInterface["dataType"];
15
+ options: ComponentInterface["options"];
16
16
  constructor(options: PickOption);
17
17
  getKeyByComponentType: (type: string) => any;
18
18
  editRender: (p: any) => React.JSX.Element;
@@ -6,15 +6,26 @@ 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 { ApaasSelect } from '@kmkf-fe-packages/basic-components';
9
+ import React from "react";
10
+ import { ApaasSelect } 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 typeMap = {
16
- BUYER_MESSAGE_NOTICE: 'buyerMessageNotice',
17
- SELECT: 'select'
16
+ BUYER_MESSAGE_NOTICE: {
17
+ key: "buyerMessageNotice",
18
+ disabled: false
19
+ },
20
+ SELECT: {
21
+ key: "select",
22
+ disabled: false
23
+ },
24
+ NEW_PAYMENT_STATUS: {
25
+ key: "newPaymentStatus",
26
+ disabled: true,
27
+ placeholder: "自动获取无需填写"
28
+ }
18
29
  };
19
30
  var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
20
31
  var _this = this,
@@ -33,7 +44,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
33
44
  _defineProperty(this, "dataType", void 0);
34
45
  _defineProperty(this, "options", void 0);
35
46
  _defineProperty(this, "getKeyByComponentType", function (type) {
36
- return typeMap[type] || '';
47
+ return typeMap[type].key || "";
37
48
  });
38
49
  _defineProperty(this, "editRender", function (p) {
39
50
  var _this$componentConfig, _this$componentConfig2;
@@ -44,8 +55,10 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
44
55
  hidden: p === null || p === void 0 ? void 0 : p.hidden,
45
56
  display: p === null || p === void 0 ? void 0 : p.display,
46
57
  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,
47
- component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({}, _this.componentConfig, {
48
- placeholder: "\u8BF7\u8F93\u5165".concat(_this.name),
58
+ component: /*#__PURE__*/React.createElement(ApaasSelect, _extends({
59
+ disabled: typeMap[_this.type].disabled
60
+ }, _this.componentConfig, {
61
+ placeholder: typeMap[_this.type].placeholder || "\u8BF7\u8F93\u5165".concat(_this.name),
49
62
  showSearch: true,
50
63
  onChange: p === null || p === void 0 ? void 0 : p.onChange
51
64
  }))
@@ -55,27 +68,27 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
55
68
  return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
56
69
  id: _this.id,
57
70
  label: _this.name,
58
- value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ''
71
+ value: (record === null || record === void 0 ? void 0 : record[_this.id]) || ""
59
72
  }) : null;
60
73
  });
61
74
  _defineProperty(this, "renderPc", function (value, record) {
62
75
  var _record;
63
76
  var type = _this.type;
64
- return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record !== void 0 ? _record : '--');
77
+ return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record !== void 0 ? _record : "--");
65
78
  });
66
79
  _defineProperty(this, "renderLog", function (r) {
67
80
  var type = _this.type;
68
- if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])])) return null;
81
+ if (isNull(r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)])) return null;
69
82
  return _this.renderPc(undefined, r);
70
83
  });
71
84
  _defineProperty(this, "getComponentValue", function (r) {
72
85
  var type = _this.type;
73
- return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type])];
86
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id, "_").concat(typeMap[type].key)];
74
87
  });
75
88
  _defineProperty(this, "renderExport", function (value, record) {
76
89
  var _record2;
77
90
  var type = _this.type;
78
- return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type])]) !== null && _record2 !== void 0 ? _record2 : '--';
91
+ return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_").concat(typeMap[type].key)]) !== null && _record2 !== void 0 ? _record2 : "--";
79
92
  });
80
93
  _defineProperty(this, "filterConfig", function (item) {
81
94
  var _item$config;
@@ -87,7 +100,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
87
100
  // 过滤组件id
88
101
  name: item.name,
89
102
  // 过滤组件名称
90
- filterComponentType: 'MultipleSelect',
103
+ filterComponentType: "MultipleSelect",
91
104
  props: {
92
105
  options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []
93
106
  },
@@ -108,7 +121,7 @@ var BasicSelect = /*#__PURE__*/_createClass(function BasicSelect(options) {
108
121
  this.isCombinationComponent = false;
109
122
  this.canSort = true;
110
123
  this.children = [];
111
- this.dataType = 'string';
124
+ this.dataType = "string";
112
125
  this.options = ((_this$componentConfig3 = this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.options) || [];
113
126
  });
114
127
  export default BasicSelect;
@@ -1,3 +1,3 @@
1
1
  import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, ErpTradeId, 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, WdtGoods, CommonInput, PaymentVoucherCode } from "./index";
2
2
  import { PickOption } from "./type";
3
- export declare const factory: (type: string, options: PickOption) => BuyerNick | CommonInput | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | BasicMultSelect | PaymentVoucherCode | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ErpTradeId | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | MsgStatus | WdtGoods;
3
+ export declare const factory: (type: string, options: PickOption) => ActualPayment | BasicAddress | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | ErpTradeId | BasicFile | FlowMarkSelect | FlowStatusSelect | FlowTag | FlowWorkOrderId | BasicGrade | BasicInput | JstItemSelect | JstLogistics | JstSendGood | JstSupply | Logistics | LogisticsInterception | LogisticsMoreInterception | LogisticsMoreTrajectory | LogisticsTrajectory | MsgStatus | BasicMultSelect | Ordinary | Payment | BasicPicture | BasicPosting | BasicRadio | BasicRate | ReceiverAddress | ReceiverMobile | ReceiverName | ERemark | ReturnLogistics | BasicSelect | ShopName | StatusSelect | SystemOrderNo | BasicTextArea | ThirdItemSelect | TradeDateTime | TradeId | WdtGoods | WlnGoods | WorkOrderId | CommonDataTime | TemplateSelect | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | NodeDeadLine | HandlerDeadLine | NodeStayDuration | PaymentVoucherCode;
@@ -30,6 +30,7 @@ export var factory = function factory(type, options) {
30
30
  return new BasicDataTime(options);
31
31
  case "SELECT":
32
32
  case "BUYER_MESSAGE_NOTICE":
33
+ case "NEW_PAYMENT_STATUS":
33
34
  return new BasicSelect(options);
34
35
  case "PICTURE":
35
36
  return new BasicPicture(options);
@@ -190,7 +191,6 @@ export var factory = function factory(type, options) {
190
191
  case "WDT_GOODS":
191
192
  // 万里牛商品
192
193
  return new WdtGoods(options);
193
- case "NEW_PAYMENT_STATUS":
194
194
  case "BUSINESS_ORDER_NO":
195
195
  return new CommonInput(options);
196
196
  case "PAYMENT_VOUCHER_CODE":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.26.2-rc.2",
3
+ "version": "0.26.2-rc.3",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "fd1d37508871670c546b43f1778d1903db6eeabb",
40
+ "gitHead": "00c2d68b24bd9a3af8d2ddc1f09162ec56d5ac6e",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }