@kmkf-fe-packages/services-components 0.21.6-alpha.3 → 0.21.6-alpha.5

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.
Files changed (29) hide show
  1. package/README.md +1 -1
  2. package/dist/esm/components/BS/BsSystemOrder/index.d.ts +7 -6
  3. package/dist/esm/components/BS/BsSystemOrder/index.js +22 -19
  4. package/dist/esm/components/BS/DeliveryNo/index.d.ts +6 -5
  5. package/dist/esm/components/BS/DeliveryNo/index.js +15 -12
  6. package/dist/esm/components/CommonMultiStatus/index.d.ts +6 -5
  7. package/dist/esm/components/CommonMultiStatus/index.js +58 -51
  8. package/dist/esm/components/CommonSystemOrder/index.d.ts +6 -5
  9. package/dist/esm/components/CommonSystemOrder/index.js +29 -26
  10. package/dist/esm/components/Input/index.d.ts +3 -2
  11. package/dist/esm/components/Input/index.js +10 -3
  12. package/dist/esm/components/JST/JstLogistics/index.d.ts +11 -0
  13. package/dist/esm/components/JST/JstLogistics/index.js +18 -4
  14. package/dist/esm/components/LogisticsMoreTrajectory/index.d.ts +12 -2
  15. package/dist/esm/components/LogisticsMoreTrajectory/index.js +7 -14
  16. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.d.ts +7 -7
  17. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCode.js +18 -37
  18. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.d.ts +8 -8
  19. package/dist/esm/components/LogisticsMoreTrajectory/trajectoryCompany.js +16 -29
  20. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.d.ts +6 -6
  21. package/dist/esm/components/LogisticsMoreTrajectory/trajectorySnapshot.js +14 -29
  22. package/dist/esm/components/Payment/index.d.ts +10 -10
  23. package/dist/esm/components/Payment/index.js +13 -12
  24. package/dist/esm/components/TradeId/index.d.ts +6 -6
  25. package/dist/esm/components/TradeId/index.js +16 -16
  26. package/dist/esm/constant.d.ts +1 -0
  27. package/dist/esm/constant.js +3 -0
  28. package/dist/esm/type.d.ts +14 -14
  29. package/package.json +4 -4
@@ -1,12 +1,12 @@
1
- import { ComponentInterface, PickOption, ColumnConfig, Record } from '../../type';
2
- import React from 'react';
3
- import AlipayNick from './AlipayNick';
4
- import AlipayNo from './AlipayNo';
5
- import AlipayTime from './AlipayTime';
6
- import BuyerNick from './BuyerNick';
7
- import PaymentAmount from './PaymentAmount';
8
- import PaymentStatus from './PaymentStatus';
9
- import PaymentTid from './PaymentTid';
1
+ import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
2
+ import React from "react";
3
+ import AlipayNick from "./AlipayNick";
4
+ import AlipayNo from "./AlipayNo";
5
+ import AlipayTime from "./AlipayTime";
6
+ import BuyerNick from "./BuyerNick";
7
+ import PaymentAmount from "./PaymentAmount";
8
+ import PaymentStatus from "./PaymentStatus";
9
+ import PaymentTid from "./PaymentTid";
10
10
  declare class Logistics implements ComponentInterface {
11
11
  name: string;
12
12
  id: string;
@@ -25,7 +25,7 @@ declare class Logistics implements ComponentInterface {
25
25
  formField: string;
26
26
  canSort: boolean;
27
27
  children: ComponentInterface[];
28
- dataType: ComponentInterface['dataType'];
28
+ dataType: ComponentInterface["dataType"];
29
29
  effects: ComponentInterface["effects"];
30
30
  constructor(options: PickOption);
31
31
  renderClient: (record: any, params: any) => React.JSX.Element;
@@ -8,8 +8,8 @@ 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 { Payment as ApaasPayment } from '@kmkf-fe-packages/basic-components';
11
+ import React from "react";
12
+ import { Payment as ApaasPayment } from "@kmkf-fe-packages/basic-components";
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import AlipayNick from "./AlipayNick";
15
15
  import AlipayNo from "./AlipayNo";
@@ -73,7 +73,8 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
73
73
  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,
74
74
  component: /*#__PURE__*/React.createElement(ApaasPayment, _extends({}, _this.componentConfig, {
75
75
  disabled: (_this$componentConfig3 = _this.componentConfig) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.disabled,
76
- onBlur: p === null || p === void 0 ? void 0 : p.onBlur
76
+ onBlur: p === null || p === void 0 ? void 0 : p.onBlur,
77
+ replaceValueCh: p === null || p === void 0 ? void 0 : p.innerReplaceValueCh
77
78
  }))
78
79
  });
79
80
  });
@@ -101,32 +102,32 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
101
102
  validator: function validator(_, value) {
102
103
  var _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
103
104
  if ((_this$componentConfig4 = _this.componentConfig) !== null && _this$componentConfig4 !== void 0 && _this$componentConfig4.required && !(value !== null && value !== void 0 && value.enterprisePaymentRefundFee)) {
104
- return Promise.reject(new Error('请输入打款金额'));
105
+ return Promise.reject(new Error("请输入打款金额"));
105
106
  } else if (value !== null && value !== void 0 && value.enterprisePaymentRefundFee && !/^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/.test(value === null || value === void 0 ? void 0 : value.enterprisePaymentRefundFee)) {
106
- return Promise.reject(new Error('打款金额最多2位小数'));
107
+ return Promise.reject(new Error("打款金额最多2位小数"));
107
108
  }
108
109
  if ((_this$componentConfig5 = _this.componentConfig) !== null && _this$componentConfig5 !== void 0 && _this$componentConfig5.required && !(value !== null && value !== void 0 && value.enterprisePaymentTid)) {
109
- return Promise.reject(new Error('请输入订单编号'));
110
+ return Promise.reject(new Error("请输入订单编号"));
110
111
  } else if (value.enterprisePaymentTid && !/^[0-9a-zA-Z_-]{1,}$/.test(value.enterprisePaymentTid)) {
111
- return Promise.reject(new Error('请输入正确的订单编号'));
112
+ return Promise.reject(new Error("请输入正确的订单编号"));
112
113
  }
113
114
  if ((_this$componentConfig6 = _this.componentConfig) !== null && _this$componentConfig6 !== void 0 && _this$componentConfig6.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick)) {
114
- return Promise.reject(new Error('请输入支付宝名称'));
115
+ return Promise.reject(new Error("请输入支付宝名称"));
115
116
  }
116
117
  if ((_this$componentConfig7 = _this.componentConfig) !== null && _this$componentConfig7 !== void 0 && _this$componentConfig7.zhiFubaoRequired && !(value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
117
- return Promise.reject(new Error('请输入支付宝账号'));
118
+ return Promise.reject(new Error("请输入支付宝账号"));
118
119
  } else if (value.enterprisePaymentAlipayNo && !/^(?:1[3-9]\d{9}|[a-zA-Z\d._-]*\@[a-zA-Z\d.-]{1,10}\.[a-zA-Z\d]{1,20})$/.test(value.enterprisePaymentAlipayNo)) {
119
- return Promise.reject(new Error('请输入正确的支付宝账号格式'));
120
+ return Promise.reject(new Error("请输入正确的支付宝账号格式"));
120
121
  }
121
122
  //支付宝信息不能只填一个,否则不能打款
122
123
  if (value !== null && value !== void 0 && value.enterprisePaymentAlipayNick || value !== null && value !== void 0 && value.enterprisePaymentAlipayNo) {
123
124
  if (!(value !== null && value !== void 0 && value.enterprisePaymentAlipayNick && value !== null && value !== void 0 && value.enterprisePaymentAlipayNo)) {
124
- return Promise.reject(new Error('支付宝姓名/账号都要填写'));
125
+ return Promise.reject(new Error("支付宝姓名/账号都要填写"));
125
126
  }
126
127
  }
127
128
  return Promise.resolve();
128
129
  }
129
130
  }];
130
- this.dataType = 'object';
131
+ this.dataType = "object";
131
132
  });
132
133
  export default Logistics;
@@ -1,5 +1,5 @@
1
- import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
2
- import React from "react";
1
+ import { ComponentInterface, PickOption, Record, ColumnConfig } from '../../type';
2
+ import React from 'react';
3
3
  declare class ETradeId implements ComponentInterface {
4
4
  name: string;
5
5
  id: string;
@@ -8,13 +8,13 @@ declare class ETradeId implements ComponentInterface {
8
8
  rules: any[];
9
9
  showContains: boolean;
10
10
  onlyContainsString: boolean;
11
- componentConfig: ComponentInterface["componentConfig"];
12
- effects: ComponentInterface["effects"];
11
+ componentConfig: ComponentInterface['componentConfig'];
12
+ effects: ComponentInterface['effects'];
13
13
  isCombinationComponent: boolean;
14
14
  formField: string;
15
15
  canSort: boolean;
16
16
  children: ComponentInterface[];
17
- dataType: ComponentInterface["dataType"];
17
+ dataType: ComponentInterface['dataType'];
18
18
  constructor(options: PickOption);
19
19
  renderClient: (record: any) => React.JSX.Element | null;
20
20
  copyHandle: (text: string) => void;
@@ -30,7 +30,7 @@ declare class ETradeId implements ComponentInterface {
30
30
  name: string;
31
31
  filterComponentType: "Input";
32
32
  filterFn: (value: string) => (i: Record) => boolean;
33
- formatFilterValue: (input: string) => string[];
33
+ formatFilterValue: (input: string) => string | string[];
34
34
  };
35
35
  }
36
36
  export default ETradeId;
@@ -6,15 +6,15 @@ 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 { message } from "antd";
11
- import { TradeId } from "@kmkf-fe-packages/basic-components";
12
- import { CopyOutlined } from "@ant-design/icons";
9
+ import React from 'react';
10
+ import { message } from 'antd';
11
+ import { TradeId } from '@kmkf-fe-packages/basic-components';
12
+ import { CopyOutlined } from '@ant-design/icons';
13
13
  import GetFormItem from "../GetFormItem";
14
14
  import ItemView from "../../commonComponents/ItemView";
15
- import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
16
- import copy from "copy-to-clipboard";
17
- import { SYMBOL } from "../../constant";
15
+ import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
16
+ import copy from 'copy-to-clipboard';
17
+ import { SYMBOL, batchInput } from "../../constant";
18
18
  var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
19
19
  var _this = this;
20
20
  _classCallCheck(this, ETradeId);
@@ -41,7 +41,7 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
41
41
  });
42
42
  _defineProperty(this, "copyHandle", function (text) {
43
43
  copy(text);
44
- message.success("复制成功");
44
+ message.success('复制成功');
45
45
  });
46
46
  _defineProperty(this, "renderPc", function (value, record) {
47
47
  if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) === undefined) {
@@ -58,8 +58,8 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
58
58
  }
59
59
  }, /*#__PURE__*/React.createElement("span", {
60
60
  style: {
61
- paddingLeft: "4px",
62
- cursor: "pointer"
61
+ paddingLeft: '4px',
62
+ cursor: 'pointer'
63
63
  }
64
64
  }, /*#__PURE__*/React.createElement(CopyOutlined, null)))));
65
65
  });
@@ -72,13 +72,13 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
72
72
  });
73
73
  _defineProperty(this, "renderExport", function (value, record) {
74
74
  var _record;
75
- return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : "--";
75
+ return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_tradeId")]) !== null && _record !== void 0 ? _record : '--';
76
76
  });
77
77
  _defineProperty(this, "editRender", function (p) {
78
78
  var _this$componentConfig, _this$componentConfig2, _this$effects, _this$effects2;
79
79
  var onTradeIdBlur = function onTradeIdBlur(e) {
80
80
  var _p$onBlur;
81
- p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, "tradeId");
81
+ p === null || p === void 0 ? void 0 : (_p$onBlur = p.onBlur) === null || _p$onBlur === void 0 ? void 0 : _p$onBlur.call(p, e.target.value, 'tradeId');
82
82
  };
83
83
  return /*#__PURE__*/React.createElement(GetFormItem, {
84
84
  title: _this.name,
@@ -102,14 +102,14 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
102
102
  // 过滤组件id
103
103
  name: item.name,
104
104
  // 过滤组件名称
105
- filterComponentType: "Input",
105
+ filterComponentType: 'Input',
106
106
  filterFn: function filterFn(value) {
107
107
  return function (i) {
108
- return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, "tradeId"), value);
108
+ return _filterFn.filterSplitComma(_filterFn.filterTableListItemColumnValue(i, item.id, 'tradeId'), value);
109
109
  };
110
110
  },
111
111
  formatFilterValue: function formatFilterValue(input) {
112
- return input.split(/[,|,|\s|\n|\rn]/);
112
+ return batchInput(input);
113
113
  }
114
114
  };
115
115
  });
@@ -126,6 +126,6 @@ var ETradeId = /*#__PURE__*/_createClass(function ETradeId(options) {
126
126
  this.isCombinationComponent = false;
127
127
  this.canSort = true;
128
128
  this.children = [];
129
- this.dataType = "string";
129
+ this.dataType = 'string';
130
130
  });
131
131
  export default ETradeId;
@@ -12,3 +12,4 @@ export declare const SYMBOL: {
12
12
  non: string;
13
13
  notnull: string;
14
14
  };
15
+ export declare const batchInput: (val: string) => string | string[];
@@ -11,4 +11,7 @@ export var SYMBOL = {
11
11
  nin: 'nin',
12
12
  non: 'non',
13
13
  notnull: 'notnull'
14
+ };
15
+ export var batchInput = function batchInput(val) {
16
+ return val ? val.split(/[,|,|\s|\n|\rn]/) : val;
14
17
  };
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
- import type { FormInstance } from 'antd';
3
- import { SYMBOL } from './constant';
4
- export declare type DataType = 'string' | 'number' | 'array' | 'dateArray' | 'date' | 'tradeId';
5
- export declare type ALignType = 'left' | 'right' | 'center';
2
+ import type { FormInstance } from "antd";
3
+ import { SYMBOL } from "./constant";
4
+ export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
5
+ export declare type ALignType = "left" | "right" | "center";
6
6
  export declare type QuerySymbol = keyof typeof SYMBOL;
7
7
  export declare type Record = {
8
8
  [props in string]: any;
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
27
27
  filterFn?: (p: any) => (r: Record) => unknown;
28
28
  formatFilterValue?: (p: any) => any;
29
29
  };
30
- export declare type FilterComponentType = 'MultipleSelect' | 'Input' | 'Date' | 'Cascader' | 'ShopList' | 'Rate';
30
+ export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
31
31
  export interface ComponentInterface {
32
32
  id: string;
33
33
  sortField: string;
@@ -47,8 +47,8 @@ export interface ComponentInterface {
47
47
  rules?: any[];
48
48
  width?: number;
49
49
  align?: ALignType;
50
- dataType: 'string' | 'number' | 'boolean' | 'array' | 'range' | 'object';
51
- format?: 'dateTime' | 'date' | 'time' | 'cascader' | 'shopInput';
50
+ dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
51
+ format?: "dateTime" | "date" | "time" | "cascader" | "shopInput";
52
52
  options?: Array<any>;
53
53
  templateId?: string;
54
54
  workOrderUniqueKey?: string;
@@ -77,7 +77,7 @@ export interface ComponentInterface {
77
77
  /**
78
78
  * @description 显示字段名称
79
79
  */
80
- showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder';
80
+ showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder";
81
81
  /**
82
82
  * @description 是否选择SKU
83
83
  */
@@ -97,7 +97,7 @@ export interface ComponentInterface {
97
97
  /**
98
98
  * @description 备注状态
99
99
  */
100
- associatedType?: 'APPEND';
100
+ associatedType?: "APPEND";
101
101
  isAssociated?: boolean;
102
102
  isShowFlag?: boolean;
103
103
  /**
@@ -138,7 +138,7 @@ export interface ComponentInterface {
138
138
  * @description 时间初始值
139
139
  */
140
140
  dateTime?: string;
141
- dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
141
+ dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
142
142
  maxSize?: number;
143
143
  basicGrade?: number;
144
144
  range?: number;
@@ -233,13 +233,13 @@ export interface ComponentInterface {
233
233
  getComponentValue: (r: Record) => any;
234
234
  formDataTransform?: (r: any) => any;
235
235
  }
236
- export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey'>;
236
+ export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey">;
237
237
  export declare type ColumnConfig = {
238
238
  id: string;
239
239
  name: string;
240
240
  type: string;
241
241
  subKey?: string;
242
- mode?: 'multiple';
243
- config?: ComponentInterface['componentConfig'];
244
- templateConfig?: ComponentInterface['componentConfig'];
242
+ mode?: "multiple";
243
+ config?: ComponentInterface["componentConfig"];
244
+ templateConfig?: ComponentInterface["componentConfig"];
245
245
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/services-components",
3
- "version": "0.21.6-alpha.3",
3
+ "version": "0.21.6-alpha.5",
4
4
  "module": "dist/esm/index.js",
5
5
  "typings": "dist/esm/index.d.ts",
6
6
  "files": [
@@ -20,8 +20,8 @@
20
20
  ]
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/basic-components": "^0.21.6-alpha.3",
24
- "@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.3"
23
+ "@kmkf-fe-packages/basic-components": "^0.21.6-alpha.5",
24
+ "@kmkf-fe-packages/kmkf-utils": "^0.21.6-alpha.5"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@typescript-eslint/eslint-plugin": "^5.59.2",
@@ -37,7 +37,7 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "82b6320bc9ae14f532b5aa543d0e6040900c5d78",
40
+ "gitHead": "70403ea96f15ae50fca601163149eeff73d911eb",
41
41
  "gitHooks": {
42
42
  "pre-commit": "lint-staged"
43
43
  }