@kmkf-fe-packages/basic-components 0.24.0-alpha.0 → 0.24.0-alpha.1

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
@@ -7715,7 +7715,10 @@ var ShopNameSelect = function ShopNameSelect(props) {
7715
7715
  function ApaasAddress(props) {
7716
7716
  var value = props.value,
7717
7717
  onChange = props.onChange,
7718
- disabled = props.disabled;
7718
+ disabled = props.disabled,
7719
+ _props$showIdentify = props.showIdentify,
7720
+ showIdentify = _props$showIdentify === void 0 ? true : _props$showIdentify,
7721
+ type = props.type;
7719
7722
  var changeCity = function changeCity(city) {
7720
7723
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
7721
7724
  address: city
@@ -7727,7 +7730,20 @@ function ApaasAddress(props) {
7727
7730
  detail: e.target.value
7728
7731
  });
7729
7732
  };
7730
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Province, {
7733
+ var handleParseLogistics = function handleParseLogistics(val) {
7734
+ var params = {
7735
+ detail: val === null || val === void 0 ? void 0 : val.addressDetail,
7736
+ address: []
7737
+ };
7738
+ var addressData = type === 'bs' ? BsAddressData.getInstance() : AddressData.getInstance();
7739
+ if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7740
+ params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7741
+ }
7742
+ onChange === null || onChange === void 0 ? void 0 : onChange(params);
7743
+ };
7744
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !disabled && showIdentify && /*#__PURE__*/React.createElement(ParseLogistics, {
7745
+ onChange: handleParseLogistics
7746
+ }), /*#__PURE__*/React.createElement(Province, {
7731
7747
  value: value === null || value === void 0 ? void 0 : value.address,
7732
7748
  onChange: changeCity,
7733
7749
  disabled: disabled
package/dist/index.js CHANGED
@@ -7726,7 +7726,10 @@ var ShopNameSelect = function ShopNameSelect(props) {
7726
7726
  function ApaasAddress(props) {
7727
7727
  var value = props.value,
7728
7728
  onChange = props.onChange,
7729
- disabled = props.disabled;
7729
+ disabled = props.disabled,
7730
+ _props$showIdentify = props.showIdentify,
7731
+ showIdentify = _props$showIdentify === void 0 ? true : _props$showIdentify,
7732
+ type = props.type;
7730
7733
  var changeCity = function changeCity(city) {
7731
7734
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread2(_objectSpread2({}, value), {}, {
7732
7735
  address: city
@@ -7738,7 +7741,20 @@ function ApaasAddress(props) {
7738
7741
  detail: e.target.value
7739
7742
  });
7740
7743
  };
7741
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Province, {
7744
+ var handleParseLogistics = function handleParseLogistics(val) {
7745
+ var params = {
7746
+ detail: val === null || val === void 0 ? void 0 : val.addressDetail,
7747
+ address: []
7748
+ };
7749
+ var addressData = type === 'bs' ? kmkfUtils.BsAddressData.getInstance() : kmkfUtils.AddressData.getInstance();
7750
+ if ((val === null || val === void 0 ? void 0 : val.province) && addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province)) {
7751
+ params.address = [addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.province), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.city), addressData.getProCodeByName(val === null || val === void 0 ? void 0 : val.district)];
7752
+ }
7753
+ onChange === null || onChange === void 0 ? void 0 : onChange(params);
7754
+ };
7755
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, !disabled && showIdentify && /*#__PURE__*/React__default['default'].createElement(ParseLogistics, {
7756
+ onChange: handleParseLogistics
7757
+ }), /*#__PURE__*/React__default['default'].createElement(Province, {
7742
7758
  value: value === null || value === void 0 ? void 0 : value.address,
7743
7759
  onChange: changeCity,
7744
7760
  disabled: disabled
@@ -6,6 +6,8 @@ interface valueType {
6
6
  export interface AddressType {
7
7
  value: valueType;
8
8
  disabled: boolean;
9
+ showIdentify?: boolean;
10
+ type?: string;
9
11
  onChange: (value: valueType) => void;
10
12
  [key: string]: any;
11
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.24.0-alpha.0",
3
+ "version": "0.24.0-alpha.1",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "ISC",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "3e66526d6aec8eda3092f7c721baef086729337b"
65
+ "gitHead": "265ad70e00afb81994f410ebe9bd77fb57b520b6"
66
66
  }