@kmkf-fe-packages/basic-components 0.2.2-alpha.1 → 0.2.2-alpha.5

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.d.ts CHANGED
@@ -28,7 +28,6 @@ export { default as Supplier } from './business/Supplier';
28
28
  export { default as Invoice } from './business/Invoice';
29
29
  export { default as Status } from './business/Status';
30
30
  export { default as Payment } from './business/Payment';
31
- export { default as LogisticsInterception } from './business/LogisticsInterception';
32
31
  export { default as Goods } from './common/Goods';
33
32
  export { default as JstGoods } from './jst/Goods';
34
33
  export { default as JstItemList } from './jst/ItemList';
package/dist/index.esm.js CHANGED
@@ -3116,175 +3116,6 @@ var Payment = function Payment(props) {
3116
3116
  }));
3117
3117
  };
3118
3118
 
3119
- var Item = Form.Item;
3120
- var LogisticsInterception = function LogisticsInterception(props) {
3121
- var _props$value = props.value,
3122
- value = _props$value === void 0 ? {} : _props$value,
3123
- _props$logisticsOptio = props.logisticsOptions,
3124
- logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
3125
- required = props.required,
3126
- onChange = props.onChange,
3127
- disabled = props.disabled;
3128
- var _useState = useState([]),
3129
- _useState2 = _slicedToArray(_useState, 2),
3130
- typeOptions = _useState2[0],
3131
- setTypeOptions = _useState2[1];
3132
- var _useState3 = useState([]),
3133
- _useState4 = _slicedToArray(_useState3, 2),
3134
- statusOptions = _useState4[0],
3135
- setStatusOptions = _useState4[1];
3136
- var _useState5 = useState(true),
3137
- _useState6 = _slicedToArray(_useState5, 2),
3138
- isInterface = _useState6[0],
3139
- setIsInterface = _useState6[1];
3140
- useEffect(function () {
3141
- console.log(value === null || value === void 0 ? void 0 : value.interceptCompany);
3142
- if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
3143
- setTypeOptions([]);
3144
- setStatusOptions([]);
3145
- setIsInterface(true);
3146
- return;
3147
- }
3148
- var interceptCompany = logisticsOptions.find(function (item) {
3149
- return item.expressCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
3150
- });
3151
- setTypeOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []);
3152
- setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionStatusList) || []);
3153
- setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
3154
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
3155
- //是否展示新地址
3156
- var showNewAddress = useMemo(function () {
3157
- var _find, _find$config;
3158
- return (_find = (typeOptions || []).find(function (item) {
3159
- return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3160
- })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3161
- }, [value === null || value === void 0 ? void 0 : value.interceptType]);
3162
- var changeHandle = function changeHandle(val, type) {
3163
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
3164
- if (type === 'interceptCompany') {
3165
- newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3166
- interceptCompany: val,
3167
- interceptType: 'RETURN',
3168
- interceptAddress: [],
3169
- interceptDetail: '',
3170
- interceptReceiverName: '',
3171
- interceptReceiverMobile: '',
3172
- interceptStatus: '',
3173
- interceptOther: ''
3174
- });
3175
- }
3176
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
3177
- };
3178
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Item, {
3179
- label: '物流信息',
3180
- required: required,
3181
- key: 'logistics'
3182
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Select, {
3183
- disabled: disabled,
3184
- placeholder: "\u7269\u6D41\u516C\u53F8",
3185
- style: {
3186
- width: '200px'
3187
- },
3188
- onChange: function onChange(val) {
3189
- return changeHandle(val, 'interceptCompany');
3190
- },
3191
- value: (value === null || value === void 0 ? void 0 : value.interceptCompany) === '' ? undefined : value === null || value === void 0 ? void 0 : value.interceptCompany,
3192
- options: logisticsOptions,
3193
- showSearch: true,
3194
- filterOption: function filterOption(input, option) {
3195
- return option.label.includes(input);
3196
- }
3197
- }), /*#__PURE__*/React.createElement(Input, {
3198
- disabled: disabled,
3199
- placeholder: "\u7269\u6D41\u5355\u53F7",
3200
- onChange: function onChange(e) {
3201
- return changeHandle(e.target.value, 'interceptCode');
3202
- },
3203
- value: value === null || value === void 0 ? void 0 : value.interceptCode
3204
- }))), /*#__PURE__*/React.createElement(Item, {
3205
- label: '拦截类型',
3206
- required: required,
3207
- key: 'interceptType'
3208
- }, /*#__PURE__*/React.createElement(Select, {
3209
- disabled: disabled,
3210
- style: {
3211
- width: '200px'
3212
- },
3213
- options: typeOptions,
3214
- onChange: function onChange(val) {
3215
- return changeHandle(val, 'interceptType');
3216
- },
3217
- value: value === null || value === void 0 ? void 0 : value.interceptType,
3218
- placeholder: "\u62E6\u622A\u7C7B\u578B",
3219
- showSearch: true,
3220
- filterOption: function filterOption(input, option) {
3221
- return option.label.includes(input);
3222
- }
3223
- })), /*#__PURE__*/React.createElement(Item, {
3224
- label: '新派送地',
3225
- required: required,
3226
- key: 'newAddress',
3227
- hidden: isInterface && showNewAddress
3228
- }, /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Province, {
3229
- value: value === null || value === void 0 ? void 0 : value.interceptAddress,
3230
- onChange: function onChange(val) {
3231
- return changeHandle(val, 'interceptAddress');
3232
- },
3233
- options: [],
3234
- disabled: disabled
3235
- }), /*#__PURE__*/React.createElement(Input, {
3236
- value: value === null || value === void 0 ? void 0 : value.interceptDetail,
3237
- disabled: disabled,
3238
- placeholder: "\u8BE6\u7EC6\u5730\u5740",
3239
- onChange: function onChange(e) {
3240
- return changeHandle(e.target.value, 'interceptDetail');
3241
- }
3242
- })), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Input, {
3243
- value: value === null || value === void 0 ? void 0 : value.interceptReceiverName,
3244
- disabled: disabled,
3245
- style: {
3246
- width: '200px'
3247
- },
3248
- placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
3249
- onChange: function onChange(e) {
3250
- return changeHandle(e.target.value, 'interceptReceiverName');
3251
- }
3252
- }), /*#__PURE__*/React.createElement(Input, {
3253
- value: value === null || value === void 0 ? void 0 : value.interceptReceiverMobile,
3254
- disabled: disabled,
3255
- placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
3256
- onChange: function onChange(e) {
3257
- return changeHandle(e.target.value, 'interceptReceiverMobile');
3258
- }
3259
- }))), /*#__PURE__*/React.createElement(Item, {
3260
- label: '拦截状态',
3261
- key: 'interceptStatus'
3262
- }, /*#__PURE__*/React.createElement(Select, {
3263
- disabled: disabled || isInterface,
3264
- style: {
3265
- width: '200px'
3266
- },
3267
- options: statusOptions,
3268
- onChange: function onChange(val) {
3269
- return changeHandle(val, 'interceptStatus');
3270
- },
3271
- value: value === null || value === void 0 ? void 0 : value.interceptStatus,
3272
- placeholder: "\u62E6\u622A\u72B6\u6001",
3273
- showSearch: true,
3274
- filterOption: function filterOption(input, option) {
3275
- return option.label.includes(input);
3276
- }
3277
- }), (value === null || value === void 0 ? void 0 : value.interceptStatus) === 'OTHER' && /*#__PURE__*/React.createElement(Input, {
3278
- style: {
3279
- width: '200px'
3280
- },
3281
- placeholder: "\u5176\u4ED6",
3282
- onChange: function onChange(e) {
3283
- return changeHandle(e.target.value, 'interceptOther');
3284
- }
3285
- })));
3286
- };
3287
-
3288
3119
  var jstGoods = function jstGoods(props) {
3289
3120
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
3290
3121
  var _props$value = props.value,
@@ -3950,4 +3781,4 @@ var Goods$1 = function Goods(props, ref) {
3950
3781
  };
3951
3782
  var index = /*#__PURE__*/forwardRef(Goods$1);
3952
3783
 
3953
- export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasMultipleSelect, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, BuyerNick, ChooseBaby, ExpressLogistics, Goods, index as GoodsTable, Invoice, jstGoods as JstGoods, ItemList as JstItemList, LogisticsInterception, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
3784
+ export { ApaasAddress as Address, AliPay, Province as ApaasAddress, ApaasCascader, ApaasCheckbox, ApaasDate, withFormItem as ApaasHoc, ApaasInput, ApaasInputNumber, ApaasMultipleSelect, ApaasRadio, ApaasRate, ApaasSelect, ApaasSlider, ApaasTextArea, ApaasUpload, ApaasUploadAsync, BuyerNick, ChooseBaby, ExpressLogistics, Goods, index as GoodsTable, Invoice, jstGoods as JstGoods, ItemList as JstItemList, Payment, RemarkInput as Remark, ExpressLogistics as ReturnLogistics, ShopNameSelect as ShopName, Status, Supplier, TBGoodId, TBGoodSerial, TradeId };
package/dist/index.js CHANGED
@@ -3126,175 +3126,6 @@ var Payment = function Payment(props) {
3126
3126
  }));
3127
3127
  };
3128
3128
 
3129
- var Item = antd.Form.Item;
3130
- var LogisticsInterception = function LogisticsInterception(props) {
3131
- var _props$value = props.value,
3132
- value = _props$value === void 0 ? {} : _props$value,
3133
- _props$logisticsOptio = props.logisticsOptions,
3134
- logisticsOptions = _props$logisticsOptio === void 0 ? [] : _props$logisticsOptio,
3135
- required = props.required,
3136
- onChange = props.onChange,
3137
- disabled = props.disabled;
3138
- var _useState = React.useState([]),
3139
- _useState2 = _slicedToArray(_useState, 2),
3140
- typeOptions = _useState2[0],
3141
- setTypeOptions = _useState2[1];
3142
- var _useState3 = React.useState([]),
3143
- _useState4 = _slicedToArray(_useState3, 2),
3144
- statusOptions = _useState4[0],
3145
- setStatusOptions = _useState4[1];
3146
- var _useState5 = React.useState(true),
3147
- _useState6 = _slicedToArray(_useState5, 2),
3148
- isInterface = _useState6[0],
3149
- setIsInterface = _useState6[1];
3150
- React.useEffect(function () {
3151
- console.log(value === null || value === void 0 ? void 0 : value.interceptCompany);
3152
- if (!(value === null || value === void 0 ? void 0 : value.interceptCompany)) {
3153
- setTypeOptions([]);
3154
- setStatusOptions([]);
3155
- setIsInterface(true);
3156
- return;
3157
- }
3158
- var interceptCompany = logisticsOptions.find(function (item) {
3159
- return item.expressCode === (value === null || value === void 0 ? void 0 : value.interceptCompany);
3160
- });
3161
- setTypeOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionTypeList) || []);
3162
- setStatusOptions((interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.interceptionStatusList) || []);
3163
- setIsInterface(interceptCompany === null || interceptCompany === void 0 ? void 0 : interceptCompany.isInterface);
3164
- }, [value === null || value === void 0 ? void 0 : value.interceptCompany]);
3165
- //是否展示新地址
3166
- var showNewAddress = React.useMemo(function () {
3167
- var _find, _find$config;
3168
- return (_find = (typeOptions || []).find(function (item) {
3169
- return item.value === (value === null || value === void 0 ? void 0 : value.interceptType);
3170
- })) === null || _find === void 0 ? void 0 : (_find$config = _find.config) === null || _find$config === void 0 ? void 0 : _find$config.showAddress;
3171
- }, [value === null || value === void 0 ? void 0 : value.interceptType]);
3172
- var changeHandle = function changeHandle(val, type) {
3173
- var newValue = _objectSpread2(_objectSpread2({}, value), {}, _defineProperty({}, type, val));
3174
- if (type === 'interceptCompany') {
3175
- newValue = _objectSpread2(_objectSpread2({}, value), {}, {
3176
- interceptCompany: val,
3177
- interceptType: 'RETURN',
3178
- interceptAddress: [],
3179
- interceptDetail: '',
3180
- interceptReceiverName: '',
3181
- interceptReceiverMobile: '',
3182
- interceptStatus: '',
3183
- interceptOther: ''
3184
- });
3185
- }
3186
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
3187
- };
3188
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Item, {
3189
- label: '物流信息',
3190
- required: required,
3191
- key: 'logistics'
3192
- }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3193
- disabled: disabled,
3194
- placeholder: "\u7269\u6D41\u516C\u53F8",
3195
- style: {
3196
- width: '200px'
3197
- },
3198
- onChange: function onChange(val) {
3199
- return changeHandle(val, 'interceptCompany');
3200
- },
3201
- value: (value === null || value === void 0 ? void 0 : value.interceptCompany) === '' ? undefined : value === null || value === void 0 ? void 0 : value.interceptCompany,
3202
- options: logisticsOptions,
3203
- showSearch: true,
3204
- filterOption: function filterOption(input, option) {
3205
- return option.label.includes(input);
3206
- }
3207
- }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3208
- disabled: disabled,
3209
- placeholder: "\u7269\u6D41\u5355\u53F7",
3210
- onChange: function onChange(e) {
3211
- return changeHandle(e.target.value, 'interceptCode');
3212
- },
3213
- value: value === null || value === void 0 ? void 0 : value.interceptCode
3214
- }))), /*#__PURE__*/React__default['default'].createElement(Item, {
3215
- label: '拦截类型',
3216
- required: required,
3217
- key: 'interceptType'
3218
- }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3219
- disabled: disabled,
3220
- style: {
3221
- width: '200px'
3222
- },
3223
- options: typeOptions,
3224
- onChange: function onChange(val) {
3225
- return changeHandle(val, 'interceptType');
3226
- },
3227
- value: value === null || value === void 0 ? void 0 : value.interceptType,
3228
- placeholder: "\u62E6\u622A\u7C7B\u578B",
3229
- showSearch: true,
3230
- filterOption: function filterOption(input, option) {
3231
- return option.label.includes(input);
3232
- }
3233
- })), /*#__PURE__*/React__default['default'].createElement(Item, {
3234
- label: '新派送地',
3235
- required: required,
3236
- key: 'newAddress',
3237
- hidden: isInterface && showNewAddress
3238
- }, /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(Province, {
3239
- value: value === null || value === void 0 ? void 0 : value.interceptAddress,
3240
- onChange: function onChange(val) {
3241
- return changeHandle(val, 'interceptAddress');
3242
- },
3243
- options: [],
3244
- disabled: disabled
3245
- }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3246
- value: value === null || value === void 0 ? void 0 : value.interceptDetail,
3247
- disabled: disabled,
3248
- placeholder: "\u8BE6\u7EC6\u5730\u5740",
3249
- onChange: function onChange(e) {
3250
- return changeHandle(e.target.value, 'interceptDetail');
3251
- }
3252
- })), /*#__PURE__*/React__default['default'].createElement("br", null), /*#__PURE__*/React__default['default'].createElement(antd.Space, null, /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3253
- value: value === null || value === void 0 ? void 0 : value.interceptReceiverName,
3254
- disabled: disabled,
3255
- style: {
3256
- width: '200px'
3257
- },
3258
- placeholder: "\u6536\u4EF6\u4EBA\u59D3\u540D",
3259
- onChange: function onChange(e) {
3260
- return changeHandle(e.target.value, 'interceptReceiverName');
3261
- }
3262
- }), /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3263
- value: value === null || value === void 0 ? void 0 : value.interceptReceiverMobile,
3264
- disabled: disabled,
3265
- placeholder: "\u6536\u4EF6\u4EBA\u7535\u8BDD",
3266
- onChange: function onChange(e) {
3267
- return changeHandle(e.target.value, 'interceptReceiverMobile');
3268
- }
3269
- }))), /*#__PURE__*/React__default['default'].createElement(Item, {
3270
- label: '拦截状态',
3271
- key: 'interceptStatus'
3272
- }, /*#__PURE__*/React__default['default'].createElement(antd.Select, {
3273
- disabled: disabled || isInterface,
3274
- style: {
3275
- width: '200px'
3276
- },
3277
- options: statusOptions,
3278
- onChange: function onChange(val) {
3279
- return changeHandle(val, 'interceptStatus');
3280
- },
3281
- value: value === null || value === void 0 ? void 0 : value.interceptStatus,
3282
- placeholder: "\u62E6\u622A\u72B6\u6001",
3283
- showSearch: true,
3284
- filterOption: function filterOption(input, option) {
3285
- return option.label.includes(input);
3286
- }
3287
- }), (value === null || value === void 0 ? void 0 : value.interceptStatus) === 'OTHER' && /*#__PURE__*/React__default['default'].createElement(antd.Input, {
3288
- style: {
3289
- width: '200px'
3290
- },
3291
- placeholder: "\u5176\u4ED6",
3292
- onChange: function onChange(e) {
3293
- return changeHandle(e.target.value, 'interceptOther');
3294
- }
3295
- })));
3296
- };
3297
-
3298
3129
  var jstGoods = function jstGoods(props) {
3299
3130
  var _value$changeIndex, _value$changeIndex2, _value$changeIndex3, _value$changeIndex4, _value$changeIndex5, _value$changeIndex6;
3300
3131
  var _props$value = props.value,
@@ -3985,7 +3816,6 @@ exports.GoodsTable = index;
3985
3816
  exports.Invoice = Invoice;
3986
3817
  exports.JstGoods = jstGoods;
3987
3818
  exports.JstItemList = ItemList;
3988
- exports.LogisticsInterception = LogisticsInterception;
3989
3819
  exports.Payment = Payment;
3990
3820
  exports.Remark = RemarkInput;
3991
3821
  exports.ReturnLogistics = ExpressLogistics;
package/package.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "name": "@kmkf-fe-packages/basic-components",
3
- "version": "0.2.2-alpha.1",
3
+ "version": "0.2.2-alpha.5",
4
4
  "description": "> TODO: description",
5
- "author": "wangzhenggui <jianjia.wzg@raycloud.com>",
6
5
  "homepage": "",
7
6
  "license": "ISC",
7
+ "author": "wangzhenggui <jianjia.wzg@raycloud.com>",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.esm.js",
10
+ "files": [
11
+ "dist"
12
+ ],
10
13
  "scripts": {
14
+ "async": "yarn build && yalc push",
11
15
  "build": "father-build",
12
16
  "start": "dumi dev",
13
- "async": "yarn build && yalc push",
14
17
  "watch": "nodemon --ignore dist/ --ignore node_modules/ --watch src/ -C -e ts,tsx,less --debug -x 'yarn async'"
15
18
  },
16
- "gitHead": "3f43f0b3abcd408e27c8cdd3d52d175bec7a95bb",
17
- "publishConfig": {
18
- "access": "public"
19
+ "dependencies": {
20
+ "umi-request": "^1.4.0"
19
21
  },
20
22
  "devDependencies": {
21
23
  "@umijs/test": "^3.0.5",
@@ -27,15 +29,13 @@
27
29
  "prettier": "^2.2.1",
28
30
  "yorkie": "^2.0.0"
29
31
  },
30
- "dependencies": {
31
- "umi-request": "^1.4.0"
32
- },
33
32
  "peerDependencies": {
34
33
  "@ant-design/icons": "^4.7.0",
35
34
  "antd": "^4.21.4",
36
35
  "react": "^16.8.0"
37
36
  },
38
- "files": [
39
- "dist"
40
- ]
37
+ "publishConfig": {
38
+ "access": "public"
39
+ },
40
+ "gitHead": "24ad2a4af1a648a63ad0d2e5b1d8a03523e89740"
41
41
  }
@@ -1,21 +0,0 @@
1
- interface LogisticsInterceptionValueType {
2
- interceptCompany: string;
3
- interceptCode: string;
4
- interceptType: string;
5
- interceptAddress: any[];
6
- interceptDetail: string;
7
- interceptReceiverName: string;
8
- interceptReceiverMobile: string;
9
- interceptStatus: string | number;
10
- interceptOther: string;
11
- }
12
- interface LogisticsInterceptionProps {
13
- value: Partial<LogisticsInterceptionValueType>;
14
- logisticsOptions: any[];
15
- required: boolean;
16
- disabled: boolean;
17
- id: string;
18
- onChange: (value: Partial<LogisticsInterceptionValueType>) => void;
19
- }
20
- declare const LogisticsInterception: (props: Partial<LogisticsInterceptionProps>) => JSX.Element;
21
- export default LogisticsInterception;