@kmkf-fe-packages/services-components 1.6.0-beta.6 → 1.6.0-beta.8
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/Handler/index.d.ts +7 -7
- package/dist/esm/components/Handler/index.js +16 -14
- package/dist/esm/components/SubForm/index.d.ts +1 -0
- package/dist/esm/components/SubForm/index.js +30 -15
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +21 -24
- package/package.json +3 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ComponentInterface, ColumnConfig, Record, PickOption } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentInterface, ColumnConfig, Record, PickOption } from "../../type";
|
|
3
3
|
declare class Handler implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
sortField: string;
|
|
7
7
|
type: string;
|
|
8
|
-
componentConfig: ComponentInterface[
|
|
9
|
-
effects: ComponentInterface[
|
|
8
|
+
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
+
effects: ComponentInterface["effects"];
|
|
10
10
|
isCombinationComponent: boolean;
|
|
11
11
|
formField: string;
|
|
12
12
|
canSort: boolean;
|
|
13
13
|
children: ComponentInterface[];
|
|
14
|
-
dataType: ComponentInterface[
|
|
15
|
-
options: ComponentInterface[
|
|
14
|
+
dataType: ComponentInterface["dataType"];
|
|
15
|
+
options: ComponentInterface["options"];
|
|
16
16
|
constructor(options: PickOption);
|
|
17
17
|
newOptions: () => {
|
|
18
18
|
label: string;
|
|
@@ -39,7 +39,7 @@ declare class Handler implements ComponentInterface {
|
|
|
39
39
|
}[];
|
|
40
40
|
};
|
|
41
41
|
filterFn: (value: string) => (i: Record) => boolean;
|
|
42
|
-
formatFilterValue: (value: any) =>
|
|
42
|
+
formatFilterValue: (value: any) => unknown[];
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
export default Handler;
|
|
@@ -17,10 +17,11 @@ 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
|
|
21
|
-
import intersection from
|
|
22
|
-
import { filterFn as _filterFn } from
|
|
20
|
+
import React from "react";
|
|
21
|
+
import intersection from "lodash/intersection";
|
|
22
|
+
import { filterFn as _filterFn } from "@kmkf-fe-packages/kmkf-utils";
|
|
23
23
|
import { SYMBOL } from "../../constant";
|
|
24
|
+
import { uniq } from "lodash";
|
|
24
25
|
var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
25
26
|
var _this = this,
|
|
26
27
|
_this$effects4;
|
|
@@ -51,7 +52,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
51
52
|
var value = record === null || record === void 0 ? void 0 : record[_this.id];
|
|
52
53
|
return /*#__PURE__*/React.createElement("span", null, (_value$map$join = value === null || value === void 0 ? void 0 : (_value$map = value.map(function (item) {
|
|
53
54
|
return item.account;
|
|
54
|
-
})) === null || _value$map === void 0 ? void 0 : _value$map.join(
|
|
55
|
+
})) === null || _value$map === void 0 ? void 0 : _value$map.join("、")) !== null && _value$map$join !== void 0 ? _value$map$join : "--");
|
|
55
56
|
});
|
|
56
57
|
_defineProperty(this, "renderLog", function () {
|
|
57
58
|
return null;
|
|
@@ -64,7 +65,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
64
65
|
var values = record === null || record === void 0 ? void 0 : record[_this.id];
|
|
65
66
|
return (_values$map$join = values === null || values === void 0 ? void 0 : (_values$map = values.map(function (item) {
|
|
66
67
|
return item.account;
|
|
67
|
-
})) === null || _values$map === void 0 ? void 0 : _values$map.join(
|
|
68
|
+
})) === null || _values$map === void 0 ? void 0 : _values$map.join("、")) !== null && _values$map$join !== void 0 ? _values$map$join : "--";
|
|
68
69
|
});
|
|
69
70
|
_defineProperty(this, "renderClient", function () {
|
|
70
71
|
return null;
|
|
@@ -80,7 +81,7 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
80
81
|
// 过滤组件id
|
|
81
82
|
name: item.name,
|
|
82
83
|
// 过滤组件名称
|
|
83
|
-
filterComponentType:
|
|
84
|
+
filterComponentType: "MultipleSelect",
|
|
84
85
|
props: {
|
|
85
86
|
options: _this.newOptions() || []
|
|
86
87
|
},
|
|
@@ -93,8 +94,8 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
93
94
|
};
|
|
94
95
|
},
|
|
95
96
|
formatFilterValue: function formatFilterValue(value) {
|
|
96
|
-
|
|
97
|
-
var _next$split = next.split(
|
|
97
|
+
var useList = value.reduce(function (prv, next) {
|
|
98
|
+
var _next$split = next.split(":"),
|
|
98
99
|
_next$split2 = _slicedToArray(_next$split, 2),
|
|
99
100
|
val = _next$split2[0],
|
|
100
101
|
groupText = _next$split2[1];
|
|
@@ -111,19 +112,20 @@ var Handler = /*#__PURE__*/_createClass(function Handler(options) {
|
|
|
111
112
|
}
|
|
112
113
|
return prv;
|
|
113
114
|
}, []);
|
|
115
|
+
return uniq(useList);
|
|
114
116
|
}
|
|
115
117
|
};
|
|
116
118
|
});
|
|
117
|
-
this.name = (options === null || options === void 0 ? void 0 : options.name) ||
|
|
118
|
-
this.id = (options === null || options === void 0 ? void 0 : options.id) ||
|
|
119
|
-
this.sortField =
|
|
120
|
-
this.formField =
|
|
121
|
-
this.type =
|
|
119
|
+
this.name = (options === null || options === void 0 ? void 0 : options.name) || "处理人";
|
|
120
|
+
this.id = (options === null || options === void 0 ? void 0 : options.id) || "handlerList";
|
|
121
|
+
this.sortField = "handlerList";
|
|
122
|
+
this.formField = "handlerList";
|
|
123
|
+
this.type = "HANDLER_INPUT";
|
|
122
124
|
this.effects = options === null || options === void 0 ? void 0 : options.effects;
|
|
123
125
|
this.isCombinationComponent = false;
|
|
124
126
|
this.canSort = false;
|
|
125
127
|
this.children = [];
|
|
126
|
-
this.dataType =
|
|
128
|
+
this.dataType = "string";
|
|
127
129
|
this.options = ((_this$effects4 = this.effects) === null || _this$effects4 === void 0 ? void 0 : _this$effects4.userList) || [];
|
|
128
130
|
});
|
|
129
131
|
export default Handler;
|
|
@@ -15,6 +15,7 @@ declare class SubForm implements ComponentInterface {
|
|
|
15
15
|
templateId?: string;
|
|
16
16
|
workOrderUniqueKey?: string;
|
|
17
17
|
constructor(options: PickOption);
|
|
18
|
+
getNewTableHeader: () => any;
|
|
18
19
|
renderTabel: (list: any) => React.JSX.Element;
|
|
19
20
|
renderPc: () => null;
|
|
20
21
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
2
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
3
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
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); }
|
|
7
5
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
6
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
9
7
|
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; }
|
|
8
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
10
10
|
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); } }
|
|
11
11
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
12
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -29,9 +29,7 @@ var WidgetMap = {
|
|
|
29
29
|
};
|
|
30
30
|
var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
31
31
|
var _this = this,
|
|
32
|
-
_this$
|
|
33
|
-
_this$componentConfig11,
|
|
34
|
-
_this$componentConfig12;
|
|
32
|
+
_this$componentConfig9;
|
|
35
33
|
_classCallCheck(this, SubForm);
|
|
36
34
|
_defineProperty(this, "name", void 0);
|
|
37
35
|
_defineProperty(this, "id", void 0);
|
|
@@ -46,8 +44,25 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
46
44
|
_defineProperty(this, "dataType", void 0);
|
|
47
45
|
_defineProperty(this, "templateId", void 0);
|
|
48
46
|
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
47
|
+
_defineProperty(this, "getNewTableHeader", function () {
|
|
48
|
+
var _this$componentConfig, _this$componentConfig2, _this$componentConfig3;
|
|
49
|
+
return (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : (_this$componentConfig2 = _this$componentConfig.subConfig) === null || _this$componentConfig2 === void 0 ? void 0 : (_this$componentConfig3 = _this$componentConfig2.correlationList) === null || _this$componentConfig3 === void 0 ? void 0 : _this$componentConfig3.map(function (item) {
|
|
50
|
+
var _this$componentConfig4;
|
|
51
|
+
var t = ((_this$componentConfig4 = _this.componentConfig) === null || _this$componentConfig4 === void 0 ? void 0 : _this$componentConfig4.tableHeader.find(function (v) {
|
|
52
|
+
return v.key === item.key;
|
|
53
|
+
})) || {
|
|
54
|
+
isShow: true,
|
|
55
|
+
isEdit: false,
|
|
56
|
+
isRequired: false,
|
|
57
|
+
isNumber: false,
|
|
58
|
+
precision: "nolimit",
|
|
59
|
+
width: 150
|
|
60
|
+
};
|
|
61
|
+
return _objectSpread(_objectSpread({}, item), t);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
49
64
|
_defineProperty(this, "renderTabel", function (list) {
|
|
50
|
-
var _ref, _ref$filter
|
|
65
|
+
var _ref, _ref$filter;
|
|
51
66
|
var columns = [{
|
|
52
67
|
dataIndex: "",
|
|
53
68
|
title: "序号",
|
|
@@ -57,7 +72,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
57
72
|
render: function render(val, record, index) {
|
|
58
73
|
return /*#__PURE__*/React.createElement("span", null, index + 1);
|
|
59
74
|
}
|
|
60
|
-
}].concat(_toConsumableArray(((_ref =
|
|
75
|
+
}].concat(_toConsumableArray(((_ref = _this.getNewTableHeader() || []) === null || _ref === void 0 ? void 0 : (_ref$filter = _ref.filter(function (t) {
|
|
61
76
|
return t.isShow;
|
|
62
77
|
})) === null || _ref$filter === void 0 ? void 0 : _ref$filter.map(function (item) {
|
|
63
78
|
return {
|
|
@@ -65,7 +80,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
65
80
|
title: item.name,
|
|
66
81
|
align: "center",
|
|
67
82
|
ellipsis: true,
|
|
68
|
-
width:
|
|
83
|
+
width: item.width,
|
|
69
84
|
render: function render(val) {
|
|
70
85
|
return /*#__PURE__*/React.createElement("span", null, val);
|
|
71
86
|
}
|
|
@@ -106,15 +121,15 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
106
121
|
}) : null;
|
|
107
122
|
});
|
|
108
123
|
_defineProperty(this, "editRender", function (p) {
|
|
109
|
-
var _this$
|
|
124
|
+
var _this$componentConfig5, _this$componentConfig6, _this$componentConfig7, _this$componentConfig8;
|
|
110
125
|
return /*#__PURE__*/React.createElement(GetFormItem, {
|
|
111
126
|
title: _this.name,
|
|
112
127
|
name: _this.id,
|
|
113
128
|
rules: _this.rules,
|
|
114
129
|
hidden: p === null || p === void 0 ? void 0 : p.hidden,
|
|
115
130
|
display: p === null || p === void 0 ? void 0 : p.display,
|
|
116
|
-
required: (_this$
|
|
117
|
-
tooltip: (_this$
|
|
131
|
+
required: (_this$componentConfig5 = (_this$componentConfig6 = _this.componentConfig) === null || _this$componentConfig6 === void 0 ? void 0 : _this$componentConfig6.required) !== null && _this$componentConfig5 !== void 0 ? _this$componentConfig5 : false,
|
|
132
|
+
tooltip: (_this$componentConfig7 = (_this$componentConfig8 = _this.componentConfig) === null || _this$componentConfig8 === void 0 ? void 0 : _this$componentConfig8.tooltip) !== null && _this$componentConfig7 !== void 0 ? _this$componentConfig7 : "",
|
|
118
133
|
component: /*#__PURE__*/React.createElement(SubFormComponent, _this.componentConfig)
|
|
119
134
|
});
|
|
120
135
|
});
|
|
@@ -138,10 +153,10 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
138
153
|
this.componentConfig = options.componentConfig;
|
|
139
154
|
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
140
155
|
this.rules = [{
|
|
141
|
-
required: (_this$
|
|
156
|
+
required: (_this$componentConfig9 = this.componentConfig) === null || _this$componentConfig9 === void 0 ? void 0 : _this$componentConfig9.required,
|
|
142
157
|
validator: function validator(_, value) {
|
|
143
|
-
var _this$
|
|
144
|
-
var result = (_this$
|
|
158
|
+
var _this$componentConfig10, _this$componentConfig11;
|
|
159
|
+
var result = (_this$componentConfig10 = _this.componentConfig) === null || _this$componentConfig10 === void 0 ? void 0 : (_this$componentConfig11 = _this$componentConfig10.tableHeader) === null || _this$componentConfig11 === void 0 ? void 0 : _this$componentConfig11.reduce(function (prv, next) {
|
|
145
160
|
if (next.isRequired && next.isShow && !next.isEdit) {
|
|
146
161
|
prv[next.key] = "".concat(next.name, "\u4E0D\u80FD\u4E3A\u7A7A");
|
|
147
162
|
}
|
|
@@ -163,7 +178,7 @@ var SubForm = /*#__PURE__*/_createClass(function SubForm(options) {
|
|
|
163
178
|
}];
|
|
164
179
|
this.isCombinationComponent = true;
|
|
165
180
|
this.canSort = false;
|
|
166
|
-
this.children = (
|
|
181
|
+
this.children = (this.getNewTableHeader() || []).map(function (item) {
|
|
167
182
|
return new BsHeaderChild(_objectSpread(_objectSpread({}, options), {}, {
|
|
168
183
|
name: item.name,
|
|
169
184
|
id: "".concat(options.id, "_productList_").concat(item.key)
|
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, SubForm, 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, KmErpSendGood, AfterSalesOrderId } 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) => ActualPayment | BasicAddress | AfterSalesOrderId | AliPay | BsExchange | BsGoods | BsLogistics | BsPosting | BsReissue | BsReturn | BsSystemOrder | BuyerNick | Calculation | BasicCascader | BasicCheckbox | CommonInput | CommonMultiStatus | CommonSystemOrder | BasicDataTime | ItemEnCode | ItemId | ItemSelect | TradeId | BasicInput | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | SubForm | CommonDataTime | ShopName | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ERemark | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsMoreInterception | LogisticsTrajectory | LogisticsMoreTrajectory | PlatForm | ShopInput | Submitter | PrevSubmitter | FlowCreator | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | NodeInput | FlowWorkOrderStatus | MsgStatus | WdtGoods | WdtReissue | WdtReturn | WdtExchange | PaymentVoucherCode | Label | KmErpSendGood;
|
package/dist/esm/type.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type { FormInstance } from
|
|
3
|
-
import { SYMBOL } from
|
|
4
|
-
export declare type DataType =
|
|
5
|
-
export declare type ALignType =
|
|
2
|
+
import type { FormInstance } from "antd";
|
|
3
|
+
import { SYMBOL } from "./constant";
|
|
4
|
+
export declare type DataType = "string" | "number" | "array" | "dateArray" | "date" | "tradeId";
|
|
5
|
+
export declare type ALignType = "left" | "right" | "center";
|
|
6
6
|
export declare type QuerySymbol = keyof typeof SYMBOL;
|
|
7
7
|
export declare type Record = {
|
|
8
8
|
[props in string]: any;
|
|
@@ -27,7 +27,7 @@ export declare type FilterConfigType = {
|
|
|
27
27
|
filterFn?: (p: any) => (r: Record) => unknown;
|
|
28
28
|
formatFilterValue?: (p: any) => any;
|
|
29
29
|
};
|
|
30
|
-
export declare type FilterComponentType =
|
|
30
|
+
export declare type FilterComponentType = "MultipleSelect" | "Input" | "Date" | "Cascader" | "ShopList" | "Rate" | "SelectInput";
|
|
31
31
|
export interface ComponentInterface {
|
|
32
32
|
id: string;
|
|
33
33
|
sortField: string;
|
|
@@ -47,8 +47,8 @@ export interface ComponentInterface {
|
|
|
47
47
|
rules?: any[];
|
|
48
48
|
width?: number;
|
|
49
49
|
align?: ALignType;
|
|
50
|
-
dataType:
|
|
51
|
-
format?:
|
|
50
|
+
dataType: "string" | "number" | "boolean" | "array" | "range" | "object";
|
|
51
|
+
format?: "dateTime" | "date" | "time" | "cascader" | "shopInput" | "staffGroup";
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
54
|
flowTemplateKey?: string;
|
|
@@ -84,7 +84,7 @@ export interface ComponentInterface {
|
|
|
84
84
|
/**
|
|
85
85
|
* @description 显示字段名称
|
|
86
86
|
*/
|
|
87
|
-
showField?:
|
|
87
|
+
showField?: "EXPRESS_COMPANY" | "EXPRESS_WAYBILL_CODE" | "EXPRESS_SNAPSHOT" | "all" | "bs" | "workOrder" | "logisticsCompany" | "logisticsCode";
|
|
88
88
|
/**
|
|
89
89
|
* @description 是否选择SKU
|
|
90
90
|
*/
|
|
@@ -104,7 +104,7 @@ export interface ComponentInterface {
|
|
|
104
104
|
/**
|
|
105
105
|
* @description 备注状态
|
|
106
106
|
*/
|
|
107
|
-
associatedType?:
|
|
107
|
+
associatedType?: "APPEND";
|
|
108
108
|
isAssociated?: boolean;
|
|
109
109
|
isShowFlag?: boolean;
|
|
110
110
|
/**
|
|
@@ -145,7 +145,7 @@ export interface ComponentInterface {
|
|
|
145
145
|
* @description 时间初始值
|
|
146
146
|
*/
|
|
147
147
|
dateTime?: string;
|
|
148
|
-
dateType?:
|
|
148
|
+
dateType?: "DATE" | "DATE_TIME" | "DATE_RANGE" | "DATE_TIME_RANGE";
|
|
149
149
|
maxSize?: number;
|
|
150
150
|
basicGrade?: number;
|
|
151
151
|
range?: number;
|
|
@@ -173,18 +173,15 @@ export interface ComponentInterface {
|
|
|
173
173
|
rulesOptions?: Array<any>;
|
|
174
174
|
selectRules?: Array<string>;
|
|
175
175
|
logistics?: string;
|
|
176
|
-
repeatConfig?: {
|
|
177
|
-
repeatRange: string;
|
|
178
|
-
repeatComponents: any[];
|
|
179
|
-
};
|
|
180
176
|
subConfig?: {
|
|
181
|
-
|
|
182
|
-
flowStatus
|
|
183
|
-
flowTemplateKey
|
|
184
|
-
nodeId
|
|
185
|
-
workOrderTemplateId
|
|
177
|
+
correlationList?: any;
|
|
178
|
+
flowStatus?: string[];
|
|
179
|
+
flowTemplateKey?: any;
|
|
180
|
+
nodeId?: string;
|
|
181
|
+
workOrderTemplateId?: string;
|
|
186
182
|
};
|
|
187
|
-
|
|
183
|
+
needFilterShopByPermission?: boolean;
|
|
184
|
+
tableHeader?: any;
|
|
188
185
|
};
|
|
189
186
|
effects?: {
|
|
190
187
|
queryWorkOrderDetail?: (r: Record) => void;
|
|
@@ -258,13 +255,13 @@ export interface ComponentInterface {
|
|
|
258
255
|
getComponentValue: (r: Record) => any;
|
|
259
256
|
formDataTransform?: (r: any) => any;
|
|
260
257
|
}
|
|
261
|
-
export declare type PickOption = Pick<ComponentInterface,
|
|
258
|
+
export declare type PickOption = Pick<ComponentInterface, "name" | "id" | "type" | "componentConfig" | "effects" | "columnHeader" | "templateId" | "workOrderUniqueKey" | "platform" | "parentName" | "width" | "flowTemplateKey">;
|
|
262
259
|
export declare type ColumnConfig = {
|
|
263
260
|
id: string;
|
|
264
261
|
name: string;
|
|
265
262
|
type: string;
|
|
266
263
|
subKey?: string;
|
|
267
|
-
mode?:
|
|
268
|
-
config?: ComponentInterface[
|
|
269
|
-
templateConfig?: ComponentInterface[
|
|
264
|
+
mode?: "multiple";
|
|
265
|
+
config?: ComponentInterface["componentConfig"];
|
|
266
|
+
templateConfig?: ComponentInterface["componentConfig"];
|
|
270
267
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "1.6.0-beta.
|
|
3
|
+
"version": "1.6.0-beta.8",
|
|
4
4
|
"module": "dist/esm/index.js",
|
|
5
5
|
"typings": "dist/esm/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kmkf-fe-packages/basic-components": "1.6.0-beta.
|
|
24
|
+
"@kmkf-fe-packages/basic-components": "1.6.0-beta.8",
|
|
25
25
|
"@kmkf-fe-packages/kmkf-utils": "1.6.0-beta.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "aed67694931e1a241ff4b4a2a7ee719aad5e05d5",
|
|
42
42
|
"gitHooks": {
|
|
43
43
|
"pre-commit": "lint-staged"
|
|
44
44
|
}
|