@zat-design/sisyphus-react 3.11.4 → 3.11.5
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/index.esm.css +1 -2
- package/dist/less.esm.css +1 -2
- package/es/ProEditTable/style/index.less +1 -2
- package/es/ProEditTable/utils/tools.d.ts +2 -2
- package/es/ProEditTable/utils/tools.js +1 -1
- package/es/ProForm/components/base/DatePicker/index.js +2 -2
- package/es/ProForm/components/base/RangePicker/index.js +2 -2
- package/es/ProForm/components/combination/ProModalSelect/index.js +18 -7
- package/es/ProLayout/components/ProCollapse/index.js +4 -2
- package/es/ProStep/components/Item/index.js +13 -10
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -2
- package/es/ProTree/components/List.js +2 -2
- package/es/ProTree/components/SearchTitle.js +2 -2
- package/es/ProTreeModal/index.js +2 -2
- package/lib/ProEditTable/style/index.less +1 -2
- package/lib/ProEditTable/utils/tools.d.ts +2 -2
- package/lib/ProEditTable/utils/tools.js +1 -1
- package/lib/ProForm/components/base/DatePicker/index.js +2 -2
- package/lib/ProForm/components/base/RangePicker/index.js +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.js +16 -5
- package/lib/ProLayout/components/ProCollapse/index.js +4 -2
- package/lib/ProStep/components/Item/index.js +14 -10
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -2
- package/lib/ProTree/components/List.js +2 -2
- package/lib/ProTree/components/SearchTitle.js +2 -2
- package/lib/ProTreeModal/index.js +2 -2
- package/package.json +1 -1
package/dist/index.esm.css
CHANGED
@@ -4812,8 +4812,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4812
4812
|
margin-left: var(--zaui-space-size-xs, 4px);
|
4813
4813
|
}
|
4814
4814
|
.pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
|
4815
|
-
text-align:
|
4816
|
-
padding-left: 52px;
|
4815
|
+
text-align: right;
|
4817
4816
|
}
|
4818
4817
|
.pro-edit-label {
|
4819
4818
|
display: inline-block;
|
package/dist/less.esm.css
CHANGED
@@ -4812,8 +4812,7 @@ span.ant-input-group-compact.pro-range-limit .forever-checkbox {
|
|
4812
4812
|
margin-left: var(--zaui-space-size-xs, 4px);
|
4813
4813
|
}
|
4814
4814
|
.pro-edit-table-drag table tr th.ant-table-selection-column.ant-table-cell-fix-left {
|
4815
|
-
text-align:
|
4816
|
-
padding-left: 52px;
|
4815
|
+
text-align: right;
|
4817
4816
|
}
|
4818
4817
|
.pro-edit-label {
|
4819
4818
|
display: inline-block;
|
@@ -7,7 +7,7 @@ export declare const customValidate: (validateKeys: any, form: any, rowName: any
|
|
7
7
|
* @returns string
|
8
8
|
*/
|
9
9
|
export declare const splitNames: (names: any[]) => any;
|
10
|
-
export declare const getNamePath: (name: any, virtualKey: any) => any;
|
10
|
+
export declare const getNamePath: (name: any, virtualKey: any) => any[];
|
11
11
|
export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys }: {
|
12
12
|
name: any;
|
13
13
|
form: any;
|
@@ -35,7 +35,7 @@ export declare const handleScrollToError: () => void;
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
36
36
|
*/
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
38
|
-
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState
|
38
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState }: {
|
39
39
|
form: any;
|
40
40
|
name: any;
|
41
41
|
value: any;
|
@@ -51,7 +51,7 @@ export var splitNames = function splitNames(names) {
|
|
51
51
|
};
|
52
52
|
// 获取中间formItem的name
|
53
53
|
export var getNamePath = function getNamePath(name, virtualKey) {
|
54
|
-
var nextName = cloneDeep(name);
|
54
|
+
var nextName = cloneDeep(Array.isArray(name) ? name : [name]);
|
55
55
|
var lastValue = nextName[nextName.length - 1];
|
56
56
|
nextName[nextName.length - 1] = "".concat(lastValue).concat(virtualKey ? "-".concat(virtualKey) : '');
|
57
57
|
return nextName;
|
@@ -7,9 +7,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
7
7
|
var _excluded = ["className", "format"];
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
/*
|
10
|
-
* @Author:
|
10
|
+
* @Author: ''
|
11
11
|
* @Date: 2024-01-19 18:27:41
|
12
|
-
* @LastEditors:
|
12
|
+
* @LastEditors: ''
|
13
13
|
* @LastEditTime: 2024-06-03 15:33:12
|
14
14
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/DatePicker/index.tsx
|
15
15
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -6,9 +6,9 @@ import _DatePicker from "antd/es/date-picker";
|
|
6
6
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
/*
|
9
|
-
* @Author:
|
9
|
+
* @Author: ''
|
10
10
|
* @Date: 2024-04-10 11:39:17
|
11
|
-
* @LastEditors:
|
11
|
+
* @LastEditors: ''
|
12
12
|
* @LastEditTime: 2024-05-29 11:50:49
|
13
13
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/RangePicker/index.tsx
|
14
14
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -19,15 +19,15 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
19
19
|
import "antd/es/form/style";
|
20
20
|
import _Form from "antd/es/form";
|
21
21
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
22
|
-
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne"],
|
22
|
+
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
23
23
|
_excluded2 = ["onOk"],
|
24
24
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
26
26
|
import { SearchOutlined } from '@ant-design/icons';
|
27
27
|
import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
28
|
-
import { debounce, isArray, isEqual, isFunction
|
28
|
+
import { debounce, isArray, isEqual, isFunction } from 'lodash';
|
29
29
|
import { ReactSVG } from 'react-svg';
|
30
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useMemo } from 'react';
|
30
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
31
31
|
import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from '../../../../index';
|
32
32
|
import Container from '../../Container';
|
33
33
|
import viewSvg from '../../../../assets/view.svg';
|
@@ -58,6 +58,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
58
58
|
searchForm = props.searchForm,
|
59
59
|
searchKey = props.searchKey,
|
60
60
|
defaultOne = props.defaultOne,
|
61
|
+
otherProps = props.otherProps,
|
61
62
|
restProps = _objectWithoutProperties(props, _excluded);
|
62
63
|
var contentForm = _Form.useFormInstance();
|
63
64
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
@@ -105,6 +106,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
105
106
|
columns = _ref4.columns,
|
106
107
|
rowSelection = _ref4.rowSelection,
|
107
108
|
restTableProps = _objectWithoutProperties(_ref4, _excluded3);
|
109
|
+
var preValue = useRef(value);
|
108
110
|
var _useSetState = useSetState({
|
109
111
|
_value: value,
|
110
112
|
isInit: true,
|
@@ -250,6 +252,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
250
252
|
};
|
251
253
|
var handleChangeValue = function handleChangeValue(e) {
|
252
254
|
onChange(e.target.value);
|
255
|
+
preValue.current = e.target.value;
|
253
256
|
if (!readOnly) {
|
254
257
|
setState({
|
255
258
|
_value: e.target.value
|
@@ -258,6 +261,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
258
261
|
};
|
259
262
|
var handleSelectValue = function handleSelectValue(val, option) {
|
260
263
|
onChange(val, option);
|
264
|
+
preValue.current = val;
|
261
265
|
};
|
262
266
|
var handleClick = /*#__PURE__*/function () {
|
263
267
|
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
@@ -369,6 +373,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
369
373
|
case 14:
|
370
374
|
if (flag) {
|
371
375
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
376
|
+
preValue.current = labelInValue ? record : getNextValues(record);
|
372
377
|
// 更新内部展示值
|
373
378
|
setState({
|
374
379
|
_value: record,
|
@@ -497,6 +502,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
497
502
|
nextSelectRowKeys = isMultiple ? value : [value];
|
498
503
|
if (labelInValue) {
|
499
504
|
onChange(_data);
|
505
|
+
preValue.current = _data;
|
500
506
|
}
|
501
507
|
// 更新内部展示值
|
502
508
|
setState({
|
@@ -553,10 +559,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
553
559
|
nextSelectRowKeys = isMultiple ? value : [value];
|
554
560
|
if (labelInValue) {
|
555
561
|
onChange(_data2);
|
562
|
+
preValue.current = _data2;
|
556
563
|
} else {
|
557
564
|
onChange(isMultiple ? _data2.map(function (item) {
|
558
565
|
return item[valueKey];
|
559
566
|
}) : _data2[valueKey]);
|
567
|
+
preValue.current = isMultiple ? _data2.map(function (item) {
|
568
|
+
return item[valueKey];
|
569
|
+
}) : _data2[valueKey];
|
560
570
|
}
|
561
571
|
// 更新内部展示值
|
562
572
|
setState({
|
@@ -646,8 +656,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
646
656
|
}
|
647
657
|
}, [JSON.stringify(value), visible, isInit]);
|
648
658
|
useDebounceEffect(function () {
|
649
|
-
if (value && !visible && readOnly) {
|
659
|
+
if (value && !visible && readOnly && !isEqual(value, preValue.current)) {
|
650
660
|
var _options$some;
|
661
|
+
preValue.current = value;
|
651
662
|
var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
|
652
663
|
return item[valueKey] === value;
|
653
664
|
});
|
@@ -746,17 +757,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
746
757
|
var nextParams = transformParams ? transformParams(params) : params;
|
747
758
|
run(nextParams);
|
748
759
|
}
|
749
|
-
},
|
760
|
+
}, 2000),
|
750
761
|
style: {
|
751
762
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
752
763
|
}
|
753
|
-
},
|
764
|
+
}, restProps)) : _jsx(_Input, _objectSpread({
|
754
765
|
value: viewText,
|
755
766
|
onChange: handleChangeValue,
|
756
767
|
disabled: disabled,
|
757
768
|
autoComplete: "off",
|
758
769
|
allowClear: true
|
759
|
-
},
|
770
|
+
}, restProps)), isView || disabled ? null : _jsx(_Button, {
|
760
771
|
icon: _jsx(ReactSVG, {
|
761
772
|
className: "viewSvg",
|
762
773
|
src: viewSvg,
|
@@ -36,7 +36,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
36
36
|
className = props.className,
|
37
37
|
icon = props.icon,
|
38
38
|
_props$autoHeight = props.autoHeight,
|
39
|
-
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight
|
39
|
+
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight,
|
40
|
+
onChange = props.onChange;
|
40
41
|
var cls = classNames(_defineProperty({
|
41
42
|
'pro-collapse': true,
|
42
43
|
'pro-collapse-level2': level === '2',
|
@@ -154,7 +155,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
154
155
|
});
|
155
156
|
},
|
156
157
|
expandIconPosition: "end",
|
157
|
-
defaultActiveKey: folding ? [] : ['1']
|
158
|
+
defaultActiveKey: folding ? [] : ['1'],
|
159
|
+
onChange: onChange
|
158
160
|
}, collapseProps), {}, {
|
159
161
|
children: renderPanel()
|
160
162
|
}))
|
@@ -3,13 +3,12 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
3
3
|
var _excluded = ["id", "title", "collapse", "children", "lazyLoad"];
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
import { useEffect } from 'react';
|
6
|
-
import LazyLoad from 'react-lazyload';
|
6
|
+
import LazyLoad, { forceCheck } from 'react-lazyload';
|
7
7
|
import { isBoolean } from 'lodash';
|
8
8
|
import { useStep } from '../../index';
|
9
|
-
import { getLoadedMap } from '../../utils';
|
10
9
|
import ProCollapse from '../../../ProLayout/components/ProCollapse';
|
11
10
|
var defaultLazyLoadConfig = {
|
12
|
-
height:
|
11
|
+
height: 300,
|
13
12
|
offset: 100,
|
14
13
|
once: true // Load only once upon first entry into the viewport
|
15
14
|
};
|
@@ -24,10 +23,8 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
24
23
|
var _useStep = useStep(),
|
25
24
|
register = _useStep.register,
|
26
25
|
collapse = _useStep.collapse,
|
27
|
-
globalLazyLoad = _useStep.lazyLoad
|
28
|
-
registerMap = _useStep.registerMap;
|
26
|
+
globalLazyLoad = _useStep.lazyLoad;
|
29
27
|
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
30
|
-
var loadedMap = getLoadedMap(registerMap);
|
31
28
|
useEffect(function () {
|
32
29
|
// Schedule registration to avoid re-render issues
|
33
30
|
var timeoutId = setTimeout(function () {
|
@@ -38,13 +35,11 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
38
35
|
}, restProps));
|
39
36
|
}, 0);
|
40
37
|
return function () {
|
41
|
-
|
38
|
+
clearTimeout(timeoutId);
|
42
39
|
};
|
43
40
|
}, [id, title, lazyLoad, restProps, register]);
|
44
41
|
var renderChildren = function renderChildren() {
|
45
|
-
|
46
|
-
// 第一个step不设置lasyload,防止懒加载不生效
|
47
|
-
if (lazyLoad && (loadedMap === null || loadedMap === void 0 ? void 0 : loadedMap.length) && (loadedMap === null || loadedMap === void 0 ? void 0 : (_loadedMap$ = loadedMap[0]) === null || _loadedMap$ === void 0 ? void 0 : _loadedMap$.id) !== id) {
|
42
|
+
if (lazyLoad) {
|
48
43
|
var lazyLoadProps = isBoolean(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
49
44
|
return _jsx(LazyLoad, _objectSpread(_objectSpread({}, lazyLoadProps), {}, {
|
50
45
|
classNamePrefix: id,
|
@@ -62,6 +57,14 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
62
57
|
title: title,
|
63
58
|
icon: true
|
64
59
|
}, restProps), {}, {
|
60
|
+
onChange: function onChange(e) {
|
61
|
+
var _restProps$onChange;
|
62
|
+
if (lazyLoad) {
|
63
|
+
forceCheck();
|
64
|
+
}
|
65
|
+
// 默认执行
|
66
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
67
|
+
},
|
65
68
|
children: renderChildren()
|
66
69
|
}))
|
67
70
|
});
|
@@ -5,9 +5,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
5
5
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
/*
|
8
|
-
* @Author:
|
8
|
+
* @Author: ''
|
9
9
|
* @Date: 2024-08-09 13:48:59
|
10
|
-
* @LastEditors:
|
10
|
+
* @LastEditors: ''
|
11
11
|
* @LastEditTime: 2024-08-27 15:27:44
|
12
12
|
* @FilePath: /za-material-warehouse/src/ProTable/components/RcTable/components/DraggableTable/index.tsx
|
13
13
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -3,9 +3,9 @@ import _Tooltip from "antd/es/tooltip";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
4
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
5
5
|
/*
|
6
|
-
* @Author:
|
6
|
+
* @Author: ''
|
7
7
|
* @Date: 2024-09-20 10:26:04
|
8
|
-
* @LastEditors:
|
8
|
+
* @LastEditors: ''
|
9
9
|
* @LastEditTime: 2024-09-26 14:12:44
|
10
10
|
* @FilePath: /za-material-warehouse/src/ProTree/components/AdaptiveTooltip.tsx
|
11
11
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -5,9 +5,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
5
5
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
6
6
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
/*
|
8
|
-
* @Author:
|
8
|
+
* @Author: ''
|
9
9
|
* @Date: 2024-07-03 11:02:19
|
10
|
-
* @LastEditors:
|
10
|
+
* @LastEditors: ''
|
11
11
|
* @LastEditTime: 2024-09-26 14:30:26
|
12
12
|
* @FilePath: /za-material-warehouse/src/ProTree/components/List.tsx
|
13
13
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
/*
|
3
|
-
* @Author:
|
3
|
+
* @Author: ''
|
4
4
|
* @Date: 2024-09-26 14:37:00
|
5
|
-
* @LastEditors:
|
5
|
+
* @LastEditors: ''
|
6
6
|
* @LastEditTime: 2024-09-26 17:50:59
|
7
7
|
* @FilePath: /za-material-warehouse/src/ProTree/components/SearchTitle.tsx
|
8
8
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
package/es/ProTreeModal/index.js
CHANGED
@@ -12,9 +12,9 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
12
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
14
14
|
/*
|
15
|
-
* @Author:
|
15
|
+
* @Author: ''
|
16
16
|
* @Date: 2024-06-04 10:01:18
|
17
|
-
* @LastEditors:
|
17
|
+
* @LastEditors: ''
|
18
18
|
* @LastEditTime: 2024-09-27 11:49:28
|
19
19
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
20
20
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -7,7 +7,7 @@ export declare const customValidate: (validateKeys: any, form: any, rowName: any
|
|
7
7
|
* @returns string
|
8
8
|
*/
|
9
9
|
export declare const splitNames: (names: any[]) => any;
|
10
|
-
export declare const getNamePath: (name: any, virtualKey: any) => any;
|
10
|
+
export declare const getNamePath: (name: any, virtualKey: any) => any[];
|
11
11
|
export declare const onDelete: ({ name, form, virtualKey, selectedRowKeys }: {
|
12
12
|
name: any;
|
13
13
|
form: any;
|
@@ -35,7 +35,7 @@ export declare const handleScrollToError: () => void;
|
|
35
35
|
* @returns 深拷贝后的对象,其中的React节点会被保留
|
36
36
|
*/
|
37
37
|
export declare function cloneDeepFilterNode(value: any): any;
|
38
|
-
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState
|
38
|
+
export declare const onPageCheck: ({ form, name, value, columns, page, pagination, setState }: {
|
39
39
|
form: any;
|
40
40
|
name: any;
|
41
41
|
value: any;
|
@@ -60,7 +60,7 @@ var splitNames = exports.splitNames = function splitNames(names) {
|
|
60
60
|
};
|
61
61
|
// 获取中间formItem的name
|
62
62
|
var getNamePath = exports.getNamePath = function getNamePath(name, virtualKey) {
|
63
|
-
var nextName = (0, _lodash.cloneDeep)(name);
|
63
|
+
var nextName = (0, _lodash.cloneDeep)(Array.isArray(name) ? name : [name]);
|
64
64
|
var lastValue = nextName[nextName.length - 1];
|
65
65
|
nextName[nextName.length - 1] = "".concat(lastValue).concat(virtualKey ? "-".concat(virtualKey) : '');
|
66
66
|
return nextName;
|
@@ -19,9 +19,9 @@ var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
|
19
19
|
var _Container = _interopRequireDefault(require("../../Container"));
|
20
20
|
var _excluded = ["className", "format"];
|
21
21
|
/*
|
22
|
-
* @Author:
|
22
|
+
* @Author: ''
|
23
23
|
* @Date: 2024-01-19 18:27:41
|
24
|
-
* @LastEditors:
|
24
|
+
* @LastEditors: ''
|
25
25
|
* @LastEditTime: 2024-06-03 15:33:12
|
26
26
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/DatePicker/index.tsx
|
27
27
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -18,9 +18,9 @@ var _Container = _interopRequireDefault(require("../../Container"));
|
|
18
18
|
var _useDateRange = require("./useDateRange");
|
19
19
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
20
20
|
/*
|
21
|
-
* @Author:
|
21
|
+
* @Author: ''
|
22
22
|
* @Date: 2024-04-10 11:39:17
|
23
|
-
* @LastEditors:
|
23
|
+
* @LastEditors: ''
|
24
24
|
* @LastEditTime: 2024-05-29 11:50:49
|
25
25
|
* @FilePath: /za-material-warehouse/src/ProForm/components/base/RangePicker/index.tsx
|
26
26
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -25,7 +25,7 @@ var _Container = _interopRequireDefault(require("../../Container"));
|
|
25
25
|
var _view = _interopRequireDefault(require("../../../../assets/view.svg"));
|
26
26
|
var _useRequestList3 = _interopRequireDefault(require("./hooks/useRequestList"));
|
27
27
|
var _locale = _interopRequireDefault(require("../../../../locale"));
|
28
|
-
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne"],
|
28
|
+
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
29
29
|
_excluded2 = ["onOk"],
|
30
30
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
31
31
|
var ProModalSelect = function ProModalSelect(props, ref) {
|
@@ -53,6 +53,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
53
53
|
searchForm = props.searchForm,
|
54
54
|
searchKey = props.searchKey,
|
55
55
|
defaultOne = props.defaultOne,
|
56
|
+
otherProps = props.otherProps,
|
56
57
|
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
57
58
|
var contentForm = _antd.Form.useFormInstance();
|
58
59
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
@@ -100,6 +101,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
100
101
|
columns = _ref4.columns,
|
101
102
|
rowSelection = _ref4.rowSelection,
|
102
103
|
restTableProps = (0, _objectWithoutProperties2.default)(_ref4, _excluded3);
|
104
|
+
var preValue = (0, _react.useRef)(value);
|
103
105
|
var _useSetState = (0, _ahooks.useSetState)({
|
104
106
|
_value: value,
|
105
107
|
isInit: true,
|
@@ -245,6 +247,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
245
247
|
};
|
246
248
|
var handleChangeValue = function handleChangeValue(e) {
|
247
249
|
onChange(e.target.value);
|
250
|
+
preValue.current = e.target.value;
|
248
251
|
if (!readOnly) {
|
249
252
|
setState({
|
250
253
|
_value: e.target.value
|
@@ -253,6 +256,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
253
256
|
};
|
254
257
|
var handleSelectValue = function handleSelectValue(val, option) {
|
255
258
|
onChange(val, option);
|
259
|
+
preValue.current = val;
|
256
260
|
};
|
257
261
|
var handleClick = /*#__PURE__*/function () {
|
258
262
|
var _ref7 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
@@ -364,6 +368,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
364
368
|
case 14:
|
365
369
|
if (flag) {
|
366
370
|
onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
|
371
|
+
preValue.current = labelInValue ? record : getNextValues(record);
|
367
372
|
// 更新内部展示值
|
368
373
|
setState({
|
369
374
|
_value: record,
|
@@ -492,6 +497,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
492
497
|
nextSelectRowKeys = isMultiple ? value : [value];
|
493
498
|
if (labelInValue) {
|
494
499
|
onChange(_data);
|
500
|
+
preValue.current = _data;
|
495
501
|
}
|
496
502
|
// 更新内部展示值
|
497
503
|
setState({
|
@@ -548,10 +554,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
548
554
|
nextSelectRowKeys = isMultiple ? value : [value];
|
549
555
|
if (labelInValue) {
|
550
556
|
onChange(_data2);
|
557
|
+
preValue.current = _data2;
|
551
558
|
} else {
|
552
559
|
onChange(isMultiple ? _data2.map(function (item) {
|
553
560
|
return item[valueKey];
|
554
561
|
}) : _data2[valueKey]);
|
562
|
+
preValue.current = isMultiple ? _data2.map(function (item) {
|
563
|
+
return item[valueKey];
|
564
|
+
}) : _data2[valueKey];
|
555
565
|
}
|
556
566
|
// 更新内部展示值
|
557
567
|
setState({
|
@@ -641,8 +651,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
641
651
|
}
|
642
652
|
}, [JSON.stringify(value), visible, isInit]);
|
643
653
|
(0, _ahooks.useDebounceEffect)(function () {
|
644
|
-
if (value && !visible && readOnly) {
|
654
|
+
if (value && !visible && readOnly && !(0, _lodash.isEqual)(value, preValue.current)) {
|
645
655
|
var _options$some;
|
656
|
+
preValue.current = value;
|
646
657
|
var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
|
647
658
|
return item[valueKey] === value;
|
648
659
|
});
|
@@ -741,17 +752,17 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
741
752
|
var nextParams = transformParams ? transformParams(params) : params;
|
742
753
|
run(nextParams);
|
743
754
|
}
|
744
|
-
},
|
755
|
+
}, 2000),
|
745
756
|
style: {
|
746
757
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
747
758
|
}
|
748
|
-
},
|
759
|
+
}, restProps)) : (0, _jsxRuntime.jsx)(_antd.Input, (0, _objectSpread3.default)({
|
749
760
|
value: viewText,
|
750
761
|
onChange: handleChangeValue,
|
751
762
|
disabled: disabled,
|
752
763
|
autoComplete: "off",
|
753
764
|
allowClear: true
|
754
|
-
},
|
765
|
+
}, restProps)), isView || disabled ? null : (0, _jsxRuntime.jsx)(_antd.Button, {
|
755
766
|
icon: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
756
767
|
className: "viewSvg",
|
757
768
|
src: _view.default,
|
@@ -38,7 +38,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
38
38
|
className = props.className,
|
39
39
|
icon = props.icon,
|
40
40
|
_props$autoHeight = props.autoHeight,
|
41
|
-
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight
|
41
|
+
autoHeight = _props$autoHeight === void 0 ? true : _props$autoHeight,
|
42
|
+
onChange = props.onChange;
|
42
43
|
var cls = (0, _classnames.default)((0, _defineProperty2.default)({
|
43
44
|
'pro-collapse': true,
|
44
45
|
'pro-collapse-level2': level === '2',
|
@@ -156,7 +157,8 @@ var ProCollapse = function ProCollapse(props) {
|
|
156
157
|
});
|
157
158
|
},
|
158
159
|
expandIconPosition: "end",
|
159
|
-
defaultActiveKey: folding ? [] : ['1']
|
160
|
+
defaultActiveKey: folding ? [] : ['1'],
|
161
|
+
onChange: onChange
|
160
162
|
}, collapseProps), {}, {
|
161
163
|
children: renderPanel()
|
162
164
|
}))
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
5
6
|
value: true
|
6
7
|
});
|
@@ -9,14 +10,13 @@ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/obje
|
|
9
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
11
12
|
var _react = require("react");
|
12
|
-
var _reactLazyload =
|
13
|
+
var _reactLazyload = _interopRequireWildcard(require("react-lazyload"));
|
13
14
|
var _lodash = require("lodash");
|
14
15
|
var _index = require("../../index");
|
15
|
-
var _utils = require("../../utils");
|
16
16
|
var _ProCollapse = _interopRequireDefault(require("../../../ProLayout/components/ProCollapse"));
|
17
17
|
var _excluded = ["id", "title", "collapse", "children", "lazyLoad"];
|
18
18
|
var defaultLazyLoadConfig = {
|
19
|
-
height:
|
19
|
+
height: 300,
|
20
20
|
offset: 100,
|
21
21
|
once: true // Load only once upon first entry into the viewport
|
22
22
|
};
|
@@ -31,10 +31,8 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
31
31
|
var _useStep = (0, _index.useStep)(),
|
32
32
|
register = _useStep.register,
|
33
33
|
collapse = _useStep.collapse,
|
34
|
-
globalLazyLoad = _useStep.lazyLoad
|
35
|
-
registerMap = _useStep.registerMap;
|
34
|
+
globalLazyLoad = _useStep.lazyLoad;
|
36
35
|
var lazyLoad = stepLazyLoad || globalLazyLoad;
|
37
|
-
var loadedMap = (0, _utils.getLoadedMap)(registerMap);
|
38
36
|
(0, _react.useEffect)(function () {
|
39
37
|
// Schedule registration to avoid re-render issues
|
40
38
|
var timeoutId = setTimeout(function () {
|
@@ -45,13 +43,11 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
45
43
|
}, restProps));
|
46
44
|
}, 0);
|
47
45
|
return function () {
|
48
|
-
|
46
|
+
clearTimeout(timeoutId);
|
49
47
|
};
|
50
48
|
}, [id, title, lazyLoad, restProps, register]);
|
51
49
|
var renderChildren = function renderChildren() {
|
52
|
-
|
53
|
-
// 第一个step不设置lasyload,防止懒加载不生效
|
54
|
-
if (lazyLoad && (loadedMap === null || loadedMap === void 0 ? void 0 : loadedMap.length) && (loadedMap === null || loadedMap === void 0 ? void 0 : (_loadedMap$ = loadedMap[0]) === null || _loadedMap$ === void 0 ? void 0 : _loadedMap$.id) !== id) {
|
50
|
+
if (lazyLoad) {
|
55
51
|
var lazyLoadProps = (0, _lodash.isBoolean)(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
56
52
|
return (0, _jsxRuntime.jsx)(_reactLazyload.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, lazyLoadProps), {}, {
|
57
53
|
classNamePrefix: id,
|
@@ -69,6 +65,14 @@ var ProStepItem = function ProStepItem(_ref) {
|
|
69
65
|
title: title,
|
70
66
|
icon: true
|
71
67
|
}, restProps), {}, {
|
68
|
+
onChange: function onChange(e) {
|
69
|
+
var _restProps$onChange;
|
70
|
+
if (lazyLoad) {
|
71
|
+
(0, _reactLazyload.forceCheck)();
|
72
|
+
}
|
73
|
+
// 默认执行
|
74
|
+
restProps === null || restProps === void 0 ? void 0 : (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 ? void 0 : _restProps$onChange.call(restProps, e);
|
75
|
+
},
|
72
76
|
children: renderChildren()
|
73
77
|
}))
|
74
78
|
});
|
@@ -16,9 +16,9 @@ var _index = require("../../../index");
|
|
16
16
|
require("../../../../style/index.less");
|
17
17
|
var _excluded = ["dataSource", "tableProps", "draggableProps", "summaryProps", "emptyTextProps"];
|
18
18
|
/*
|
19
|
-
* @Author:
|
19
|
+
* @Author: ''
|
20
20
|
* @Date: 2024-08-09 13:48:59
|
21
|
-
* @LastEditors:
|
21
|
+
* @LastEditors: ''
|
22
22
|
* @LastEditTime: 2024-08-27 15:27:44
|
23
23
|
* @FilePath: /za-material-warehouse/src/ProTable/components/RcTable/components/DraggableTable/index.tsx
|
24
24
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -10,9 +10,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
var _antd = require("antd");
|
11
11
|
var _react = require("react");
|
12
12
|
/*
|
13
|
-
* @Author:
|
13
|
+
* @Author: ''
|
14
14
|
* @Date: 2024-09-20 10:26:04
|
15
|
-
* @LastEditors:
|
15
|
+
* @LastEditors: ''
|
16
16
|
* @LastEditTime: 2024-09-26 14:12:44
|
17
17
|
* @FilePath: /za-material-warehouse/src/ProTree/components/AdaptiveTooltip.tsx
|
18
18
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -14,9 +14,9 @@ var _SearchTitle = _interopRequireDefault(require("./SearchTitle"));
|
|
14
14
|
var _CloseIcon = _interopRequireDefault(require("./CloseIcon"));
|
15
15
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "showCodeName", "mode", "fieldNames", "handleOnChange", "handleFilterClose", "optionRender"];
|
16
16
|
/*
|
17
|
-
* @Author:
|
17
|
+
* @Author: ''
|
18
18
|
* @Date: 2024-07-03 11:02:19
|
19
|
-
* @LastEditors:
|
19
|
+
* @LastEditors: ''
|
20
20
|
* @LastEditTime: 2024-09-26 14:30:26
|
21
21
|
* @FilePath: /za-material-warehouse/src/ProTree/components/List.tsx
|
22
22
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -9,9 +9,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
var _react = require("react");
|
10
10
|
var _AdaptiveTooltip = _interopRequireDefault(require("./AdaptiveTooltip"));
|
11
11
|
/*
|
12
|
-
* @Author:
|
12
|
+
* @Author: ''
|
13
13
|
* @Date: 2024-09-26 14:37:00
|
14
|
-
* @LastEditors:
|
14
|
+
* @LastEditors: ''
|
15
15
|
* @LastEditTime: 2024-09-26 17:50:59
|
16
16
|
* @FilePath: /za-material-warehouse/src/ProTree/components/SearchTitle.tsx
|
17
17
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
@@ -25,9 +25,9 @@ var _inputSearch = _interopRequireDefault(require("../assets/input-search.svg"))
|
|
25
25
|
var _locale = _interopRequireWildcard(require("../locale"));
|
26
26
|
require("./style/index.less");
|
27
27
|
/*
|
28
|
-
* @Author:
|
28
|
+
* @Author: ''
|
29
29
|
* @Date: 2024-06-04 10:01:18
|
30
|
-
* @LastEditors:
|
30
|
+
* @LastEditors: ''
|
31
31
|
* @LastEditTime: 2024-09-27 11:49:28
|
32
32
|
* @FilePath: /za-material-warehouse/src/ProTreeModal/index.tsx
|
33
33
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|