@kmkf-fe-packages/services-components 0.6.3-alpha.13 → 0.6.3-alpha.14
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/CommonDataTime/index.d.ts +6 -1
- package/dist/esm/components/CommonDataTime/index.js +14 -2
- package/dist/esm/components/FlowStatusSelect/index.d.ts +10 -1
- package/dist/esm/components/FlowStatusSelect/index.js +20 -1
- package/dist/esm/components/TemplateSelect/index.d.ts +7 -1
- package/dist/esm/components/TemplateSelect/index.js +15 -2
- package/dist/esm/components/WorkOrderId/index.d.ts +6 -1
- package/dist/esm/components/WorkOrderId/index.js +13 -2
- package/package.json +2 -2
|
@@ -20,6 +20,11 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
20
20
|
getComponentValue: (r: Record) => any;
|
|
21
21
|
renderExport: (value: any, record: Record) => string;
|
|
22
22
|
editRender: () => null;
|
|
23
|
-
filterConfig: (item: ColumnConfig) =>
|
|
23
|
+
filterConfig: (item: ColumnConfig) => {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
filterComponentType: "Date";
|
|
27
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
28
|
+
};
|
|
24
29
|
}
|
|
25
30
|
export default CommonDataTime;
|
|
@@ -8,7 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import moment from 'moment';
|
|
10
10
|
import ItemView from "../../commonComponents/ItemView";
|
|
11
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import { isNull, filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
@@ -60,7 +60,19 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
60
60
|
return null;
|
|
61
61
|
});
|
|
62
62
|
_defineProperty(this, "filterConfig", function (item) {
|
|
63
|
-
return
|
|
63
|
+
return {
|
|
64
|
+
id: item.id,
|
|
65
|
+
// 过滤组件id
|
|
66
|
+
name: item.name,
|
|
67
|
+
// 过滤组件名称
|
|
68
|
+
filterComponentType: 'Date',
|
|
69
|
+
filterFn: function filterFn(value) {
|
|
70
|
+
return function (i) {
|
|
71
|
+
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
|
|
72
|
+
return _filterFn.filterDateFn(value, recordDateTime);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
};
|
|
64
76
|
});
|
|
65
77
|
this.name = options.name;
|
|
66
78
|
this.id = options.id;
|
|
@@ -19,6 +19,15 @@ declare class WorkOrderId implements ComponentInterface {
|
|
|
19
19
|
render: () => null;
|
|
20
20
|
renderClient: () => null;
|
|
21
21
|
editRender: () => JSX.Element;
|
|
22
|
-
filterConfig: (item: ColumnConfig) =>
|
|
22
|
+
filterConfig: (item: ColumnConfig) => {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
filterComponentType: "MultipleSelect";
|
|
26
|
+
options: {
|
|
27
|
+
label: any;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
31
|
+
};
|
|
23
32
|
}
|
|
24
33
|
export default WorkOrderId;
|
|
@@ -9,6 +9,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { Dropdown, Menu } from 'antd';
|
|
11
11
|
import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
12
|
+
import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
13
|
import GetFormItem from "../GetFormItem";
|
|
13
14
|
import get from 'lodash/get';
|
|
14
15
|
var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
@@ -84,7 +85,25 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
84
85
|
});
|
|
85
86
|
});
|
|
86
87
|
_defineProperty(this, "filterConfig", function (item) {
|
|
87
|
-
|
|
88
|
+
var _Object$keys;
|
|
89
|
+
return {
|
|
90
|
+
id: item.id,
|
|
91
|
+
// 过滤组件id
|
|
92
|
+
name: item.name,
|
|
93
|
+
// 过滤组件名称
|
|
94
|
+
filterComponentType: 'MultipleSelect',
|
|
95
|
+
options: (_Object$keys = Object.keys(_this.workOrderStatus)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (item) {
|
|
96
|
+
return {
|
|
97
|
+
label: _this.workOrderStatus[item].label,
|
|
98
|
+
value: item
|
|
99
|
+
};
|
|
100
|
+
}),
|
|
101
|
+
filterFn: function filterFn(value) {
|
|
102
|
+
return function (i) {
|
|
103
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
};
|
|
88
107
|
});
|
|
89
108
|
this.name = options.name;
|
|
90
109
|
this.id = options.id;
|
|
@@ -17,6 +17,12 @@ declare class TemplateSelect implements ComponentInterface {
|
|
|
17
17
|
render: () => null;
|
|
18
18
|
renderClient: () => null;
|
|
19
19
|
editRender: (value: any) => null;
|
|
20
|
-
filterConfig: (item: ColumnConfig) =>
|
|
20
|
+
filterConfig: (item: ColumnConfig) => {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
filterComponentType: "MultipleSelect";
|
|
24
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
25
|
+
options: any[] | undefined;
|
|
26
|
+
};
|
|
21
27
|
}
|
|
22
28
|
export default TemplateSelect;
|
|
@@ -8,7 +8,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import find from 'lodash/find';
|
|
10
10
|
import get from 'lodash/get';
|
|
11
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
11
|
+
import { filterFn as _filterFn, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
12
|
var TemplateSelect = /*#__PURE__*/_createClass(function TemplateSelect(options) {
|
|
13
13
|
var _this = this;
|
|
14
14
|
_classCallCheck(this, TemplateSelect);
|
|
@@ -59,7 +59,20 @@ var TemplateSelect = /*#__PURE__*/_createClass(function TemplateSelect(options)
|
|
|
59
59
|
return null;
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "filterConfig", function (item) {
|
|
62
|
-
|
|
62
|
+
var _this$effects3;
|
|
63
|
+
return {
|
|
64
|
+
id: item.id,
|
|
65
|
+
// 过滤组件id
|
|
66
|
+
name: item.name,
|
|
67
|
+
// 过滤组件名称
|
|
68
|
+
filterComponentType: 'MultipleSelect',
|
|
69
|
+
filterFn: function filterFn(value) {
|
|
70
|
+
return function (i) {
|
|
71
|
+
return value === null || value === void 0 ? void 0 : value.includes(_filterFn.filterTableListItemColumnValue(i, item.id, ''));
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
options: (_this$effects3 = _this.effects) === null || _this$effects3 === void 0 ? void 0 : _this$effects3.templateList
|
|
75
|
+
};
|
|
63
76
|
});
|
|
64
77
|
this.name = options.name;
|
|
65
78
|
this.id = options.id;
|
|
@@ -18,6 +18,11 @@ declare class WorkOrderId implements ComponentInterface {
|
|
|
18
18
|
render: () => null;
|
|
19
19
|
renderClient: () => null;
|
|
20
20
|
editRender: () => JSX.Element;
|
|
21
|
-
filterConfig: (item: ColumnConfig) =>
|
|
21
|
+
filterConfig: (item: ColumnConfig) => {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
filterComponentType: "Input";
|
|
25
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
26
|
+
};
|
|
22
27
|
}
|
|
23
28
|
export default WorkOrderId;
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import { message } from 'antd';
|
|
11
11
|
import { CopyOutlined } from '@ant-design/icons';
|
|
12
12
|
import { ApaasInput } from '@kmkf-fe-packages/basic-components';
|
|
13
|
-
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
|
+
import { filterFn as _filterFn, isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
14
|
import GetFormItem from "../GetFormItem";
|
|
15
15
|
import repeatPng from "./img/repeat.png";
|
|
16
16
|
import copy from 'copy-to-clipboard';
|
|
@@ -85,7 +85,18 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
_defineProperty(this, "filterConfig", function (item) {
|
|
88
|
-
return
|
|
88
|
+
return {
|
|
89
|
+
id: item.id,
|
|
90
|
+
// 过滤组件id
|
|
91
|
+
name: item.name,
|
|
92
|
+
// 过滤组件名称
|
|
93
|
+
filterComponentType: 'Input',
|
|
94
|
+
filterFn: function filterFn(value) {
|
|
95
|
+
return function (i) {
|
|
96
|
+
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, '')).includes(value);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
};
|
|
89
100
|
});
|
|
90
101
|
this.name = options.name;
|
|
91
102
|
this.id = options.id;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.6.3-alpha.
|
|
3
|
+
"version": "0.6.3-alpha.14",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"gitHooks": {
|
|
36
36
|
"pre-commit": "lint-staged"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "fea796cf97c6a19e9c1206e52d521471e21b2eec"
|
|
39
39
|
}
|