@kmkf-fe-packages/services-components 0.13.0-alpha.1 → 0.13.0-alpha.12
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/components/Address/index.d.ts +5 -5
- package/dist/esm/components/Address/index.js +31 -25
- package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/City/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/Detail/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/District/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +29 -0
- package/dist/esm/components/BS/BsPosting/components/Province/index.js +76 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +27 -0
- package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +70 -0
- package/dist/esm/components/BS/BsPosting/index.d.ts +43 -0
- package/dist/esm/components/BS/BsPosting/index.js +106 -0
- package/dist/esm/components/Common/img/reject.png +0 -0
- package/dist/esm/components/Common/img/reminder.png +0 -0
- package/dist/esm/components/FlowTag/index.js +15 -3
- package/dist/esm/components/GetFormItem/index.d.ts +1 -1
- package/dist/esm/components/GetFormItem/index.js +4 -2
- package/dist/esm/components/Input/index.d.ts +5 -4
- package/dist/esm/components/Input/index.js +63 -9
- package/dist/esm/components/ReceiverAddress/index.d.ts +5 -5
- package/dist/esm/components/ReceiverAddress/index.js +27 -19
- package/dist/esm/factory.d.ts +3 -3
- package/dist/esm/factory.js +95 -93
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/service/api.d.ts +1 -0
- package/dist/esm/service/api.js +9 -0
- package/dist/esm/service/request.d.ts +17 -0
- package/dist/esm/service/request.js +56 -0
- package/dist/esm/type.d.ts +2 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, Record, ColumnConfig } from
|
|
2
|
-
import React from
|
|
3
|
-
import { AddressData } from
|
|
1
|
+
import { ComponentInterface, PickOption, Record, ColumnConfig } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
4
4
|
declare type Value = (string | number)[] | undefined;
|
|
5
5
|
declare class Address implements ComponentInterface {
|
|
6
6
|
name: string;
|
|
@@ -14,7 +14,7 @@ declare class Address implements ComponentInterface {
|
|
|
14
14
|
children: ComponentInterface[];
|
|
15
15
|
componentConfig: ComponentInterface["componentConfig"];
|
|
16
16
|
addressDateInstance: InstanceType<typeof AddressData>;
|
|
17
|
-
dataType: ComponentInterface[
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
19
|
/**
|
|
20
20
|
* 通过值计算展示内容
|
|
@@ -25,7 +25,7 @@ declare class Address implements ComponentInterface {
|
|
|
25
25
|
transTextToNumber: (value?: string) => string | number | undefined;
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
27
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
28
|
-
renderLog: (r: Record) =>
|
|
28
|
+
renderLog: (r: Record) => string;
|
|
29
29
|
getComponentValue: (r: Record) => any[];
|
|
30
30
|
renderExport: (value: any, record: any) => string;
|
|
31
31
|
editRender: (p: any) => React.JSX.Element;
|
|
@@ -5,14 +5,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
5
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
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
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
|
|
9
|
-
import { ApaasAddress } from
|
|
10
|
-
import { AddressData } from
|
|
11
|
-
import intersection from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import { ApaasAddress } from "@kmkf-fe-packages/basic-components";
|
|
10
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
11
|
+
import intersection from "lodash/intersection";
|
|
12
12
|
import GetFormItem from "../GetFormItem";
|
|
13
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
14
|
-
import { isNull, filterFn as _filterFn } from
|
|
15
|
-
import every from
|
|
14
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
|
+
import every from "lodash/every";
|
|
16
16
|
import { SYMBOL } from "../../constant";
|
|
17
17
|
var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
18
18
|
var _this = this;
|
|
@@ -33,7 +33,7 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
33
33
|
var _value$map;
|
|
34
34
|
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (suffix) {
|
|
35
35
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
36
|
-
})) === null || _value$map === void 0 ? void 0 : _value$map.join(
|
|
36
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.join("");
|
|
37
37
|
});
|
|
38
38
|
_defineProperty(this, "transTextToNumber", function (value) {
|
|
39
39
|
return value ? +value : value;
|
|
@@ -42,7 +42,7 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
42
42
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
43
43
|
id: _this.id,
|
|
44
44
|
label: _this.name,
|
|
45
|
-
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
45
|
+
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
46
46
|
}) : null;
|
|
47
47
|
});
|
|
48
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -55,28 +55,34 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
55
55
|
return !item;
|
|
56
56
|
}) ? [] : address;
|
|
57
57
|
return /*#__PURE__*/React.createElement("span", null, (_address = address) === null || _address === void 0 ? void 0 : _address.map(function (suffix) {
|
|
58
|
-
return _this.addressDateInstance.getNameByCode(suffix ||
|
|
59
|
-
}).join(
|
|
58
|
+
return _this.addressDateInstance.getNameByCode(suffix || "");
|
|
59
|
+
}).join(""));
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "renderLog", function (r) {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
var _address2;
|
|
63
|
+
var address = [_this.transTextToNumber(r["".concat(_this.id, "_basicProvince")]), _this.transTextToNumber(r["".concat(_this.id, "_basicCity")]), _this.transTextToNumber(r["".concat(_this.id, "_basicDistrict")])];
|
|
64
|
+
address = every(address, function (item) {
|
|
65
|
+
return !item;
|
|
66
|
+
}) ? [] : address;
|
|
67
|
+
return (_address2 = address) === null || _address2 === void 0 ? void 0 : _address2.map(function (suffix) {
|
|
68
|
+
return _this.addressDateInstance.getNameByCode(suffix || "");
|
|
69
|
+
}).join("");
|
|
64
70
|
});
|
|
65
71
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
66
72
|
return !isNull(r["".concat(_this.id, "_basicProvince")]) ? [r["".concat(_this.id, "_basicProvince")], r["".concat(_this.id, "_basicCity")], r["".concat(_this.id, "_basicDistrict")]] : [];
|
|
67
73
|
});
|
|
68
74
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
69
|
-
var
|
|
75
|
+
var _address3;
|
|
70
76
|
if (record["".concat(_this.id, "_basicProvince")] === undefined) {
|
|
71
|
-
return
|
|
77
|
+
return "--";
|
|
72
78
|
}
|
|
73
79
|
var address = [_this.transTextToNumber(record["".concat(_this.id, "_basicProvince")]), _this.transTextToNumber(record["".concat(_this.id, "_basicCity")]), _this.transTextToNumber(record["".concat(_this.id, "_basicDistrict")])];
|
|
74
80
|
address = every(address, function (item) {
|
|
75
81
|
return !item;
|
|
76
82
|
}) ? [] : address;
|
|
77
|
-
return (
|
|
78
|
-
return _this.addressDateInstance.getNameByCode(suffix ||
|
|
79
|
-
}).join(
|
|
83
|
+
return (_address3 = address) === null || _address3 === void 0 ? void 0 : _address3.map(function (suffix) {
|
|
84
|
+
return _this.addressDateInstance.getNameByCode(suffix || "");
|
|
85
|
+
}).join("");
|
|
80
86
|
});
|
|
81
87
|
_defineProperty(this, "editRender", function (p) {
|
|
82
88
|
var _this$componentConfig, _this$componentConfig2;
|
|
@@ -97,18 +103,18 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
97
103
|
// 过滤组件id
|
|
98
104
|
name: item.name,
|
|
99
105
|
// 过滤组件名称
|
|
100
|
-
filterComponentType:
|
|
106
|
+
filterComponentType: "Cascader",
|
|
101
107
|
props: {
|
|
102
108
|
options: _this.addressDateInstance.addressOptions || [],
|
|
103
109
|
fieldNames: {
|
|
104
|
-
label:
|
|
105
|
-
value:
|
|
106
|
-
children:
|
|
110
|
+
label: "label",
|
|
111
|
+
value: "value",
|
|
112
|
+
children: "children"
|
|
107
113
|
}
|
|
108
114
|
},
|
|
109
115
|
filterFn: function filterFn(value) {
|
|
110
116
|
return function (i) {
|
|
111
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
117
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "basicMultSelect")).length > 0;
|
|
112
118
|
};
|
|
113
119
|
},
|
|
114
120
|
formatFilterValue: function formatFilterValue(val) {
|
|
@@ -123,7 +129,7 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
123
129
|
this.sortField = "".concat(options.id, "_basicDistrict");
|
|
124
130
|
this.formField = "".concat(options.id, "_basicDistrict");
|
|
125
131
|
this.type = options.type;
|
|
126
|
-
this.dataType =
|
|
132
|
+
this.dataType = "object";
|
|
127
133
|
this.isCombinationComponent = false;
|
|
128
134
|
this.canSort = true;
|
|
129
135
|
this.children = [];
|
|
@@ -133,8 +139,8 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
133
139
|
}
|
|
134
140
|
/**
|
|
135
141
|
* 通过值计算展示内容
|
|
136
|
-
* @param value
|
|
137
|
-
* @returns
|
|
142
|
+
* @param value
|
|
143
|
+
* @returns
|
|
138
144
|
*/);
|
|
139
145
|
|
|
140
146
|
export default Address;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
|
|
4
|
+
declare class City implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface['dataType'];
|
|
19
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => string;
|
|
23
|
+
renderLog: (r: Record) => string;
|
|
24
|
+
renderExport: (value?: string) => string;
|
|
25
|
+
getComponentValue: (r: Record) => any;
|
|
26
|
+
editRender: () => null;
|
|
27
|
+
filterConfig: () => never[];
|
|
28
|
+
}
|
|
29
|
+
export default City;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
|
+
var City = /*#__PURE__*/_createClass(function City(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, City);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
30
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
31
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
32
|
+
id: _this.id,
|
|
33
|
+
label: _this.name,
|
|
34
|
+
value: _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
35
|
+
}) : null;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
+
if (Reflect.has(record, "".concat(_this.id))) {
|
|
39
|
+
return _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
40
|
+
} else {
|
|
41
|
+
return '--';
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
return _this.addressDateInstance.getNameByCode(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value) {
|
|
48
|
+
var _this$addressDateInst;
|
|
49
|
+
return (_this$addressDateInst = _this.addressDateInstance.getNameByCode(value)) !== null && _this$addressDateInst !== void 0 ? _this$addressDateInst : '--';
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "filterConfig", function () {
|
|
58
|
+
return [];
|
|
59
|
+
});
|
|
60
|
+
this.name = '省';
|
|
61
|
+
this.id = "".concat(options.id, "_bsPostingCity");
|
|
62
|
+
this.sortField = "".concat(options.id, "_bsPostingCity");
|
|
63
|
+
this.formField = "".concat(options.id, "_bsPostingCity");
|
|
64
|
+
this.type = options.type;
|
|
65
|
+
this.isCombinationComponent = false;
|
|
66
|
+
this.canSort = false;
|
|
67
|
+
this.children = [];
|
|
68
|
+
this.align = 'left';
|
|
69
|
+
this.dataType = 'string';
|
|
70
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
71
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
|
+
this.rules = [];
|
|
73
|
+
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
+
this.addressDateInstance = BsAddressData.getInstance();
|
|
75
|
+
});
|
|
76
|
+
export default City;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
|
|
3
|
+
declare class Detail implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: 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
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface['dataType'];
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
20
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
21
|
+
renderLog: (r: Record) => any;
|
|
22
|
+
renderExport: (value?: string) => string;
|
|
23
|
+
getComponentValue: (r: Record) => any;
|
|
24
|
+
editRender: () => null;
|
|
25
|
+
filterConfig: () => never[];
|
|
26
|
+
}
|
|
27
|
+
export default Detail;
|
|
@@ -0,0 +1,70 @@
|
|
|
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 { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
10
|
+
import ItemView from "../../../../../commonComponents/ItemView";
|
|
11
|
+
var Detail = /*#__PURE__*/_createClass(function Detail(options) {
|
|
12
|
+
var _this = this;
|
|
13
|
+
_classCallCheck(this, Detail);
|
|
14
|
+
_defineProperty(this, "name", void 0);
|
|
15
|
+
_defineProperty(this, "id", void 0);
|
|
16
|
+
_defineProperty(this, "sortField", 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, "formField", void 0);
|
|
25
|
+
_defineProperty(this, "canSort", void 0);
|
|
26
|
+
_defineProperty(this, "children", void 0);
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
28
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
29
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
30
|
+
id: _this.id,
|
|
31
|
+
label: _this.name,
|
|
32
|
+
value: record === null || record === void 0 ? void 0 : record[_this.id]
|
|
33
|
+
}) : null;
|
|
34
|
+
});
|
|
35
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
|
+
var _record;
|
|
37
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : '--';
|
|
38
|
+
});
|
|
39
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
40
|
+
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
41
|
+
});
|
|
42
|
+
_defineProperty(this, "renderExport", function (value) {
|
|
43
|
+
return value !== null && value !== void 0 ? value : '--';
|
|
44
|
+
});
|
|
45
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
46
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
47
|
+
});
|
|
48
|
+
_defineProperty(this, "editRender", function () {
|
|
49
|
+
return null;
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "filterConfig", function () {
|
|
52
|
+
return [];
|
|
53
|
+
});
|
|
54
|
+
this.name = '详细地址';
|
|
55
|
+
this.id = "".concat(options.id, "_bsPostingDetail");
|
|
56
|
+
this.sortField = "".concat(options.id, "_bsPostingDetail");
|
|
57
|
+
this.formField = "".concat(options.id, "_bsPostingDetail");
|
|
58
|
+
this.type = options.type;
|
|
59
|
+
this.isCombinationComponent = false;
|
|
60
|
+
this.canSort = false;
|
|
61
|
+
this.children = [];
|
|
62
|
+
this.align = 'left';
|
|
63
|
+
this.dataType = 'string';
|
|
64
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
65
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
66
|
+
this.rules = [];
|
|
67
|
+
this.width = 200; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export default Detail;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
|
|
4
|
+
declare class District implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface['dataType'];
|
|
19
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => string;
|
|
23
|
+
renderLog: (r: Record) => string;
|
|
24
|
+
renderExport: (value?: string) => string;
|
|
25
|
+
getComponentValue: (r: Record) => any;
|
|
26
|
+
editRender: () => null;
|
|
27
|
+
filterConfig: () => never[];
|
|
28
|
+
}
|
|
29
|
+
export default District;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
|
+
var District = /*#__PURE__*/_createClass(function District(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, District);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
30
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
31
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
32
|
+
id: _this.id,
|
|
33
|
+
label: _this.name,
|
|
34
|
+
value: _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
35
|
+
}) : null;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
+
if (Reflect.has(record, "".concat(_this.id))) {
|
|
39
|
+
return _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
40
|
+
} else {
|
|
41
|
+
return '--';
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
return _this.addressDateInstance.getNameByCode(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value) {
|
|
48
|
+
var _this$addressDateInst;
|
|
49
|
+
return (_this$addressDateInst = _this.addressDateInstance.getNameByCode(value)) !== null && _this$addressDateInst !== void 0 ? _this$addressDateInst : '--';
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "filterConfig", function () {
|
|
58
|
+
return [];
|
|
59
|
+
});
|
|
60
|
+
this.name = '区/县';
|
|
61
|
+
this.id = "".concat(options.id, "_bsPostingDistrict");
|
|
62
|
+
this.sortField = "".concat(options.id, "_bsPostingDistrict");
|
|
63
|
+
this.formField = "".concat(options.id, "_bsPostingDistrict");
|
|
64
|
+
this.type = options.type;
|
|
65
|
+
this.isCombinationComponent = false;
|
|
66
|
+
this.canSort = false;
|
|
67
|
+
this.children = [];
|
|
68
|
+
this.align = 'left';
|
|
69
|
+
this.dataType = 'string';
|
|
70
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
71
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
|
+
this.rules = [];
|
|
73
|
+
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
+
this.addressDateInstance = BsAddressData.getInstance();
|
|
75
|
+
});
|
|
76
|
+
export default District;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
3
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
|
|
4
|
+
declare class Province implements ComponentInterface {
|
|
5
|
+
name: string;
|
|
6
|
+
id: string;
|
|
7
|
+
sortField: string;
|
|
8
|
+
type: string;
|
|
9
|
+
rules: any[];
|
|
10
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
+
effects: ComponentInterface["effects"];
|
|
12
|
+
align: ALignType;
|
|
13
|
+
width: number;
|
|
14
|
+
isCombinationComponent: boolean;
|
|
15
|
+
formField: string;
|
|
16
|
+
canSort: boolean;
|
|
17
|
+
children: ComponentInterface[];
|
|
18
|
+
dataType: ComponentInterface['dataType'];
|
|
19
|
+
addressDateInstance: InstanceType<typeof AddressData>;
|
|
20
|
+
constructor(options: PickOption);
|
|
21
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
22
|
+
renderPc: (value: unknown, record: Record) => string;
|
|
23
|
+
renderLog: (r: Record) => string;
|
|
24
|
+
renderExport: (value?: string) => string;
|
|
25
|
+
getComponentValue: (r: Record) => any;
|
|
26
|
+
editRender: () => null;
|
|
27
|
+
filterConfig: () => never[];
|
|
28
|
+
}
|
|
29
|
+
export default Province;
|
|
@@ -0,0 +1,76 @@
|
|
|
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 { BsAddressData } from "@kmkf-fe-packages/kmkf-utils";
|
|
10
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import ItemView from "../../../../../commonComponents/ItemView";
|
|
12
|
+
var Province = /*#__PURE__*/_createClass(function Province(options) {
|
|
13
|
+
var _this = this;
|
|
14
|
+
_classCallCheck(this, Province);
|
|
15
|
+
_defineProperty(this, "name", void 0);
|
|
16
|
+
_defineProperty(this, "id", void 0);
|
|
17
|
+
_defineProperty(this, "sortField", void 0);
|
|
18
|
+
_defineProperty(this, "type", void 0);
|
|
19
|
+
_defineProperty(this, "rules", void 0);
|
|
20
|
+
_defineProperty(this, "componentConfig", void 0);
|
|
21
|
+
_defineProperty(this, "effects", void 0);
|
|
22
|
+
_defineProperty(this, "align", void 0);
|
|
23
|
+
_defineProperty(this, "width", void 0);
|
|
24
|
+
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
+
_defineProperty(this, "formField", void 0);
|
|
26
|
+
_defineProperty(this, "canSort", void 0);
|
|
27
|
+
_defineProperty(this, "children", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "addressDateInstance", void 0);
|
|
30
|
+
_defineProperty(this, "renderClient", function (record) {
|
|
31
|
+
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
32
|
+
id: _this.id,
|
|
33
|
+
label: _this.name,
|
|
34
|
+
value: _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
35
|
+
}) : null;
|
|
36
|
+
});
|
|
37
|
+
_defineProperty(this, "renderPc", function (value, record) {
|
|
38
|
+
if (Reflect.has(record, "".concat(_this.id))) {
|
|
39
|
+
return _this.addressDateInstance.getNameByCode(record === null || record === void 0 ? void 0 : record[_this.id]);
|
|
40
|
+
} else {
|
|
41
|
+
return '--';
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
_defineProperty(this, "renderLog", function (r) {
|
|
45
|
+
return _this.addressDateInstance.getNameByCode(r === null || r === void 0 ? void 0 : r[_this.id]);
|
|
46
|
+
});
|
|
47
|
+
_defineProperty(this, "renderExport", function (value) {
|
|
48
|
+
var _this$addressDateInst;
|
|
49
|
+
return (_this$addressDateInst = _this.addressDateInstance.getNameByCode(value)) !== null && _this$addressDateInst !== void 0 ? _this$addressDateInst : '--';
|
|
50
|
+
});
|
|
51
|
+
_defineProperty(this, "getComponentValue", function (r) {
|
|
52
|
+
return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
|
|
53
|
+
});
|
|
54
|
+
_defineProperty(this, "editRender", function () {
|
|
55
|
+
return null;
|
|
56
|
+
});
|
|
57
|
+
_defineProperty(this, "filterConfig", function () {
|
|
58
|
+
return [];
|
|
59
|
+
});
|
|
60
|
+
this.name = '省';
|
|
61
|
+
this.id = "".concat(options.id, "_bsPostingProvince");
|
|
62
|
+
this.sortField = "".concat(options.id, "_bsPostingProvince");
|
|
63
|
+
this.formField = "".concat(options.id, "_bsPostingProvince");
|
|
64
|
+
this.type = options.type;
|
|
65
|
+
this.isCombinationComponent = false;
|
|
66
|
+
this.canSort = false;
|
|
67
|
+
this.children = [];
|
|
68
|
+
this.align = 'left';
|
|
69
|
+
this.dataType = 'string';
|
|
70
|
+
this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
|
|
71
|
+
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
72
|
+
this.rules = [];
|
|
73
|
+
this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
|
|
74
|
+
this.addressDateInstance = BsAddressData.getInstance();
|
|
75
|
+
});
|
|
76
|
+
export default Province;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
|
|
3
|
+
declare class ReceiverMobile implements ComponentInterface {
|
|
4
|
+
name: string;
|
|
5
|
+
id: string;
|
|
6
|
+
sortField: 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
|
+
formField: string;
|
|
15
|
+
canSort: boolean;
|
|
16
|
+
children: ComponentInterface[];
|
|
17
|
+
dataType: ComponentInterface['dataType'];
|
|
18
|
+
constructor(options: PickOption);
|
|
19
|
+
renderClient: (record: Record) => React.JSX.Element | null;
|
|
20
|
+
renderPc: (value: unknown, record: Record) => any;
|
|
21
|
+
renderLog: (r: Record) => any;
|
|
22
|
+
renderExport: (value?: string) => string;
|
|
23
|
+
getComponentValue: (r: Record) => any;
|
|
24
|
+
editRender: () => null;
|
|
25
|
+
filterConfig: () => never[];
|
|
26
|
+
}
|
|
27
|
+
export default ReceiverMobile;
|