@kmkf-fe-packages/services-components 0.7.14-alpha.0 → 0.7.14-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/commonComponents/OperationLog/index.js +3 -1
- package/dist/esm/components/Common/index.d.ts +5 -5
- package/dist/esm/components/CommonDataTime/index.d.ts +4 -4
- package/dist/esm/components/CommonDataTime/index.js +13 -13
- package/dist/esm/components/DataTime/ApaasDate.d.ts +2 -2
- package/dist/esm/components/EItemEnCode/ItemEncode.d.ts +2 -2
- package/dist/esm/components/EItemId/ItemId.d.ts +2 -2
- package/dist/esm/components/EItemSelect/ItemSelect.d.ts +2 -2
- package/dist/esm/components/ExpressCompany/index.d.ts +2 -2
- package/dist/esm/components/FlowStatusSelect/index.js +5 -8
- package/dist/esm/components/GetFormItem/index.d.ts +1 -1
- package/dist/esm/components/GetFormItem/index.js +4 -2
- package/dist/esm/components/Popover/index.d.ts +2 -2
- package/dist/esm/components/ThirdItemSelect/ItemEncode.d.ts +2 -2
- package/package.json +4 -4
|
@@ -18,6 +18,8 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
18
18
|
componentDtoList = _ref.componentDtoList;
|
|
19
19
|
if (!content) return null;
|
|
20
20
|
try {
|
|
21
|
+
//todo过滤一些固定字段 展示不确定
|
|
22
|
+
var filterList = ["COMPLETED_DATETIME", "COMPLETED_USER_INPUT"];
|
|
21
23
|
if (/^TRANSFER/.test(operation)) {
|
|
22
24
|
if (/^\[.*?\]-->>\[.*?\]$/.test(content)) {
|
|
23
25
|
var _content$split = content.split("-->>"),
|
|
@@ -71,7 +73,7 @@ var OperationLog = function OperationLog(_ref) {
|
|
|
71
73
|
}, {});
|
|
72
74
|
var currentNeedContentId = Object.keys(currentContent);
|
|
73
75
|
var newTemplateColumns = componentDtoList === null || componentDtoList === void 0 ? void 0 : componentDtoList.filter(function (item) {
|
|
74
|
-
return currentNeedContentId.findIndex(function (id) {
|
|
76
|
+
return !filterList.includes(item.workOrderComponentType) && currentNeedContentId.findIndex(function (id) {
|
|
75
77
|
return id === null || id === void 0 ? void 0 : id.startsWith(item === null || item === void 0 ? void 0 : item.uniqueKey);
|
|
76
78
|
}) > -1;
|
|
77
79
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
declare type getFormItemProps = {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -6,13 +6,13 @@ declare type getFormItemProps = {
|
|
|
6
6
|
required: boolean;
|
|
7
7
|
component: JSX.Element | string | null;
|
|
8
8
|
};
|
|
9
|
-
export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) =>
|
|
9
|
+
export declare const getFormItem: ({ name, title, rules, required, component }: getFormItemProps) => JSX.Element;
|
|
10
10
|
export declare const showImage: ({ item, type, index }: {
|
|
11
11
|
item: any;
|
|
12
12
|
type: string;
|
|
13
13
|
index: number;
|
|
14
|
-
}) =>
|
|
15
|
-
export declare const ShowTotalImage: ({ total, allImage, type }: any) =>
|
|
16
|
-
export declare const GoodImage: ({ list, type }: any) =>
|
|
14
|
+
}) => JSX.Element;
|
|
15
|
+
export declare const ShowTotalImage: ({ total, allImage, type }: any) => JSX.Element;
|
|
16
|
+
export declare const GoodImage: ({ list, type }: any) => JSX.Element | null;
|
|
17
17
|
export declare const JstGoodImage: ({ list, type }: any) => any;
|
|
18
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentInterface, PickOption, ColumnConfig, Record } from
|
|
2
|
-
import React from
|
|
1
|
+
import { ComponentInterface, PickOption, ColumnConfig, Record } from "../../type";
|
|
2
|
+
import React from "react";
|
|
3
3
|
/**
|
|
4
4
|
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
5
5
|
*/
|
|
@@ -14,8 +14,8 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
14
14
|
formField: string;
|
|
15
15
|
canSort: boolean;
|
|
16
16
|
children: ComponentInterface[];
|
|
17
|
-
dataType: ComponentInterface[
|
|
18
|
-
format: ComponentInterface[
|
|
17
|
+
dataType: ComponentInterface["dataType"];
|
|
18
|
+
format: ComponentInterface["format"];
|
|
19
19
|
constructor(options: PickOption);
|
|
20
20
|
getValue: (value: string) => string;
|
|
21
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
@@ -5,10 +5,10 @@ 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 moment from
|
|
8
|
+
import React from "react";
|
|
9
|
+
import moment from "moment";
|
|
10
10
|
import ItemView from "../../commonComponents/ItemView";
|
|
11
|
-
import { isNull, filterFn as _filterFn } from
|
|
11
|
+
import { isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
12
12
|
import { SYMBOL } from "../../constant";
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -30,18 +30,18 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "format", void 0);
|
|
32
32
|
_defineProperty(this, "getValue", function (value) {
|
|
33
|
-
return moment(value).format(
|
|
33
|
+
return moment(value).format("YYYY-MM-DD HH:mm:ss");
|
|
34
34
|
});
|
|
35
35
|
_defineProperty(this, "renderClient", function (record) {
|
|
36
36
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
37
37
|
id: _this.id,
|
|
38
38
|
label: _this.name,
|
|
39
|
-
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) ||
|
|
39
|
+
value: _this.getValue(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
40
40
|
}) : null;
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
43
43
|
var _record;
|
|
44
|
-
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record :
|
|
44
|
+
return (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) !== null && _record !== void 0 ? _record : "--";
|
|
45
45
|
// if (record?.[`${this.id}`] === undefined) {
|
|
46
46
|
// return <span>--</span>;
|
|
47
47
|
// }
|
|
@@ -60,9 +60,9 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
60
60
|
});
|
|
61
61
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
62
62
|
if ((record === null || record === void 0 ? void 0 : record["".concat(_this.id)]) === undefined) {
|
|
63
|
-
return
|
|
63
|
+
return "--";
|
|
64
64
|
}
|
|
65
|
-
return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format(
|
|
65
|
+
return moment(record === null || record === void 0 ? void 0 : record["".concat(_this.id)]).format("YYYY-MM-DD HH:mm:ss");
|
|
66
66
|
});
|
|
67
67
|
_defineProperty(this, "editRender", function () {
|
|
68
68
|
return null;
|
|
@@ -75,17 +75,17 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
75
75
|
// 过滤组件id
|
|
76
76
|
name: item.name,
|
|
77
77
|
// 过滤组件名称
|
|
78
|
-
filterComponentType:
|
|
78
|
+
filterComponentType: "Date",
|
|
79
79
|
filterFn: function filterFn(value) {
|
|
80
80
|
return function (i) {
|
|
81
|
-
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id,
|
|
81
|
+
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, "");
|
|
82
82
|
return _filterFn.filterDateFn(value, recordDateTime);
|
|
83
83
|
};
|
|
84
84
|
},
|
|
85
85
|
formatFilterValue: function formatFilterValue(val) {
|
|
86
86
|
if ((val === null || val === void 0 ? void 0 : val.length) > 0) {
|
|
87
87
|
return val === null || val === void 0 ? void 0 : val.map(function (v) {
|
|
88
|
-
return moment(v).startOf(
|
|
88
|
+
return moment(v).startOf("second").valueOf();
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -101,7 +101,7 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
101
101
|
this.isCombinationComponent = false;
|
|
102
102
|
this.canSort = true;
|
|
103
103
|
this.children = [];
|
|
104
|
-
this.dataType =
|
|
105
|
-
this.format =
|
|
104
|
+
this.dataType = "string";
|
|
105
|
+
this.format = "dateTime";
|
|
106
106
|
});
|
|
107
107
|
export default CommonDataTime;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
declare const DateType: ['DATE', 'DATE_TIME', 'DATE_RANGE', 'DATE_TIME_RANGE'];
|
|
3
3
|
export declare type ButtonType = typeof DateType[number];
|
|
4
4
|
export interface ApaasDate {
|
|
5
5
|
dateType?: ButtonType;
|
|
6
6
|
[propName: string]: any;
|
|
7
7
|
}
|
|
8
|
-
declare const Date: (props: ApaasDate) =>
|
|
8
|
+
declare const Date: (props: ApaasDate) => JSX.Element;
|
|
9
9
|
export default Date;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ItemEncode: (props: JSX.IntrinsicAttributes & any) =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ItemEncode: (props: JSX.IntrinsicAttributes & any) => JSX.Element;
|
|
3
3
|
export default ItemEncode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
|
|
3
|
-
declare const ItemId: (props: JSX.IntrinsicAttributes & GoodsProps) =>
|
|
3
|
+
declare const ItemId: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
|
|
4
4
|
export default ItemId;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
|
|
3
|
-
declare const ItemSelect: (props: JSX.IntrinsicAttributes & GoodsProps) =>
|
|
3
|
+
declare const ItemSelect: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
|
|
4
4
|
export default ItemSelect;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const ExpressCompany: (props: any) =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const ExpressCompany: (props: any) => JSX.Element;
|
|
3
3
|
export default ExpressCompany;
|
|
@@ -7,7 +7,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
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); }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { Menu } from 'antd';
|
|
10
|
+
import { Dropdown, Menu } from 'antd';
|
|
11
11
|
import { ApaasSelect } from '@kmkf-fe-packages/basic-components';
|
|
12
12
|
import { filterFn as _filterFn } from '@kmkf-fe-packages/kmkf-utils';
|
|
13
13
|
import GetFormItem from "../GetFormItem";
|
|
@@ -51,16 +51,13 @@ var WorkOrderId = /*#__PURE__*/_createClass(function WorkOrderId(options) {
|
|
|
51
51
|
});
|
|
52
52
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
53
53
|
var status = get(_this.workOrderStatus, record === null || record === void 0 ? void 0 : record["".concat(_this.id)]);
|
|
54
|
-
return status ?
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
React.createElement("span", {
|
|
54
|
+
return status ? /*#__PURE__*/React.createElement(Dropdown, {
|
|
55
|
+
overlay: _this.renderMenu(record)
|
|
56
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
58
57
|
style: {
|
|
59
58
|
color: status.color
|
|
60
59
|
}
|
|
61
|
-
}, status === null || status === void 0 ? void 0 : status.label)
|
|
62
|
-
// </Dropdown>
|
|
63
|
-
: /*#__PURE__*/React.createElement("span", null, "--");
|
|
60
|
+
}, status === null || status === void 0 ? void 0 : status.label)) : /*#__PURE__*/React.createElement("span", null, "--");
|
|
64
61
|
});
|
|
65
62
|
_defineProperty(this, "renderLog", function (r) {
|
|
66
63
|
var status = get(_this.workOrderStatus, r === null || r === void 0 ? void 0 : r["".concat(_this.id)]);
|
|
@@ -7,5 +7,5 @@ declare type GetFormItemProps = {
|
|
|
7
7
|
component: JSX.Element | null;
|
|
8
8
|
hidden?: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare const GetFormItem: ({ rules, required, title, component, name, hidden }: GetFormItemProps) => React.JSX.Element;
|
|
10
|
+
declare const GetFormItem: ({ rules, required, title, component, name, hidden }: GetFormItemProps) => React.JSX.Element | null;
|
|
11
11
|
export default GetFormItem;
|
|
@@ -15,6 +15,8 @@ var GetFormItem = function GetFormItem(_ref) {
|
|
|
15
15
|
message: "\u8BF7\u8F93\u5165".concat(title)
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
+
// 当隐藏时, 不在拥有该组件
|
|
19
|
+
if (hidden) return null;
|
|
18
20
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
21
|
className: "form-item--wrap",
|
|
20
22
|
style: {
|
|
@@ -24,8 +26,8 @@ var GetFormItem = function GetFormItem(_ref) {
|
|
|
24
26
|
name: name,
|
|
25
27
|
label: title,
|
|
26
28
|
rules: newRules,
|
|
27
|
-
className: "form-item-label--index"
|
|
28
|
-
|
|
29
|
+
className: "form-item-label--index"
|
|
30
|
+
// hidden={hidden}
|
|
29
31
|
}, component));
|
|
30
32
|
};
|
|
31
33
|
export default GetFormItem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare const Popover: ({ Overlay, ShowComponent }: any) =>
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Popover: ({ Overlay, ShowComponent }: any) => JSX.Element;
|
|
3
3
|
export default Popover;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { GoodsProps } from '@kmkf-fe-packages/basic-components/dist/common/Goods';
|
|
3
|
-
declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) =>
|
|
3
|
+
declare const ItemEncode: (props: JSX.IntrinsicAttributes & GoodsProps) => JSX.Element;
|
|
4
4
|
export default ItemEncode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.7.14-alpha.
|
|
3
|
+
"version": "0.7.14-alpha.13",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"father": "^4.1.7"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@kmkf-fe-packages/basic-components": "^0.7.14-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.7.14-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.7.14-alpha.13",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.7.14-alpha.9"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@ant-design/icons": "^4.7.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"gitHooks": {
|
|
41
41
|
"pre-commit": "lint-staged"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9be3679577165c64c1de730d9aa5cc7e660f11f8"
|
|
44
44
|
}
|