@para-ui/core 3.0.16 → 3.0.18

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.
@@ -1,5 +1,6 @@
1
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
1
2
  import { jsx } from 'react/jsx-runtime';
2
- import { useRef, useEffect } from 'react';
3
+ import { useRef, useState, useEffect } from 'react';
3
4
  import { Transition } from 'react-transition-group';
4
5
  import { g as getTransitionProps, a as getAutoHeightDuration } from '../_verture/util-a77b261e.js';
5
6
  import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
@@ -11,7 +12,7 @@ styleInject(css_248z);
11
12
  var CollapseBox = function CollapseBox(props) {
12
13
  var className = props.className,
13
14
  style = props.style,
14
- inProp = props.in,
15
+ open = props.in,
15
16
  _props$collapsedHeigh = props.collapsedHeight,
16
17
  collapsedHeightProp = _props$collapsedHeigh === void 0 ? '0px' : _props$collapsedHeigh,
17
18
  _props$timeout = props.timeout,
@@ -28,11 +29,20 @@ var CollapseBox = function CollapseBox(props) {
28
29
  var autoTransitionDuration = useRef(null); // 下拉收起的高度
29
30
 
30
31
  var collapsedHeight = typeof collapsedHeightProp === 'number' ? "".concat(collapsedHeightProp, "px") : collapsedHeightProp;
32
+
33
+ var _useState = useState(false),
34
+ _useState2 = _slicedToArray(_useState, 2),
35
+ inProp = _useState2[0],
36
+ setInProp = _useState2[1];
37
+
31
38
  useEffect(function () {
32
39
  return function () {
33
40
  clearTimeout(timer.current);
34
41
  };
35
- }, []); // 处理节点
42
+ }, []);
43
+ useEffect(function () {
44
+ setInProp(open);
45
+ }, [open]); // 处理节点
36
46
 
37
47
  var normalizedTransitionCallback = function normalizedTransitionCallback(callback) {
38
48
  return function (nodeOrAppearing) {
@@ -8,7 +8,7 @@ import SearchIcon from '@para-ui/icons/Search';
8
8
  import CloseIcon from '@para-ui/icons/Close';
9
9
  import CloseCircle from '@para-ui/icons/CloseCircle';
10
10
  import Table from '../Table/index.js';
11
- import { T as Tree } from '../_verture/index-6aeaf919.js';
11
+ import { T as Tree } from '../_verture/index-62dbd8e3.js';
12
12
  import { Button } from '../Button/index.js';
13
13
  import { Dropdown } from '../Dropdown/index.js';
14
14
  import { Popover } from '../Popover/index.js';
@@ -327,8 +327,14 @@ var ComboSelect = function ComboSelect(props) {
327
327
 
328
328
  var intl = useFormatMessage('ComboSelect', localeJson);
329
329
  var isRemoteLoadRef = useRef(isRemoteLoad(mode, mode === 'table' ? TableProps : TreeProps)); //是否远程加载数据
330
+
331
+ var _useState19 = useState([]),
332
+ _useState20 = _slicedToArray(_useState19, 2),
333
+ loadedKeys = _useState20[0],
334
+ setLoadKeys = _useState20[1]; //加载过的key
330
335
  //选择框点击
331
336
 
337
+
332
338
  var handleSelectorClick = function handleSelectorClick(event) {
333
339
  if (disablePopup) return;
334
340
  if (disabled) return;
@@ -421,6 +427,8 @@ var ComboSelect = function ComboSelect(props) {
421
427
  } else {
422
428
  onSearch(inputValue);
423
429
  }
430
+
431
+ if (isRemoteLoadRef.current) setLoadKeys([]);
424
432
  };
425
433
 
426
434
  if (type === 'click') {
@@ -1008,6 +1016,7 @@ var ComboSelect = function ComboSelect(props) {
1008
1016
  radioable: !checkable,
1009
1017
  showRadio: false,
1010
1018
  selectable: mode !== 'list',
1019
+ loadedKeys: loadedKeys,
1011
1020
  checkedKeys: checkKeys,
1012
1021
  onCheck: handleTreeCheck,
1013
1022
  onSelect: handleSelect,
@@ -1015,7 +1024,7 @@ var ComboSelect = function ComboSelect(props) {
1015
1024
  refresh: refresh !== null && refresh !== void 0 ? refresh : inRefresh
1016
1025
  }))
1017
1026
  }));
1018
- }, [checkKeys, refresh, params, inRefresh, open]); //组合选择器输入框
1027
+ }, [checkKeys, refresh, params, inRefresh, open, loadedKeys]); //组合选择器输入框
1019
1028
 
1020
1029
  var comboSelectorInput = jsxs("div", Object.assign({
1021
1030
  className: 'comboselect-wrapper',
@@ -1149,7 +1158,7 @@ var ComboSelect = function ComboSelect(props) {
1149
1158
  children: comboSelectorInput
1150
1159
  }))
1151
1160
  }));
1152
- }, [open, checkKeys, inputValue, refresh, params, fullPath, inRefresh, hasAllClear, helperText, language, locale, openMore, moreTagList]);
1161
+ }, [open, checkKeys, inputValue, refresh, params, fullPath, inRefresh, hasAllClear, helperText, language, locale, openMore, moreTagList, loadedKeys]);
1153
1162
  return jsxs("div", Object.assign({
1154
1163
  className: makeSelectCls(),
1155
1164
  style: style
package/Drawer/index.js CHANGED
@@ -55,7 +55,9 @@ var Drawer = function Drawer(props) {
55
55
  onOk = props.onOk,
56
56
  onCancel = props.onCancel,
57
57
  _afterVisibleChange = props.afterVisibleChange,
58
- restProps = __rest(props, ["className", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange"]);
58
+ okButtonProps = props.okButtonProps,
59
+ cancelButtonProps = props.cancelButtonProps,
60
+ restProps = __rest(props, ["className", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange", "okButtonProps", "cancelButtonProps"]);
59
61
 
60
62
  var intl = useFormatMessage('Drawer', localeJson);
61
63
 
@@ -127,7 +129,7 @@ var Drawer = function Drawer(props) {
127
129
  variant: "outlined",
128
130
  size: "medium",
129
131
  onClick: handleCancel
130
- }, {
132
+ }, cancelButtonProps, {
131
133
  children: intl({
132
134
  id: 'cancel'
133
135
  })
@@ -135,7 +137,7 @@ var Drawer = function Drawer(props) {
135
137
  variant: "contained",
136
138
  size: "medium",
137
139
  onClick: handleOk
138
- }, {
140
+ }, okButtonProps, {
139
141
  children: intl({
140
142
  id: 'ok'
141
143
  })
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { ButtonProps } from "../Button";
2
3
  /**
3
4
  * @author Hanz
4
5
  * @date 2021/11/8 下午3:07
@@ -78,6 +79,10 @@ export interface DrawerProps {
78
79
  onOk?: () => void;
79
80
  /** 取消回调 */
80
81
  onCancel?: () => void;
82
+ /** 确定按钮属性*/
83
+ okButtonProps?: ButtonProps;
84
+ /** 取消按钮属性*/
85
+ cancelButtonProps?: ButtonProps;
81
86
  [name: string]: any;
82
87
  }
83
88
  export {};
package/Form/index.js CHANGED
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { DeepClone } from '@paraview/lib';
5
5
  import React__default from 'react';
6
- import { F as FormItem, v as validate } from '../_verture/index-d79d2102.js';
6
+ import { F as FormItem, v as validate } from '../_verture/index-503870a9.js';
7
7
  import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
8
8
  import '../TextField/index.js';
9
9
  import '../_verture/typeof-498dd2b1.js';
@@ -67,7 +67,7 @@ import '@para-ui/icons/DoubleLeft';
67
67
  import '@para-ui/icons/DoubleRight';
68
68
  import '@para-ui/icons/Left';
69
69
  import '@para-ui/icons/Right';
70
- import '../_verture/index-6aeaf919.js';
70
+ import '../_verture/index-62dbd8e3.js';
71
71
  import 'rc-tree';
72
72
  import '@para-ui/icons/Document';
73
73
  import 'react-dom';
package/FormItem/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
- export { F as default } from '../_verture/index-d79d2102.js';
3
+ export { F as default } from '../_verture/index-503870a9.js';
4
4
  import 'clsx';
5
5
  import '../Label/index.js';
6
6
  import '../_verture/constant-bf34e6fa.js';
@@ -67,7 +67,7 @@ import '@para-ui/icons/DoubleLeft';
67
67
  import '@para-ui/icons/DoubleRight';
68
68
  import '@para-ui/icons/Left';
69
69
  import '@para-ui/icons/Right';
70
- import '../_verture/index-6aeaf919.js';
70
+ import '../_verture/index-62dbd8e3.js';
71
71
  import 'rc-tree';
72
72
  import '@para-ui/icons/Document';
73
73
  import 'react-dom';
package/Menu/index.js CHANGED
@@ -1092,6 +1092,7 @@ var FooterExpansion = function FooterExpansion(props) {
1092
1092
  customizeContent = props.customizeContent,
1093
1093
  clickExpansion = props.clickExpansion,
1094
1094
  version = props.version,
1095
+ render = props.render,
1095
1096
  className = props.className;
1096
1097
  /** 点击展开/收起按钮 */
1097
1098
 
@@ -1105,6 +1106,7 @@ var FooterExpansion = function FooterExpansion(props) {
1105
1106
 
1106
1107
 
1107
1108
  var handContent = function handContent() {
1109
+ if (render) return render;
1108
1110
  if (customizeContent) return customizeContent;
1109
1111
 
1110
1112
  var handIcon = function handIcon() {