@ccs-ui/rc-pro 1.0.7-rc.9 → 1.1.0

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.
Files changed (72) hide show
  1. package/es/auth/auth-button.d.ts +1 -2
  2. package/es/auth/index.d.ts +11 -4
  3. package/es/cascader/index.d.ts +2 -3
  4. package/es/cascader/index.js +3 -2
  5. package/es/color-picker/index.d.ts +2 -2
  6. package/es/config.d.ts +1 -2
  7. package/es/config.js +5 -4
  8. package/es/context/index.d.ts +25 -12
  9. package/es/context/index.js +1 -6
  10. package/es/date-picker/index.d.ts +2 -3
  11. package/es/dialog/HookDrawer.d.ts +8 -0
  12. package/es/dialog/HookDrawer.js +106 -0
  13. package/es/dialog/HookModal.d.ts +8 -0
  14. package/es/dialog/HookModal.js +179 -0
  15. package/es/dialog/button.d.ts +10 -0
  16. package/es/dialog/button.js +47 -0
  17. package/es/dialog/context.d.ts +11 -0
  18. package/es/dialog/context.js +10 -0
  19. package/es/dialog/dialog.d.ts +41 -0
  20. package/es/dialog/dialog.js +167 -0
  21. package/es/dialog/form.d.ts +13 -0
  22. package/es/dialog/form.js +47 -0
  23. package/es/dialog/index.d.ts +11 -0
  24. package/es/dialog/index.js +9 -0
  25. package/es/dialog/index.less +28 -0
  26. package/es/dialog/usePatchElement.d.ts +5 -0
  27. package/es/dialog/usePatchElement.js +35 -0
  28. package/es/drawer/buttons.d.ts +2 -2
  29. package/es/drawer/index.d.ts +3 -0
  30. package/es/drawer/index.js +3 -0
  31. package/es/drawer/open/content.d.ts +3 -3
  32. package/es/drawer/open/form.d.ts +2 -2
  33. package/es/drawer/open/index.js +1 -6
  34. package/es/full-screen/index.d.ts +1 -2
  35. package/es/full-screen/index.js +29 -26
  36. package/es/hooks/use-tabs.d.ts +1 -1
  37. package/es/hooks/use-window.d.ts +4 -0
  38. package/es/hooks/use-window.js +5 -0
  39. package/es/index.d.ts +1 -0
  40. package/es/index.js +1 -0
  41. package/es/interval-button/index.d.ts +1 -2
  42. package/es/interval-button/index.js +1 -1
  43. package/es/keep-alive-tabs/index.d.ts +1 -2
  44. package/es/keep-alive-tabs/page.d.ts +1 -1
  45. package/es/loading/index.d.ts +1 -2
  46. package/es/loading/index.js +25 -21
  47. package/es/modal/buttons.d.ts +2 -2
  48. package/es/modal/index.d.ts +3 -0
  49. package/es/modal/index.js +3 -0
  50. package/es/modal/open/drag.d.ts +1 -2
  51. package/es/modal/open/form.d.ts +2 -2
  52. package/es/pro-grid/index.d.ts +2 -2
  53. package/es/pro-table/index.d.ts +6 -2
  54. package/es/pro-table/index.js +75 -53
  55. package/es/pro-table/index.less +5 -14
  56. package/es/pro-table/search.d.ts +4 -3
  57. package/es/pro-table/search.js +221 -175
  58. package/es/pro-tabs/index.d.ts +1 -2
  59. package/es/pro-tabs/index.js +102 -31
  60. package/es/select/index.d.ts +2 -3
  61. package/es/select/index.js +3 -2
  62. package/es/status-tag/index.js +6 -5
  63. package/es/table/index.d.ts +1 -2
  64. package/es/time-picker/index.d.ts +2 -3
  65. package/es/trigger/index.d.ts +2 -2
  66. package/es/upload/index.d.ts +1 -2
  67. package/es/upload/upload-image.d.ts +1 -2
  68. package/es/utils/index.d.ts +7 -7
  69. package/es/utils/index.js +33 -27
  70. package/es/virtual-list/index.d.ts +2 -2
  71. package/es/water-mark/index.d.ts +1 -1
  72. package/package.json +4 -3
@@ -1,13 +1,3 @@
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
- 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."); }
4
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
- 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; }
7
- 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; }
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; }
9
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
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); }
11
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
2
  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."); }
13
3
  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); }
@@ -15,6 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
15
5
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
16
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
7
  import { useUpdateEffect } from 'ahooks';
8
+ import update from 'immutability-helper';
18
9
  import React, { cloneElement, useState } from 'react';
19
10
  import { TabsContext } from "../context";
20
11
  import "./index.less";
@@ -25,11 +16,14 @@ export default (function (_ref) {
25
16
  _ref2$items = _ref2.items,
26
17
  items = _ref2$items === void 0 ? [] : _ref2$items,
27
18
  activeKey = _ref2.activeKey,
28
- defaultActiveKey = _ref2.defaultActiveKey;
29
- var _useState = useState({
30
- activeKey: defaultActiveKey || (items[0] || {}).key,
31
- items: items || [],
32
- option: {}
19
+ defaultActiveKey = _ref2.defaultActiveKey,
20
+ onChange = _ref2.onChange;
21
+ var _useState = useState(function () {
22
+ return {
23
+ activeKey: defaultActiveKey || (items[0] || {}).key,
24
+ items: items || [],
25
+ options: {}
26
+ };
33
27
  }),
34
28
  _useState2 = _slicedToArray(_useState, 2),
35
29
  tabsProps = _useState2[0],
@@ -37,8 +31,10 @@ export default (function (_ref) {
37
31
 
38
32
  // items 发生改变
39
33
  useUpdateEffect(function () {
40
- setTabsProps(_objectSpread(_objectSpread({}, tabsProps), {}, {
41
- items: items
34
+ setTabsProps(update(tabsProps, {
35
+ items: {
36
+ $set: items
37
+ }
42
38
  }));
43
39
  }, [children === null || children === void 0 ? void 0 : (_children$items = children.items) === null || _children$items === void 0 ? void 0 : _children$items.map(function (t) {
44
40
  return t.key;
@@ -52,26 +48,101 @@ export default (function (_ref) {
52
48
  if (!activeKey) {
53
49
  addOptions.activeKey = tabsProps.activeKey;
54
50
  addOptions.onChange = function (key) {
55
- setTabsProps(_objectSpread(_objectSpread({}, tabsProps), {}, {
56
- activeKey: key
51
+ setTabsProps(update(tabsProps, {
52
+ activeKey: {
53
+ $set: key
54
+ }
57
55
  }));
56
+ if (onChange) onChange(key);
58
57
  };
59
58
  }
59
+
60
+ // hooks改变状态
61
+ var onHooksChange = function onHooksChange(e) {
62
+ var key = e.activeKey,
63
+ _e$enableKeys = e.enableKeys,
64
+ enableKeys = _e$enableKeys === void 0 ? [] : _e$enableKeys,
65
+ _e$disableKeys = e.disableKeys,
66
+ disableKeys = _e$disableKeys === void 0 ? [] : _e$disableKeys,
67
+ options = e.options;
68
+ var updateParams = {};
69
+
70
+ // 更新activeKey
71
+ if (!!key) {
72
+ updateParams.activeKey = {
73
+ $set: key
74
+ };
75
+ if (onChange) onChange(key);
76
+ }
77
+
78
+ // 更新禁用或启用tab
79
+ if (enableKeys.length || disableKeys.length) {
80
+ var _tabsProps$items;
81
+ var newItem = {};
82
+ (_tabsProps$items = tabsProps.items) === null || _tabsProps$items === void 0 ? void 0 : _tabsProps$items.forEach(function (item, index) {
83
+ if (enableKeys.includes(item.key)) {
84
+ newItem[index] = {
85
+ disabled: {
86
+ $set: false
87
+ }
88
+ };
89
+ } else if (disableKeys.includes(item.key)) {
90
+ newItem[index] = {
91
+ disabled: {
92
+ $set: true
93
+ }
94
+ };
95
+ }
96
+ });
97
+ updateParams.items = newItem;
98
+ }
99
+
100
+ // 更新options
101
+ if (options) {
102
+ updateParams.options = {
103
+ $set: options
104
+ };
105
+ }
106
+ setTabsProps(update(tabsProps, updateParams));
107
+ };
108
+
109
+ // remove tabs
110
+ var onRemoveTabs = function onRemoveTabs(key) {
111
+ var _tabsProps$items2;
112
+ var curKey = key;
113
+ if (typeof key === 'string') {
114
+ curKey = [key];
115
+ }
116
+ var removeItems = [];
117
+ (_tabsProps$items2 = tabsProps.items) === null || _tabsProps$items2 === void 0 ? void 0 : _tabsProps$items2.forEach(function (item, index) {
118
+ if (curKey.includes(item.key)) {
119
+ removeItems.push([index, 1]);
120
+ }
121
+ });
122
+ setTabsProps(update(tabsProps, {
123
+ items: {
124
+ $splice: removeItems
125
+ }
126
+ }));
127
+ };
128
+
129
+ // add tabs
130
+ var onAddTabs = function onAddTabs() {
131
+ var tabs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
132
+ var isArray = Array.isArray(tabs);
133
+ setTabsProps(update(tabsProps, {
134
+ items: {
135
+ $push: isArray ? tabs : [tabs]
136
+ }
137
+ }));
138
+ };
60
139
  return children ? /*#__PURE__*/React.createElement(TabsContext.Provider, {
61
140
  value: {
62
141
  activeKey: tabsProps.activeKey,
63
- items: tabsProps.items,
64
- option: tabsProps.option,
65
- onChange: function onChange(e) {
66
- return setTabsProps(function (state) {
67
- if (e.items) {
68
- return _objectSpread(_objectSpread(_objectSpread({}, state), e), {}, {
69
- items: _toConsumableArray(e.items || [])
70
- });
71
- }
72
- return _objectSpread(_objectSpread({}, state), e);
73
- });
74
- }
142
+ options: tabsProps.options,
143
+ onTabChange: onHooksChange,
144
+ onRemoveTabs: onRemoveTabs,
145
+ onAddTabs: onAddTabs
75
146
  }
76
147
  }, /*#__PURE__*/cloneElement(children, addOptions)) : /*#__PURE__*/React.createElement(React.Fragment, null);
77
148
  });
@@ -1,5 +1,4 @@
1
1
  import { SelectProps } from 'antd';
2
- import React from 'react';
3
2
  import { HttpResult, RecordType } from '..';
4
3
  type CacheType = {
5
4
  /** 缓存key,同一个key将共享数据 */
@@ -14,12 +13,12 @@ type ApiSelectProps = SelectProps & {
14
13
  /** 依赖参数 */
15
14
  defaultParams?: RecordType;
16
15
  /** 查询请求 */
17
- onQuery?: (dependParams?: RecordType) => Promise<HttpResult<any[]>>;
16
+ onQuery?: (params?: any) => Promise<HttpResult<any[]>>;
18
17
  };
19
18
  /**
20
19
  * 基于接口查询的select组件
21
20
  * @param CcsSelectProps
22
21
  * @returns
23
22
  */
24
- export default function CcsApiSelect({ onQuery, cache, defaultParams, ...restProps }: ApiSelectProps): React.JSX.Element;
23
+ export default function CcsApiSelect({ onQuery, cache, defaultParams, ...restProps }: ApiSelectProps): import("react/jsx-runtime").JSX.Element;
25
24
  export {};
@@ -23,7 +23,8 @@ import React, { useEffect } from 'react';
23
23
  export default function CcsApiSelect(_ref) {
24
24
  var onQuery = _ref.onQuery,
25
25
  cache = _ref.cache,
26
- defaultParams = _ref.defaultParams,
26
+ _ref$defaultParams = _ref.defaultParams,
27
+ defaultParams = _ref$defaultParams === void 0 ? {} : _ref$defaultParams,
27
28
  restProps = _objectWithoutProperties(_ref, _excluded);
28
29
  var _useRequest = useRequest( /*#__PURE__*/function () {
29
30
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
@@ -60,7 +61,7 @@ export default function CcsApiSelect(_ref) {
60
61
  run = _useRequest.run;
61
62
  useEffect(function () {
62
63
  if (onQuery) run(defaultParams);
63
- }, [defaultParams]);
64
+ }, [JSON.stringify(defaultParams)]);
64
65
  return /*#__PURE__*/React.createElement(Select, _extends({
65
66
  options: data,
66
67
  loading: loading,
@@ -1,5 +1,5 @@
1
1
  import { Badge, Tag } from 'antd';
2
- import React from 'react';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  export default function CcsStatusTag(_ref) {
4
4
  var value = _ref.value,
5
5
  _ref$options = _ref.options,
@@ -12,12 +12,13 @@ export default function CcsStatusTag(_ref) {
12
12
  var label = option.label,
13
13
  tag = option.tag;
14
14
  if (tag && tag[0] === 'tag') {
15
- return /*#__PURE__*/React.createElement(Tag, {
16
- color: tag[1]
17
- }, label);
15
+ return /*#__PURE__*/_jsx(Tag, {
16
+ color: tag[1],
17
+ children: label
18
+ });
18
19
  }
19
20
  if (tag && tag[0] === 'badge') {
20
- return /*#__PURE__*/React.createElement(Badge, {
21
+ return /*#__PURE__*/_jsx(Badge, {
21
22
  status: tag[1],
22
23
  text: label
23
24
  });
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import { CcsTableProps } from '../pro-table';
3
2
  import './index.less';
4
3
  type TableProps<T> = Omit<CcsTableProps<T>, 'request' | 'requestParam'>;
5
- declare const CustomTable: <T extends object = any>(props: TableProps<T>) => React.JSX.Element;
4
+ declare const CustomTable: <T extends object = any>(props: TableProps<T>) => import("react/jsx-runtime").JSX.Element;
6
5
  export default CustomTable;
@@ -1,7 +1,6 @@
1
1
  import { TimePickerProps } from 'antd';
2
2
  import { RangePickerTimeProps } from 'antd/es/date-picker/generatePicker';
3
3
  import { Dayjs } from 'dayjs';
4
- import React from 'react';
5
4
  type CcsTimePickerProps = {
6
5
  value?: string;
7
6
  onChange?: (e: string) => void;
@@ -10,8 +9,8 @@ type CcsRangePickerProps = {
10
9
  value?: [string, string];
11
10
  onChange?: (e: [string, string]) => void;
12
11
  } & Omit<RangePickerTimeProps<Dayjs>, 'value' | 'onChange' | 'picker'>;
13
- declare function CcsDatePicker({ value, onChange, ...restProps }: CcsTimePickerProps): React.JSX.Element;
12
+ declare function CcsDatePicker({ value, onChange, ...restProps }: CcsTimePickerProps): import("react/jsx-runtime").JSX.Element;
14
13
  declare namespace CcsDatePicker {
15
- var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => React.JSX.Element;
14
+ var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => import("react/jsx-runtime").JSX.Element;
16
15
  }
17
16
  export default CcsDatePicker;
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, ReactElement } from 'react';
1
+ import { CSSProperties, ReactElement } from 'react';
2
2
  import { SizeType } from 'antd/es/config-provider/SizeContext';
3
3
  import './index.less';
4
4
  export interface CcsTriggerChildrenProps<T = any> {
@@ -56,5 +56,5 @@ export interface CcsTriggerProps {
56
56
  * @param CcsTriggerPropsType
57
57
  * @returns
58
58
  */
59
- declare const TriggerComponent: (props: CcsTriggerProps) => React.JSX.Element;
59
+ declare const TriggerComponent: (props: CcsTriggerProps) => import("react/jsx-runtime").JSX.Element;
60
60
  export default TriggerComponent;
@@ -1,5 +1,4 @@
1
1
  import { UploadProps } from 'antd';
2
- import React from 'react';
3
2
  import { ImageUpload } from './upload-image';
4
3
  export type CcsUploadProps = Pick<UploadProps, 'maxCount' | 'data' | 'multiple' | 'accept' | 'action' | 'name' | 'headers'> & {
5
4
  tokenKey?: string;
@@ -7,7 +6,7 @@ export type CcsUploadProps = Pick<UploadProps, 'maxCount' | 'data' | 'multiple'
7
6
  uploadText?: string;
8
7
  onChange?: (value: any) => void;
9
8
  };
10
- declare function CcsUpload({ tokenKey, uploadText, maxCount, maxFileSize, onChange, ...otherProps }: CcsUploadProps): React.JSX.Element;
9
+ declare function CcsUpload({ tokenKey, uploadText, maxCount, maxFileSize, onChange, ...otherProps }: CcsUploadProps): import("react/jsx-runtime").JSX.Element;
11
10
  declare namespace CcsUpload {
12
11
  var Image: typeof ImageUpload;
13
12
  }
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import { CcsUploadProps } from './index';
3
2
  type CcsImageUploadProps = CcsUploadProps & {
4
3
  crop?: boolean;
5
4
  tokenKey?: string;
6
5
  };
7
- export declare function ImageUpload({ crop, tokenKey, uploadText, maxCount, maxFileSize, onChange, ...otherProps }: CcsImageUploadProps): React.JSX.Element;
6
+ export declare function ImageUpload({ crop, tokenKey, uploadText, maxCount, maxFileSize, onChange, ...otherProps }: CcsImageUploadProps): import("react/jsx-runtime").JSX.Element;
8
7
  export {};
@@ -109,12 +109,12 @@ export default class utils {
109
109
  * @param obj
110
110
  * @returns
111
111
  */
112
- static objIsEmpty: (obj: any) => boolean;
112
+ static objIsEmpty(obj: any): boolean;
113
+ /**
114
+ * 判断值不为空
115
+ * @param str string,object,array
116
+ * @returns
117
+ */
118
+ static isNil(str: any): boolean;
113
119
  }
114
- /**
115
- * 判断值不为空
116
- * @param str string,object,array
117
- * @returns
118
- */
119
- export declare function isNil(str: any): boolean;
120
120
  export {};
package/es/utils/index.js CHANGED
@@ -214,14 +214,41 @@ var utils = /*#__PURE__*/function () {
214
214
  * @param content
215
215
  * @returns
216
216
  */
217
+ }, {
218
+ key: "objIsEmpty",
219
+ value:
220
+ /**
221
+ * 空对象?
222
+ * @param obj
223
+ * @returns
224
+ */
225
+ function objIsEmpty(obj) {
226
+ if (!obj) return true;
227
+ return Object.keys(obj).length === 0;
228
+ }
229
+
230
+ /**
231
+ * 判断值不为空
232
+ * @param str string,object,array
233
+ * @returns
234
+ */
235
+ }, {
236
+ key: "isNil",
237
+ value: function isNil(str) {
238
+ if (typeof str === 'string') {
239
+ return str.trim() === '';
240
+ }
241
+ if (_isArray(str)) {
242
+ return str.length === 0;
243
+ }
244
+ if (_isObject(str)) {
245
+ return Object.keys(str).length === 0;
246
+ }
247
+ return str === undefined || str === null;
248
+ }
217
249
  }]);
218
250
  return utils;
219
251
  }();
220
- /**
221
- * 判断值不为空
222
- * @param str string,object,array
223
- * @returns
224
- */
225
252
  _defineProperty(utils, "isNode", typeof process !== 'undefined' && process.versions !== null && process.versions.node !== null);
226
253
  _defineProperty(utils, "isEmpty", function (val) {
227
254
  return _empty(val);
@@ -253,25 +280,4 @@ _defineProperty(utils, "showConfirm", function (title) {
253
280
  });
254
281
  });
255
282
  });
256
- /**
257
- * 空对象?
258
- * @param obj
259
- * @returns
260
- */
261
- _defineProperty(utils, "objIsEmpty", function (obj) {
262
- if (!obj) return true;
263
- return Object.keys(obj).length === 0;
264
- });
265
- export { utils as default };
266
- export function isNil(str) {
267
- if (typeof str === 'string') {
268
- return str.trim() === '';
269
- }
270
- if (_isArray(str)) {
271
- return str.length === 0;
272
- }
273
- if (_isObject(str)) {
274
- return Object.keys(str).length === 0;
275
- }
276
- return str === undefined || str === null;
277
- }
283
+ export { utils as default };
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, ReactNode, RefObject } from 'react';
1
+ import { CSSProperties, ReactNode, RefObject } from 'react';
2
2
  interface Position {
3
3
  left: number;
4
4
  top: number;
@@ -48,5 +48,5 @@ export interface ListItemProps {
48
48
  description?: ReactNode;
49
49
  onClick?: () => void;
50
50
  }
51
- declare const VirtualList: ({ height, rowCount, rowHeight, className, style, virtualRef, onScroll, rowRenderer, autoHideScroll, overscanRowCount, rowCountChangeScrollTop, }: VirtualListProps) => React.JSX.Element;
51
+ declare const VirtualList: ({ height, rowCount, rowHeight, className, style, virtualRef, onScroll, rowRenderer, autoHideScroll, overscanRowCount, rowCountChangeScrollTop, }: VirtualListProps) => import("react/jsx-runtime").JSX.Element;
52
52
  export default VirtualList;
@@ -65,5 +65,5 @@ export type WaterMarkProps = {
65
65
  * @param WaterMarkProps
66
66
  * @returns
67
67
  */
68
- declare const WaterMarkComponent: (props: WaterMarkProps) => React.JSX.Element;
68
+ declare const WaterMarkComponent: (props: WaterMarkProps) => import("react/jsx-runtime").JSX.Element;
69
69
  export default WaterMarkComponent;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ccs-ui/rc-pro",
3
- "version": "1.0.7-rc.9",
4
- "description": "A react library developed with dumi",
3
+ "version": "1.1.0",
4
+ "description": "A react pro components",
5
5
  "license": "MIT",
6
6
  "module": "es/index.js",
7
7
  "types": "es/index.d.ts",
@@ -49,10 +49,11 @@
49
49
  "dependencies": {
50
50
  "@ant-design/icons": "^5.1.4",
51
51
  "ahooks": "^3.7.7",
52
- "antd": "^5.5.2",
52
+ "antd": "5.6",
53
53
  "antd-img-crop": "^4.12.2",
54
54
  "classnames": "^2.3.2",
55
55
  "dayjs": "^1.11.7",
56
+ "immutability-helper": "^3.1.1",
56
57
  "js-base64": "^3.7.5",
57
58
  "localforage": "^1.10.0",
58
59
  "lodash": "^4.17.21",