wt-enjoy-link-antd-repack 4.1.55 → 4.1.58
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/component/BiuAButton/index.d.ts +4 -4
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts +1 -1
- package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.js +64 -18
- package/dist/esm/component/BiuField/component/DepartOrgSelect/index.js +2 -1
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.d.ts +1 -0
- package/dist/esm/component/BiuField/component/TableSelectLocal/locationSelect.js +8 -5
- package/dist/esm/component/BiuField/component/lpnSelectNew.d.ts +1 -0
- package/dist/esm/component/BiuField/component/lpnSelectNew.js +4 -2
- package/dist/esm/component/BiuField/component/orderTypeSelect.d.ts +1 -1
- package/dist/esm/component/BiuTableSelect/index.d.ts +1 -1
- package/package.json +1 -1
@@ -3,16 +3,16 @@ export declare const BiuAButton: React.MemoExoticComponent<import("styled-compon
|
|
3
3
|
href: string;
|
4
4
|
target?: string | undefined;
|
5
5
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
6
|
-
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "
|
6
|
+
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
7
7
|
htmlType?: "button" | "submit" | "reset" | undefined;
|
8
8
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
9
|
-
} & Omit<React.ButtonHTMLAttributes<any>, "
|
9
|
+
} & Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & React.RefAttributes<HTMLElement>, never>> & Omit<React.ForwardRefExoticComponent<Partial<{
|
10
10
|
href: string;
|
11
11
|
target?: string | undefined;
|
12
12
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
13
|
-
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "
|
13
|
+
} & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
|
14
14
|
htmlType?: "button" | "submit" | "reset" | undefined;
|
15
15
|
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
16
|
-
} & Omit<React.ButtonHTMLAttributes<any>, "
|
16
|
+
} & Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & React.RefAttributes<HTMLElement>> & {
|
17
17
|
Group: React.FC<import("antd/lib/button").ButtonGroupProps>;
|
18
18
|
}, keyof React.Component<any, {}, any>>>;
|
package/dist/esm/component/BiuField/component/DepartOrgSelect/hooks/useConvertUnSubValue.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: ({ value, onChange }: any, { defaultValue, multiple }: any) =>
|
1
|
+
declare const _default: ({ value, onChange }: any, { defaultValue, multiple, treeData }: any) => any[];
|
2
2
|
export default _default;
|
@@ -1,16 +1,34 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
3
3
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
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); }
|
5
|
-
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; }
|
6
4
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
7
5
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
6
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
7
|
+
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."); }
|
8
|
+
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); }
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
10
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
11
|
+
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; }
|
12
|
+
import { unionBy } from 'lodash';
|
8
13
|
import { useCallback, useEffect, useState } from 'react';
|
14
|
+
var filterCurrentNodeWithSubNode = function filterCurrentNodeWithSubNode() {
|
15
|
+
var treeDataSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
16
|
+
var currentNodes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
17
|
+
var subNode = [];
|
18
|
+
var currentSubNode = treeDataSource.filter(function (n) {
|
19
|
+
return currentNodes.some(function (cn) {
|
20
|
+
return n.pId === cn.id;
|
21
|
+
});
|
22
|
+
});
|
23
|
+
subNode = [].concat(_toConsumableArray(subNode), _toConsumableArray(currentNodes), _toConsumableArray(currentSubNode), _toConsumableArray(currentSubNode.length > 0 ? filterCurrentNodeWithSubNode(treeDataSource, currentSubNode) : []));
|
24
|
+
return unionBy(subNode, 'id');
|
25
|
+
};
|
9
26
|
export default (function (_ref, _ref2) {
|
10
27
|
var value = _ref.value,
|
11
28
|
onChange = _ref.onChange;
|
12
29
|
var defaultValue = _ref2.defaultValue,
|
13
|
-
multiple = _ref2.multiple
|
30
|
+
multiple = _ref2.multiple,
|
31
|
+
treeData = _ref2.treeData;
|
14
32
|
/**
|
15
33
|
* 机构树组件的数据绑定值,如果是多选,那么就是一个数组,如果是单选,那么就是一个数字
|
16
34
|
*/
|
@@ -20,13 +38,11 @@ export default (function (_ref, _ref2) {
|
|
20
38
|
setState = _useState2[1];
|
21
39
|
var InChangeTrigger = useCallback(function (data) {
|
22
40
|
if (!data) return data;
|
23
|
-
if (multiple) {
|
24
|
-
return
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
});
|
29
|
-
}
|
41
|
+
if (multiple) return "".concat(data).split(',').map(function (n) {
|
42
|
+
return {
|
43
|
+
value: !Number.isNaN(+n) ? +n : undefined
|
44
|
+
};
|
45
|
+
});
|
30
46
|
if (!Number.isNaN(+data)) return +data;
|
31
47
|
return undefined;
|
32
48
|
}, [multiple]);
|
@@ -58,15 +74,15 @@ export default (function (_ref, _ref2) {
|
|
58
74
|
/**
|
59
75
|
* 内部初始化默认值,需要给外面一份
|
60
76
|
*/
|
61
|
-
if (Array.isArray(inValue) && ((_inValue$ = inValue[0]) === null || _inValue$ === void 0 ? void 0 : _inValue$.value) === +defaultValue
|
62
|
-
onChange(OutChangeTrigger(inValue));
|
77
|
+
if (Array.isArray(inValue) && ((_inValue$ = inValue[0]) === null || _inValue$ === void 0 ? void 0 : _inValue$.value) === +defaultValue) {
|
78
|
+
if (onChange) onChange(OutChangeTrigger(inValue));
|
63
79
|
}
|
64
80
|
} else {
|
65
81
|
/**
|
66
82
|
* 同上
|
67
83
|
*/
|
68
|
-
if (inValue === +defaultValue
|
69
|
-
onChange(OutChangeTrigger(inValue));
|
84
|
+
if (inValue === +defaultValue) {
|
85
|
+
if (onChange) onChange(OutChangeTrigger(inValue));
|
70
86
|
}
|
71
87
|
}
|
72
88
|
setState(function (ss) {
|
@@ -92,9 +108,39 @@ export default (function (_ref, _ref2) {
|
|
92
108
|
return inValue;
|
93
109
|
});
|
94
110
|
}, [InChangeTrigger, OutChangeTrigger, defaultValue, multiple, onChange, value]);
|
95
|
-
var changeTrigger = useCallback(function (
|
96
|
-
|
97
|
-
|
98
|
-
|
111
|
+
var changeTrigger = useCallback(function (_data, _label, _ref3) {
|
112
|
+
var checked = _ref3.checked,
|
113
|
+
triggerValue = _ref3.triggerValue;
|
114
|
+
setState(function () {
|
115
|
+
var currentState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
116
|
+
if (multiple) {
|
117
|
+
var mergeDepartData = [];
|
118
|
+
var currentTriggerNode = treeData === null || treeData === void 0 ? void 0 : treeData.filter(function (n) {
|
119
|
+
return n.id === triggerValue;
|
120
|
+
});
|
121
|
+
var filterSubNodeData = (filterCurrentNodeWithSubNode(treeData, currentTriggerNode) || []).map(function (n) {
|
122
|
+
return {
|
123
|
+
value: n.id,
|
124
|
+
label: n.title
|
125
|
+
};
|
126
|
+
});
|
127
|
+
if (checked) {
|
128
|
+
mergeDepartData = unionBy([].concat(_toConsumableArray(currentState), _toConsumableArray(filterSubNodeData)), 'value') || [];
|
129
|
+
}
|
130
|
+
if (!checked) {
|
131
|
+
mergeDepartData = currentState === null || currentState === void 0 ? void 0 : currentState.filter(function (n) {
|
132
|
+
return !filterSubNodeData.some(function (sn) {
|
133
|
+
return sn.value === n.value;
|
134
|
+
});
|
135
|
+
});
|
136
|
+
}
|
137
|
+
if (onChange) onChange(OutChangeTrigger(mergeDepartData));
|
138
|
+
return mergeDepartData;
|
139
|
+
} else {
|
140
|
+
if (onChange) onChange(OutChangeTrigger(_data));
|
141
|
+
return _data;
|
142
|
+
}
|
143
|
+
});
|
144
|
+
}, [OutChangeTrigger, multiple, onChange, treeData]);
|
99
145
|
return [state, changeTrigger];
|
100
146
|
});
|
@@ -68,7 +68,8 @@ var UnSubDepartSelect = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(functio
|
|
68
68
|
}, {
|
69
69
|
defaultValue: defaultActiveCurrentOrg ? userDepartID : undefined,
|
70
70
|
multiple: multiple,
|
71
|
-
treeCheckStrictly: treeCheckStrictly
|
71
|
+
treeCheckStrictly: treeCheckStrictly,
|
72
|
+
treeData: treeData
|
72
73
|
}),
|
73
74
|
_useConvertUnSubValue2 = _slicedToArray(_useConvertUnSubValue, 2),
|
74
75
|
state = _useConvertUnSubValue2[0],
|
@@ -21,5 +21,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
21
21
|
goodsId: string;
|
22
22
|
isAutoGenerate?: string | undefined;
|
23
23
|
filterInv?: boolean | undefined;
|
24
|
+
isGoodType?: string | number | undefined;
|
24
25
|
} & React.RefAttributes<unknown>>>;
|
25
26
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["ownerId", "initialValue", "warehouseIds", "warehouseAreaId", "searchTimes", "rowLabel", "isDefWth", "goodsId", "batch", "isAutoGenerate", "filterInv"];
|
2
|
+
var _excluded = ["ownerId", "initialValue", "warehouseIds", "warehouseAreaId", "searchTimes", "rowLabel", "isDefWth", "goodsId", "batch", "isAutoGenerate", "filterInv", "isGoodType"];
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -73,6 +73,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
73
73
|
isAutoGenerate = _props$isAutoGenerate === void 0 ? '2' : _props$isAutoGenerate,
|
74
74
|
_props$filterInv = props.filterInv,
|
75
75
|
filterInv = _props$filterInv === void 0 ? false : _props$filterInv,
|
76
|
+
isGoodType = props.isGoodType,
|
76
77
|
restProps = _objectWithoutProperties(props, _excluded);
|
77
78
|
var _useState = useState(),
|
78
79
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -101,7 +102,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
101
102
|
page: 1,
|
102
103
|
size: 20,
|
103
104
|
isAutoGenerate: isAutoGenerate,
|
104
|
-
filterInv: filterInv
|
105
|
+
filterInv: filterInv,
|
106
|
+
isGoodType: isGoodType
|
105
107
|
}).then(function (res) {
|
106
108
|
if (res !== null && res !== void 0 && res.length && res[0].id) {
|
107
109
|
setLocationList(res);
|
@@ -126,7 +128,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
126
128
|
setLoading(false);
|
127
129
|
});
|
128
130
|
}
|
129
|
-
}, [initialValue, warehouseIds, goodsId, ownerId, isDefWth, batch, warehouseAreaId, props, isAutoGenerate, rowLabel, filterInv]);
|
131
|
+
}, [initialValue, warehouseIds, goodsId, ownerId, isDefWth, batch, warehouseAreaId, props, isAutoGenerate, rowLabel, filterInv, isGoodType]);
|
130
132
|
var onSearch = useCallback(function (sValue) {
|
131
133
|
if (timerRef.current) clearTimeout(timerRef.current);
|
132
134
|
timerRef.current = setTimeout(function () {
|
@@ -141,14 +143,15 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
141
143
|
page: 1,
|
142
144
|
size: 20,
|
143
145
|
isAutoGenerate: isAutoGenerate,
|
144
|
-
filterInv: filterInv
|
146
|
+
filterInv: filterInv,
|
147
|
+
isGoodType: isGoodType
|
145
148
|
}).then(function (res) {
|
146
149
|
setLocationList(res);
|
147
150
|
}).finally(function () {
|
148
151
|
setLoading(false);
|
149
152
|
});
|
150
153
|
}, searchTimes);
|
151
|
-
}, [searchTimes, warehouseIds, goodsId, ownerId, isDefWth, batch, isAutoGenerate, filterInv]);
|
154
|
+
}, [searchTimes, warehouseIds, goodsId, ownerId, isDefWth, batch, isAutoGenerate, filterInv, isGoodType]);
|
152
155
|
return /*#__PURE__*/_jsx(TableSelectBase, _objectSpread(_objectSpread({
|
153
156
|
ref: ref
|
154
157
|
}, restProps), {}, {
|
@@ -11,5 +11,6 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
11
11
|
goodsId?: string | undefined;
|
12
12
|
qty?: string | number | undefined;
|
13
13
|
lpnId?: string | number | undefined;
|
14
|
+
isGoodType?: string | number | undefined;
|
14
15
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
16
|
export default _default;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
var _excluded = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete", "locationType", "defaultValues", "style", "goodsId", "qty", "lpnId"];
|
2
|
+
var _excluded = ["locationId", "onChange", "onChangeData", "isFirstLoad", "isAutoComplete", "locationType", "defaultValues", "style", "goodsId", "qty", "lpnId", "isGoodType"];
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
@@ -48,6 +48,7 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
48
48
|
goodsId = props.goodsId,
|
49
49
|
qty = props.qty,
|
50
50
|
lpnId = props.lpnId,
|
51
|
+
isGoodType = props.isGoodType,
|
51
52
|
restProps = _objectWithoutProperties(props, _excluded);
|
52
53
|
var _useState3 = useState(isFirstLoad),
|
53
54
|
_useState4 = _slicedToArray(_useState3, 2),
|
@@ -81,7 +82,8 @@ export default /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props,
|
|
81
82
|
locationType: locationType,
|
82
83
|
goodsId: goodsId,
|
83
84
|
qty: qty,
|
84
|
-
lpnId: lpnId
|
85
|
+
lpnId: lpnId,
|
86
|
+
isGoodType: isGoodType
|
85
87
|
}).then(function (res) {
|
86
88
|
var data = res === null || res === void 0 ? void 0 : res.map(function (item) {
|
87
89
|
return _objectSpread(_objectSpread({}, item), {}, {
|
@@ -9,7 +9,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
|
|
9
9
|
/**
|
10
10
|
* 0:入库 1:出库 2:移库 3:冻结 4:调整 5:属性变更
|
11
11
|
*/
|
12
|
-
orderType: 0 |
|
12
|
+
orderType: 0 | 2 | 1 | 3 | 4 | 5;
|
13
13
|
isFirstLoad: boolean;
|
14
14
|
} & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
|
15
15
|
export default _default;
|
@@ -46,4 +46,4 @@ export declare const BiuTableSelect: React.MemoExoticComponent<React.ForwardRefE
|
|
46
46
|
* 转换下绑定到组件上的数据源
|
47
47
|
*/
|
48
48
|
dataOption?: ((value: Record<string, any>) => Record<string, any>[]) | undefined;
|
49
|
-
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "
|
49
|
+
} & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "allowClear" | "showSearch"> & Pick<TableProps<any>, "dataSource" | "onRow"> & React.RefAttributes<unknown>>>;
|