@vtx/components 4.0.0-beta.7 → 4.0.0-beta.71

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 (212) hide show
  1. package/README.md +19 -19
  2. package/es/index.js +3 -0
  3. package/es/utils/components/LabelIconTip/index.js +7 -7
  4. package/es/utils/conversionMomentValue/index.js +25 -25
  5. package/es/utils/filterSpecialCharacters.js +53 -52
  6. package/es/utils/genCopyable/index.js +6 -6
  7. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  8. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  9. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  10. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  11. package/es/utils/hooks/useLatest/index.js +2 -2
  12. package/es/utils/hooks/useRefCallback/index.js +5 -5
  13. package/es/utils/index.js +1 -2
  14. package/es/utils/isBrowser/index.js +7 -7
  15. package/es/utils/isUrl/index.js +4 -4
  16. package/es/utils/merge/index.js +4 -4
  17. package/es/utils/nanoid/index.js +4 -4
  18. package/es/utils/omitBoolean/index.js +4 -4
  19. package/es/utils/parseValueToMoment/index.js +4 -4
  20. package/es/utils/proFieldParsingText/index.js +10 -10
  21. package/es/utils/transformKeySubmitValue/index.js +57 -57
  22. package/es/utils/useEditableArray/index.js +46 -46
  23. package/es/utils/useEditableMap/index.js +22 -22
  24. package/es/utils/useMediaQuery/index.js +5 -5
  25. package/es/vtx-color-picker/index.js +138 -33
  26. package/es/vtx-color-picker/style/index.js +36 -12
  27. package/es/vtx-combogrid/Combogrid.js +16 -10
  28. package/es/vtx-combogrid/index.js +7 -4
  29. package/es/vtx-combogrid/style/index.js +4 -4
  30. package/es/vtx-datagrid/Store/Provide.js +109 -132
  31. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -9
  32. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  33. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  34. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  35. package/es/vtx-datagrid/ToolBar/index.js +2 -2
  36. package/es/vtx-datagrid/columnState.js +64 -0
  37. package/es/vtx-datagrid/index.js +114 -35
  38. package/es/vtx-datagrid/mergeComponents.js +15 -0
  39. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  40. package/es/vtx-datagrid/style/index.js +102 -20
  41. package/es/vtx-datagrid/style/index.less +242 -242
  42. package/es/vtx-date-picker/QdatePicker.js +1 -1
  43. package/es/vtx-date-picker/style/index.less +39 -39
  44. package/es/vtx-descriptions/Descriptions.js +29 -0
  45. package/es/vtx-descriptions/index.js +3 -0
  46. package/es/vtx-descriptions/style/index.js +19 -0
  47. package/es/vtx-ellipsis-text/index.js +7 -2
  48. package/es/vtx-ellipsis-text/style/index.js +3 -1
  49. package/es/vtx-export/index.js +33 -33
  50. package/es/vtx-export-async/History.js +11 -3
  51. package/es/vtx-export-async/index.js +45 -15
  52. package/es/vtx-form-layout/Card.js +10 -10
  53. package/es/vtx-form-layout/Divider.js +1 -1
  54. package/es/vtx-form-layout/FormItem.js +18 -17
  55. package/es/vtx-form-layout/Pane.js +23 -12
  56. package/es/vtx-icon/index.js +54 -45
  57. package/es/vtx-icon/index.js1 +90 -0
  58. package/es/vtx-image/Preview.js +11 -6
  59. package/es/vtx-image/style/index.js +0 -1
  60. package/es/vtx-import/index.js +155 -43
  61. package/es/vtx-import/result.js +6 -2
  62. package/es/vtx-import/style/index.js +16 -1
  63. package/es/vtx-import2/Content.js +2 -1
  64. package/es/vtx-import2/index.js +31 -20
  65. package/es/vtx-import2/style/index.js +60 -9
  66. package/es/vtx-input/TextArea/index.js +11 -6
  67. package/es/vtx-modal/index.js +11 -6
  68. package/es/vtx-modal/style/index.js +5 -3
  69. package/es/vtx-page-layout/Basic.js +2 -2
  70. package/es/vtx-page-layout/Content.js +1 -1
  71. package/es/vtx-page-layout/TabLayout.js +7 -13
  72. package/es/vtx-page-layout/TableLayout.js +24 -14
  73. package/es/vtx-page-layout/TableWrap.js +3 -2
  74. package/es/vtx-page-layout/TreeLayout.js +8 -14
  75. package/es/vtx-page-layout/container.js +8 -7
  76. package/es/vtx-page-layout/style/index.js +4 -2
  77. package/es/vtx-provider/index.js +50 -40
  78. package/es/vtx-provider/intl.js +9 -9
  79. package/es/vtx-provider/locale/en_US.js +65 -5
  80. package/es/vtx-provider/locale/zh_CN.js +75 -5
  81. package/es/vtx-provider/useStyle/index.js +25 -21
  82. package/es/vtx-scrollable-row/index.js +38 -28
  83. package/es/vtx-search/index.js +18 -13
  84. package/es/vtx-search/style/index.js +2 -1
  85. package/es/vtx-select/index.js +132 -46
  86. package/es/vtx-select/style/index.js +11 -56
  87. package/es/vtx-signature/index.js +5 -4
  88. package/es/vtx-signature/style/index.js +1 -1
  89. package/es/vtx-split-pane/Resizer.js +0 -1
  90. package/es/vtx-split-pane/SplitPane.js +34 -25
  91. package/es/vtx-split-pane/style/index.js +8 -112
  92. package/es/vtx-time-picker/index.js +27 -1
  93. package/es/vtx-transfer/Transfer.js +29 -0
  94. package/es/vtx-transfer/index.js +3 -0
  95. package/es/vtx-transfer/style/index.js +19 -0
  96. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  97. package/es/vtx-transfer-select/index.js +3 -0
  98. package/es/vtx-transfer-select/style/index.js +19 -0
  99. package/es/vtx-tree/index.js +104 -40
  100. package/es/vtx-tree-select/index.js +75 -105
  101. package/es/vtx-tree-select/style/index.js +9 -3
  102. package/es/vtx-upload/FilePreview.js +2 -1
  103. package/es/vtx-wang-editor/index.js +291 -113
  104. package/es/vtx-wang-editor/style/index.less +12 -12
  105. package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
  106. package/lib/index.js +36 -0
  107. package/lib/utils/components/LabelIconTip/index.js +7 -7
  108. package/lib/utils/conversionMomentValue/index.js +25 -25
  109. package/lib/utils/filterSpecialCharacters.js +54 -52
  110. package/lib/utils/genCopyable/index.js +6 -6
  111. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  112. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  113. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  114. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  115. package/lib/utils/hooks/useLatest/index.js +2 -2
  116. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  117. package/lib/utils/index.js +0 -7
  118. package/lib/utils/isBrowser/index.js +7 -7
  119. package/lib/utils/isUrl/index.js +4 -4
  120. package/lib/utils/merge/index.js +4 -4
  121. package/lib/utils/nanoid/index.js +4 -4
  122. package/lib/utils/omitBoolean/index.js +4 -4
  123. package/lib/utils/parseValueToMoment/index.js +4 -4
  124. package/lib/utils/proFieldParsingText/index.js +10 -10
  125. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  126. package/lib/utils/useEditableArray/index.js +46 -46
  127. package/lib/utils/useEditableMap/index.js +22 -22
  128. package/lib/utils/useMediaQuery/index.js +5 -5
  129. package/lib/vtx-color-picker/index.js +139 -34
  130. package/lib/vtx-color-picker/style/index.js +36 -12
  131. package/lib/vtx-combogrid/Combogrid.js +16 -10
  132. package/lib/vtx-combogrid/index.js +7 -4
  133. package/lib/vtx-combogrid/style/index.js +4 -4
  134. package/lib/vtx-datagrid/Store/Provide.js +116 -138
  135. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -10
  136. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  137. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  138. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  139. package/lib/vtx-datagrid/ToolBar/index.js +2 -2
  140. package/lib/vtx-datagrid/columnState.js +73 -0
  141. package/lib/vtx-datagrid/index.js +115 -35
  142. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  143. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  144. package/lib/vtx-datagrid/style/index.js +102 -20
  145. package/lib/vtx-datagrid/style/index.less +242 -242
  146. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  147. package/lib/vtx-date-picker/style/index.less +39 -39
  148. package/lib/vtx-descriptions/Descriptions.js +38 -0
  149. package/lib/vtx-descriptions/index.js +15 -0
  150. package/lib/vtx-descriptions/style/index.js +25 -0
  151. package/lib/vtx-ellipsis-text/index.js +7 -2
  152. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  153. package/lib/vtx-export/index.js +34 -34
  154. package/lib/vtx-export-async/History.js +11 -3
  155. package/lib/vtx-export-async/index.js +43 -13
  156. package/lib/vtx-form-layout/Card.js +9 -9
  157. package/lib/vtx-form-layout/Divider.js +1 -1
  158. package/lib/vtx-form-layout/FormItem.js +18 -17
  159. package/lib/vtx-form-layout/Pane.js +22 -11
  160. package/lib/vtx-icon/index.js +54 -52
  161. package/lib/vtx-icon/index.js1 +90 -0
  162. package/lib/vtx-image/Preview.js +11 -6
  163. package/lib/vtx-image/style/index.js +0 -1
  164. package/lib/vtx-import/index.js +154 -42
  165. package/lib/vtx-import/result.js +6 -2
  166. package/lib/vtx-import/style/index.js +16 -1
  167. package/lib/vtx-import2/Content.js +2 -1
  168. package/lib/vtx-import2/index.js +30 -19
  169. package/lib/vtx-import2/style/index.js +60 -9
  170. package/lib/vtx-input/TextArea/index.js +11 -6
  171. package/lib/vtx-modal/index.js +11 -6
  172. package/lib/vtx-modal/style/index.js +5 -3
  173. package/lib/vtx-page-layout/Basic.js +2 -2
  174. package/lib/vtx-page-layout/Content.js +1 -1
  175. package/lib/vtx-page-layout/TabLayout.js +8 -14
  176. package/lib/vtx-page-layout/TableLayout.js +24 -14
  177. package/lib/vtx-page-layout/TableWrap.js +3 -2
  178. package/lib/vtx-page-layout/TreeLayout.js +9 -15
  179. package/lib/vtx-page-layout/container.js +8 -7
  180. package/lib/vtx-page-layout/style/index.js +4 -2
  181. package/lib/vtx-provider/index.js +49 -40
  182. package/lib/vtx-provider/intl.js +9 -9
  183. package/lib/vtx-provider/locale/en_US.js +65 -5
  184. package/lib/vtx-provider/locale/zh_CN.js +75 -5
  185. package/lib/vtx-provider/useStyle/index.js +25 -21
  186. package/lib/vtx-scrollable-row/index.js +38 -28
  187. package/lib/vtx-search/index.js +18 -13
  188. package/lib/vtx-search/style/index.js +2 -1
  189. package/lib/vtx-select/index.js +134 -48
  190. package/lib/vtx-select/style/index.js +11 -56
  191. package/lib/vtx-signature/index.js +4 -3
  192. package/lib/vtx-signature/style/index.js +1 -1
  193. package/lib/vtx-split-pane/Resizer.js +0 -1
  194. package/lib/vtx-split-pane/SplitPane.js +32 -23
  195. package/lib/vtx-split-pane/style/index.js +8 -112
  196. package/lib/vtx-time-picker/index.js +27 -1
  197. package/lib/vtx-transfer/Transfer.js +38 -0
  198. package/lib/vtx-transfer/index.js +15 -0
  199. package/lib/vtx-transfer/style/index.js +25 -0
  200. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  201. package/lib/vtx-transfer-select/index.js +15 -0
  202. package/lib/vtx-transfer-select/style/index.js +25 -0
  203. package/lib/vtx-tree/index.js +102 -38
  204. package/lib/vtx-tree-select/index.js +75 -105
  205. package/lib/vtx-tree-select/style/index.js +9 -3
  206. package/lib/vtx-upload/FilePreview.js +2 -1
  207. package/lib/vtx-wang-editor/index.js +289 -113
  208. package/lib/vtx-wang-editor/style/index.less +12 -12
  209. package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
  210. package/package.json +238 -222
  211. package/es/utils/hooks/useFetchData/index.js +0 -82
  212. package/lib/utils/hooks/useFetchData/index.js +0 -89
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
- # @vtx/components
2
-
3
- > 公司 PC 端基础组件库
4
-
5
- ## 安装
6
-
7
- ```shell
8
- $ pnpm add @vtx/components -S
9
- ```
10
-
11
- ## 使用
12
-
13
- ```js
14
- import { VtxDatePicker } from '@vtx/components';
15
- ```
16
-
17
- ## Doc
18
-
19
- [在线示例文档](http://front-end.pages.cloudhw.cn:8000/react-components/)
1
+ # @vtx/components
2
+
3
+ > 公司 PC 端基础组件库
4
+
5
+ ## 安装
6
+
7
+ ```shell
8
+ $ pnpm add @vtx/components -S
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ```js
14
+ import { VtxDatePicker } from '@vtx/components';
15
+ ```
16
+
17
+ ## Doc
18
+
19
+ [在线示例文档](http://front-end.pages.cloudhw.cn:8000/react-components/)
package/es/index.js CHANGED
@@ -22,6 +22,7 @@ export * from "./vtx-time-picker";
22
22
  export * from "./vtx-upload";
23
23
  export * from "./vtx-tree-select";
24
24
  export * from "./vtx-signature";
25
+ export * from "./vtx-transfer-select";
25
26
 
26
27
  // data display
27
28
  export * from "./vtx-datagrid";
@@ -30,8 +31,10 @@ export * from "./vtx-image";
30
31
  export * from "./vtx-rps-frame";
31
32
  export * from "./vtx-statistics-column";
32
33
  export * from "./vtx-tree";
34
+ export * from "./vtx-transfer";
33
35
  export * from "./vtx-split-pane";
34
36
  export * from "./vtx-icon";
37
+ export * from "./vtx-descriptions";
35
38
 
36
39
  // feedback
37
40
  export * from "./vtx-modal";
@@ -10,13 +10,13 @@ import classnames from 'classnames';
10
10
  import React, { useContext } from 'react';
11
11
  import { useStyle } from "./style";
12
12
 
13
- /**
14
- * 在 form 的 label 后面增加一个 tips 来展示一些说明文案
15
- * @param {Object} props
16
- * @param {React.ReactNode} props.label
17
- * @param {React.ReactNode} [props.subTitle]
18
- * @param {string|Object} [props.tooltip]
19
- * @param {boolean|Object} [props.ellipsis]
13
+ /**
14
+ * 在 form 的 label 后面增加一个 tips 来展示一些说明文案
15
+ * @param {Object} props
16
+ * @param {React.ReactNode} props.label
17
+ * @param {React.ReactNode} [props.subTitle]
18
+ * @param {string|Object} [props.tooltip]
19
+ * @param {boolean|Object} [props.ellipsis]
20
20
  */
21
21
  import { Fragment as _Fragment } from "react/jsx-runtime";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -17,19 +17,19 @@ var dateFormatterMap = {
17
17
  dateTimeRange: 'YYYY-MM-DD HH:mm:ss'
18
18
  };
19
19
 
20
- /**
21
- * 判断是不是一个 object
22
- * @param {any} o
23
- * @returns boolean
20
+ /**
21
+ * 判断是不是一个 object
22
+ * @param {any} o
23
+ * @returns boolean
24
24
  */
25
25
  function isObject(o) {
26
26
  return Object.prototype.toString.call(o) === '[object Object]';
27
27
  }
28
28
 
29
- /**
30
- * 判断是否是一个的简单的 object
31
- * @param {{constructor:any}} o
32
- * @returns boolean
29
+ /**
30
+ * 判断是否是一个的简单的 object
31
+ * @param {{constructor:any}} o
32
+ * @returns boolean
33
33
  */
34
34
  export function isPlainObject(o) {
35
35
  if (isObject(o) === false) return false;
@@ -51,20 +51,20 @@ export function isPlainObject(o) {
51
51
  return true;
52
52
  }
53
53
 
54
- /**
55
- * 一个比较hack的moment判断工具
56
- * @param {any} value
57
- * @returns boolean
54
+ /**
55
+ * 一个比较hack的moment判断工具
56
+ * @param {any} value
57
+ * @returns boolean
58
58
  */
59
59
  var isMoment = function isMoment(value) {
60
60
  return !!(value !== null && value !== void 0 && value._isAMomentObject);
61
61
  };
62
62
 
63
- /**
64
- * 根据不同的格式转化 dayjs
65
- * @param {dayjs.Dayjs} value
66
- * @param {string|((value:dayjs.Dayjs} dateFormatter
67
- * @param {string} valueType
63
+ /**
64
+ * 根据不同的格式转化 dayjs
65
+ * @param {dayjs.Dayjs} value
66
+ * @param {string|((value:dayjs.Dayjs} dateFormatter
67
+ * @param {string} valueType
68
68
  */
69
69
  export var convertMoment = function convertMoment(value, dateFormatter, valueType) {
70
70
  if (!dateFormatter) {
@@ -87,14 +87,14 @@ export var convertMoment = function convertMoment(value, dateFormatter, valueTyp
87
87
  return value;
88
88
  };
89
89
 
90
- /**
91
- * 这里主要是来转化一下数据 将 dayjs 转化为 string 将 all 默认删除
92
- * @param {T} value
93
- * @param {DateFormatter} dateFormatter
94
- * @param {Record<string} valueTypeMap
95
- * @param {ProFieldValueType;dateFormat:string;}|any>} |{valueType
96
- * @param {boolean} omitNil?
97
- * @param {NamePath} parentKey?
90
+ /**
91
+ * 这里主要是来转化一下数据 将 dayjs 转化为 string 将 all 默认删除
92
+ * @param {T} value
93
+ * @param {DateFormatter} dateFormatter
94
+ * @param {Record<string} valueTypeMap
95
+ * @param {ProFieldValueType;dateFormat:string;}|any>} |{valueType
96
+ * @param {boolean} omitNil?
97
+ * @param {NamePath} parentKey?
98
98
  */
99
99
  export var conversionMomentValue = function conversionMomentValue(value, dateFormatter, valueTypeMap, omitNil, parentKey) {
100
100
  var tmpValue = {};
@@ -9,12 +9,58 @@ function isNotEmpty(value) {
9
9
  return Array.isArray(value) && value.length > 0;
10
10
  }
11
11
 
12
- /**
13
- * 过滤特殊字符
14
- * @param {String} value 值
15
- * @param {Object} option
16
- * @param {Array} [option.include] 新增
17
- * @param {Array} [option.exclude] 排除
12
+ // 特殊符号,- _ 排除
13
+ export var SpecialCharacters = [
14
+ // 小括号
15
+ '(', ')', '(', ')',
16
+ // 中括号
17
+ '\\[', '\\]', '[', ']',
18
+ // 大括号
19
+ '{', '}', '{', '}',
20
+ // 方头括号
21
+ '【', '】',
22
+ // 尖括号
23
+ '<', '>',
24
+ // 书名号
25
+ '《', '》',
26
+ // 斜杠
27
+ '/',
28
+ // 反斜杠
29
+ '\\\\',
30
+ // 逗号
31
+ ',', ',',
32
+ // 句号
33
+ '.', '。',
34
+ // 冒号
35
+ ':', ':',
36
+ // 分号
37
+ ';', ';',
38
+ // 顿号
39
+ '、',
40
+ // 破折号
41
+ '——',
42
+ // 感叹号
43
+ '!', '!',
44
+ // 问号
45
+ '?', '?',
46
+ // 加减等于
47
+ '+', '=',
48
+ // 单引号
49
+ "'", '‘', '’',
50
+ // 双引号
51
+ '"', '“', '”',
52
+ // 金钱
53
+ '$', '¥',
54
+ // 百分号
55
+ '%', '%',
56
+ // 其它
57
+ '@', '#', '`', '~', '*', '^', '……', '|', '&'];
58
+ /**
59
+ * 过滤特殊字符
60
+ * @param {String} value 值
61
+ * @param {Object} option
62
+ * @param {Array} [option.include] 新增
63
+ * @param {Array} [option.exclude] 排除
18
64
  */
19
65
  export default function filterSpecialCharacters(value) {
20
66
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -22,52 +68,7 @@ export default function filterSpecialCharacters(value) {
22
68
  include = _ref$include === void 0 ? [] : _ref$include,
23
69
  _ref$exclude = _ref.exclude,
24
70
  exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
25
- // 特殊符号,- _ 排除
26
- var specialCharacter = [
27
- // 小括号
28
- '(', ')', '(', ')',
29
- // 中括号
30
- '\\[', '\\]', '[', ']',
31
- // 大括号
32
- '{', '}', '{', '}',
33
- // 方头括号
34
- '【', '】',
35
- // 尖括号
36
- '<', '>',
37
- // 书名号
38
- '《', '》',
39
- // 斜杠
40
- '/',
41
- // 反斜杠
42
- '\\\\',
43
- // 逗号
44
- ',', ',',
45
- // 句号
46
- '.', '。',
47
- // 冒号
48
- ':', ':',
49
- // 分号
50
- ';', ';',
51
- // 顿号
52
- '、',
53
- // 破折号
54
- '——',
55
- // 感叹号
56
- '!', '!',
57
- // 问号
58
- '?', '?',
59
- // 加减等于
60
- '+', '=',
61
- // 单引号
62
- "'", '‘', '’',
63
- // 双引号
64
- '"', '“', '”',
65
- // 金钱
66
- '$', '¥',
67
- // 百分号
68
- '%', '%',
69
- // 其它
70
- '@', '#', '`', '~', '*', '^', '……', '|', '&'];
71
+ var specialCharacter = JSON.parse(JSON.stringify(SpecialCharacters));
71
72
 
72
73
  // 新增
73
74
  if (isNotEmpty(include)) {
@@ -19,12 +19,12 @@ var getEllipsis = function getEllipsis(item) {
19
19
  return item.ellipsis;
20
20
  };
21
21
 
22
- /**
23
- * 生成 Copyable 或 Ellipsis 的 dom
24
- *
25
- * @param dom
26
- * @param item
27
- * @param text
22
+ /**
23
+ * 生成 Copyable 或 Ellipsis 的 dom
24
+ *
25
+ * @param dom
26
+ * @param item
27
+ * @param text
28
28
  */
29
29
  export var genCopyable = function genCopyable(dom, item, text) {
30
30
  if (item.copyable || item.ellipsis) {
@@ -1,12 +1,12 @@
1
1
  import { runFunction } from "../runFunction";
2
2
 
3
- /**
4
- * 因为 fieldProps 支持了 function 所以新增了这个方法
5
- *
6
- * @param {any} fieldProps
7
- * @param {any} [form]
8
- * @param {any} [extraProps]
9
- * @returns {Record<string, any> & { onChange: any, colSize: number }}
3
+ /**
4
+ * 因为 fieldProps 支持了 function 所以新增了这个方法
5
+ *
6
+ * @param {any} fieldProps
7
+ * @param {any} [form]
8
+ * @param {any} [extraProps]
9
+ * @returns {Record<string, any> & { onChange: any, colSize: number }}
10
10
  */
11
11
  export var getFieldPropsOrFormItemProps = function getFieldPropsOrFormItemProps(fieldProps, form, extraProps) {
12
12
  if (form === undefined) {
@@ -4,10 +4,10 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
5
  import { useCallback, useEffect, useRef } from 'react';
6
6
  import { useRefFunction } from "../useRefFunction";
7
- /**
8
- * 一个去抖的 hook,传入一个 function,返回一个去抖后的 function
9
- * @param {(...args:T) => Promise<any>} fn
10
- * @param {number} wait?
7
+ /**
8
+ * 一个去抖的 hook,传入一个 function,返回一个去抖后的 function
9
+ * @param {(...args:T) => Promise<any>} fn
10
+ * @param {number} wait?
11
11
  */
12
12
  export function useDebounceFn(fn, wait) {
13
13
  var callback = useRefFunction(fn);
@@ -11,12 +11,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import { useEffect, useState } from 'react';
12
12
  import { useLatest } from "../useLatest";
13
13
 
14
- /**
15
- * 一个去抖的setState,减少更新的频率
16
- * @param {any} value
17
- * @param {number} [delay=100]
18
- * @param {any[]} deps
19
- * @returns {any}
14
+ /**
15
+ * 一个去抖的setState,减少更新的频率
16
+ * @param {any} value
17
+ * @param {number} [delay=100]
18
+ * @param {any[]} deps
19
+ * @returns {any}
20
20
  */
21
21
  export function useDebounceValue(value) {
22
22
  var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  import { useDeepCompareMemoize } from "../useDeepCompareEffect";
3
3
 
4
- /**
5
- * `useDeepCompareMemo` will only recompute the memoized value when one of the
6
- * `deps` has changed.
7
- *
8
- * Usage note: only use this if `deps` are objects or arrays that contain
9
- * objects. Otherwise you should just use React.useMemo.
10
- *
4
+ /**
5
+ * `useDeepCompareMemo` will only recompute the memoized value when one of the
6
+ * `deps` has changed.
7
+ *
8
+ * Usage note: only use this if `deps` are objects or arrays that contain
9
+ * objects. Otherwise you should just use React.useMemo.
10
+ *
11
11
  */
12
12
  function useDeepCompareMemo(factory, dependencies) {
13
13
  return React.useMemo(factory, useDeepCompareMemoize(dependencies));
@@ -1,7 +1,7 @@
1
1
  import { useRef } from 'react';
2
2
 
3
- /**
4
- * @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
3
+ /**
4
+ * @see https://github.com/streamich/react-use/blob/master/docs/useLatest.md
5
5
  */
6
6
  export var useLatest = function useLatest(value) {
7
7
  var ref = useRef(value);
@@ -1,10 +1,10 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
- /**
4
- * useRefCallback
5
- * @param {Function} callback ref.current 变化时触发
6
- * @param {any} [initialValue] 初始值
7
- * @returns {Object} 代理后的 ref 对象
3
+ /**
4
+ * useRefCallback
5
+ * @param {Function} callback ref.current 变化时触发
6
+ * @param {any} [initialValue] 初始值
7
+ * @returns {Object} 代理后的 ref 对象
8
8
  */
9
9
  export function useRefCallback(callback, initialValue) {
10
10
  var ref = useMemo(function () {
package/es/utils/index.js CHANGED
@@ -15,7 +15,6 @@ import { useDebounceValue } from "./hooks/useDebounceValue";
15
15
  import { useDeepCompareEffect, useDeepCompareEffectDebounce } from "./hooks/useDeepCompareEffect";
16
16
  import useDeepCompareMemo from "./hooks/useDeepCompareMemo";
17
17
  import { useDocumentTitle } from "./hooks/useDocumentTitle";
18
- import { useFetchData } from "./hooks/useFetchData";
19
18
  import { useLatest } from "./hooks/useLatest";
20
19
  import { usePrevious } from "./hooks/usePrevious";
21
20
  import { useReactiveRef } from "./hooks/useReactiveRef";
@@ -56,7 +55,7 @@ export { conversionMomentValue, conversionMomentValue as conversionSubmitValue,
56
55
  // function
57
56
  transformKeySubmitValue, useBreakpoint, useDebounceFn, useDebounceValue, useDeepCompareEffect, useDeepCompareEffectDebounce, useDeepCompareMemo, useDocumentTitle,
58
57
  // hooks
59
- useEditableArray, useEditableMap, useFetchData, useLatest, useMountMergeState, usePrevious, useReactiveRef, useRefCallback, useRefFunction, useStyle, genColumnKey, getPlaceholder };
58
+ useEditableArray, useEditableMap, useLatest, useMountMergeState, usePrevious, useReactiveRef, useRefCallback, useRefFunction, useStyle, genColumnKey, getPlaceholder };
60
59
 
61
60
  // 注意:以下类型导出在JavaScript中不可用,已移除
62
61
  // export type {
@@ -1,12 +1,12 @@
1
1
  var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
2
2
 
3
- /**
4
- * 用于判断当前是否在浏览器环境中。
5
- * 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
6
- * 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
7
- * 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
8
- * 如果都符合,则返回 true 表示当前处于浏览器环境中。
9
- * @returns boolean
3
+ /**
4
+ * 用于判断当前是否在浏览器环境中。
5
+ * 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
6
+ * 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
7
+ * 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
8
+ * 如果都符合,则返回 true 表示当前处于浏览器环境中。
9
+ * @returns boolean
10
10
  */
11
11
  export var isBrowser = function isBrowser() {
12
12
  if (typeof process !== 'undefined' && process.env.NODE_ENV === 'TEST') {
@@ -1,7 +1,7 @@
1
- /**
2
- * 判断是不是一个 url
3
- * @param {string|undefined} path
4
- * @returns boolean
1
+ /**
2
+ * 判断是不是一个 url
3
+ * @param {string|undefined} path
4
+ * @returns boolean
5
5
  */
6
6
  export var isUrl = function isUrl(path) {
7
7
  if (!path) return false;
@@ -6,10 +6,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
6
6
  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); }
7
7
  /* eslint-disable prefer-rest-params */
8
8
 
9
- /**
10
- * 用于合并 n 个对象
11
- * @param {any[]} ...rest
12
- * @returns T
9
+ /**
10
+ * 用于合并 n 个对象
11
+ * @param {any[]} ...rest
12
+ * @returns T
13
13
  */
14
14
  var merge = function merge() {
15
15
  var obj = {};
@@ -15,10 +15,10 @@ var genNanoid = function genNanoid() {
15
15
  return e;
16
16
  };
17
17
 
18
- /**
19
- * 生成uuid,如果不支持 randomUUID,就用 genNanoid
20
- *
21
- * @returns string
18
+ /**
19
+ * 生成uuid,如果不支持 randomUUID,就用 genNanoid
20
+ *
21
+ * @returns string
22
22
  */
23
23
  export var nanoid = function nanoid() {
24
24
  if (typeof window === 'undefined') return genNanoid();
@@ -1,7 +1,7 @@
1
- /**
2
- * 剔除 boolean 值
3
- * @param {boolean|T} obj
4
- * @returns T
1
+ /**
2
+ * 剔除 boolean 值
3
+ * @param {boolean|T} obj
4
+ * @returns T
5
5
  */
6
6
  export var omitBoolean = function omitBoolean(obj) {
7
7
  if (obj && obj !== true) {
@@ -3,10 +3,10 @@ import customParseFormat from 'dayjs/plugin/customParseFormat';
3
3
  import { isNil } from "../isNil";
4
4
  dayjs.extend(customParseFormat);
5
5
 
6
- /**
7
- * 一个比较hack的moment判断工具
8
- * @param value
9
- * @returns
6
+ /**
7
+ * 一个比较hack的moment判断工具
8
+ * @param value
9
+ * @returns
10
10
  */
11
11
  var isMoment = function isMoment(value) {
12
12
  return !!(value !== null && value !== void 0 && value._isAMomentObject);
@@ -2,10 +2,10 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  import { Badge, Space } from 'antd';
3
3
  import React from 'react';
4
4
 
5
- /**
6
- * 获取类型的 type
7
- *
8
- * @param obj
5
+ /**
6
+ * 获取类型的 type
7
+ *
8
+ * @param obj
9
9
  */
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
11
  function getType(obj) {
@@ -103,12 +103,12 @@ var TableStatus = {
103
103
  }
104
104
  };
105
105
 
106
- /**
107
- * 转化 text 和 valueEnum 通过 type 来添加 Status
108
- *
109
- * @param text
110
- * @param valueEnum
111
- * @param pure 纯净模式,不增加 status
106
+ /**
107
+ * 转化 text 和 valueEnum 通过 type 来添加 Status
108
+ *
109
+ * @param text
110
+ * @param valueEnum
111
+ * @param pure 纯净模式,不增加 status
112
112
  */
113
113
  export var proFieldParsingText = function proFieldParsingText(text, valueEnumParams, key) {
114
114
  if (Array.isArray(text)) {