@kmkf-fe-packages/services-components 0.6.3-alpha.4 → 0.6.3
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/ActualPayment/index.d.ts +11 -8
- package/dist/esm/components/ActualPayment/index.js +22 -19
- package/dist/esm/components/Address/index.d.ts +14 -6
- package/dist/esm/components/Address/index.js +22 -9
- package/dist/esm/components/Alipay/index.d.ts +18 -9
- package/dist/esm/components/Alipay/index.js +17 -6
- package/dist/esm/components/AlipayAccount/index.d.ts +13 -9
- package/dist/esm/components/AlipayAccount/index.js +24 -19
- package/dist/esm/components/AlipayName/index.d.ts +12 -8
- package/dist/esm/components/AlipayName/index.js +23 -18
- package/dist/esm/components/BuyerNick/index.d.ts +11 -8
- package/dist/esm/components/BuyerNick/index.js +25 -30
- package/dist/esm/components/Cascader/index.d.ts +23 -9
- package/dist/esm/components/Cascader/index.js +27 -29
- package/dist/esm/components/Checkbox/index.d.ts +10 -9
- package/dist/esm/components/Checkbox/index.js +21 -25
- package/dist/esm/components/CommonDataTime/index.d.ts +10 -8
- package/dist/esm/components/CommonDataTime/index.js +20 -19
- package/dist/esm/components/DataTime/index.d.ts +10 -9
- package/dist/esm/components/DataTime/index.js +23 -22
- package/dist/esm/components/EItemEnCode/index.d.ts +10 -8
- package/dist/esm/components/EItemEnCode/index.js +20 -22
- package/dist/esm/components/EItemId/index.d.ts +10 -8
- package/dist/esm/components/EItemId/index.js +20 -22
- package/dist/esm/components/EItemSelect/index.d.ts +11 -4
- package/dist/esm/components/EItemSelect/index.js +18 -6
- package/dist/esm/components/ErpTradeId/index.d.ts +11 -8
- package/dist/esm/components/ErpTradeId/index.js +21 -18
- package/dist/esm/components/Express/index.d.ts +13 -9
- package/dist/esm/components/Express/index.js +29 -18
- package/dist/esm/components/ExpressCode/index.d.ts +12 -8
- package/dist/esm/components/ExpressCode/index.js +22 -17
- package/dist/esm/components/FlowStatusSelect/index.d.ts +33 -13
- package/dist/esm/components/FlowStatusSelect/index.js +22 -27
- package/dist/esm/components/Grade/index.d.ts +11 -4
- package/dist/esm/components/Grade/index.js +19 -6
- package/dist/esm/components/Input/index.d.ts +11 -8
- package/dist/esm/components/Input/index.js +24 -20
- package/dist/esm/components/JstItemSelect/index.d.ts +11 -9
- package/dist/esm/components/JstItemSelect/index.js +20 -35
- package/dist/esm/components/JstLogistics/index.d.ts +11 -16
- package/dist/esm/components/JstLogistics/index.js +20 -31
- package/dist/esm/components/JstSendGood/index.d.ts +11 -9
- package/dist/esm/components/JstSendGood/index.js +20 -35
- package/dist/esm/components/JstSupply/index.d.ts +11 -9
- package/dist/esm/components/JstSupply/index.js +20 -35
- package/dist/esm/components/Logistics/index.d.ts +25 -15
- package/dist/esm/components/Logistics/index.js +17 -10
- package/dist/esm/components/MultSelect/index.d.ts +10 -9
- package/dist/esm/components/MultSelect/index.js +20 -21
- package/dist/esm/components/Ordinary/OrdinaryHeader.d.ts +21 -8
- package/dist/esm/components/Ordinary/OrdinaryHeader.js +26 -14
- package/dist/esm/components/Ordinary/OrdinaryMoney.d.ts +21 -8
- package/dist/esm/components/Ordinary/OrdinaryMoney.js +26 -14
- package/dist/esm/components/Ordinary/OrdinarySerial.d.ts +16 -8
- package/dist/esm/components/Ordinary/OrdinarySerial.js +16 -14
- package/dist/esm/components/Ordinary/index.d.ts +22 -9
- package/dist/esm/components/Ordinary/index.js +7 -8
- package/dist/esm/components/Payment/AlipayNick.d.ts +22 -9
- package/dist/esm/components/Payment/AlipayNick.js +28 -16
- package/dist/esm/components/Payment/AlipayNo.d.ts +20 -8
- package/dist/esm/components/Payment/AlipayNo.js +27 -16
- package/dist/esm/components/Payment/AlipayTime.d.ts +22 -8
- package/dist/esm/components/Payment/AlipayTime.js +27 -15
- package/dist/esm/components/Payment/BuyerNick.d.ts +21 -8
- package/dist/esm/components/Payment/BuyerNick.js +26 -14
- package/dist/esm/components/Payment/PaymentAmount.d.ts +21 -8
- package/dist/esm/components/Payment/PaymentAmount.js +26 -14
- package/dist/esm/components/Payment/PaymentStatus.d.ts +27 -13
- package/dist/esm/components/Payment/PaymentStatus.js +36 -37
- package/dist/esm/components/Payment/PaymentTid.d.ts +21 -8
- package/dist/esm/components/Payment/PaymentTid.js +26 -14
- package/dist/esm/components/Payment/index.d.ts +96 -23
- package/dist/esm/components/Payment/index.js +17 -8
- package/dist/esm/components/Picture/index.d.ts +10 -8
- package/dist/esm/components/Picture/index.js +18 -6
- package/dist/esm/components/Radio/index.d.ts +10 -9
- package/dist/esm/components/Radio/index.js +23 -30
- package/dist/esm/components/Rate/index.d.ts +11 -4
- package/dist/esm/components/Rate/index.js +22 -11
- package/dist/esm/components/ReceiverAddress/index.d.ts +12 -4
- package/dist/esm/components/ReceiverAddress/index.js +26 -9
- package/dist/esm/components/ReceiverMobile/index.d.ts +12 -9
- package/dist/esm/components/ReceiverMobile/index.js +23 -20
- package/dist/esm/components/ReceiverName/index.d.ts +11 -8
- package/dist/esm/components/ReceiverName/index.js +23 -20
- package/dist/esm/components/Remark/index.d.ts +11 -8
- package/dist/esm/components/Remark/index.js +21 -18
- package/dist/esm/components/ReturnLogistics/index.d.ts +20 -15
- package/dist/esm/components/ReturnLogistics/index.js +7 -10
- package/dist/esm/components/Select/index.d.ts +10 -9
- package/dist/esm/components/Select/index.js +20 -20
- package/dist/esm/components/ShopName/index.d.ts +11 -8
- package/dist/esm/components/ShopName/index.js +20 -18
- package/dist/esm/components/SystemOrderNo/index.d.ts +11 -8
- package/dist/esm/components/SystemOrderNo/index.js +21 -18
- package/dist/esm/components/TemplateSelect/index.d.ts +11 -9
- package/dist/esm/components/TemplateSelect/index.js +20 -20
- package/dist/esm/components/TextArea/index.d.ts +10 -8
- package/dist/esm/components/TextArea/index.js +20 -18
- package/dist/esm/components/ThirdItemSelect/index.d.ts +10 -8
- package/dist/esm/components/ThirdItemSelect/index.js +20 -24
- package/dist/esm/components/TradeDateTime/index.d.ts +5 -9
- package/dist/esm/components/TradeDateTime/index.js +10 -34
- package/dist/esm/components/TradeId/index.d.ts +5 -8
- package/dist/esm/components/TradeId/index.js +10 -18
- package/dist/esm/components/WorkOrderId/index.d.ts +11 -8
- package/dist/esm/components/WorkOrderId/index.js +22 -20
- package/dist/esm/index.d.ts +0 -9
- package/dist/esm/index.js +1 -10
- package/dist/esm/type.d.ts +36 -38
- package/package.json +4 -4
- package/dist/esm/commonComponents/PlatformAvatar/index.d.ts +0 -7
- package/dist/esm/commonComponents/PlatformAvatar/index.js +0 -28
- package/dist/esm/commonComponents/ShopList/index.d.ts +0 -13
- package/dist/esm/commonComponents/ShopList/index.js +0 -34
- package/dist/esm/components/CompletedUser/index.d.ts +0 -28
- package/dist/esm/components/CompletedUser/index.js +0 -60
- package/dist/esm/components/Handler/index.d.ts +0 -32
- package/dist/esm/components/Handler/index.js +0 -64
- package/dist/esm/components/LogisticsInterception/InterceptAddress.d.ts +0 -25
- package/dist/esm/components/LogisticsInterception/InterceptAddress.js +0 -89
- package/dist/esm/components/LogisticsInterception/InterceptType.d.ts +0 -24
- package/dist/esm/components/LogisticsInterception/InterceptType.js +0 -62
- package/dist/esm/components/LogisticsInterception/index.d.ts +0 -27
- package/dist/esm/components/LogisticsInterception/index.js +0 -90
- package/dist/esm/components/PlatForm/index.d.ts +0 -29
- package/dist/esm/components/PlatForm/index.js +0 -62
- package/dist/esm/components/ShopInput/index.d.ts +0 -26
- package/dist/esm/components/ShopInput/index.js +0 -71
- package/dist/esm/components/Submitter/index.d.ts +0 -28
- package/dist/esm/components/Submitter/index.js +0 -60
- package/dist/esm/factory.d.ts +0 -3
- package/dist/esm/factory.js +0 -105
|
@@ -1,4 +1,6 @@
|
|
|
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; }
|
|
2
4
|
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); }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -6,25 +8,27 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
6
8
|
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; }
|
|
7
9
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
10
|
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
|
-
import React from
|
|
10
|
-
import { BuyerNick } from
|
|
11
|
+
import React from "react";
|
|
12
|
+
import { BuyerNick } from "@kmkf-fe-packages/basic-components";
|
|
11
13
|
import GetFormItem from "../GetFormItem";
|
|
12
14
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
15
|
import PlatBuyer from "../../commonComponents/PlatBuyer";
|
|
14
|
-
import { isNull
|
|
16
|
+
import { isNull } from "@kmkf-fe-packages/kmkf-utils";
|
|
15
17
|
var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
16
18
|
var _this = this,
|
|
17
|
-
_this$componentConfig3
|
|
18
|
-
_this$componentConfig4;
|
|
19
|
+
_this$componentConfig3;
|
|
19
20
|
_classCallCheck(this, EBuyerNick);
|
|
20
21
|
_defineProperty(this, "name", void 0);
|
|
21
22
|
_defineProperty(this, "id", void 0);
|
|
22
23
|
_defineProperty(this, "type", void 0);
|
|
23
24
|
_defineProperty(this, "rules", void 0);
|
|
25
|
+
_defineProperty(this, "canFilter", void 0);
|
|
26
|
+
_defineProperty(this, "canGroup", void 0);
|
|
27
|
+
_defineProperty(this, "canHidden", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "showContains", void 0);
|
|
24
30
|
_defineProperty(this, "componentConfig", void 0);
|
|
25
31
|
_defineProperty(this, "effects", void 0);
|
|
26
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
27
|
-
_defineProperty(this, "children", void 0);
|
|
28
32
|
_defineProperty(this, "render", function (value) {
|
|
29
33
|
return /*#__PURE__*/React.createElement("span", null, value === null || value === void 0 ? void 0 : value.buyerNick);
|
|
30
34
|
});
|
|
@@ -67,35 +71,26 @@ var EBuyerNick = /*#__PURE__*/_createClass(function EBuyerNick(options) {
|
|
|
67
71
|
}))
|
|
68
72
|
});
|
|
69
73
|
});
|
|
70
|
-
_defineProperty(this, "
|
|
71
|
-
return {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
filterFn: function filterFn(value) {
|
|
78
|
-
return function (i) {
|
|
79
|
-
return "".concat(_filterFn.filterTableListItemColumnValue(i, item.id, 'buyerNick')).includes(value);
|
|
80
|
-
};
|
|
74
|
+
_defineProperty(this, "getColumns", function () {
|
|
75
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
76
|
+
dataIndex: _this.id,
|
|
77
|
+
title: _this.name,
|
|
78
|
+
renderExport: _this.renderExport,
|
|
79
|
+
customizeFilter: function customizeFilter(value) {
|
|
80
|
+
return value === null || value === void 0 ? void 0 : value.buyerNick;
|
|
81
81
|
}
|
|
82
|
-
};
|
|
82
|
+
});
|
|
83
83
|
});
|
|
84
84
|
this.name = options.name;
|
|
85
85
|
this.id = options.id;
|
|
86
86
|
this.type = options.type;
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
return Promise.reject(new Error('请输入买家昵称'));
|
|
93
|
-
}
|
|
94
|
-
return Promise.resolve();
|
|
95
|
-
}
|
|
96
|
-
}] : [];
|
|
87
|
+
this.canFilter = true;
|
|
88
|
+
this.canGroup = false;
|
|
89
|
+
this.canHidden = true;
|
|
90
|
+
this.dataType = "string";
|
|
91
|
+
this.showContains = false;
|
|
97
92
|
this.componentConfig = options.componentConfig;
|
|
98
|
-
this.rules = (_this$
|
|
93
|
+
this.rules = (_this$componentConfig3 = this.componentConfig) !== null && _this$componentConfig3 !== void 0 && _this$componentConfig3.required ? [{
|
|
99
94
|
validator: function validator(_, value) {
|
|
100
95
|
if (!(value !== null && value !== void 0 && value.buyerNick)) {
|
|
101
96
|
return Promise.reject(new Error("请输入买家昵称"));
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, ALignType, Record } from '../../type';
|
|
3
|
+
import { FormInstance } from 'antd';
|
|
3
4
|
declare class BasicCascader implements ComponentInterface {
|
|
4
5
|
name: string;
|
|
5
6
|
id: string;
|
|
6
7
|
type: string;
|
|
7
8
|
rules: any[];
|
|
9
|
+
canFilter: boolean;
|
|
10
|
+
canGroup: boolean;
|
|
11
|
+
canHidden: boolean;
|
|
12
|
+
dataType: DataType;
|
|
13
|
+
showContains: boolean;
|
|
8
14
|
componentConfig: ComponentInterface["componentConfig"];
|
|
9
|
-
isCombinationComponent: boolean;
|
|
10
|
-
children: ComponentInterface[];
|
|
11
15
|
constructor(options: PickOption);
|
|
16
|
+
width?: number | undefined;
|
|
17
|
+
align?: ALignType | undefined;
|
|
18
|
+
dataIndex?: string | undefined;
|
|
19
|
+
editable?: boolean | undefined;
|
|
20
|
+
formItemIndex?: number | undefined;
|
|
21
|
+
effects?: {
|
|
22
|
+
queryWorkOrderDetail: (r: any) => void;
|
|
23
|
+
isEditing: boolean;
|
|
24
|
+
form: FormInstance<any>;
|
|
25
|
+
shopList?: any[] | undefined;
|
|
26
|
+
shopId?: string | undefined;
|
|
27
|
+
} | undefined;
|
|
12
28
|
/**
|
|
13
29
|
* 通过值计算展示内容
|
|
14
30
|
* @param value
|
|
@@ -20,12 +36,10 @@ declare class BasicCascader implements ComponentInterface {
|
|
|
20
36
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
21
37
|
renderExport: (value: any, record: Record) => string;
|
|
22
38
|
editRender: (value: any) => JSX.Element;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
options: any;
|
|
28
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
39
|
+
getColumns: () => this & {
|
|
40
|
+
dataIndex: string;
|
|
41
|
+
title: string;
|
|
42
|
+
renderExport: (value: any, record: Record) => string;
|
|
29
43
|
};
|
|
30
44
|
}
|
|
31
45
|
export default BasicCascader;
|
|
@@ -1,4 +1,6 @@
|
|
|
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; }
|
|
2
4
|
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); }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -8,11 +10,10 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
|
|
|
8
10
|
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
11
|
import React from 'react';
|
|
10
12
|
import { Cascader } from 'antd';
|
|
11
|
-
import intersection from 'lodash/intersection';
|
|
12
13
|
import GetFormItem from "../GetFormItem";
|
|
13
14
|
import { findLabelBySelectValue, transMultSelectOptions } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
15
|
import ItemView from "../../commonComponents/ItemView";
|
|
15
|
-
import { isNull
|
|
16
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
16
17
|
var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
|
|
17
18
|
var _this = this;
|
|
18
19
|
_classCallCheck(this, BasicCascader);
|
|
@@ -20,9 +21,18 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
|
|
|
20
21
|
_defineProperty(this, "id", void 0);
|
|
21
22
|
_defineProperty(this, "type", void 0);
|
|
22
23
|
_defineProperty(this, "rules", void 0);
|
|
24
|
+
_defineProperty(this, "canFilter", void 0);
|
|
25
|
+
_defineProperty(this, "canGroup", void 0);
|
|
26
|
+
_defineProperty(this, "canHidden", void 0);
|
|
27
|
+
_defineProperty(this, "dataType", void 0);
|
|
28
|
+
_defineProperty(this, "showContains", void 0);
|
|
23
29
|
_defineProperty(this, "componentConfig", void 0);
|
|
24
|
-
_defineProperty(this, "
|
|
25
|
-
_defineProperty(this, "
|
|
30
|
+
_defineProperty(this, "width", void 0);
|
|
31
|
+
_defineProperty(this, "align", void 0);
|
|
32
|
+
_defineProperty(this, "dataIndex", void 0);
|
|
33
|
+
_defineProperty(this, "editable", void 0);
|
|
34
|
+
_defineProperty(this, "formItemIndex", void 0);
|
|
35
|
+
_defineProperty(this, "effects", void 0);
|
|
26
36
|
_defineProperty(this, "getValue", function (value) {
|
|
27
37
|
var _findLabelBySelectVal, _findLabelBySelectVal2, _this$componentConfig;
|
|
28
38
|
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) {
|
|
@@ -80,35 +90,23 @@ var BasicCascader = /*#__PURE__*/_createClass(function BasicCascader(options) {
|
|
|
80
90
|
}))
|
|
81
91
|
});
|
|
82
92
|
});
|
|
83
|
-
_defineProperty(this, "
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
filterComponentType: 'Cascader',
|
|
91
|
-
options: transMultSelectOptions((item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || []),
|
|
92
|
-
filterFn: function filterFn(value) {
|
|
93
|
-
return function (i) {
|
|
94
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'basicMultSelect')).length > 0;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
};
|
|
93
|
+
_defineProperty(this, "getColumns", function () {
|
|
94
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
95
|
+
dataIndex: _this.id,
|
|
96
|
+
title: _this.name,
|
|
97
|
+
renderExport: _this.renderExport
|
|
98
|
+
});
|
|
99
|
+
;
|
|
98
100
|
});
|
|
99
101
|
this.name = options.name;
|
|
100
102
|
this.id = options.id;
|
|
101
103
|
this.type = options.type;
|
|
104
|
+
this.canFilter = true;
|
|
105
|
+
this.canGroup = false;
|
|
106
|
+
this.canHidden = true;
|
|
107
|
+
this.dataType = 'array';
|
|
108
|
+
this.showContains = false;
|
|
102
109
|
this.componentConfig = options.componentConfig;
|
|
103
110
|
this.rules = [];
|
|
104
|
-
|
|
105
|
-
this.isCombinationComponent = false;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* 通过值计算展示内容
|
|
110
|
-
* @param value
|
|
111
|
-
* @returns
|
|
112
|
-
*/);
|
|
113
|
-
|
|
111
|
+
});
|
|
114
112
|
export default BasicCascader;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
3
|
declare type Value = {
|
|
4
4
|
value?: string[];
|
|
5
5
|
other?: string;
|
|
@@ -9,9 +9,12 @@ declare class BasicCheckbox implements ComponentInterface {
|
|
|
9
9
|
id: string;
|
|
10
10
|
type: string;
|
|
11
11
|
rules: any[];
|
|
12
|
+
canFilter: boolean;
|
|
13
|
+
canGroup: boolean;
|
|
14
|
+
canHidden: boolean;
|
|
15
|
+
dataType: DataType;
|
|
16
|
+
showContains: boolean;
|
|
12
17
|
componentConfig: ComponentInterface["componentConfig"];
|
|
13
|
-
isCombinationComponent: boolean;
|
|
14
|
-
children: ComponentInterface[];
|
|
15
18
|
constructor(options: PickOption);
|
|
16
19
|
getValue: (value: Value) => string | null | undefined;
|
|
17
20
|
render: (value: Value) => JSX.Element;
|
|
@@ -19,12 +22,10 @@ declare class BasicCheckbox implements ComponentInterface {
|
|
|
19
22
|
renderExport: (value: any, record: Record) => string;
|
|
20
23
|
renderClient: (record: any) => JSX.Element | null;
|
|
21
24
|
editRender: () => JSX.Element;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
options: any[] | undefined;
|
|
27
|
-
filterFn: (value: string) => (i: Record) => boolean;
|
|
25
|
+
getColumns: () => this & {
|
|
26
|
+
dataIndex: string;
|
|
27
|
+
title: string;
|
|
28
|
+
renderExport: (value: any, record: Record) => string;
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
export default BasicCheckbox;
|
|
@@ -1,4 +1,6 @@
|
|
|
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; }
|
|
2
4
|
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); } }
|
|
3
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -6,11 +8,10 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
8
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
9
|
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
10
|
import React from 'react';
|
|
9
|
-
import intersection from 'lodash/intersection';
|
|
10
11
|
import { ApaasCheckbox } from '@kmkf-fe-packages/basic-components';
|
|
11
12
|
import GetFormItem from "../GetFormItem";
|
|
12
13
|
import ItemView from "../../commonComponents/ItemView";
|
|
13
|
-
import { isNull
|
|
14
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
14
15
|
var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
15
16
|
var _this = this,
|
|
16
17
|
_options$componentCon;
|
|
@@ -19,9 +20,12 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
19
20
|
_defineProperty(this, "id", void 0);
|
|
20
21
|
_defineProperty(this, "type", void 0);
|
|
21
22
|
_defineProperty(this, "rules", void 0);
|
|
23
|
+
_defineProperty(this, "canFilter", void 0);
|
|
24
|
+
_defineProperty(this, "canGroup", void 0);
|
|
25
|
+
_defineProperty(this, "canHidden", void 0);
|
|
26
|
+
_defineProperty(this, "dataType", void 0);
|
|
27
|
+
_defineProperty(this, "showContains", void 0);
|
|
22
28
|
_defineProperty(this, "componentConfig", void 0);
|
|
23
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
24
|
-
_defineProperty(this, "children", void 0);
|
|
25
29
|
_defineProperty(this, "getValue", function (value) {
|
|
26
30
|
var _value$value, _value$value2, _value$value3;
|
|
27
31
|
if ((value === null || value === void 0 ? void 0 : (_value$value = value.value) === null || _value$value === void 0 ? void 0 : _value$value.length) === 0 && !(value !== null && value !== void 0 && value.other)) return null;
|
|
@@ -68,36 +72,28 @@ var BasicCheckbox = /*#__PURE__*/_createClass(function BasicCheckbox(options) {
|
|
|
68
72
|
component: /*#__PURE__*/React.createElement(ApaasCheckbox, _this.componentConfig)
|
|
69
73
|
});
|
|
70
74
|
});
|
|
71
|
-
_defineProperty(this, "
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
filterComponentType: 'MultipleSelect',
|
|
79
|
-
options: item !== null && item !== void 0 && (_item$config = item.config) !== null && _item$config !== void 0 && _item$config.showOther ? item === null || item === void 0 ? void 0 : (_item$config2 = item.config) === null || _item$config2 === void 0 ? void 0 : (_item$config2$options = _item$config2.options) === null || _item$config2$options === void 0 ? void 0 : _item$config2$options.concat({
|
|
80
|
-
label: '其他',
|
|
81
|
-
value: '其他'
|
|
82
|
-
}) : (item === null || item === void 0 ? void 0 : (_item$config3 = item.config) === null || _item$config3 === void 0 ? void 0 : _item$config3.options) || [],
|
|
83
|
-
filterFn: function filterFn(value) {
|
|
84
|
-
return function (i) {
|
|
85
|
-
return intersection(value, _filterFn.filterTableListItemColumnValue(i, item.id, 'checkbox')).length > 0;
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
};
|
|
75
|
+
_defineProperty(this, "getColumns", function () {
|
|
76
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
77
|
+
dataIndex: _this.id,
|
|
78
|
+
title: _this.name,
|
|
79
|
+
renderExport: _this.renderExport
|
|
80
|
+
});
|
|
81
|
+
;
|
|
89
82
|
});
|
|
90
83
|
this.name = options.name;
|
|
91
84
|
this.id = options.id;
|
|
92
85
|
this.type = options.type;
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
86
|
+
this.canFilter = false;
|
|
87
|
+
this.canGroup = false;
|
|
88
|
+
this.canHidden = true;
|
|
89
|
+
this.showContains = false;
|
|
90
|
+
this.dataType = 'array';
|
|
95
91
|
this.componentConfig = options.componentConfig;
|
|
96
92
|
this.rules = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && _options$componentCon.required ? [{
|
|
97
93
|
validator: function validator(_, value) {
|
|
98
94
|
var _value$value4;
|
|
99
95
|
if (!(value !== null && value !== void 0 && (_value$value4 = value.value) !== null && _value$value4 !== void 0 && _value$value4.length)) {
|
|
100
|
-
return Promise.reject(new Error(
|
|
96
|
+
return Promise.reject(new Error("\u8BF7\u9009\u62E9".concat(_this.name)));
|
|
101
97
|
}
|
|
102
98
|
return Promise.resolve();
|
|
103
99
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
3
|
/**
|
|
4
4
|
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
5
5
|
*/
|
|
@@ -8,9 +8,12 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
8
8
|
id: string;
|
|
9
9
|
type: string;
|
|
10
10
|
rules: any[];
|
|
11
|
+
canFilter: boolean;
|
|
12
|
+
canGroup: boolean;
|
|
13
|
+
canHidden: boolean;
|
|
14
|
+
dataType: DataType;
|
|
15
|
+
showContains: boolean;
|
|
11
16
|
componentConfig: ComponentInterface["componentConfig"];
|
|
12
|
-
isCombinationComponent: boolean;
|
|
13
|
-
children: ComponentInterface[];
|
|
14
17
|
constructor(options: PickOption);
|
|
15
18
|
getValue: (value: string) => string;
|
|
16
19
|
render: (value: string) => JSX.Element | null;
|
|
@@ -18,11 +21,10 @@ declare class CommonDataTime implements ComponentInterface {
|
|
|
18
21
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
19
22
|
renderExport: (value: any, record: Record) => string;
|
|
20
23
|
editRender: () => null;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
24
|
+
getColumns: () => this & {
|
|
25
|
+
dataIndex: string;
|
|
26
|
+
title: string;
|
|
27
|
+
renderExport: (value: any, record: Record) => string;
|
|
26
28
|
};
|
|
27
29
|
}
|
|
28
30
|
export default CommonDataTime;
|
|
@@ -1,4 +1,6 @@
|
|
|
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; }
|
|
2
4
|
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); } }
|
|
3
5
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
6
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -8,7 +10,7 @@ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input ==
|
|
|
8
10
|
import React from 'react';
|
|
9
11
|
import moment from 'moment';
|
|
10
12
|
import ItemView from "../../commonComponents/ItemView";
|
|
11
|
-
import { isNull
|
|
13
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
12
14
|
|
|
13
15
|
/**
|
|
14
16
|
* 针对完成时间、创建时间、修改时间定义了3中类型
|
|
@@ -20,9 +22,12 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
20
22
|
_defineProperty(this, "id", void 0);
|
|
21
23
|
_defineProperty(this, "type", void 0);
|
|
22
24
|
_defineProperty(this, "rules", void 0);
|
|
25
|
+
_defineProperty(this, "canFilter", void 0);
|
|
26
|
+
_defineProperty(this, "canGroup", void 0);
|
|
27
|
+
_defineProperty(this, "canHidden", void 0);
|
|
28
|
+
_defineProperty(this, "dataType", void 0);
|
|
29
|
+
_defineProperty(this, "showContains", void 0);
|
|
23
30
|
_defineProperty(this, "componentConfig", void 0);
|
|
24
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
25
|
-
_defineProperty(this, "children", void 0);
|
|
26
31
|
_defineProperty(this, "getValue", function (value) {
|
|
27
32
|
return moment(value).format('YYYY-MM-DD HH:mm:ss');
|
|
28
33
|
});
|
|
@@ -52,27 +57,23 @@ var CommonDataTime = /*#__PURE__*/_createClass(function CommonDataTime(options)
|
|
|
52
57
|
_defineProperty(this, "editRender", function () {
|
|
53
58
|
return null;
|
|
54
59
|
});
|
|
55
|
-
_defineProperty(this, "
|
|
56
|
-
return {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
filterFn: function filterFn(value) {
|
|
63
|
-
return function (i) {
|
|
64
|
-
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, '');
|
|
65
|
-
return _filterFn.filterDateFn(value, recordDateTime);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
};
|
|
60
|
+
_defineProperty(this, "getColumns", function () {
|
|
61
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
62
|
+
dataIndex: _this.id,
|
|
63
|
+
title: _this.name,
|
|
64
|
+
renderExport: _this.renderExport
|
|
65
|
+
});
|
|
66
|
+
;
|
|
69
67
|
});
|
|
70
68
|
this.name = options.name;
|
|
71
69
|
this.id = options.id;
|
|
72
70
|
this.type = options.type;
|
|
71
|
+
this.canFilter = true;
|
|
72
|
+
this.canGroup = true;
|
|
73
|
+
this.canHidden = true;
|
|
74
|
+
this.showContains = false;
|
|
75
|
+
this.dataType = 'string';
|
|
73
76
|
this.componentConfig = options.componentConfig;
|
|
74
77
|
this.rules = [];
|
|
75
|
-
this.isCombinationComponent = false;
|
|
76
|
-
this.children = [];
|
|
77
78
|
});
|
|
78
79
|
export default CommonDataTime;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
3
|
declare type Value = string | string[] | undefined;
|
|
4
4
|
export declare const DateTime: ({ value, onChange, ...otherProps }: any) => JSX.Element;
|
|
5
5
|
declare class BasicDataTime implements ComponentInterface {
|
|
@@ -7,9 +7,12 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
7
7
|
id: string;
|
|
8
8
|
type: string;
|
|
9
9
|
rules: any[];
|
|
10
|
+
canFilter: boolean;
|
|
11
|
+
canGroup: boolean;
|
|
12
|
+
canHidden: boolean;
|
|
13
|
+
dataType: DataType;
|
|
14
|
+
showContains: boolean;
|
|
10
15
|
componentConfig: ComponentInterface["componentConfig"];
|
|
11
|
-
isCombinationComponent: boolean;
|
|
12
|
-
children: ComponentInterface[];
|
|
13
16
|
constructor(options: PickOption);
|
|
14
17
|
getValue: (value: Value) => string | undefined;
|
|
15
18
|
render: (value: Value) => JSX.Element;
|
|
@@ -17,12 +20,10 @@ declare class BasicDataTime implements ComponentInterface {
|
|
|
17
20
|
renderPc: (value: any, record: Record) => JSX.Element;
|
|
18
21
|
renderExport: (value: any, record: Record) => any;
|
|
19
22
|
editRender: () => JSX.Element;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
options: any[];
|
|
25
|
-
filterFn: (value: string[]) => (i: Record) => boolean;
|
|
23
|
+
getColumns: () => this & {
|
|
24
|
+
dataIndex: string;
|
|
25
|
+
title: string;
|
|
26
|
+
renderExport: (value: any, record: Record) => any;
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
29
|
export default BasicDataTime;
|
|
@@ -1,5 +1,7 @@
|
|
|
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
2
|
var _excluded = ["value", "onChange"];
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
3
5
|
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); } }
|
|
4
6
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
5
7
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -14,7 +16,7 @@ import ApaasDate from "./ApaasDate";
|
|
|
14
16
|
import moment from 'moment';
|
|
15
17
|
import GetFormItem from "../GetFormItem";
|
|
16
18
|
import ItemView from "../../commonComponents/ItemView";
|
|
17
|
-
import { isNull
|
|
19
|
+
import { isNull } from '@kmkf-fe-packages/kmkf-utils';
|
|
18
20
|
export var DateTime = function DateTime(_ref) {
|
|
19
21
|
var value = _ref.value,
|
|
20
22
|
onChange = _ref.onChange,
|
|
@@ -30,15 +32,20 @@ export var DateTime = function DateTime(_ref) {
|
|
|
30
32
|
}));
|
|
31
33
|
};
|
|
32
34
|
var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
33
|
-
var _this = this
|
|
35
|
+
var _this = this,
|
|
36
|
+
_options$componentCon,
|
|
37
|
+
_options$componentCon2;
|
|
34
38
|
_classCallCheck(this, BasicDataTime);
|
|
35
39
|
_defineProperty(this, "name", void 0);
|
|
36
40
|
_defineProperty(this, "id", void 0);
|
|
37
41
|
_defineProperty(this, "type", void 0);
|
|
38
42
|
_defineProperty(this, "rules", void 0);
|
|
43
|
+
_defineProperty(this, "canFilter", void 0);
|
|
44
|
+
_defineProperty(this, "canGroup", void 0);
|
|
45
|
+
_defineProperty(this, "canHidden", void 0);
|
|
46
|
+
_defineProperty(this, "dataType", void 0);
|
|
47
|
+
_defineProperty(this, "showContains", void 0);
|
|
39
48
|
_defineProperty(this, "componentConfig", void 0);
|
|
40
|
-
_defineProperty(this, "isCombinationComponent", void 0);
|
|
41
|
-
_defineProperty(this, "children", void 0);
|
|
42
49
|
_defineProperty(this, "getValue", function (value) {
|
|
43
50
|
return Array.isArray(value) ? value.join('~') : value;
|
|
44
51
|
});
|
|
@@ -74,29 +81,23 @@ var BasicDataTime = /*#__PURE__*/_createClass(function BasicDataTime(options) {
|
|
|
74
81
|
component: /*#__PURE__*/React.createElement(DateTime, _this.componentConfig)
|
|
75
82
|
});
|
|
76
83
|
});
|
|
77
|
-
_defineProperty(this, "
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
filterComponentType: 'Date',
|
|
85
|
-
options: (item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config.options) || [],
|
|
86
|
-
filterFn: function filterFn(value) {
|
|
87
|
-
return function (i) {
|
|
88
|
-
var recordDateTime = _filterFn.filterTableListItemColumnValue(i, item.id, 'dateTime');
|
|
89
|
-
return _filterFn.filterDateFn(value, recordDateTime);
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
};
|
|
84
|
+
_defineProperty(this, "getColumns", function () {
|
|
85
|
+
return _objectSpread(_objectSpread({}, _this), {}, {
|
|
86
|
+
dataIndex: _this.id,
|
|
87
|
+
title: _this.name,
|
|
88
|
+
renderExport: _this.renderExport
|
|
89
|
+
});
|
|
90
|
+
;
|
|
93
91
|
});
|
|
94
92
|
this.name = options.name;
|
|
95
93
|
this.id = options.id;
|
|
96
94
|
this.type = options.type;
|
|
95
|
+
this.canFilter = true;
|
|
96
|
+
this.canGroup = true;
|
|
97
|
+
this.canHidden = true;
|
|
98
|
+
this.showContains = false;
|
|
99
|
+
this.dataType = options !== null && options !== void 0 && (_options$componentCon = options.componentConfig) !== null && _options$componentCon !== void 0 && (_options$componentCon2 = _options$componentCon.dateType) !== null && _options$componentCon2 !== void 0 && _options$componentCon2.includes('RANGE') ? 'dateArray' : 'date';
|
|
97
100
|
this.componentConfig = options.componentConfig;
|
|
98
101
|
this.rules = [];
|
|
99
|
-
this.isCombinationComponent = false;
|
|
100
|
-
this.children = [];
|
|
101
102
|
});
|
|
102
103
|
export default BasicDataTime;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ComponentInterface, PickOption,
|
|
2
|
+
import { ComponentInterface, PickOption, DataType, Record } from '../../type';
|
|
3
3
|
declare class EItemEncode implements ComponentInterface {
|
|
4
4
|
name: string;
|
|
5
5
|
id: string;
|
|
6
6
|
type: string;
|
|
7
7
|
rules: any[];
|
|
8
|
+
canFilter: boolean;
|
|
9
|
+
canGroup: boolean;
|
|
10
|
+
canHidden: boolean;
|
|
11
|
+
dataType: DataType;
|
|
12
|
+
showContains: boolean;
|
|
8
13
|
componentConfig: ComponentInterface["componentConfig"];
|
|
9
14
|
effects: ComponentInterface["effects"];
|
|
10
|
-
isCombinationComponent: boolean;
|
|
11
|
-
children: ComponentInterface[];
|
|
12
15
|
constructor(options: PickOption);
|
|
13
16
|
render: (value: any) => JSX.Element;
|
|
14
17
|
renderClient: (record: any) => JSX.Element | null;
|
|
15
18
|
renderPc: (value: unknown, record: Record) => JSX.Element;
|
|
16
19
|
renderExport: (value: unknown, record: Record) => any;
|
|
17
20
|
editRender: () => JSX.Element;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
filterFn: (value: string) => (i: Record) => any;
|
|
21
|
+
getColumns: () => this & {
|
|
22
|
+
dataIndex: string;
|
|
23
|
+
title: string;
|
|
24
|
+
renderExport: (value: unknown, record: Record) => any;
|
|
23
25
|
};
|
|
24
26
|
}
|
|
25
27
|
export default EItemEncode;
|