@kmkf-fe-packages/services-components 0.7.15-alpha.81 → 0.7.15-alpha.82
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/BS/BsExchange/index.d.ts +6 -6
- package/dist/esm/components/BS/BsExchange/index.js +26 -199
- package/dist/esm/components/BS/BsGoods/index.d.ts +6 -6
- package/dist/esm/components/BS/BsGoods/index.js +8 -65
- package/dist/esm/components/BS/BsReissue/index.d.ts +6 -6
- package/dist/esm/components/BS/BsReissue/index.js +15 -75
- package/dist/esm/components/BS/common/BsHeaderChild.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderChild.js +8 -8
- package/dist/esm/components/BS/common/BsHeaderGood.d.ts +4 -4
- package/dist/esm/components/BS/common/BsHeaderGood.js +41 -41
- package/dist/esm/components/BS/common/BsHeaderPic.js +1 -1
- package/dist/esm/components/BS/common/BsMemo.js +1 -1
- package/dist/esm/components/BS/common/BsType.js +1 -1
- package/dist/esm/components/BS/common/index.d.ts +5 -12
- package/dist/esm/components/BS/common/index.js +7 -7
- package/package.json +2 -2
- package/dist/esm/components/BS/common/BsHeaderCode.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderCode.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderMoney.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderMoney.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderName.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderName.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderNumber.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderNumber.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderShare.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderShare.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderSku.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderSku.js +0 -88
- package/dist/esm/components/BS/common/BsHeaderType.d.ts +0 -26
- package/dist/esm/components/BS/common/BsHeaderType.js +0 -88
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsHeaderChild implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
getParentId: () => string;
|
|
18
18
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -11,9 +11,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
11
11
|
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; }
|
|
12
12
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
13
|
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); }
|
|
14
|
-
import React from
|
|
14
|
+
import React from 'react';
|
|
15
15
|
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
17
|
var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
18
18
|
var _this = this;
|
|
19
19
|
_classCallCheck(this, BsHeaderChild);
|
|
@@ -30,7 +30,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
30
30
|
_defineProperty(this, "children", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
32
|
_defineProperty(this, "getParentId", function () {
|
|
33
|
-
var _this$id$split = _this.id.split(
|
|
33
|
+
var _this$id$split = _this.id.split('_'),
|
|
34
34
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
35
|
key = _this$id$split2[0],
|
|
36
36
|
name = _this$id$split2[1],
|
|
@@ -46,7 +46,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
46
46
|
});
|
|
47
47
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
48
|
var _this$getComponentVal;
|
|
49
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
49
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
50
50
|
});
|
|
51
51
|
_defineProperty(this, "renderLog", function (r) {
|
|
52
52
|
var id = _this.getParentId();
|
|
@@ -58,7 +58,7 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
58
58
|
});
|
|
59
59
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
60
60
|
var _this$getComponentVal2;
|
|
61
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
61
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
62
62
|
});
|
|
63
63
|
_defineProperty(this, "editRender", function () {
|
|
64
64
|
return null;
|
|
@@ -72,11 +72,11 @@ var BsHeaderChild = /*#__PURE__*/_createClass(function BsHeaderChild(options) {
|
|
|
72
72
|
this.formField = options.id;
|
|
73
73
|
this.type = options.type;
|
|
74
74
|
this.componentConfig = options.componentConfig;
|
|
75
|
-
this.align =
|
|
76
|
-
this.width =
|
|
75
|
+
this.align = 'left';
|
|
76
|
+
this.width = (options === null || options === void 0 ? void 0 : options.width) || 100;
|
|
77
77
|
this.isCombinationComponent = false;
|
|
78
78
|
this.canSort = false;
|
|
79
|
-
this.dataType =
|
|
79
|
+
this.dataType = 'string';
|
|
80
80
|
this.children = [];
|
|
81
81
|
});
|
|
82
82
|
export default BsHeaderChild;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
declare class BsHeaderGods implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface['componentConfig'];
|
|
9
9
|
align: ALignType;
|
|
10
10
|
width: number;
|
|
11
11
|
isCombinationComponent: boolean;
|
|
12
12
|
formField: string;
|
|
13
13
|
canSort: boolean;
|
|
14
14
|
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface[
|
|
15
|
+
dataType: ComponentInterface['dataType'];
|
|
16
16
|
itemKey: any;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
18
|
getParentId: () => string;
|
|
@@ -17,63 +17,63 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
17
17
|
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; }
|
|
18
18
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
19
|
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); }
|
|
20
|
-
import React from
|
|
20
|
+
import React from 'react';
|
|
21
21
|
import ItemView from "../../../commonComponents/ItemView";
|
|
22
|
-
import { isNull } from
|
|
22
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
23
23
|
import { BsHeaderPic, BsHeaderChild } from "./index";
|
|
24
24
|
var HeaderMap = {
|
|
25
25
|
mark: {
|
|
26
26
|
component: BsHeaderChild,
|
|
27
|
-
name:
|
|
28
|
-
key:
|
|
29
|
-
width:
|
|
27
|
+
name: '商品标记',
|
|
28
|
+
key: 'mark',
|
|
29
|
+
width: 140
|
|
30
30
|
},
|
|
31
31
|
pic: {
|
|
32
32
|
component: BsHeaderPic,
|
|
33
|
-
name:
|
|
34
|
-
key:
|
|
35
|
-
width:
|
|
33
|
+
name: '图片',
|
|
34
|
+
key: 'pic',
|
|
35
|
+
width: 70
|
|
36
36
|
},
|
|
37
37
|
name: {
|
|
38
38
|
component: BsHeaderChild,
|
|
39
|
-
name:
|
|
40
|
-
key:
|
|
39
|
+
name: '名称',
|
|
40
|
+
key: 'name',
|
|
41
41
|
width: 200
|
|
42
42
|
},
|
|
43
43
|
code: {
|
|
44
44
|
component: BsHeaderChild,
|
|
45
|
-
name:
|
|
46
|
-
key:
|
|
45
|
+
name: '编码',
|
|
46
|
+
key: 'code',
|
|
47
47
|
width: 100
|
|
48
48
|
},
|
|
49
49
|
sku: {
|
|
50
50
|
component: BsHeaderChild,
|
|
51
|
-
name:
|
|
52
|
-
key:
|
|
53
|
-
width:
|
|
51
|
+
name: 'sku编码',
|
|
52
|
+
key: 'sku',
|
|
53
|
+
width: 140
|
|
54
54
|
},
|
|
55
55
|
money: {
|
|
56
56
|
component: BsHeaderChild,
|
|
57
|
-
name:
|
|
58
|
-
key:
|
|
59
|
-
width:
|
|
57
|
+
name: '实付金额',
|
|
58
|
+
key: 'money',
|
|
59
|
+
width: 140
|
|
60
60
|
},
|
|
61
61
|
number: {
|
|
62
62
|
component: BsHeaderChild,
|
|
63
|
-
name:
|
|
64
|
-
key:
|
|
63
|
+
name: '数量',
|
|
64
|
+
key: 'number',
|
|
65
65
|
width: 100
|
|
66
66
|
},
|
|
67
67
|
share: {
|
|
68
68
|
component: BsHeaderChild,
|
|
69
|
-
name:
|
|
70
|
-
key:
|
|
71
|
-
width:
|
|
69
|
+
name: '分摊价',
|
|
70
|
+
key: 'share',
|
|
71
|
+
width: 120
|
|
72
72
|
},
|
|
73
73
|
type: {
|
|
74
74
|
component: BsHeaderChild,
|
|
75
|
-
name:
|
|
76
|
-
key:
|
|
75
|
+
name: '赠品类型',
|
|
76
|
+
key: 'type',
|
|
77
77
|
width: 150
|
|
78
78
|
}
|
|
79
79
|
};
|
|
@@ -94,7 +94,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
94
94
|
_defineProperty(this, "dataType", void 0);
|
|
95
95
|
_defineProperty(this, "itemKey", void 0);
|
|
96
96
|
_defineProperty(this, "getParentId", function () {
|
|
97
|
-
var _this$id$split = _this.id.split(
|
|
97
|
+
var _this$id$split = _this.id.split('_'),
|
|
98
98
|
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
99
99
|
key = _this$id$split2[0],
|
|
100
100
|
name = _this$id$split2[1],
|
|
@@ -110,7 +110,7 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
110
110
|
});
|
|
111
111
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
112
112
|
var _this$getComponentVal;
|
|
113
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal :
|
|
113
|
+
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
114
114
|
});
|
|
115
115
|
_defineProperty(this, "renderLog", function (r) {
|
|
116
116
|
var id = _this.getParentId();
|
|
@@ -120,14 +120,14 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
120
120
|
_defineProperty(this, "getComponentValue", function (r) {
|
|
121
121
|
var id = _this.getParentId();
|
|
122
122
|
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
123
|
-
next[
|
|
123
|
+
next['money'] && prv.push(next['money']);
|
|
124
124
|
return prv;
|
|
125
125
|
}, []);
|
|
126
|
-
return list.join(
|
|
126
|
+
return list.join(',');
|
|
127
127
|
});
|
|
128
128
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
129
129
|
var _this$getComponentVal2;
|
|
130
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 :
|
|
130
|
+
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
131
131
|
});
|
|
132
132
|
_defineProperty(this, "editRender", function () {
|
|
133
133
|
return null;
|
|
@@ -141,21 +141,21 @@ var BsHeaderGods = /*#__PURE__*/_createClass(function BsHeaderGods(options) {
|
|
|
141
141
|
this.formField = options.id;
|
|
142
142
|
this.type = options.type;
|
|
143
143
|
this.componentConfig = options.componentConfig;
|
|
144
|
-
this.align =
|
|
144
|
+
this.align = 'left';
|
|
145
145
|
this.width = 200;
|
|
146
146
|
this.isCombinationComponent = true;
|
|
147
147
|
this.canSort = false;
|
|
148
|
-
this.dataType =
|
|
148
|
+
this.dataType = 'string';
|
|
149
149
|
this.itemKey = {
|
|
150
|
-
mark:
|
|
151
|
-
pic:
|
|
152
|
-
name:
|
|
153
|
-
code:
|
|
154
|
-
sku:
|
|
155
|
-
money:
|
|
156
|
-
number:
|
|
157
|
-
share:
|
|
158
|
-
type:
|
|
150
|
+
mark: '商品标记',
|
|
151
|
+
pic: '图片',
|
|
152
|
+
name: '名称',
|
|
153
|
+
code: '编码',
|
|
154
|
+
sku: 'sku编码',
|
|
155
|
+
money: '实付金额',
|
|
156
|
+
number: '数量',
|
|
157
|
+
share: '分摊价',
|
|
158
|
+
type: '赠品类型'
|
|
159
159
|
};
|
|
160
160
|
this.children = _toConsumableArray(Object.keys(HeaderMap).reduce(function (prv, key) {
|
|
161
161
|
var _options$componentCon, _options$componentCon2;
|
|
@@ -89,7 +89,7 @@ var BsChildPic = /*#__PURE__*/_createClass(function BsChildPic(options) {
|
|
|
89
89
|
this.type = options.type;
|
|
90
90
|
this.componentConfig = options.componentConfig;
|
|
91
91
|
this.align = 'left';
|
|
92
|
-
this.width =
|
|
92
|
+
this.width = 100;
|
|
93
93
|
this.isCombinationComponent = false;
|
|
94
94
|
this.canSort = false;
|
|
95
95
|
this.dataType = 'string';
|
|
@@ -101,7 +101,7 @@ var BsMemo = /*#__PURE__*/_createClass(function BsMemo(options) {
|
|
|
101
101
|
this.type = options.type;
|
|
102
102
|
this.componentConfig = options.componentConfig;
|
|
103
103
|
this.align = 'left';
|
|
104
|
-
this.width =
|
|
104
|
+
this.width = 140;
|
|
105
105
|
this.isCombinationComponent = false;
|
|
106
106
|
this.canSort = false;
|
|
107
107
|
this.dataType = 'string';
|
|
@@ -116,7 +116,7 @@ var BsType = /*#__PURE__*/_createClass(function BsType(options) {
|
|
|
116
116
|
this.type = options.type;
|
|
117
117
|
this.componentConfig = options.componentConfig;
|
|
118
118
|
this.align = 'left';
|
|
119
|
-
this.width =
|
|
119
|
+
this.width = 140;
|
|
120
120
|
this.isCombinationComponent = false;
|
|
121
121
|
this.canSort = false;
|
|
122
122
|
this.dataType = 'string';
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
export { default as BsType } from
|
|
2
|
-
export { default as BsMemo } from
|
|
3
|
-
export { default as BsHeaderPic } from
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as BsHeaderSku } from "./BsHeaderSku";
|
|
7
|
-
export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
8
|
-
export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
|
-
export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
|
-
export { default as BsHeaderType } from "./BsHeaderType";
|
|
11
|
-
export { default as BsHeaderChild } from "./BsHeaderChild";
|
|
12
|
-
export { default as BsHeaderGood } from "./BsHeaderGood";
|
|
1
|
+
export { default as BsType } from './BsType';
|
|
2
|
+
export { default as BsMemo } from './BsMemo';
|
|
3
|
+
export { default as BsHeaderPic } from './BsHeaderPic';
|
|
4
|
+
export { default as BsHeaderChild } from './BsHeaderChild';
|
|
5
|
+
export { default as BsHeaderGood } from './BsHeaderGood';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { default as BsType } from "./BsType";
|
|
2
2
|
export { default as BsMemo } from "./BsMemo";
|
|
3
3
|
export { default as BsHeaderPic } from "./BsHeaderPic";
|
|
4
|
-
export { default as BsHeaderName } from "./BsHeaderName";
|
|
5
|
-
export { default as BsHeaderCode } from "./BsHeaderCode";
|
|
6
|
-
export { default as BsHeaderSku } from "./BsHeaderSku";
|
|
7
|
-
export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
8
|
-
export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
|
-
export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
|
-
export { default as BsHeaderType } from "./BsHeaderType";
|
|
4
|
+
// export { default as BsHeaderName } from "./BsHeaderName";
|
|
5
|
+
// export { default as BsHeaderCode } from "./BsHeaderCode";
|
|
6
|
+
// export { default as BsHeaderSku } from "./BsHeaderSku";
|
|
7
|
+
// export { default as BsHeaderMoney } from "./BsHeaderMoney";
|
|
8
|
+
// export { default as BsHeaderNumber } from "./BsHeaderNumber";
|
|
9
|
+
// export { default as BsHeaderShare } from "./BsHeaderShare";
|
|
10
|
+
// export { default as BsHeaderType } from "./BsHeaderType";
|
|
11
11
|
export { default as BsHeaderChild } from "./BsHeaderChild";
|
|
12
12
|
export { default as BsHeaderGood } from "./BsHeaderGood";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.15-alpha.
|
|
3
|
+
"version": "0.7.15-alpha.82",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "2e48a0ff5acda6e52bd785277daf3953b97837c5"
|
|
44
44
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare class BsChildCode implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
componentConfig: ComponentInterface['componentConfig'];
|
|
9
|
-
align: ALignType;
|
|
10
|
-
width: number;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface['dataType'];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
getParentId: () => string;
|
|
18
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: (value: string, record: Record) => any;
|
|
23
|
-
editRender: () => null;
|
|
24
|
-
filterConfig: () => never[];
|
|
25
|
-
}
|
|
26
|
-
export default BsChildCode;
|
|
@@ -1,88 +0,0 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
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); } }
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
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; }
|
|
12
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
-
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); }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
-
var BsChildCode = /*#__PURE__*/_createClass(function BsChildCode(options) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
_classCallCheck(this, BsChildCode);
|
|
20
|
-
_defineProperty(this, "name", void 0);
|
|
21
|
-
_defineProperty(this, "id", void 0);
|
|
22
|
-
_defineProperty(this, "sortField", void 0);
|
|
23
|
-
_defineProperty(this, "type", void 0);
|
|
24
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
-
_defineProperty(this, "align", void 0);
|
|
26
|
-
_defineProperty(this, "width", void 0);
|
|
27
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
-
_defineProperty(this, "formField", void 0);
|
|
29
|
-
_defineProperty(this, "canSort", void 0);
|
|
30
|
-
_defineProperty(this, "children", void 0);
|
|
31
|
-
_defineProperty(this, "dataType", void 0);
|
|
32
|
-
_defineProperty(this, "getParentId", function () {
|
|
33
|
-
var _this$id$split = _this.id.split('_'),
|
|
34
|
-
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
-
key = _this$id$split2[0],
|
|
36
|
-
name = _this$id$split2[1],
|
|
37
|
-
code = _this$id$split2[2];
|
|
38
|
-
return "".concat(key, "_").concat(name);
|
|
39
|
-
});
|
|
40
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
-
id: _this.id,
|
|
43
|
-
label: _this.name,
|
|
44
|
-
value: _this.getComponentValue(record)
|
|
45
|
-
}) : null;
|
|
46
|
-
});
|
|
47
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
-
var _this$getComponentVal;
|
|
49
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
-
var id = _this.getParentId();
|
|
53
|
-
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
54
|
-
return _this.renderPc(undefined, r);
|
|
55
|
-
});
|
|
56
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
57
|
-
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
58
|
-
var id = _this.getParentId();
|
|
59
|
-
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
60
|
-
next['code'] && prv.push(next['code']);
|
|
61
|
-
return prv;
|
|
62
|
-
}, []);
|
|
63
|
-
return list.join(',');
|
|
64
|
-
});
|
|
65
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
66
|
-
var _this$getComponentVal2;
|
|
67
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(this, "editRender", function () {
|
|
70
|
-
return null;
|
|
71
|
-
});
|
|
72
|
-
_defineProperty(this, "filterConfig", function () {
|
|
73
|
-
return [];
|
|
74
|
-
});
|
|
75
|
-
this.name = options.name;
|
|
76
|
-
this.id = options.id;
|
|
77
|
-
this.sortField = options.id;
|
|
78
|
-
this.formField = options.id;
|
|
79
|
-
this.type = options.type;
|
|
80
|
-
this.componentConfig = options.componentConfig;
|
|
81
|
-
this.align = 'left';
|
|
82
|
-
this.width = 200;
|
|
83
|
-
this.isCombinationComponent = false;
|
|
84
|
-
this.canSort = false;
|
|
85
|
-
this.dataType = 'string';
|
|
86
|
-
this.children = [];
|
|
87
|
-
});
|
|
88
|
-
export default BsChildCode;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from '../../../type';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
declare class BsChildMoney implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
componentConfig: ComponentInterface['componentConfig'];
|
|
9
|
-
align: ALignType;
|
|
10
|
-
width: number;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface['dataType'];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
getParentId: () => string;
|
|
18
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: (value: string, record: Record) => any;
|
|
23
|
-
editRender: () => null;
|
|
24
|
-
filterConfig: () => never[];
|
|
25
|
-
}
|
|
26
|
-
export default BsChildMoney;
|
|
@@ -1,88 +0,0 @@
|
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
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); } }
|
|
9
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
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; }
|
|
12
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
13
|
-
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); }
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import ItemView from "../../../commonComponents/ItemView";
|
|
16
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
17
|
-
var BsChildMoney = /*#__PURE__*/_createClass(function BsChildMoney(options) {
|
|
18
|
-
var _this = this;
|
|
19
|
-
_classCallCheck(this, BsChildMoney);
|
|
20
|
-
_defineProperty(this, "name", void 0);
|
|
21
|
-
_defineProperty(this, "id", void 0);
|
|
22
|
-
_defineProperty(this, "sortField", void 0);
|
|
23
|
-
_defineProperty(this, "type", void 0);
|
|
24
|
-
_defineProperty(this, "componentConfig", void 0);
|
|
25
|
-
_defineProperty(this, "align", void 0);
|
|
26
|
-
_defineProperty(this, "width", void 0);
|
|
27
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
28
|
-
_defineProperty(this, "formField", void 0);
|
|
29
|
-
_defineProperty(this, "canSort", void 0);
|
|
30
|
-
_defineProperty(this, "children", void 0);
|
|
31
|
-
_defineProperty(this, "dataType", void 0);
|
|
32
|
-
_defineProperty(this, "getParentId", function () {
|
|
33
|
-
var _this$id$split = _this.id.split('_'),
|
|
34
|
-
_this$id$split2 = _slicedToArray(_this$id$split, 3),
|
|
35
|
-
key = _this$id$split2[0],
|
|
36
|
-
name = _this$id$split2[1],
|
|
37
|
-
code = _this$id$split2[2];
|
|
38
|
-
return "".concat(key, "_").concat(name);
|
|
39
|
-
});
|
|
40
|
-
_defineProperty(this, "renderClient", function (record) {
|
|
41
|
-
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
42
|
-
id: _this.id,
|
|
43
|
-
label: _this.name,
|
|
44
|
-
value: _this.getComponentValue(record)
|
|
45
|
-
}) : null;
|
|
46
|
-
});
|
|
47
|
-
_defineProperty(this, "renderPc", function (value, record) {
|
|
48
|
-
var _this$getComponentVal;
|
|
49
|
-
return /*#__PURE__*/React.createElement("span", null, (_this$getComponentVal = _this.getComponentValue(record)) !== null && _this$getComponentVal !== void 0 ? _this$getComponentVal : '--');
|
|
50
|
-
});
|
|
51
|
-
_defineProperty(this, "renderLog", function (r) {
|
|
52
|
-
var id = _this.getParentId();
|
|
53
|
-
if (isNull(r === null || r === void 0 ? void 0 : r[id])) return null;
|
|
54
|
-
return _this.renderPc(undefined, r);
|
|
55
|
-
});
|
|
56
|
-
_defineProperty(this, "getComponentValue", function (r) {
|
|
57
|
-
return r === null || r === void 0 ? void 0 : r[_this.id];
|
|
58
|
-
var id = _this.getParentId();
|
|
59
|
-
var list = ((r === null || r === void 0 ? void 0 : r[id]) || []).reduce(function (prv, next) {
|
|
60
|
-
next['money'] && prv.push(next['money']);
|
|
61
|
-
return prv;
|
|
62
|
-
}, []);
|
|
63
|
-
return list.join(',');
|
|
64
|
-
});
|
|
65
|
-
_defineProperty(this, "renderExport", function (value, record) {
|
|
66
|
-
var _this$getComponentVal2;
|
|
67
|
-
return (_this$getComponentVal2 = _this.getComponentValue(record)) !== null && _this$getComponentVal2 !== void 0 ? _this$getComponentVal2 : '--';
|
|
68
|
-
});
|
|
69
|
-
_defineProperty(this, "editRender", function () {
|
|
70
|
-
return null;
|
|
71
|
-
});
|
|
72
|
-
_defineProperty(this, "filterConfig", function () {
|
|
73
|
-
return [];
|
|
74
|
-
});
|
|
75
|
-
this.name = options.name;
|
|
76
|
-
this.id = options.id;
|
|
77
|
-
this.sortField = options.id;
|
|
78
|
-
this.formField = options.id;
|
|
79
|
-
this.type = options.type;
|
|
80
|
-
this.componentConfig = options.componentConfig;
|
|
81
|
-
this.align = 'left';
|
|
82
|
-
this.width = 200;
|
|
83
|
-
this.isCombinationComponent = false;
|
|
84
|
-
this.canSort = false;
|
|
85
|
-
this.dataType = 'string';
|
|
86
|
-
this.children = [];
|
|
87
|
-
});
|
|
88
|
-
export default BsChildMoney;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ALignType, Record } from "../../../type";
|
|
2
|
-
import React from "react";
|
|
3
|
-
declare class BsChildName implements ComponentInterface {
|
|
4
|
-
name: string;
|
|
5
|
-
id: string;
|
|
6
|
-
sortField: string;
|
|
7
|
-
type: string;
|
|
8
|
-
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
-
align: ALignType;
|
|
10
|
-
width: number;
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
formField: string;
|
|
13
|
-
canSort: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
|
-
dataType: ComponentInterface["dataType"];
|
|
16
|
-
constructor(options: PickOption);
|
|
17
|
-
getParentId: () => string;
|
|
18
|
-
renderClient: (record: any) => React.JSX.Element | null;
|
|
19
|
-
renderPc: (value: unknown, record: Record) => React.JSX.Element;
|
|
20
|
-
renderLog: (r: Record) => React.JSX.Element | null;
|
|
21
|
-
getComponentValue: (r: Record) => any;
|
|
22
|
-
renderExport: (value: string, record: Record) => any;
|
|
23
|
-
editRender: () => null;
|
|
24
|
-
filterConfig: () => never[];
|
|
25
|
-
}
|
|
26
|
-
export default BsChildName;
|