@kmkf-fe-packages/services-components 0.13.0-alpha.17 → 0.13.0-alpha.19
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/Address/index.d.ts +1 -1
- package/dist/esm/components/Address/index.js +2 -2
- package/dist/esm/components/Cascader/index.d.ts +1 -1
- package/dist/esm/components/Cascader/index.js +2 -2
- package/dist/esm/components/Checkbox/index.d.ts +1 -1
- package/dist/esm/components/Checkbox/index.js +2 -2
- package/dist/esm/components/CommonDataTime/index.d.ts +1 -1
- package/dist/esm/components/CommonDataTime/index.js +2 -2
- package/dist/esm/components/DataTime/index.d.ts +1 -1
- package/dist/esm/components/DataTime/index.js +2 -2
- package/dist/esm/components/Input/index.d.ts +1 -0
- package/dist/esm/components/Input/index.js +3 -0
- package/dist/esm/factory.d.ts +1 -1
- package/dist/esm/type.d.ts +15 -14
- package/package.json +4 -4
|
@@ -21,7 +21,7 @@ declare class Address implements ComponentInterface {
|
|
|
21
21
|
* @param value
|
|
22
22
|
* @returns
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
getValues: (value: Value) => string | undefined;
|
|
25
25
|
transTextToNumber: (value?: string) => string | number | undefined;
|
|
26
26
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
27
27
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
@@ -29,7 +29,7 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
29
29
|
_defineProperty(this, "componentConfig", void 0);
|
|
30
30
|
_defineProperty(this, "addressDateInstance", void 0);
|
|
31
31
|
_defineProperty(this, "dataType", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
32
|
+
_defineProperty(this, "getValues", function (value) {
|
|
33
33
|
var _value$map;
|
|
34
34
|
return value === null || value === void 0 ? void 0 : (_value$map = value.map(function (suffix) {
|
|
35
35
|
return _this.addressDateInstance.getNameByCode(suffix);
|
|
@@ -42,7 +42,7 @@ var Address = /*#__PURE__*/_createClass(function Address(options) {
|
|
|
42
42
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
43
43
|
id: _this.id,
|
|
44
44
|
label: _this.name,
|
|
45
|
-
value: _this.
|
|
45
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
46
46
|
}) : null;
|
|
47
47
|
});
|
|
48
48
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -19,7 +19,7 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
19
19
|
* @param value
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
getValues: (value: any) => string;
|
|
23
23
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
24
24
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
25
25
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -29,7 +29,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "format", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
32
|
+
_defineProperty(this, "getValues", function (value) {
|
|
33
33
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
34
34
|
return (_findLabelBySelectVal = findLabelBySelectValue(value, (_this$componentConfig = _this.componentConfig) === null || _this$componentConfig === void 0 ? void 0 : _this$componentConfig.options)) === null || _findLabelBySelectVal === void 0 ? void 0 : (_findLabelBySelectVal2 = _findLabelBySelectVal.map(function (i) {
|
|
35
35
|
return i.label;
|
|
@@ -39,7 +39,7 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(_options) {
|
|
|
39
39
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
40
40
|
id: _this.id,
|
|
41
41
|
label: _this.name,
|
|
42
|
-
value: _this.
|
|
42
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id])
|
|
43
43
|
}) : null;
|
|
44
44
|
});
|
|
45
45
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -18,7 +18,7 @@ declare class BasicCheckbox implements ComponentInterface {
|
|
|
18
18
|
dataType: ComponentInterface['dataType'];
|
|
19
19
|
options: ComponentInterface['options'];
|
|
20
20
|
constructor(options: PickOption);
|
|
21
|
-
|
|
21
|
+
getValues: (value: Value) => string | null | undefined;
|
|
22
22
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
23
23
|
renderLog: (r: Record) => any;
|
|
24
24
|
getComponentValue: (r: Record) => {
|
|
@@ -29,7 +29,7 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "options", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
32
|
+
_defineProperty(this, "getValues", function (value) {
|
|
33
33
|
var _value$value, _value$value2, _value$value3;
|
|
34
34
|
if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && isNull(value === null || value === void 0 ? void 0 : value.other)) return null;
|
|
35
35
|
var findIndex = value === null || value === void 0 ? void 0 : (_value$value2 = value.value) === null || _value$value2 === void 0 ? void 0 : _value$value2.findIndex(function (item) {
|
|
@@ -76,7 +76,7 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
76
76
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
77
77
|
id: _this.id,
|
|
78
78
|
label: _this.name,
|
|
79
|
-
value: _this.
|
|
79
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
80
80
|
}) : null;
|
|
81
81
|
});
|
|
82
82
|
_defineProperty(this, "editRender", function (p) {
|
|
@@ -17,7 +17,7 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
17
17
|
dataType: ComponentInterface["dataType"];
|
|
18
18
|
format: ComponentInterface["format"];
|
|
19
19
|
constructor(options: PickOption);
|
|
20
|
-
|
|
20
|
+
getValues: (value: string) => string;
|
|
21
21
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
22
22
|
renderPc: (value: any, record: Record) => any;
|
|
23
23
|
renderLog: (r: Record) => any;
|
|
@@ -29,14 +29,14 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
29
29
|
_defineProperty(this, "children", void 0);
|
|
30
30
|
_defineProperty(this, "dataType", void 0);
|
|
31
31
|
_defineProperty(this, "format", void 0);
|
|
32
|
-
_defineProperty(this, "
|
|
32
|
+
_defineProperty(this, "getValues", function (value) {
|
|
33
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.
|
|
39
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ""
|
|
40
40
|
}) : null;
|
|
41
41
|
});
|
|
42
42
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -16,7 +16,7 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
16
16
|
dataType: ComponentInterface['dataType'];
|
|
17
17
|
format: ComponentInterface['format'];
|
|
18
18
|
constructor(options: PickOption);
|
|
19
|
-
|
|
19
|
+
getValues: (value: Value) => string | undefined;
|
|
20
20
|
renderClient: (record: any) => React.JSX.Element | null;
|
|
21
21
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
22
22
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -49,14 +49,14 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
|
49
49
|
_defineProperty(this, "children", void 0);
|
|
50
50
|
_defineProperty(this, "dataType", void 0);
|
|
51
51
|
_defineProperty(this, "format", void 0);
|
|
52
|
-
_defineProperty(this, "
|
|
52
|
+
_defineProperty(this, "getValues", function (value) {
|
|
53
53
|
return Array.isArray(value) ? value.join('~') : value;
|
|
54
54
|
});
|
|
55
55
|
_defineProperty(this, "renderClient", function (record) {
|
|
56
56
|
return !isNull(record === null || record === void 0 ? void 0 : record[_this.id]) ? /*#__PURE__*/React.createElement(ItemView, {
|
|
57
57
|
id: _this.id,
|
|
58
58
|
label: _this.name,
|
|
59
|
-
value: _this.
|
|
59
|
+
value: _this.getValues(record === null || record === void 0 ? void 0 : record[_this.id]) || ''
|
|
60
60
|
}) : null;
|
|
61
61
|
});
|
|
62
62
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
@@ -13,6 +13,7 @@ declare class BasicInput implements ComponentInterface {
|
|
|
13
13
|
children: ComponentInterface[];
|
|
14
14
|
dataType: ComponentInterface['dataType'];
|
|
15
15
|
templateId?: string;
|
|
16
|
+
workOrderUniqueKey?: string;
|
|
16
17
|
constructor(options: PickOption);
|
|
17
18
|
renderPc: (value: any, record: Record) => React.JSX.Element;
|
|
18
19
|
renderLog: (r: Record) => React.JSX.Element | null;
|
|
@@ -32,6 +32,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
32
32
|
_defineProperty(this, "children", void 0);
|
|
33
33
|
_defineProperty(this, "dataType", void 0);
|
|
34
34
|
_defineProperty(this, "templateId", void 0);
|
|
35
|
+
_defineProperty(this, "workOrderUniqueKey", void 0);
|
|
35
36
|
_defineProperty(this, "renderPc", function (value, record) {
|
|
36
37
|
var _record;
|
|
37
38
|
return /*#__PURE__*/React.createElement("span", null, (_record = record === null || record === void 0 ? void 0 : record["".concat(_this.id, "_input")]) !== null && _record !== void 0 ? _record : '--');
|
|
@@ -91,6 +92,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
91
92
|
this.type = options.type;
|
|
92
93
|
this.templateId = options.templateId;
|
|
93
94
|
this.componentConfig = options.componentConfig;
|
|
95
|
+
this.workOrderUniqueKey = options === null || options === void 0 ? void 0 : options.workOrderUniqueKey;
|
|
94
96
|
this.rules = [{
|
|
95
97
|
validator: function validator(_, value) {
|
|
96
98
|
var _this$componentConfig3, _this$componentConfig4, _this$componentConfig5, _this$componentConfig6, _this$componentConfig7;
|
|
@@ -154,6 +156,7 @@ var BasicInput = /*#__PURE__*/_createClass(function BasicInput(options) {
|
|
|
154
156
|
}
|
|
155
157
|
params = {
|
|
156
158
|
templateId: _this.templateId,
|
|
159
|
+
workOrderUniqueKey: _this.workOrderUniqueKey,
|
|
157
160
|
needCheckComponentList: [{
|
|
158
161
|
componentKey: _this.formField,
|
|
159
162
|
componentValue: String(value)
|
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, ErpTradeId, 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, LogisticsTrajectory, FlowWorkOrderId, BsGoods, BsExchange, BsReissue, BsReturn, BsSystemOrder, BsLogistics, StatusSelect, CommonTradeId, CommonSystemOrder, CommonMultiStatus, Calculation, NodeDeadLine, HandlerDeadLine, NodeStayDuration, WlnGoods, BsPosting } from "./index";
|
|
2
2
|
import { PickOption } from "./type";
|
|
3
|
-
export declare const factory: (type: string, options: PickOption) => BasicAddress | BsExchange |
|
|
3
|
+
export declare const factory: (type: string, options: PickOption) => BasicAddress | BsExchange | BsReissue | BsReturn | BsSystemOrder | BasicCascader | BasicCheckbox | CommonDataTime | BasicDataTime | FlowCreator | BasicInput | PrevSubmitter | Submitter | BasicSelect | BasicRadio | BasicTextArea | BasicPicture | BasicMultSelect | BasicGrade | BasicRate | BasicFile | BasicPosting | TradeId | ErpTradeId | ShopName | BuyerNick | ReceiverName | ReceiverMobile | ReceiverAddress | TradeDateTime | Logistics | ReturnLogistics | ActualPayment | ERemark | AliPay | ItemSelect | ItemId | ItemEnCode | SystemOrderNo | Ordinary | ThirdItemSelect | Payment | JstLogistics | JstItemSelect | JstSendGood | JstSupply | BsGoods | BsLogistics | FlowStatusSelect | FlowMarkSelect | FlowTag | TemplateSelect | WorkOrderId | LogisticsInterception | LogisticsTrajectory | PlatForm | ShopInput | Handler | CompletedUser | FlowWorkOrderId | StatusSelect | CommonTradeId | Calculation | CommonSystemOrder | CommonMultiStatus | NodeDeadLine | HandlerDeadLine | NodeStayDuration | WlnGoods | BsPosting;
|
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';
|
|
31
31
|
export interface ComponentInterface {
|
|
32
32
|
id: string;
|
|
33
33
|
sortField: string;
|
|
@@ -47,10 +47,11 @@ 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';
|
|
52
52
|
options?: Array<any>;
|
|
53
53
|
templateId?: string;
|
|
54
|
+
workOrderUniqueKey?: string;
|
|
54
55
|
/**
|
|
55
56
|
* @description 组件下标
|
|
56
57
|
* @deprecated 已弃用字段,后续版本不在使用
|
|
@@ -72,7 +73,7 @@ export interface ComponentInterface {
|
|
|
72
73
|
/**
|
|
73
74
|
* @description 显示字段名称
|
|
74
75
|
*/
|
|
75
|
-
showField?:
|
|
76
|
+
showField?: 'EXPRESS_COMPANY' | 'EXPRESS_WAYBILL_CODE' | 'EXPRESS_SNAPSHOT' | 'all' | 'bs' | 'workOrder';
|
|
76
77
|
/**
|
|
77
78
|
* @description 是否选择SKU
|
|
78
79
|
*/
|
|
@@ -92,7 +93,7 @@ export interface ComponentInterface {
|
|
|
92
93
|
/**
|
|
93
94
|
* @description 备注状态
|
|
94
95
|
*/
|
|
95
|
-
associatedType?:
|
|
96
|
+
associatedType?: 'APPEND';
|
|
96
97
|
isAssociated?: boolean;
|
|
97
98
|
isShowFlag?: boolean;
|
|
98
99
|
/**
|
|
@@ -133,7 +134,7 @@ export interface ComponentInterface {
|
|
|
133
134
|
* @description 时间初始值
|
|
134
135
|
*/
|
|
135
136
|
dateTime?: string;
|
|
136
|
-
dateType?:
|
|
137
|
+
dateType?: 'DATE' | 'DATE_TIME' | 'DATE_RANGE' | 'DATE_TIME_RANGE';
|
|
137
138
|
maxSize?: number;
|
|
138
139
|
basicGrade?: number;
|
|
139
140
|
range?: number;
|
|
@@ -228,13 +229,13 @@ export interface ComponentInterface {
|
|
|
228
229
|
getComponentValue: (r: Record) => any;
|
|
229
230
|
formDataTransform?: (r: any) => any;
|
|
230
231
|
}
|
|
231
|
-
export declare type PickOption = Pick<ComponentInterface,
|
|
232
|
+
export declare type PickOption = Pick<ComponentInterface, 'name' | 'id' | 'type' | 'componentConfig' | 'effects' | 'columnHeader' | 'templateId' | 'workOrderUniqueKey'>;
|
|
232
233
|
export declare type ColumnConfig = {
|
|
233
234
|
id: string;
|
|
234
235
|
name: string;
|
|
235
236
|
type: string;
|
|
236
237
|
subKey?: string;
|
|
237
|
-
mode?:
|
|
238
|
-
config?: ComponentInterface[
|
|
239
|
-
templateConfig?: ComponentInterface[
|
|
238
|
+
mode?: 'multiple';
|
|
239
|
+
config?: ComponentInterface['componentConfig'];
|
|
240
|
+
templateConfig?: ComponentInterface['componentConfig'];
|
|
240
241
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kmkf-fe-packages/services-components",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.19",
|
|
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.13.0-alpha.
|
|
30
|
-
"@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.
|
|
29
|
+
"@kmkf-fe-packages/basic-components": "^0.13.0-alpha.19",
|
|
30
|
+
"@kmkf-fe-packages/kmkf-utils": "^0.13.0-alpha.19"
|
|
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": "6916478fc4267a1c0e2318b3c3fbd26256e0f771"
|
|
44
44
|
}
|