@kmkf-fe-packages/basic-components 0.25.0-alpha.1 → 0.25.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,
|
|
3
|
+
import { EyeOutlined, DeleteOutlined, 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';
|
|
@@ -516,8 +516,18 @@ function ApaasInput(props) {
|
|
|
516
516
|
var isNumber = props.isNumber,
|
|
517
517
|
replaceWarn = props.replaceWarn,
|
|
518
518
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
519
|
+
var handleBlur = function handleBlur(e) {
|
|
520
|
+
// 去除头尾空格
|
|
521
|
+
e.target.value = e.target.value.trim();
|
|
522
|
+
var onChange = props.onChange,
|
|
523
|
+
onBlur = props.onBlur;
|
|
524
|
+
typeof onChange === 'function' && onChange(e);
|
|
525
|
+
typeof onBlur === 'function' && onBlur(e);
|
|
526
|
+
};
|
|
519
527
|
// @ts-ignore
|
|
520
|
-
return isNumber ? /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React.createElement(Input, _objectSpread2({}, other)
|
|
528
|
+
return isNumber ? /*#__PURE__*/React.createElement(InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React.createElement(Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
529
|
+
onBlur: handleBlur
|
|
530
|
+
}));
|
|
521
531
|
}
|
|
522
532
|
|
|
523
533
|
function ApaasInputNumber(props) {
|
|
@@ -7389,14 +7399,11 @@ var Province = function Province(props) {
|
|
|
7389
7399
|
num++;
|
|
7390
7400
|
options = type !== 'bs' ? addressData.addressOptions || [] : bsAddressData.addressOptions || [];
|
|
7391
7401
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7392
|
-
getBsAddress();
|
|
7393
7402
|
time.current = setTimeout(function () {
|
|
7394
7403
|
initPageSource();
|
|
7395
7404
|
}, 1000);
|
|
7396
7405
|
}
|
|
7397
|
-
|
|
7398
|
-
setOptions(options);
|
|
7399
|
-
}
|
|
7406
|
+
setOptions(options);
|
|
7400
7407
|
case 4:
|
|
7401
7408
|
case "end":
|
|
7402
7409
|
return _context.stop();
|
|
@@ -9728,6 +9735,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9728
9735
|
var address = AddressData.getInstance();
|
|
9729
9736
|
var _props$value = props.value,
|
|
9730
9737
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9738
|
+
_props$logisticsOptio = props.logisticsOptions,
|
|
9731
9739
|
_props$expressInterce = props.expressInterceptData,
|
|
9732
9740
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9733
9741
|
_props$required = props.required,
|
|
@@ -10019,64 +10027,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10019
10027
|
})));
|
|
10020
10028
|
};
|
|
10021
10029
|
|
|
10022
|
-
var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
10023
|
-
var required = props.required,
|
|
10024
|
-
expressInterceptData = props.expressInterceptData,
|
|
10025
|
-
_props$value = props.value,
|
|
10026
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
10027
|
-
disabled = props.disabled,
|
|
10028
|
-
onChange = props.onChange,
|
|
10029
|
-
isEditing = props.isEditing;
|
|
10030
|
-
var _useState = useState(0),
|
|
10031
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10032
|
-
changeIndex = _useState2[0],
|
|
10033
|
-
setChangeIndex = _useState2[1];
|
|
10034
|
-
var handleChange = function handleChange(val, index) {
|
|
10035
|
-
var newValue = cloneDeep(value);
|
|
10036
|
-
newValue.splice(index, 1, val);
|
|
10037
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10038
|
-
};
|
|
10039
|
-
var handleDelete = function handleDelete(e, index) {
|
|
10040
|
-
e.stopPropagation();
|
|
10041
|
-
var newValue = cloneDeep(value);
|
|
10042
|
-
newValue.splice(index, 1);
|
|
10043
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10044
|
-
setChangeIndex(0);
|
|
10045
|
-
};
|
|
10046
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Space, {
|
|
10047
|
-
wrap: true
|
|
10048
|
-
}, value.length > 1 ? (value || []).map(function (item, index) {
|
|
10049
|
-
return /*#__PURE__*/React.createElement("span", {
|
|
10050
|
-
style: {
|
|
10051
|
-
position: 'relative',
|
|
10052
|
-
color: changeIndex === index ? '#4569d4' : 'black',
|
|
10053
|
-
cursor: 'pointer'
|
|
10054
|
-
},
|
|
10055
|
-
onClick: function onClick() {
|
|
10056
|
-
return setChangeIndex(index);
|
|
10057
|
-
}
|
|
10058
|
-
}, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React.createElement(CloseCircleOutlined, {
|
|
10059
|
-
style: {
|
|
10060
|
-
position: 'absolute',
|
|
10061
|
-
right: '-7px',
|
|
10062
|
-
top: '-10px'
|
|
10063
|
-
},
|
|
10064
|
-
onClick: function onClick(e) {
|
|
10065
|
-
return handleDelete(e, index);
|
|
10066
|
-
}
|
|
10067
|
-
}) : null);
|
|
10068
|
-
}) : null), /*#__PURE__*/React.createElement(LogisticsInterception, {
|
|
10069
|
-
required: required,
|
|
10070
|
-
expressInterceptData: expressInterceptData,
|
|
10071
|
-
value: value[changeIndex],
|
|
10072
|
-
disabled: disabled,
|
|
10073
|
-
isEditing: false,
|
|
10074
|
-
onChange: function onChange(val) {
|
|
10075
|
-
return handleChange(val, changeIndex);
|
|
10076
|
-
}
|
|
10077
|
-
}));
|
|
10078
|
-
};
|
|
10079
|
-
|
|
10080
10030
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10081
10031
|
var showField = props.showField,
|
|
10082
10032
|
_props$value = props.value,
|
|
@@ -12913,4 +12863,4 @@ var CalculationInput = function CalculationInput(props) {
|
|
|
12913
12863
|
}, config === null || config === void 0 ? void 0 : config.unit));
|
|
12914
12864
|
};
|
|
12915
12865
|
|
|
12916
|
-
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,
|
|
12866
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -527,8 +527,18 @@ function ApaasInput(props) {
|
|
|
527
527
|
var isNumber = props.isNumber,
|
|
528
528
|
replaceWarn = props.replaceWarn,
|
|
529
529
|
other = _objectWithoutProperties(props, _excluded$1);
|
|
530
|
+
var handleBlur = function handleBlur(e) {
|
|
531
|
+
// 去除头尾空格
|
|
532
|
+
e.target.value = e.target.value.trim();
|
|
533
|
+
var onChange = props.onChange,
|
|
534
|
+
onBlur = props.onBlur;
|
|
535
|
+
typeof onChange === 'function' && onChange(e);
|
|
536
|
+
typeof onBlur === 'function' && onBlur(e);
|
|
537
|
+
};
|
|
530
538
|
// @ts-ignore
|
|
531
|
-
return isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2({}, other)
|
|
539
|
+
return isNumber ? /*#__PURE__*/React__default['default'].createElement(antd.InputNumber, _objectSpread2({}, other)) : /*#__PURE__*/React__default['default'].createElement(antd.Input, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
540
|
+
onBlur: handleBlur
|
|
541
|
+
}));
|
|
532
542
|
}
|
|
533
543
|
|
|
534
544
|
function ApaasInputNumber(props) {
|
|
@@ -7400,14 +7410,11 @@ var Province = function Province(props) {
|
|
|
7400
7410
|
num++;
|
|
7401
7411
|
options = type !== 'bs' ? addressData.addressOptions || [] : bsAddressData.addressOptions || [];
|
|
7402
7412
|
if (!(options === null || options === void 0 ? void 0 : options.length) && num < 6) {
|
|
7403
|
-
getBsAddress();
|
|
7404
7413
|
time.current = setTimeout(function () {
|
|
7405
7414
|
initPageSource();
|
|
7406
7415
|
}, 1000);
|
|
7407
7416
|
}
|
|
7408
|
-
|
|
7409
|
-
setOptions(options);
|
|
7410
|
-
}
|
|
7417
|
+
setOptions(options);
|
|
7411
7418
|
case 4:
|
|
7412
7419
|
case "end":
|
|
7413
7420
|
return _context.stop();
|
|
@@ -9739,6 +9746,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
9739
9746
|
var address = kmkfUtils.AddressData.getInstance();
|
|
9740
9747
|
var _props$value = props.value,
|
|
9741
9748
|
value = _props$value === void 0 ? {} : _props$value,
|
|
9749
|
+
_props$logisticsOptio = props.logisticsOptions,
|
|
9742
9750
|
_props$expressInterce = props.expressInterceptData,
|
|
9743
9751
|
expressInterceptData = _props$expressInterce === void 0 ? [] : _props$expressInterce,
|
|
9744
9752
|
_props$required = props.required,
|
|
@@ -10030,64 +10038,6 @@ var LogisticsInterception = function LogisticsInterception(props) {
|
|
|
10030
10038
|
})));
|
|
10031
10039
|
};
|
|
10032
10040
|
|
|
10033
|
-
var LogisticsMoreInterception = function LogisticsMoreInterception(props) {
|
|
10034
|
-
var required = props.required,
|
|
10035
|
-
expressInterceptData = props.expressInterceptData,
|
|
10036
|
-
_props$value = props.value,
|
|
10037
|
-
value = _props$value === void 0 ? [] : _props$value,
|
|
10038
|
-
disabled = props.disabled,
|
|
10039
|
-
onChange = props.onChange,
|
|
10040
|
-
isEditing = props.isEditing;
|
|
10041
|
-
var _useState = React.useState(0),
|
|
10042
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
10043
|
-
changeIndex = _useState2[0],
|
|
10044
|
-
setChangeIndex = _useState2[1];
|
|
10045
|
-
var handleChange = function handleChange(val, index) {
|
|
10046
|
-
var newValue = lodash.cloneDeep(value);
|
|
10047
|
-
newValue.splice(index, 1, val);
|
|
10048
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10049
|
-
};
|
|
10050
|
-
var handleDelete = function handleDelete(e, index) {
|
|
10051
|
-
e.stopPropagation();
|
|
10052
|
-
var newValue = lodash.cloneDeep(value);
|
|
10053
|
-
newValue.splice(index, 1);
|
|
10054
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
|
|
10055
|
-
setChangeIndex(0);
|
|
10056
|
-
};
|
|
10057
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(antd.Space, {
|
|
10058
|
-
wrap: true
|
|
10059
|
-
}, value.length > 1 ? (value || []).map(function (item, index) {
|
|
10060
|
-
return /*#__PURE__*/React__default['default'].createElement("span", {
|
|
10061
|
-
style: {
|
|
10062
|
-
position: 'relative',
|
|
10063
|
-
color: changeIndex === index ? '#4569d4' : 'black',
|
|
10064
|
-
cursor: 'pointer'
|
|
10065
|
-
},
|
|
10066
|
-
onClick: function onClick() {
|
|
10067
|
-
return setChangeIndex(index);
|
|
10068
|
-
}
|
|
10069
|
-
}, "\u5305\u88F9".concat(index + 1), !disabled ? /*#__PURE__*/React__default['default'].createElement(icons.CloseCircleOutlined, {
|
|
10070
|
-
style: {
|
|
10071
|
-
position: 'absolute',
|
|
10072
|
-
right: '-7px',
|
|
10073
|
-
top: '-10px'
|
|
10074
|
-
},
|
|
10075
|
-
onClick: function onClick(e) {
|
|
10076
|
-
return handleDelete(e, index);
|
|
10077
|
-
}
|
|
10078
|
-
}) : null);
|
|
10079
|
-
}) : null), /*#__PURE__*/React__default['default'].createElement(LogisticsInterception, {
|
|
10080
|
-
required: required,
|
|
10081
|
-
expressInterceptData: expressInterceptData,
|
|
10082
|
-
value: value[changeIndex],
|
|
10083
|
-
disabled: disabled,
|
|
10084
|
-
isEditing: false,
|
|
10085
|
-
onChange: function onChange(val) {
|
|
10086
|
-
return handleChange(val, changeIndex);
|
|
10087
|
-
}
|
|
10088
|
-
}));
|
|
10089
|
-
};
|
|
10090
|
-
|
|
10091
10041
|
var LogisticsTrajectory = function LogisticsTrajectory(props) {
|
|
10092
10042
|
var showField = props.showField,
|
|
10093
10043
|
_props$value = props.value,
|
|
@@ -12963,7 +12913,6 @@ exports.Invoice = Invoice;
|
|
|
12963
12913
|
exports.JstGoods = jstGoods;
|
|
12964
12914
|
exports.JstItemList = ItemList;
|
|
12965
12915
|
exports.LogisticsInterception = LogisticsInterception;
|
|
12966
|
-
exports.LogisticsMoreInterception = LogisticsMoreInterception;
|
|
12967
12916
|
exports.LogisticsMoreTrajectory = LogisticsMoreTrajectory;
|
|
12968
12917
|
exports.LogisticsTrajectory = LogisticsTrajectory;
|
|
12969
12918
|
exports.MsgStatus = MsgStatus;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ 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';
|
|
36
35
|
export { default as LogisticsTrajectory } from './business/LogisticsTrajectory';
|
|
37
36
|
export { default as LogisticsMoreTrajectory } from './business/LogisticsMoreTrajectory';
|
|
38
37
|
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.25.0
|
|
3
|
+
"version": "0.25.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.25.0
|
|
23
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.25.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": "
|
|
67
|
+
"gitHead": "356a8047a0b59ea8ad5c74cedf392f0f3fa71df2"
|
|
68
68
|
}
|