@kmkf-fe-packages/services-components 0.6.3-alpha.0 → 0.6.3-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/esm/commonComponents/ShopList/index.d.ts +13 -0
- package/dist/esm/commonComponents/ShopList/index.js +34 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +24 -0
- package/dist/esm/components/LogisticsInterception/InterceptType.js +62 -0
- package/dist/esm/components/LogisticsInterception/index.d.ts +5 -1
- package/dist/esm/components/LogisticsInterception/index.js +18 -4
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +3 -1
- package/package.json +3 -3
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Shop = {
|
|
3
|
+
auditStatus: number;
|
|
4
|
+
shopId: string;
|
|
5
|
+
shopName: string;
|
|
6
|
+
shopSource: string | number;
|
|
7
|
+
};
|
|
8
|
+
declare type ShopListProps = {
|
|
9
|
+
shopList: Shop[];
|
|
10
|
+
[prop: string]: any;
|
|
11
|
+
};
|
|
12
|
+
declare const ShopList: ({ shopList, onChange, setShopId, ...prop }: ShopListProps) => JSX.Element;
|
|
13
|
+
export default ShopList;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var _excluded = ["shopList", "onChange", "setShopId"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { Select } from 'antd';
|
|
7
|
+
import PlatformAvatar from "../PlatformAvatar";
|
|
8
|
+
var ShopList = function ShopList(_ref) {
|
|
9
|
+
var _shopList$filter;
|
|
10
|
+
var shopList = _ref.shopList,
|
|
11
|
+
onChange = _ref.onChange,
|
|
12
|
+
setShopId = _ref.setShopId,
|
|
13
|
+
prop = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
var handleChange = function handleChange(val) {
|
|
15
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(val);
|
|
16
|
+
setShopId === null || setShopId === void 0 ? void 0 : setShopId(val);
|
|
17
|
+
};
|
|
18
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
19
|
+
onChange: handleChange
|
|
20
|
+
}, prop), shopList === null || shopList === void 0 ? void 0 : (_shopList$filter = shopList.filter(function (item) {
|
|
21
|
+
return (item === null || item === void 0 ? void 0 : item.auditStatus) === 1;
|
|
22
|
+
})) === null || _shopList$filter === void 0 ? void 0 : _shopList$filter.map(function (item) {
|
|
23
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
24
|
+
value: item.shopId,
|
|
25
|
+
label: item.shopName
|
|
26
|
+
}, /*#__PURE__*/React.createElement(PlatformAvatar, {
|
|
27
|
+
styles: {
|
|
28
|
+
marginRight: 5
|
|
29
|
+
},
|
|
30
|
+
type: item.shopSource
|
|
31
|
+
}), /*#__PURE__*/React.createElement("span", null, item.shopName));
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
export default ShopList;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ComponentInterface, PickOption, ColumnConfig, ALignType, Record } from '../../type';
|
|
3
|
+
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
declare class PaymentTid implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
rules: any[];
|
|
9
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
10
|
+
effects: ComponentInterface["effects"];
|
|
11
|
+
align: ALignType;
|
|
12
|
+
width: number;
|
|
13
|
+
isCombinationComponent: boolean;
|
|
14
|
+
children: ComponentInterface[];
|
|
15
|
+
addressDateInstance: AddressData;
|
|
16
|
+
constructor(options: PickOption);
|
|
17
|
+
render: (value: any, record: any) => JSX.Element;
|
|
18
|
+
renderClient: (record: any) => JSX.Element | null;
|
|
19
|
+
renderPc: (value: any, record: Record) => any;
|
|
20
|
+
renderExport: (value: any, record: Record) => any;
|
|
21
|
+
editRender: () => null;
|
|
22
|
+
filterConfig: (item: ColumnConfig) => never[];
|
|
23
|
+
}
|
|
24
|
+
export default PaymentTid;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import ItemView from "../../commonComponents/ItemView";
|
|
10
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import { AddressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
|
+
var PaymentTid = /*#__PURE__*/_createClass(function PaymentTid(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, PaymentTid);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "type", void 0);
|
|
18
|
+
_defineProperty(this, "rules", void 0);
|
|
19
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
20
|
+
_defineProperty(this, "effects", void 0);
|
|
21
|
+
_defineProperty(this, "align", void 0);
|
|
22
|
+
_defineProperty(this, "width", void 0);
|
|
23
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
+
_defineProperty(this, "children", void 0);
|
|
25
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
26
|
+
_defineProperty(this, "render", function (value, record) {
|
|
27
|
+
return /*#__PURE__*/React.createElement("span", null, "TODO");
|
|
28
|
+
});
|
|
29
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
30
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
31
|
+
id: _this.id,
|
|
32
|
+
label: _this.name,
|
|
33
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
34
|
+
}) : null;
|
|
35
|
+
});
|
|
36
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
37
|
+
var _record;
|
|
38
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_interceptType")]) !== null && _record !== void 0 ? _record : '--';
|
|
39
|
+
});
|
|
40
|
+
_defineProperty(this, "renderExport", function (value, record) {
|
|
41
|
+
var _record2;
|
|
42
|
+
return (_record2 = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_interceptType")]) !== null && _record2 !== void 0 ? _record2 : '--';
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "editRender", function () {
|
|
45
|
+
return null;
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "filterConfig", function (item) {
|
|
48
|
+
return [];
|
|
49
|
+
});
|
|
50
|
+
this.name = '拦截类型';
|
|
51
|
+
this.id = "".concat(options.id, "_interceptType");
|
|
52
|
+
this.type = options.type;
|
|
53
|
+
this.componentConfig = options.componentConfig;
|
|
54
|
+
this.rules = [];
|
|
55
|
+
this.align = 'left';
|
|
56
|
+
this.width = 200;
|
|
57
|
+
this.isCombinationComponent = false;
|
|
58
|
+
this.children = [];
|
|
59
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
60
|
+
this.addressDateInstance = AddressData.getInstance();
|
|
61
|
+
});
|
|
62
|
+
export default PaymentTid;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ComponentInterface, PickOption, ColumnConfig } from '../../type';
|
|
3
|
-
import InterceptAddress from './InterceptAddress';
|
|
4
3
|
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
4
|
+
import InterceptAddress from './InterceptAddress';
|
|
5
|
+
import Express from '../Express';
|
|
6
|
+
import ExpressCode from '../ExpressCode';
|
|
5
7
|
declare class Logistics implements ComponentInterface {
|
|
6
8
|
name: string;
|
|
7
9
|
id: string;
|
|
@@ -11,6 +13,8 @@ declare class Logistics implements ComponentInterface {
|
|
|
11
13
|
interceptAddress: InterceptAddress;
|
|
12
14
|
isCombinationComponent: boolean;
|
|
13
15
|
children: ComponentInterface[];
|
|
16
|
+
express: Express;
|
|
17
|
+
expressCode: ExpressCode;
|
|
14
18
|
expressDateInstance: ExpressData;
|
|
15
19
|
constructor(options: PickOption);
|
|
16
20
|
render: () => null;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -7,9 +9,11 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
7
9
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
10
|
import React from 'react';
|
|
9
11
|
import { LogisticsInterception } from '@kmkf-fe-packages/basic-components';
|
|
12
|
+
import { ExpressData } from '@kmkf-fe-packages/kmkf-utils';
|
|
10
13
|
import GetFormItem from "../GetFormItem";
|
|
11
14
|
import InterceptAddress from "./InterceptAddress";
|
|
12
|
-
import
|
|
15
|
+
import Express from "../Express";
|
|
16
|
+
import ExpressCode from "../ExpressCode";
|
|
13
17
|
var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
14
18
|
var _this = this;
|
|
15
19
|
_classCallCheck(this, Logistics);
|
|
@@ -21,12 +25,14 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
21
25
|
_defineProperty(this, "interceptAddress", void 0);
|
|
22
26
|
_defineProperty(this, "isCombinationComponent", void 0);
|
|
23
27
|
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "express", void 0);
|
|
29
|
+
_defineProperty(this, "expressCode", void 0);
|
|
24
30
|
_defineProperty(this, "expressDateInstance", void 0);
|
|
25
31
|
_defineProperty(this, "render", function () {
|
|
26
32
|
return null;
|
|
27
33
|
});
|
|
28
34
|
_defineProperty(this, "renderClient", function (record) {
|
|
29
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.interceptAddress.renderClient(record));
|
|
35
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, _this.express.renderClient(record), _this.expressCode.renderClient(record), _this.interceptAddress.renderClient(record));
|
|
30
36
|
});
|
|
31
37
|
_defineProperty(this, "renderPc", function () {
|
|
32
38
|
return null;
|
|
@@ -51,10 +57,18 @@ var Logistics = /*#__PURE__*/_createClass(function Logistics(options) {
|
|
|
51
57
|
this.id = options.id;
|
|
52
58
|
this.type = options.type;
|
|
53
59
|
this.componentConfig = options.componentConfig;
|
|
54
|
-
this.interceptAddress = new InterceptAddress(options);
|
|
55
60
|
this.expressDateInstance = ExpressData.getInstance();
|
|
61
|
+
this.interceptAddress = new InterceptAddress(options);
|
|
62
|
+
this.express = new Express(_objectSpread(_objectSpread({}, options), {}, {
|
|
63
|
+
id: "".concat(options.id, "_interceptCompany"),
|
|
64
|
+
name: "物流信息"
|
|
65
|
+
}));
|
|
66
|
+
this.expressCode = new ExpressCode(_objectSpread(_objectSpread({}, options), {}, {
|
|
67
|
+
id: "".concat(options.id, "_interceptCode"),
|
|
68
|
+
name: "物流单号"
|
|
69
|
+
}));
|
|
56
70
|
this.isCombinationComponent = true;
|
|
57
|
-
this.children = [this.interceptAddress];
|
|
71
|
+
this.children = [this.express, this.expressCode, this.interceptAddress];
|
|
58
72
|
this.rules = [{
|
|
59
73
|
validator: function validator(_, value) {
|
|
60
74
|
var _this$componentConfig3, _this$componentConfig4, _value$interceptAddre;
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -45,3 +45,5 @@ export { default as Submitter } from './components/Submitter';
|
|
|
45
45
|
export { default as Handler } from './components/Handler';
|
|
46
46
|
export { default as CompletedUser } from './components/CompletedUser';
|
|
47
47
|
export { factory } from './factory';
|
|
48
|
+
export { default as PlatformAvatar } from './commonComponents/PlatformAvatar';
|
|
49
|
+
export { default as ShopList } from './commonComponents/ShopList';
|
package/dist/esm/index.js
CHANGED
|
@@ -44,4 +44,6 @@ export { default as ShopInput } from "./components/ShopInput";
|
|
|
44
44
|
export { default as Submitter } from "./components/Submitter";
|
|
45
45
|
export { default as Handler } from "./components/Handler";
|
|
46
46
|
export { default as CompletedUser } from "./components/CompletedUser";
|
|
47
|
-
export { factory } from "./factory";
|
|
47
|
+
export { factory } from "./factory";
|
|
48
|
+
export { default as PlatformAvatar } from "./commonComponents/PlatformAvatar";
|
|
49
|
+
export { default as ShopList } from "./commonComponents/ShopList";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.1",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@kmkf-fe-packages/basic-components": "^0.6.3-alpha.0",
|
|
25
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.
|
|
25
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.6.3-alpha.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"gitHooks": {
|
|
36
36
|
"pre-commit": "lint-staged"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "077b49bb3f2c7d7d9b33b822cc56df3018ca050a"
|
|
39
39
|
}
|