@kmkf-fe-packages/basic-components 0.6.3-alpha.21 → 0.6.3-alpha.26

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
@@ -498,6 +498,7 @@ var ApaasDate = function ApaasDate(props) {
498
498
 
499
499
  var _excluded$1 = ["isNumber", "replaceWarn"];
500
500
  function ApaasInput(props) {
501
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
501
502
  var isNumber = props.isNumber,
502
503
  replaceWarn = props.replaceWarn,
503
504
  other = _objectWithoutProperties(props, _excluded$1);
@@ -510,6 +511,7 @@ function ApaasInputNumber(props) {
510
511
 
511
512
  var _excluded$2 = ["options", "basicMultSelect"];
512
513
  function ApaasSelect(props) {
514
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
513
515
  var _props$options = props.options,
514
516
  options = _props$options === void 0 ? [] : _props$options,
515
517
  basicMultSelect = props.basicMultSelect,
@@ -1506,15 +1508,11 @@ var ShopNameSelect = function ShopNameSelect(props) {
1506
1508
  disabled = props.disabled,
1507
1509
  style = props.style;
1508
1510
  var _useState = useState([]),
1509
- _useState2 = _slicedToArray(_useState, 2),
1510
- options = _useState2[0],
1511
- setOptions = _useState2[1];
1511
+ _useState2 = _slicedToArray(_useState, 1),
1512
+ options = _useState2[0];
1512
1513
  var handleChange = function handleChange(value) {
1513
1514
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
1514
1515
  };
1515
- useEffect(function () {
1516
- // initDataSource();
1517
- }, []);
1518
1516
  return /*#__PURE__*/React.createElement(Select, {
1519
1517
  defaultValue: value,
1520
1518
  disabled: disabled,
@@ -2230,8 +2228,7 @@ var Sku = /*#__PURE__*/forwardRef(function (props, ref) {
2230
2228
  useImperativeHandle(ref, function () {
2231
2229
  return {
2232
2230
  open: function open(_ref) {
2233
- var shopId = _ref.shopId,
2234
- numIids = _ref.numIids,
2231
+ var numIids = _ref.numIids,
2235
2232
  options = _ref.options;
2236
2233
  setVisible(true);
2237
2234
  setSku('');
@@ -2371,19 +2368,14 @@ var Goods = function Goods(props) {
2371
2368
  _useState2 = _slicedToArray(_useState, 2),
2372
2369
  visible = _useState2[0],
2373
2370
  setVisible = _useState2[1];
2374
- var _useState3 = useState(''),
2371
+ var _useState3 = useState(0),
2375
2372
  _useState4 = _slicedToArray(_useState3, 2),
2376
- editState = _useState4[0],
2377
- setEditState = _useState4[1];
2378
- var _useState5 = useState(0),
2379
- _useState6 = _slicedToArray(_useState5, 2),
2380
- uploadImageCount = _useState6[0],
2381
- setUploadImageCount = _useState6[1];
2373
+ uploadImageCount = _useState4[0],
2374
+ setUploadImageCount = _useState4[1];
2382
2375
  var skuRef = useRef();
2383
- var _useState7 = useState(false),
2384
- _useState8 = _slicedToArray(_useState7, 2),
2385
- editVisible = _useState8[0],
2386
- setEditVisible = _useState8[1];
2376
+ var _useState5 = useState(false),
2377
+ _useState6 = _slicedToArray(_useState5, 2),
2378
+ setEditVisible = _useState6[1];
2387
2379
  // onChange事件会修改imgList里的字段,所以保存初始化的imglist值
2388
2380
  if (!imgListConstant.length) {
2389
2381
  imgListConstant = JSON.parse(JSON.stringify(imgList));
@@ -3147,7 +3139,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3147
3139
  // 修改后把工单信息重新提交给快递公司,清空拦截状态的值
3148
3140
  if (!isInterface) return true;
3149
3141
  //已对接公司在拦截中可以修改
3150
- var INTERCEPTING = logisticsInterceptHandleStatus === 'INTERCEPTING';
3142
+ var INTERCEPTING = !logisticsInterceptHandleStatus || logisticsInterceptHandleStatus === 'INTERCEPTING';
3151
3143
  return isEditing ? INTERCEPTING : true;
3152
3144
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany, statusOptions, isInterface, isEditing]);
3153
3145
  useEffect(function () {
@@ -3196,12 +3188,11 @@ var LogisticsInterception = function LogisticsInterception(props) {
3196
3188
  return item.value === val;
3197
3189
  });
3198
3190
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3199
- var _item$label;
3200
- return (item === null || item === void 0 ? void 0 : item.label) && (item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.indexOf('退回')) > -1;
3191
+ return item === null || item === void 0 ? void 0 : item.isDefault;
3201
3192
  });
3202
3193
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3203
3194
  interceptCompany: val,
3204
- interceptType: (returnValue === null || returnValue === void 0 ? void 0 : returnValue.value) || '',
3195
+ interceptType: returnValue === null || returnValue === void 0 ? void 0 : returnValue.value,
3205
3196
  interceptAddress: [],
3206
3197
  interceptDetail: undefined,
3207
3198
  interceptReceiverName: undefined,
@@ -3217,7 +3208,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3217
3208
  required: required,
3218
3209
  key: 'logistics'
3219
3210
  }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
3220
- disabled: disabled || !canEdit,
3211
+ disabled: disabled || isEditing,
3221
3212
  placeholder: "\u7269\u6D41\u516C\u53F8",
3222
3213
  style: {
3223
3214
  width: '200px'
@@ -3232,7 +3223,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3232
3223
  return option.label.includes(input);
3233
3224
  }
3234
3225
  }), /*#__PURE__*/React.createElement(Input, {
3235
- disabled: disabled || !canEdit,
3226
+ disabled: disabled || isEditing,
3236
3227
  placeholder: "\u7269\u6D41\u5355\u53F7",
3237
3228
  onChange: function onChange(e) {
3238
3229
  return changeHandle(e.target.value, 'interceptCode');
@@ -3578,9 +3569,8 @@ var GoodsModal$1 = function GoodsModal(props) {
3578
3569
  tab: '已选择',
3579
3570
  key: 'all'
3580
3571
  }]),
3581
- _useState18 = _slicedToArray(_useState17, 2),
3582
- tabs = _useState18[0],
3583
- setTabs = _useState18[1];
3572
+ _useState18 = _slicedToArray(_useState17, 1),
3573
+ tabs = _useState18[0];
3584
3574
  var _useState19 = useState([{
3585
3575
  name: '上架时间',
3586
3576
  value: 'list_time'
package/dist/index.js CHANGED
@@ -508,6 +508,7 @@ var ApaasDate = function ApaasDate(props) {
508
508
 
509
509
  var _excluded$1 = ["isNumber", "replaceWarn"];
510
510
  function ApaasInput(props) {
511
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
511
512
  var isNumber = props.isNumber,
512
513
  replaceWarn = props.replaceWarn,
513
514
  other = _objectWithoutProperties(props, _excluded$1);
@@ -520,6 +521,7 @@ function ApaasInputNumber(props) {
520
521
 
521
522
  var _excluded$2 = ["options", "basicMultSelect"];
522
523
  function ApaasSelect(props) {
524
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
523
525
  var _props$options = props.options,
524
526
  options = _props$options === void 0 ? [] : _props$options,
525
527
  basicMultSelect = props.basicMultSelect,
@@ -1516,15 +1518,11 @@ var ShopNameSelect = function ShopNameSelect(props) {
1516
1518
  disabled = props.disabled,
1517
1519
  style = props.style;
1518
1520
  var _useState = React.useState([]),
1519
- _useState2 = _slicedToArray(_useState, 2),
1520
- options = _useState2[0],
1521
- setOptions = _useState2[1];
1521
+ _useState2 = _slicedToArray(_useState, 1),
1522
+ options = _useState2[0];
1522
1523
  var handleChange = function handleChange(value) {
1523
1524
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
1524
1525
  };
1525
- React.useEffect(function () {
1526
- // initDataSource();
1527
- }, []);
1528
1526
  return /*#__PURE__*/React__default['default'].createElement(antd.Select, {
1529
1527
  defaultValue: value,
1530
1528
  disabled: disabled,
@@ -2240,8 +2238,7 @@ var Sku = /*#__PURE__*/React.forwardRef(function (props, ref) {
2240
2238
  React.useImperativeHandle(ref, function () {
2241
2239
  return {
2242
2240
  open: function open(_ref) {
2243
- var shopId = _ref.shopId,
2244
- numIids = _ref.numIids,
2241
+ var numIids = _ref.numIids,
2245
2242
  options = _ref.options;
2246
2243
  setVisible(true);
2247
2244
  setSku('');
@@ -2381,19 +2378,14 @@ var Goods = function Goods(props) {
2381
2378
  _useState2 = _slicedToArray(_useState, 2),
2382
2379
  visible = _useState2[0],
2383
2380
  setVisible = _useState2[1];
2384
- var _useState3 = React.useState(''),
2381
+ var _useState3 = React.useState(0),
2385
2382
  _useState4 = _slicedToArray(_useState3, 2),
2386
- editState = _useState4[0],
2387
- setEditState = _useState4[1];
2388
- var _useState5 = React.useState(0),
2389
- _useState6 = _slicedToArray(_useState5, 2),
2390
- uploadImageCount = _useState6[0],
2391
- setUploadImageCount = _useState6[1];
2383
+ uploadImageCount = _useState4[0],
2384
+ setUploadImageCount = _useState4[1];
2392
2385
  var skuRef = React.useRef();
2393
- var _useState7 = React.useState(false),
2394
- _useState8 = _slicedToArray(_useState7, 2),
2395
- editVisible = _useState8[0],
2396
- setEditVisible = _useState8[1];
2386
+ var _useState5 = React.useState(false),
2387
+ _useState6 = _slicedToArray(_useState5, 2),
2388
+ setEditVisible = _useState6[1];
2397
2389
  // onChange事件会修改imgList里的字段,所以保存初始化的imglist值
2398
2390
  if (!imgListConstant.length) {
2399
2391
  imgListConstant = JSON.parse(JSON.stringify(imgList));
@@ -3157,7 +3149,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3157
3149
  // 修改后把工单信息重新提交给快递公司,清空拦截状态的值
3158
3150
  if (!isInterface) return true;
3159
3151
  //已对接公司在拦截中可以修改
3160
- var INTERCEPTING = logisticsInterceptHandleStatus === 'INTERCEPTING';
3152
+ var INTERCEPTING = !logisticsInterceptHandleStatus || logisticsInterceptHandleStatus === 'INTERCEPTING';
3161
3153
  return isEditing ? INTERCEPTING : true;
3162
3154
  }, [value === null || value === void 0 ? void 0 : value.interceptCompany, statusOptions, isInterface, isEditing]);
3163
3155
  React.useEffect(function () {
@@ -3206,12 +3198,11 @@ var LogisticsInterception = function LogisticsInterception(props) {
3206
3198
  return item.value === val;
3207
3199
  });
3208
3200
  var returnValue = ((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []).find(function (item) {
3209
- var _item$label;
3210
- return (item === null || item === void 0 ? void 0 : item.label) && (item === null || item === void 0 ? void 0 : (_item$label = item.label) === null || _item$label === void 0 ? void 0 : _item$label.indexOf('退回')) > -1;
3201
+ return item === null || item === void 0 ? void 0 : item.isDefault;
3211
3202
  });
3212
3203
  newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3213
3204
  interceptCompany: val,
3214
- interceptType: (returnValue === null || returnValue === void 0 ? void 0 : returnValue.value) || '',
3205
+ interceptType: returnValue === null || returnValue === void 0 ? void 0 : returnValue.value,
3215
3206
  interceptAddress: [],
3216
3207
  interceptDetail: undefined,
3217
3208
  interceptReceiverName: undefined,
@@ -3227,7 +3218,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3227
3218
  required: required,
3228
3219
  key: 'logistics'
3229
3220
  }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3230
- disabled: disabled || !canEdit,
3221
+ disabled: disabled || isEditing,
3231
3222
  placeholder: "\u7269\u6D41\u516C\u53F8",
3232
3223
  style: {
3233
3224
  width: '200px'
@@ -3242,7 +3233,7 @@ var LogisticsInterception = function LogisticsInterception(props) {
3242
3233
  return option.label.includes(input);
3243
3234
  }
3244
3235
  }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3245
- disabled: disabled || !canEdit,
3236
+ disabled: disabled || isEditing,
3246
3237
  placeholder: "\u7269\u6D41\u5355\u53F7",
3247
3238
  onChange: function onChange(e) {
3248
3239
  return changeHandle(e.target.value, 'interceptCode');
@@ -3588,9 +3579,8 @@ var GoodsModal$1 = function GoodsModal(props) {
3588
3579
  tab: '已选择',
3589
3580
  key: 'all'
3590
3581
  }]),
3591
- _useState18 = _slicedToArray(_useState17, 2),
3592
- tabs = _useState18[0],
3593
- setTabs = _useState18[1];
3582
+ _useState18 = _slicedToArray(_useState17, 1),
3583
+ tabs = _useState18[0];
3594
3584
  var _useState19 = React.useState([{
3595
3585
  name: '上架时间',
3596
3586
  value: 'list_time'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.6.3-alpha.21",
3
+ "version": "0.6.3-alpha.26",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "79d6a0773ee444beb4c8d2c646b9adfcf1c628a5"
45
+ "gitHead": "c65ff2b1f44a3a4e469c7dc39125385660e05f81"
46
46
  }