@kmkf-fe-packages/services-components 1.3.0-rc.0 → 1.4.0-rc.0
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.
|
@@ -27,8 +27,18 @@ declare class Label implements ComponentInterface {
|
|
|
27
27
|
}>) => React.JSX.Element;
|
|
28
28
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
29
29
|
renderLog: (r: Record) => React.JSX.Element;
|
|
30
|
-
renderExport: (value: any, record: Record) =>
|
|
31
|
-
filterConfig: (item: ColumnConfig) =>
|
|
30
|
+
renderExport: (value: any, record: Record) => string;
|
|
31
|
+
filterConfig: (item: ColumnConfig) => {
|
|
32
|
+
searchDefaultConditions: "in";
|
|
33
|
+
type: string;
|
|
34
|
+
id: string;
|
|
35
|
+
name: string;
|
|
36
|
+
filterComponentType: "MultipleSelect";
|
|
37
|
+
props: {
|
|
38
|
+
options: any;
|
|
39
|
+
};
|
|
40
|
+
filterFn: (value: string) => (i: Record) => boolean;
|
|
41
|
+
};
|
|
32
42
|
formDataTransform: (v: Array<{
|
|
33
43
|
labelShowName: string;
|
|
34
44
|
}>) => string[];
|
|
@@ -8,9 +8,12 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
8
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { Tag, Select, Space } from 'antd';
|
|
11
|
-
import {
|
|
11
|
+
import { groupBy } from 'lodash';
|
|
12
|
+
import { LabelData, isNull, filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
13
|
+
import intersection from "lodash/intersection";
|
|
12
14
|
import GetFormItem from "../GetFormItem";
|
|
13
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
16
|
+
import { SYMBOL } from "../../constant";
|
|
14
17
|
var EditRenderItem = function EditRenderItem(props) {
|
|
15
18
|
var value = props.value;
|
|
16
19
|
var tagRender = function tagRender(prop) {
|
|
@@ -90,14 +93,17 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
90
93
|
}) : null;
|
|
91
94
|
});
|
|
92
95
|
_defineProperty(this, "showDetail", function (value) {
|
|
96
|
+
var _Object$keys;
|
|
93
97
|
return /*#__PURE__*/React.createElement(Space, {
|
|
94
98
|
style: {
|
|
95
99
|
flexWrap: 'wrap'
|
|
96
100
|
}
|
|
97
|
-
}, Array.isArray(value) ?
|
|
101
|
+
}, Array.isArray(value) ? (_Object$keys = Object.keys(groupBy(value, function (item) {
|
|
102
|
+
return item.labelShowName;
|
|
103
|
+
}))) === null || _Object$keys === void 0 ? void 0 : _Object$keys.map(function (labelShowName) {
|
|
98
104
|
var _this$labelDateInstan;
|
|
99
105
|
var label = ((_this$labelDateInstan = _this.labelDateInstance.labelData) === null || _this$labelDateInstan === void 0 ? void 0 : _this$labelDateInstan.find(function (item) {
|
|
100
|
-
return item.value ===
|
|
106
|
+
return item.value === labelShowName;
|
|
101
107
|
})) || {};
|
|
102
108
|
if (!isNull(label)) return /*#__PURE__*/React.createElement(Tag, {
|
|
103
109
|
color: label === null || label === void 0 ? void 0 : label.color
|
|
@@ -112,13 +118,29 @@ var Label = /*#__PURE__*/_createClass(function Label(options) {
|
|
|
112
118
|
return _this.renderPc(undefined, r);
|
|
113
119
|
});
|
|
114
120
|
_defineProperty(this, "renderExport", function (value, record) {
|
|
115
|
-
var
|
|
116
|
-
return record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 :
|
|
121
|
+
var _Array$from, _record;
|
|
122
|
+
return (_Array$from = Array.from(new Set(record === null || record === void 0 ? void 0 : (_record = record["".concat(_this.id, "_label")]) === null || _record === void 0 ? void 0 : _record.map(function (item) {
|
|
117
123
|
return item === null || item === void 0 ? void 0 : item.labelShowName;
|
|
118
|
-
})) === null ||
|
|
124
|
+
})))) === null || _Array$from === void 0 ? void 0 : _Array$from.join('、');
|
|
119
125
|
});
|
|
120
126
|
_defineProperty(this, "filterConfig", function (item) {
|
|
121
|
-
return
|
|
127
|
+
return {
|
|
128
|
+
searchDefaultConditions: SYMBOL.in,
|
|
129
|
+
type: item.type,
|
|
130
|
+
id: "".concat(item.id, "_label"),
|
|
131
|
+
// 过滤组件id
|
|
132
|
+
name: item.name,
|
|
133
|
+
// 过滤组件名称
|
|
134
|
+
filterComponentType: "MultipleSelect",
|
|
135
|
+
props: {
|
|
136
|
+
options: _this.labelDateInstance.labelData || []
|
|
137
|
+
},
|
|
138
|
+
filterFn: function filterFn(value) {
|
|
139
|
+
return function (i) {
|
|
140
|
+
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, "label")).length > 0;
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
};
|
|
122
144
|
});
|
|
123
145
|
_defineProperty(this, "formDataTransform", function (v) {
|
|
124
146
|
return v === null || v === void 0 ? void 0 : v.map(function (item) {
|
package/dist/esm/factory.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JstLogistics, JstItemSelect, JstSupply, JstSendGood, BasicInput, BasicAddress, BasicCascader, BasicCheckbox, BasicDataTime, BasicSelect, BasicRadio, BasicTextArea, BasicPicture, BasicMultSelect, BasicGrade, BasicRate, BasicFile, BasicPosting, CommonDataTime, TradeId, ShopName, BuyerNick, ReceiverName, ReceiverMobile, ReceiverAddress, TradeDateTime, Logistics, ReturnLogistics, ActualPayment, ERemark, AliPay, ItemSelect, ItemId, ItemEnCode, SystemOrderNo, Ordinary, ThirdItemSelect, FlowStatusSelect, FlowMarkSelect, FlowTag, Payment, TemplateSelect, WorkOrderId, PlatForm, ShopInput, Submitter, PrevSubmitter, FlowCreator, Handler, CompletedUser, LogisticsInterception, LogisticsMoreInterception, LogisticsTrajectory, LogisticsMoreTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting, MsgStatus, NodeInput, FlowWorkOrderStatus, WdtGoods, WdtReturn, WdtExchange, CommonInput, PaymentVoucherCode, Label, WdtReissue } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) =>
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => FlowMarkSelect | Label | MsgStatus | BasicInput | BasicAddress | BasicCascader | BasicCheckbox | BasicDataTime | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | CommonDataTime | TradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsSystemOrder | BsGoods | BsExchange | BsReissue | BsReturn | BsLogistics | FlowStatusSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting | NodeInput | FlowWorkOrderStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | CommonInput | PaymentVoucherCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0-rc.0",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kmkf-fe-packages/basic-components": "1.
|
|
24
|
-
"@kmkf-fe-packages/kmkf-utils": "1.
|
|
23
|
+
"@kmkf-fe-packages/basic-components": "1.4.0-rc.0",
|
|
24
|
+
"@kmkf-fe-packages/kmkf-utils": "1.4.0-rc.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^5.59.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "6ecec78fdd7fa5eb426bf0d8092953a3ecb94b1f",
|
|
41
41
|
"gitHooks": {
|
|
42
42
|
"pre-commit": "lint-staged"
|
|
43
43
|
}
|