@kmkf-fe-packages/basic-components 0.13.1 → 0.14.1-alpha.11

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,4 +1,4 @@
1
- import React, { useRef, useState, useEffect, useMemo, forwardRef, useImperativeHandle } from 'react';
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
3
  import { EyeOutlined, DeleteOutlined } from '@ant-design/icons';
4
4
  import request, { extend as extend$1 } from 'umi-request';
@@ -899,7 +899,7 @@ var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "ac
899
899
  var fn$1 = function fn() {
900
900
  return void 0;
901
901
  };
902
- var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
902
+ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
903
903
  var _ref$maxCount = _ref.maxCount,
904
904
  maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
905
905
  _ref$maxSize = _ref.maxSize,
@@ -1120,6 +1120,11 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
1120
1120
  });
1121
1121
  };
1122
1122
  }, [pasteDefaultStates]);
1123
+ useImperativeHandle(ref, function () {
1124
+ return {
1125
+ taskCompleted: !uploading
1126
+ };
1127
+ }, [uploading]);
1123
1128
  return /*#__PURE__*/React.createElement(Spin, {
1124
1129
  spinning: uploading
1125
1130
  }, /*#__PURE__*/React.createElement("p", {
@@ -1172,6 +1177,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
1172
1177
  }
1173
1178
  })));
1174
1179
  };
1180
+ var index = /*#__PURE__*/forwardRef(ApaasUploadAsync);
1175
1181
 
1176
1182
  var css_248z$2 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1rpoB .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
1177
1183
  var styles$2 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","tips":"index-module_tips__168Vy"};
@@ -11118,7 +11124,7 @@ var columnsNameMap = {
11118
11124
  tagName: '标记'
11119
11125
  }
11120
11126
  };
11121
- var index = (function (props) {
11127
+ var index$1 = (function (props) {
11122
11128
  var value = props.value,
11123
11129
  _onChange = props.onChange,
11124
11130
  disabled = props.disabled,
@@ -11758,7 +11764,7 @@ var Goods$1 = function Goods(props, ref) {
11758
11764
  userNick: userNick
11759
11765
  }));
11760
11766
  };
11761
- var index$1 = /*#__PURE__*/forwardRef(Goods$1);
11767
+ var index$2 = /*#__PURE__*/forwardRef(Goods$1);
11762
11768
 
11763
11769
  var _excluded$g = ["onChange", "value", "failValue"];
11764
11770
  function CommonStatus(props) {
@@ -11963,4 +11969,4 @@ var CalculationInput = function CalculationInput(props) {
11963
11969
  }, config === null || config === void 0 ? void 0 : config.unit));
11964
11970
  };
11965
11971
 
11966
- 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, ApaasUploadAsync, ApaasUploadFile, BsExchange, BsGoods, BsReissue, BsReturnGoods as BsReturn, index as BsSystemOrder, BuyerNick, CalculationInput, ChooseBaby, CommonSystemOrder$1 as CommonMultiStatus, CommonStatus, CommonSystemOrder, ExpressLogistics, Goods, index$1 as GoodsTable, IdentifyAddress, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
11972
+ 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, LogisticsTrajectory, ParseLogistics, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId, WlnGoods };
package/dist/index.js CHANGED
@@ -910,7 +910,7 @@ var _excluded$6 = ["maxCount", "maxSize", "uploadText", "onChange", "value", "ac
910
910
  var fn$1 = function fn() {
911
911
  return void 0;
912
912
  };
913
- var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
913
+ var ApaasUploadAsync = function ApaasUploadAsync(_ref, ref) {
914
914
  var _ref$maxCount = _ref.maxCount,
915
915
  maxCount = _ref$maxCount === void 0 ? 10 : _ref$maxCount,
916
916
  _ref$maxSize = _ref.maxSize,
@@ -1131,6 +1131,11 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
1131
1131
  });
1132
1132
  };
1133
1133
  }, [pasteDefaultStates]);
1134
+ React.useImperativeHandle(ref, function () {
1135
+ return {
1136
+ taskCompleted: !uploading
1137
+ };
1138
+ }, [uploading]);
1134
1139
  return /*#__PURE__*/React__default['default'].createElement(antd.Spin, {
1135
1140
  spinning: uploading
1136
1141
  }, /*#__PURE__*/React__default['default'].createElement("p", {
@@ -1183,6 +1188,7 @@ var ApaasUploadAsync = function ApaasUploadAsync(_ref) {
1183
1188
  }
1184
1189
  })));
1185
1190
  };
1191
+ var index = /*#__PURE__*/React.forwardRef(ApaasUploadAsync);
1186
1192
 
1187
1193
  var css_248z$2 = ".index-module_imageBox__1rpoB {\n display: flex;\n flex-wrap: wrap;\n}\n.index-module_imageBox__1rpoB .ant-upload-picture-card-wrapper {\n width: auto;\n}\n.index-module_imageBox__1rpoB .index-module_inputImage__MyiR1 {\n width: 80px;\n height: 80px;\n border: 1px dashed #ccc;\n outline: none;\n background-color: rgba(0, 0, 0, 0);\n text-indent: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageShow__3BNqT {\n padding: 8px;\n border: 1px solid #d9d9d9;\n border-radius: 2px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP {\n width: 100px;\n height: 80px;\n position: relative;\n border-radius: 2px;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover {\n background: transparent;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP:hover .index-module_mask__uy8r2:before {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP img {\n width: 100%;\n height: 100%;\n -o-object-fit: contain;\n object-fit: contain;\n}\n.index-module_imageBox__1rpoB .index-module_imageWrap__LyKfP .index-module_delete__28zCp {\n position: absolute;\n right: 0px;\n top: 0px;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 {\n position: relative;\n height: 100%;\n overflow: hidden;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2::before {\n position: absolute;\n z-index: 1;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: all 0.3s;\n content: ' ';\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2:hover .index-module_actions__1-6f4 {\n opacity: 1;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 10;\n white-space: nowrap;\n transform: translate(-50%, -50%);\n opacity: 0;\n transition: all 0.3s;\n}\n.index-module_imageBox__1rpoB .index-module_mask__uy8r2 .index-module_actions__1-6f4 .index-module_icon__3yEcS {\n font-size: 16px;\n color: #fff;\n padding: 0 4px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C {\n display: inline-block;\n margin-right: 8px;\n margin-bottom: 8px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- {\n width: 80px;\n height: 80px;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n padding-top: 16px;\n}\n.index-module_imageBox__1rpoB .index-module_imagePaste__Ac77C .index-module_fakeBox__3W1d- .index-module_addBtn__3a1TQ {\n color: #86909C;\n}\n.index-module_imageBox__1rpoB .ant-upload {\n padding: 0;\n height: 80px;\n width: 80px;\n border: none;\n border-radius: 2px;\n background: #F2F3F5;\n text-align: center;\n color: #86909C;\n font-size: 14px;\n}\n.index-module_imageBox__1rpoB .ant-upload .index-module_addBtn__3a1TQ {\n color: #86909C;\n font-size: 14px;\n}\n.index-module_tips__168Vy {\n color: #4E5969;\n font-size: 12px;\n}\n";
1188
1194
  var styles$2 = {"imageBox":"index-module_imageBox__1rpoB","inputImage":"index-module_inputImage__MyiR1","imageShow":"index-module_imageShow__3BNqT","imageWrap":"index-module_imageWrap__LyKfP","-webkit-mask":"index-module_mask__uy8r2","mask":"index-module_mask__uy8r2","delete":"index-module_delete__28zCp","actions":"index-module_actions__1-6f4","icon":"index-module_icon__3yEcS","imagePaste":"index-module_imagePaste__Ac77C","fakeBox":"index-module_fakeBox__3W1d-","addBtn":"index-module_addBtn__3a1TQ","tips":"index-module_tips__168Vy"};
@@ -11129,7 +11135,7 @@ var columnsNameMap = {
11129
11135
  tagName: '标记'
11130
11136
  }
11131
11137
  };
11132
- var index = (function (props) {
11138
+ var index$1 = (function (props) {
11133
11139
  var value = props.value,
11134
11140
  _onChange = props.onChange,
11135
11141
  disabled = props.disabled,
@@ -11769,7 +11775,7 @@ var Goods$1 = function Goods(props, ref) {
11769
11775
  userNick: userNick
11770
11776
  }));
11771
11777
  };
11772
- var index$1 = /*#__PURE__*/React.forwardRef(Goods$1);
11778
+ var index$2 = /*#__PURE__*/React.forwardRef(Goods$1);
11773
11779
 
11774
11780
  var _excluded$g = ["onChange", "value", "failValue"];
11775
11781
  function CommonStatus(props) {
@@ -11992,13 +11998,13 @@ exports.ApaasSelect = ApaasSelect;
11992
11998
  exports.ApaasSlider = ApaasSlider;
11993
11999
  exports.ApaasTextArea = ApaasTextArea;
11994
12000
  exports.ApaasUpload = ApaasUpload;
11995
- exports.ApaasUploadAsync = ApaasUploadAsync;
12001
+ exports.ApaasUploadAsync = index;
11996
12002
  exports.ApaasUploadFile = ApaasUploadFile;
11997
12003
  exports.BsExchange = BsExchange;
11998
12004
  exports.BsGoods = BsGoods;
11999
12005
  exports.BsReissue = BsReissue;
12000
12006
  exports.BsReturn = BsReturnGoods;
12001
- exports.BsSystemOrder = index;
12007
+ exports.BsSystemOrder = index$1;
12002
12008
  exports.BuyerNick = BuyerNick;
12003
12009
  exports.CalculationInput = CalculationInput;
12004
12010
  exports.ChooseBaby = ChooseBaby;
@@ -12007,7 +12013,7 @@ exports.CommonStatus = CommonStatus;
12007
12013
  exports.CommonSystemOrder = CommonSystemOrder;
12008
12014
  exports.ExpressLogistics = ExpressLogistics;
12009
12015
  exports.Goods = Goods;
12010
- exports.GoodsTable = index$1;
12016
+ exports.GoodsTable = index$2;
12011
12017
  exports.IdentifyAddress = IdentifyAddress;
12012
12018
  exports.Invoice = Invoice;
12013
12019
  exports.JstGoods = jstGoods;
@@ -13,5 +13,5 @@ export interface ApaasUploadProps extends Omit<UploadProps, 'onChange' | 'value'
13
13
  hostUrl?: string;
14
14
  actionUrl?: string;
15
15
  }
16
- declare const ApaasUploadAsync: ({ maxCount, maxSize, uploadText, onChange, value, accept, canPreview, disabled, uniqueKey, hostUrl, actionUrl, ...resetProps }: ApaasUploadProps) => React.JSX.Element;
17
- export default ApaasUploadAsync;
16
+ declare const _default: React.ForwardRefExoticComponent<ApaasUploadProps & React.RefAttributes<any>>;
17
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.13.1",
3
+ "version": "0.14.1-alpha.11",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -61,5 +61,5 @@
61
61
  "publishConfig": {
62
62
  "access": "public"
63
63
  },
64
- "gitHead": "b15358b27bd9bba7d13b78172a55969e29a1a0e6"
64
+ "gitHead": "e354513e4c1b6a3a8460bab9bc21b8ae85fb0241"
65
65
  }