@kmkf-fe-packages/services-components 0.13.0-alpha.0 → 0.13.0-alpha.11

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.
Files changed (32) hide show
  1. package/dist/esm/components/BS/BsPosting/components/City/index.d.ts +29 -0
  2. package/dist/esm/components/BS/BsPosting/components/City/index.js +75 -0
  3. package/dist/esm/components/BS/BsPosting/components/Detail/index.d.ts +27 -0
  4. package/dist/esm/components/BS/BsPosting/components/Detail/index.js +70 -0
  5. package/dist/esm/components/BS/BsPosting/components/District/index.d.ts +29 -0
  6. package/dist/esm/components/BS/BsPosting/components/District/index.js +75 -0
  7. package/dist/esm/components/BS/BsPosting/components/Province/index.d.ts +29 -0
  8. package/dist/esm/components/BS/BsPosting/components/Province/index.js +75 -0
  9. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.d.ts +27 -0
  10. package/dist/esm/components/BS/BsPosting/components/ReceiverMobile/index.js +70 -0
  11. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.d.ts +27 -0
  12. package/dist/esm/components/BS/BsPosting/components/ReceiverName/index.js +70 -0
  13. package/dist/esm/components/BS/BsPosting/index.d.ts +43 -0
  14. package/dist/esm/components/BS/BsPosting/index.js +106 -0
  15. package/dist/esm/components/Cascader/index.d.ts +5 -3
  16. package/dist/esm/components/Cascader/index.js +16 -12
  17. package/dist/esm/components/FlowTag/index.d.ts +38 -0
  18. package/dist/esm/components/FlowTag/index.js +126 -0
  19. package/dist/esm/components/GetFormItem/index.d.ts +1 -1
  20. package/dist/esm/components/GetFormItem/index.js +4 -2
  21. package/dist/esm/components/Input/index.d.ts +5 -4
  22. package/dist/esm/components/Input/index.js +63 -9
  23. package/dist/esm/factory.d.ts +3 -3
  24. package/dist/esm/factory.js +98 -98
  25. package/dist/esm/index.d.ts +2 -0
  26. package/dist/esm/index.js +2 -0
  27. package/dist/esm/service/api.d.ts +1 -0
  28. package/dist/esm/service/api.js +9 -0
  29. package/dist/esm/service/request.d.ts +17 -0
  30. package/dist/esm/service/request.js +56 -0
  31. package/dist/esm/type.d.ts +2 -1
  32. package/package.json +4 -4
@@ -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,75 @@
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
+ return value !== null && value !== void 0 ? value : '--';
49
+ });
50
+ _defineProperty(this, "getComponentValue", function (r) {
51
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
52
+ });
53
+ _defineProperty(this, "editRender", function () {
54
+ return null;
55
+ });
56
+ _defineProperty(this, "filterConfig", function () {
57
+ return [];
58
+ });
59
+ this.name = '省';
60
+ this.id = "".concat(options.id, "_bsPostingCity");
61
+ this.sortField = "".concat(options.id, "_bsPostingCity");
62
+ this.formField = "".concat(options.id, "_bsPostingCity");
63
+ this.type = options.type;
64
+ this.isCombinationComponent = false;
65
+ this.canSort = false;
66
+ this.children = [];
67
+ this.align = 'left';
68
+ this.dataType = 'string';
69
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
70
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
71
+ this.rules = [];
72
+ this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
73
+ this.addressDateInstance = BsAddressData.getInstance();
74
+ });
75
+ 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,75 @@
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
+ return value !== null && value !== void 0 ? value : '--';
49
+ });
50
+ _defineProperty(this, "getComponentValue", function (r) {
51
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
52
+ });
53
+ _defineProperty(this, "editRender", function () {
54
+ return null;
55
+ });
56
+ _defineProperty(this, "filterConfig", function () {
57
+ return [];
58
+ });
59
+ this.name = '区/县';
60
+ this.id = "".concat(options.id, "_bsPostingDistrict");
61
+ this.sortField = "".concat(options.id, "_bsPostingDistrict");
62
+ this.formField = "".concat(options.id, "_bsPostingDistrict");
63
+ this.type = options.type;
64
+ this.isCombinationComponent = false;
65
+ this.canSort = false;
66
+ this.children = [];
67
+ this.align = 'left';
68
+ this.dataType = 'string';
69
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
70
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
71
+ this.rules = [];
72
+ this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
73
+ this.addressDateInstance = BsAddressData.getInstance();
74
+ });
75
+ 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,75 @@
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
+ return value !== null && value !== void 0 ? value : '--';
49
+ });
50
+ _defineProperty(this, "getComponentValue", function (r) {
51
+ return r === null || r === void 0 ? void 0 : r["".concat(_this.id)];
52
+ });
53
+ _defineProperty(this, "editRender", function () {
54
+ return null;
55
+ });
56
+ _defineProperty(this, "filterConfig", function () {
57
+ return [];
58
+ });
59
+ this.name = '省';
60
+ this.id = "".concat(options.id, "_bsPostingProvince");
61
+ this.sortField = "".concat(options.id, "_bsPostingProvince");
62
+ this.formField = "".concat(options.id, "_bsPostingProvince");
63
+ this.type = options.type;
64
+ this.isCombinationComponent = false;
65
+ this.canSort = false;
66
+ this.children = [];
67
+ this.align = 'left';
68
+ this.dataType = 'string';
69
+ this.componentConfig = options === null || options === void 0 ? void 0 : options.componentConfig;
70
+ this.effects = options === null || options === void 0 ? void 0 : options.effects;
71
+ this.rules = [];
72
+ this.width = 120; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
73
+ this.addressDateInstance = BsAddressData.getInstance();
74
+ });
75
+ 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;
@@ -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 ReceiverMobile = /*#__PURE__*/_createClass(function ReceiverMobile(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, ReceiverMobile);
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, "_bsPostingReceiverMobile");
56
+ this.sortField = "".concat(options.id, "_bsPostingReceiverMobile");
57
+ this.formField = "".concat(options.id, "_bsPostingReceiverMobile");
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 = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
68
+ });
69
+
70
+ export default ReceiverMobile;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { ComponentInterface, PickOption, ALignType, Record } from '../../../../../type';
3
+ declare class ReceiverName 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 ReceiverName;
@@ -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 ReceiverName = /*#__PURE__*/_createClass(function ReceiverName(options) {
12
+ var _this = this;
13
+ _classCallCheck(this, ReceiverName);
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, "_bsPostingReceiverName");
56
+ this.sortField = "".concat(options.id, "_bsPostingReceiverName");
57
+ this.formField = "".concat(options.id, "_bsPostingReceiverName");
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 = 180; // TODO: 针对子组件,必须拥有width属性,否则就会出现多列展示问题
68
+ });
69
+
70
+ export default ReceiverName;