@kmkf-fe-packages/basic-components 0.24.1 → 0.25.0-alpha.0

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.
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { useRef, useState, useEffect, forwardRef, useImperativeHandle, useMemo } from 'react';
2
2
  import { Cascader, DatePicker, InputNumber, Input, Select, Upload, Image, message, Radio, Space, Spin, Modal, Button, Checkbox, Row, Col, Slider, Rate, Form, Tabs, ConfigProvider, Pagination, Popover, Table } from 'antd';
3
- import { EyeOutlined, DeleteOutlined, CaretUpOutlined } from '@ant-design/icons';
3
+ import { EyeOutlined, DeleteOutlined, CloseCircleOutlined, CaretUpOutlined } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
5
5
  import { CopyToClipboard } from 'react-copy-to-clipboard';
6
6
  import { AddressData, BsAddressData, toTree, request as request$1, ExpressData, uuid, LogisticsAddressData } from '@kmkf-fe-packages/kmkf-utils';
@@ -9725,7 +9725,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
9725
9725
  var address = AddressData.getInstance();
9726
9726
  var _props$value = props.value,
9727
9727
  value = _props$value === void 0 ? {} : _props$value,
9728
- _props$logisticsOptio = props.logisticsOptions,
9729
9728
  _props$expressInterce = props.expressInterceptData,
9730
9729
  expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
9731
9730
  _props$required = props.required,
@@ -10017,6 +10016,62 @@ var LogisticsInterception = function LogisticsInterception(props) {
10017
10016
  })));
10018
10017
  };
10019
10018
 
10019
+ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
10020
+ var required = props.required,
10021
+ expressInterceptData = props.expressInterceptData,
10022
+ _props$value = props.value,
10023
+ value = _props$value === void 0 ? [] : _props$value,
10024
+ disabled = props.disabled,
10025
+ onChange = props.onChange,
10026
+ isEditing = props.isEditing;
10027
+ var _useState = useState(0),
10028
+ _useState2 = _slicedToArray(_useState, 2),
10029
+ changeIndex = _useState2[0],
10030
+ setChangeIndex = _useState2[1];
10031
+ var handleChange = function handleChange(val, index) {
10032
+ var newValue = cloneDeep(value);
10033
+ newValue.splice(index, 1, val);
10034
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10035
+ };
10036
+ var handleDelete = function handleDelete(index) {
10037
+ var newValue = cloneDeep(value);
10038
+ newValue.splice(index, 1);
10039
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10040
+ };
10041
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, {
10042
+ wrap: true
10043
+ }, (value || []).map(function (item, index) {
10044
+ return /*#__PURE__*/React.createElement("span", {
10045
+ style: {
10046
+ position: 'relative',
10047
+ color: changeIndex === index ? '#4569d4' : 'black',
10048
+ cursor: 'pointer'
10049
+ },
10050
+ onClick: function onClick() {
10051
+ return setChangeIndex(index);
10052
+ }
10053
+ }, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React.createElement(CloseCircleOutlined, {
10054
+ style: {
10055
+ position: 'absolute',
10056
+ right: '-7px',
10057
+ top: '-10px'
10058
+ },
10059
+ onClick: function onClick() {
10060
+ return handleDelete(index);
10061
+ }
10062
+ }) : null);
10063
+ })), /*#__PURE__*/React.createElement(LogisticsInterception, {
10064
+ required: required,
10065
+ expressInterceptData: expressInterceptData,
10066
+ value: value[changeIndex],
10067
+ disabled: disabled,
10068
+ isEditing: isEditing,
10069
+ onChange: function onChange(val) {
10070
+ return handleChange(val, changeIndex);
10071
+ }
10072
+ }));
10073
+ };
10074
+
10020
10075
  var LogisticsTrajectory = function LogisticsTrajectory(props) {
10021
10076
  var showField = props.showField,
10022
10077
  _props$value = props.value,
@@ -12853,4 +12908,4 @@ var CalculationInput = function CalculationInput(props) {
12853
12908
  }, config === null || config === void 0 ? void 0 : config.unit));
12854
12909
  };
12855
12910
 
12856
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
12911
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasLogistics, ApaasMultipleSelect, ApaasPosting, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, index as ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index$1 as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$2 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsMoreInterception, LogisticsMoreTrajectory, LogisticsTrajectory, MsgStatus, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
package/dist/index.js CHANGED
@@ -9736,7 +9736,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
9736
9736
  var address = kmkfUtils.AddressData.getInstance();
9737
9737
  var _props$value = props.value,
9738
9738
  value = _props$value === void 0 ? {} : _props$value,
9739
- _props$logisticsOptio = props.logisticsOptions,
9740
9739
  _props$expressInterce = props.expressInterceptData,
9741
9740
  expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
9742
9741
  _props$required = props.required,
@@ -10028,6 +10027,62 @@ var LogisticsInterception = function LogisticsInterception(props) {
10028
10027
  })));
10029
10028
  };
10030
10029
 
10030
+ var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
10031
+ var required = props.required,
10032
+ expressInterceptData = props.expressInterceptData,
10033
+ _props$value = props.value,
10034
+ value = _props$value === void 0 ? [] : _props$value,
10035
+ disabled = props.disabled,
10036
+ onChange = props.onChange,
10037
+ isEditing = props.isEditing;
10038
+ var _useState = React.useState(0),
10039
+ _useState2 = _slicedToArray(_useState, 2),
10040
+ changeIndex = _useState2[0],
10041
+ setChangeIndex = _useState2[1];
10042
+ var handleChange = function handleChange(val, index) {
10043
+ var newValue = lodash.cloneDeep(value);
10044
+ newValue.splice(index, 1, val);
10045
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10046
+ };
10047
+ var handleDelete = function handleDelete(index) {
10048
+ var newValue = lodash.cloneDeep(value);
10049
+ newValue.splice(index, 1);
10050
+ onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
10051
+ };
10052
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
10053
+ wrap: true
10054
+ }, (value || []).map(function (item, index) {
10055
+ return /*#__PURE__*/React__default['default'].createElement("span", {
10056
+ style: {
10057
+ position: 'relative',
10058
+ color: changeIndex === index ? '#4569d4' : 'black',
10059
+ cursor: 'pointer'
10060
+ },
10061
+ onClick: function onClick() {
10062
+ return setChangeIndex(index);
10063
+ }
10064
+ }, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
10065
+ style: {
10066
+ position: 'absolute',
10067
+ right: '-7px',
10068
+ top: '-10px'
10069
+ },
10070
+ onClick: function onClick() {
10071
+ return handleDelete(index);
10072
+ }
10073
+ }) : null);
10074
+ })), /*#__PURE__*/React__default['default'].createElement(LogisticsInterception, {
10075
+ required: required,
10076
+ expressInterceptData: expressInterceptData,
10077
+ value: value[changeIndex],
10078
+ disabled: disabled,
10079
+ isEditing: isEditing,
10080
+ onChange: function onChange(val) {
10081
+ return handleChange(val, changeIndex);
10082
+ }
10083
+ }));
10084
+ };
10085
+
10031
10086
  var LogisticsTrajectory = function LogisticsTrajectory(props) {
10032
10087
  var showField = props.showField,
10033
10088
  _props$value = props.value,
@@ -12903,6 +12958,7 @@ exports.Invoice = Invoice;
12903
12958
  exports.JstGoods = jstGoods;
12904
12959
  exports.JstItemList = ItemList;
12905
12960
  exports.LogisticsInterception = LogisticsInterception;
12961
+ exports.LogisticsMoreInterception = LogisticsMoreInterception;
12906
12962
  exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
12907
12963
  exports.LogisticsTrajectory = LogisticsTrajectory;
12908
12964
  exports.MsgStatus = MsgStatus;
@@ -14,7 +14,6 @@ interface LogisticsInterceptionValueType {
14
14
  }
15
15
  interface LogisticsInterceptionProps {
16
16
  value: Partial<LogisticsInterceptionValueType>;
17
- logisticsOptions: any[];
18
17
  expressInterceptData: any[];
19
18
  required: boolean;
20
19
  disabled: boolean;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const LogisticsMoreInterception: (props: any) => React.JSX.Element;
3
+ export default LogisticsMoreInterception;
@@ -32,6 +32,7 @@ export { default as Invoice } from './business/Invoice';
32
32
  export { default as Status } from './business/Status';
33
33
  export { default as Payment } from './business/Payment';
34
34
  export { default as LogisticsInterception } from './business/LogisticsInterception';
35
+ export { default as LogisticsMoreInterception } from './business/LogisticsMoreInterception';
35
36
  export { default as LogisticsTrajectory } from './business/LogisticsTrajectory';
36
37
  export { default as LogisticsMoreTrajectory } from './business/LogisticsMoreTrajectory';
37
38
  export { default as Goods } from './common/Goods';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.24.1",
3
+ "version": "0.25.0-alpha.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@
20
20
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
21
21
  },
22
22
  "dependencies": {
23
- "@kmkf-fe-packages/kmkf-utils": "^0.24.1",
23
+ "@kmkf-fe-packages/kmkf-utils": "^0.25.0-alpha.0",
24
24
  "ahooks": "^3.7.4",
25
25
  "kmkf-monitor": "^0.8.8",
26
26
  "lodash": "^4.17.21",
@@ -64,5 +64,5 @@
64
64
  "publishConfig": {
65
65
  "access": "public"
66
66
  },
67
- "gitHead": "1574e8b0d511d79bf4a92f7d614a226b67fc8640"
67
+ "gitHead": "d78e11602412f0e388413cd529da58f64a5f6429"
68
68
  }