@kmkf-fe-packages/basic-components 0.8.17-alpha.38 → 0.8.17-alpha.40

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
@@ -10441,7 +10441,7 @@ var BsGoods = function BsGoods(props) {
10441
10441
  useEffect(function () {
10442
10442
  pubsub.subscribe('type', function (type, data) {
10443
10443
  if (disabled) return;
10444
- console.log(type, data);
10444
+ // console.log(type, data);
10445
10445
  withInfo.current = {
10446
10446
  type: type,
10447
10447
  val: data.val,
@@ -10467,6 +10467,10 @@ var BsGoods = function BsGoods(props) {
10467
10467
  setTableSelect(['2', '4'].includes(data.val));
10468
10468
  if (['1', '3'].includes(data.val)) {
10469
10469
  var _valueRef$current2;
10470
+ // console.log(
10471
+ // 'goods-reissueSelectListReturn',
10472
+ // valueRef?.current?.bsGoods,
10473
+ // );
10470
10474
  pubsub.publish('reissueSelectListReturn', {
10471
10475
  list: cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
10472
10476
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
@@ -10491,11 +10495,14 @@ var BsGoods = function BsGoods(props) {
10491
10495
  }
10492
10496
  });
10493
10497
  pubsub.subscribeOnce('changeShopCode', function (type, data) {
10494
- console.log(data);
10498
+ // console.log(data);
10495
10499
  onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
10496
10500
  shopCode: data.shopCode
10497
10501
  }));
10498
10502
  });
10503
+ return function () {
10504
+ pubsub.clearAllSubscriptions();
10505
+ };
10499
10506
  }, [disabled]);
10500
10507
  var _onSelect = function onSelect(list) {
10501
10508
  var _withInfo$current, _withInfo$current2;
@@ -10507,7 +10514,7 @@ var BsGoods = function BsGoods(props) {
10507
10514
  returnType: 'returnSelectList'
10508
10515
  };
10509
10516
  var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
10510
- console.log('onSelect', type, withInfo.current, newList);
10517
+ // console.log('onSelect', type, withInfo.current, newList);
10511
10518
  pubsub.publish(type, {
10512
10519
  type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
10513
10520
  list: newList.map(function (item) {
package/dist/index.js CHANGED
@@ -10452,7 +10452,7 @@ var BsGoods = function BsGoods(props) {
10452
10452
  React.useEffect(function () {
10453
10453
  pubsub__default['default'].subscribe('type', function (type, data) {
10454
10454
  if (disabled) return;
10455
- console.log(type, data);
10455
+ // console.log(type, data);
10456
10456
  withInfo.current = {
10457
10457
  type: type,
10458
10458
  val: data.val,
@@ -10478,6 +10478,10 @@ var BsGoods = function BsGoods(props) {
10478
10478
  setTableSelect(['2', '4'].includes(data.val));
10479
10479
  if (['1', '3'].includes(data.val)) {
10480
10480
  var _valueRef$current2;
10481
+ // console.log(
10482
+ // 'goods-reissueSelectListReturn',
10483
+ // valueRef?.current?.bsGoods,
10484
+ // );
10481
10485
  pubsub__default['default'].publish('reissueSelectListReturn', {
10482
10486
  list: lodash.cloneDeep((valueRef === null || valueRef === void 0 ? void 0 : (_valueRef$current2 = valueRef.current) === null || _valueRef$current2 === void 0 ? void 0 : _valueRef$current2.bsGoods) || []),
10483
10487
  goodValue: data === null || data === void 0 ? void 0 : data.goodValue
@@ -10502,11 +10506,14 @@ var BsGoods = function BsGoods(props) {
10502
10506
  }
10503
10507
  });
10504
10508
  pubsub__default['default'].subscribeOnce('changeShopCode', function (type, data) {
10505
- console.log(data);
10509
+ // console.log(data);
10506
10510
  onChange(_objectSpread2(_objectSpread2({}, valueRef === null || valueRef === void 0 ? void 0 : valueRef.current), {}, {
10507
10511
  shopCode: data.shopCode
10508
10512
  }));
10509
10513
  });
10514
+ return function () {
10515
+ pubsub__default['default'].clearAllSubscriptions();
10516
+ };
10510
10517
  }, [disabled]);
10511
10518
  var _onSelect = function onSelect(list) {
10512
10519
  var _withInfo$current, _withInfo$current2;
@@ -10518,7 +10525,7 @@ var BsGoods = function BsGoods(props) {
10518
10525
  returnType: 'returnSelectList'
10519
10526
  };
10520
10527
  var type = typeMap[(_withInfo$current = withInfo.current) === null || _withInfo$current === void 0 ? void 0 : _withInfo$current.type];
10521
- console.log('onSelect', type, withInfo.current, newList);
10528
+ // console.log('onSelect', type, withInfo.current, newList);
10522
10529
  pubsub__default['default'].publish(type, {
10523
10530
  type: (_withInfo$current2 = withInfo.current) === null || _withInfo$current2 === void 0 ? void 0 : _withInfo$current2.val,
10524
10531
  list: newList.map(function (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.8.17-alpha.38",
3
+ "version": "0.8.17-alpha.40",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "10fac44deb5d0f9ff70156291c2cc71d6bff4807"
63
+ "gitHead": "742a4ea0bfeb1e957f59ec02118bf547e2d5ed9f"
64
64
  }