@tiny-codes/react-easy 1.7.8 → 1.7.9

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## 1.7.9
6
+
7
+ 2026-3-18
8
+
9
+ ### Features
10
+
11
+ - **useRowSelection**
12
+ - ✨ Add `useRowSelection` hook for managing row selection in tables.
13
+
5
14
  ## 1.7.8
6
15
 
7
16
  2026-3-18
@@ -6,8 +6,10 @@ export * from './useMovable';
6
6
  export { default as useMovable } from './useMovable';
7
7
  export * from './useProcessingText';
8
8
  export { default as useProcessingText } from './useProcessingText';
9
- export { default as useRefValue } from './useRefValue';
10
9
  export { default as useRefFunction } from './useRefFunction';
10
+ export { default as useRefValue } from './useRefValue';
11
+ export * from './useRowSelection';
12
+ export { default as useRowSelection } from './useRowSelection';
11
13
  export * from './useSplitter';
12
14
  export { default as useSplitter } from './useSplitter';
13
15
  export * from './useSSE';
package/es/hooks/index.js CHANGED
@@ -6,8 +6,10 @@ export * from "./useMovable";
6
6
  export { default as useMovable } from "./useMovable";
7
7
  export * from "./useProcessingText";
8
8
  export { default as useProcessingText } from "./useProcessingText";
9
- export { default as useRefValue } from "./useRefValue";
10
9
  export { default as useRefFunction } from "./useRefFunction";
10
+ export { default as useRefValue } from "./useRefValue";
11
+ export * from "./useRowSelection";
12
+ export { default as useRowSelection } from "./useRowSelection";
11
13
  export * from "./useSplitter";
12
14
  export { default as useSplitter } from "./useSplitter";
13
15
  export * from "./useSSE";
@@ -1 +1 @@
1
- {"version":3,"names":["default","useAudioPlayer","useDebounce","useLocalStorage","useMovable","useProcessingText","useRefValue","useRefFunction","useSplitter","useSSE","useStompSocket","useUserMedia","useValidators","useValidator","useValidatorBuilder"],"sources":["../../src/hooks/index.ts"],"sourcesContent":["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useLocalStorage';\nexport { default as useLocalStorage } from './useLocalStorage';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,cAAc;AAElC,SAASD,OAAO,IAAIE,WAAW;AAE/B;AACA,SAASF,OAAO,IAAIG,eAAe;AAEnC;AACA,SAASH,OAAO,IAAII,UAAU;AAE9B;AACA,SAASJ,OAAO,IAAIK,iBAAiB;AAErC,SAASL,OAAO,IAAIM,WAAW;AAE/B,SAASN,OAAO,IAAIO,cAAc;AAElC;AACA,SAASP,OAAO,IAAIQ,WAAW;AAE/B;AACA,SAASR,OAAO,IAAIS,MAAM;AAE1B;AACA,SAAST,OAAO,IAAIU,cAAc;AAElC;AACA,SAASV,OAAO,IAAIW,YAAY;AAGhC,SAASX,OAAO,IAAIY,aAAa;AAEjC,SAASZ,OAAO,IAAIa,YAAY;AAGhC,SAASb,OAAO,IAAIc,mBAAmB"}
1
+ {"version":3,"names":["default","useAudioPlayer","useDebounce","useLocalStorage","useMovable","useProcessingText","useRefFunction","useRefValue","useRowSelection","useSplitter","useSSE","useStompSocket","useUserMedia","useValidators","useValidator","useValidatorBuilder"],"sources":["../../src/hooks/index.ts"],"sourcesContent":["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useLocalStorage';\nexport { default as useLocalStorage } from './useLocalStorage';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport * from './useRowSelection';\nexport { default as useRowSelection } from './useRowSelection';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,cAAc;AAElC,SAASD,OAAO,IAAIE,WAAW;AAE/B;AACA,SAASF,OAAO,IAAIG,eAAe;AAEnC;AACA,SAASH,OAAO,IAAII,UAAU;AAE9B;AACA,SAASJ,OAAO,IAAIK,iBAAiB;AAErC,SAASL,OAAO,IAAIM,cAAc;AAElC,SAASN,OAAO,IAAIO,WAAW;AAE/B;AACA,SAASP,OAAO,IAAIQ,eAAe;AAEnC;AACA,SAASR,OAAO,IAAIS,WAAW;AAE/B;AACA,SAAST,OAAO,IAAIU,MAAM;AAE1B;AACA,SAASV,OAAO,IAAIW,cAAc;AAElC;AACA,SAASX,OAAO,IAAIY,YAAY;AAGhC,SAASZ,OAAO,IAAIa,aAAa;AAEjC,SAASb,OAAO,IAAIc,YAAY;AAGhC,SAASd,OAAO,IAAIe,mBAAmB"}
@@ -0,0 +1,55 @@
1
+ import type { TableRowSelection } from 'antd/es/table/interface';
2
+ export type UseRowSelectionOption<T extends object = Record<string, unknown>> = Omit<TableRowSelection<T>, 'preserveSelectedRowKeys' | 'selectedRowKeys' | 'onChange'> & {
3
+ /**
4
+ * - **EN:** The selected row objects.
5
+ * - **CN:** 选中的行对象。
6
+ */
7
+ value?: T[];
8
+ /**
9
+ * - **EN:** Callback function triggered when the selected rows change.
10
+ * - **CN:** 当选中的行发生变化时触发的回调函数。
11
+ *
12
+ * @param value - The selected row objects | 选中的行对象
13
+ */
14
+ onChange?: (value: T[]) => void;
15
+ /**
16
+ * - **EN:** The field name or function to get the key of the object. If not set, the `id` or `code`
17
+ * field will be used as the key by default.
18
+ * - **CN:** 获取对象key的字段名或函数,如果不设置,则默认使用 `id` 或 `code` 字段作为key。
19
+ */
20
+ rowKey?: keyof T | ((item: T) => string);
21
+ /**
22
+ * - **EN:** Whether to support table selection. If set to `false`, the table row selection feature
23
+ * will be disabled.
24
+ * - **CN:** 是否支持表格选择,如果设置为`false`,则禁用table的行选择功能。
25
+ *
26
+ * @default true
27
+ */
28
+ checkable?: boolean;
29
+ /**
30
+ * - **EN:** Cache of all selected objects, used to initialize the internal cache.
31
+ *
32
+ * This usage is not very common and is generally used for persistent caching outside the Table,
33
+ * such as saving in localStorage or, in the case of a MicroApp, saving in the main application,
34
+ * so that when the Table is destroyed and re-entered, it can restore all previously selected
35
+ * cached objects (otherwise, data across pages will be lost).
36
+ * - **CN:** 所有被选中对象的缓存,用于初始化内部的缓存对象。
37
+ *
38
+ * 这种用法不太常见,一般用于在Table外进行持久化缓存,例如保存在localStorage中、或作为MicroApp时保存在主应用中,
39
+ * 从而在Table被销毁后再次进入时能恢复之前选中的所有缓存对象(否则跨页的数据会丢失)。
40
+ */
41
+ cache?: T[];
42
+ };
43
+ /**
44
+ * - **EN:** Generate the `rowSelection` property settings for the Table component, supporting
45
+ * cross-page selection. The `onChange` callback returns the selected row objects instead of the
46
+ * selected row keys.
47
+ *
48
+ * Use `rowKey` to specify the key of the row object. If not specified, it will try to get the `id`
49
+ * or `code` field from the row object as the key.
50
+ * - **CN:** 生成Table组件的rowSelection属性设置,支持跨页选中,`onChange`返回选中的行对象,而不是选中的行key。
51
+ *
52
+ * 使用 `rowKey` 来指定行对象的key,如果不指定,则会尝试从行对象中获取 `id` 或 `code` 字段作为key。
53
+ */
54
+ declare function useRowSelection<T extends object = Record<string, unknown>>(options?: UseRowSelectionOption<T>): TableRowSelection<T> | undefined;
55
+ export default useRowSelection;
@@ -0,0 +1,83 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["value", "rowKey", "onChange", "checkable", "cache"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ 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; }
6
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
+ import { useEffect, useMemo, useRef } from 'react';
11
+ /**
12
+ * - **EN:** Generate the `rowSelection` property settings for the Table component, supporting
13
+ * cross-page selection. The `onChange` callback returns the selected row objects instead of the
14
+ * selected row keys.
15
+ *
16
+ * Use `rowKey` to specify the key of the row object. If not specified, it will try to get the `id`
17
+ * or `code` field from the row object as the key.
18
+ * - **CN:** 生成Table组件的rowSelection属性设置,支持跨页选中,`onChange`返回选中的行对象,而不是选中的行key。
19
+ *
20
+ * 使用 `rowKey` 来指定行对象的key,如果不指定,则会尝试从行对象中获取 `id` 或 `code` 字段作为key。
21
+ */
22
+ function useRowSelection(options) {
23
+ var _ref = options || {},
24
+ value = _ref.value,
25
+ rowKey = _ref.rowKey,
26
+ _onChange = _ref.onChange,
27
+ _ref$checkable = _ref.checkable,
28
+ checkable = _ref$checkable === void 0 ? true : _ref$checkable,
29
+ cache = _ref.cache,
30
+ restOptions = _objectWithoutProperties(_ref, _excluded);
31
+ var keys = useMemo(function () {
32
+ return value === null || value === void 0 ? void 0 : value.map(function (item) {
33
+ return getKey(item, rowKey);
34
+ });
35
+ }, [value, rowKey]);
36
+ var selectedCacheRef = useRef(new Map(cache === null || cache === void 0 ? void 0 : cache.map(function (item) {
37
+ return [getKey(item, rowKey), item];
38
+ })));
39
+ useEffect(function () {
40
+ // Remove items that no longer exist in selectedCacheRef
41
+ // When the parent component's directory type or domain changes, the value will be reset, and the selectedCacheRef needs to be cleared
42
+ selectedCacheRef.current.forEach(function (item) {
43
+ var itemKey = getKey(item, rowKey);
44
+ if (!(value || []).some(function (v) {
45
+ return getKey(v, rowKey) === itemKey;
46
+ })) {
47
+ selectedCacheRef.current.delete(itemKey);
48
+ }
49
+ });
50
+ }, [rowKey, value]);
51
+ return checkable !== false ? _objectSpread(_objectSpread({}, restOptions), {}, {
52
+ preserveSelectedRowKeys: true,
53
+ selectedRowKeys: keys,
54
+ onChange: function onChange(selectedKeys, selectedRows) {
55
+ // Remove the deselected items
56
+ selectedCacheRef.current.forEach(function (item) {
57
+ var key = getKey(item, rowKey);
58
+ if (!(selectedKeys !== null && selectedKeys !== void 0 && selectedKeys.includes(key))) {
59
+ selectedCacheRef.current.delete(key);
60
+ }
61
+ });
62
+ // Add new selected items
63
+ selectedRows === null || selectedRows === void 0 || selectedRows.forEach(function (item) {
64
+ var key = getKey(item, rowKey);
65
+ selectedCacheRef.current.set(key, item);
66
+ });
67
+ _onChange === null || _onChange === void 0 || _onChange(selectedKeys.map(function (id) {
68
+ return selectedCacheRef.current.get(id);
69
+ }).filter(Boolean));
70
+ }
71
+ }) : undefined;
72
+ }
73
+ function getKey(item, keyField) {
74
+ if (!item) {
75
+ return '';
76
+ }
77
+ if (typeof keyField === 'function') {
78
+ return keyField(item);
79
+ }
80
+ return item[keyField] || ('id' in item ? item['id'] : '') || ('code' in item ? item['code'] : '');
81
+ }
82
+ export default useRowSelection;
83
+ //# sourceMappingURL=useRowSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useMemo","useRef","useRowSelection","options","_ref","value","rowKey","onChange","_ref$checkable","checkable","cache","restOptions","_objectWithoutProperties","_excluded","keys","map","item","getKey","selectedCacheRef","Map","current","forEach","itemKey","some","v","delete","_objectSpread","preserveSelectedRowKeys","selectedRowKeys","selectedKeys","selectedRows","key","includes","set","id","get","filter","Boolean","undefined","keyField"],"sources":["../../src/hooks/useRowSelection.ts"],"sourcesContent":["import type { Key } from 'react';\nimport { useEffect, useMemo, useRef } from 'react';\nimport type { TableRowSelection } from 'antd/es/table/interface';\n\nexport type UseRowSelectionOption<T extends object = Record<string, unknown>> = Omit<\n TableRowSelection<T>,\n 'preserveSelectedRowKeys' | 'selectedRowKeys' | 'onChange'\n> & {\n /**\n * - **EN:** The selected row objects.\n * - **CN:** 选中的行对象。\n */\n value?: T[];\n /**\n * - **EN:** Callback function triggered when the selected rows change.\n * - **CN:** 当选中的行发生变化时触发的回调函数。\n *\n * @param value - The selected row objects | 选中的行对象\n */\n onChange?: (value: T[]) => void;\n /**\n * - **EN:** The field name or function to get the key of the object. If not set, the `id` or `code`\n * field will be used as the key by default.\n * - **CN:** 获取对象key的字段名或函数,如果不设置,则默认使用 `id` 或 `code` 字段作为key。\n */\n rowKey?: keyof T | ((item: T) => string);\n /**\n * - **EN:** Whether to support table selection. If set to `false`, the table row selection feature\n * will be disabled.\n * - **CN:** 是否支持表格选择,如果设置为`false`,则禁用table的行选择功能。\n *\n * @default true\n */\n checkable?: boolean;\n /**\n * - **EN:** Cache of all selected objects, used to initialize the internal cache.\n *\n * This usage is not very common and is generally used for persistent caching outside the Table,\n * such as saving in localStorage or, in the case of a MicroApp, saving in the main application,\n * so that when the Table is destroyed and re-entered, it can restore all previously selected\n * cached objects (otherwise, data across pages will be lost).\n * - **CN:** 所有被选中对象的缓存,用于初始化内部的缓存对象。\n *\n * 这种用法不太常见,一般用于在Table外进行持久化缓存,例如保存在localStorage中、或作为MicroApp时保存在主应用中,\n * 从而在Table被销毁后再次进入时能恢复之前选中的所有缓存对象(否则跨页的数据会丢失)。\n */\n cache?: T[];\n};\n\n/**\n * - **EN:** Generate the `rowSelection` property settings for the Table component, supporting\n * cross-page selection. The `onChange` callback returns the selected row objects instead of the\n * selected row keys.\n *\n * Use `rowKey` to specify the key of the row object. If not specified, it will try to get the `id`\n * or `code` field from the row object as the key.\n * - **CN:** 生成Table组件的rowSelection属性设置,支持跨页选中,`onChange`返回选中的行对象,而不是选中的行key。\n *\n * 使用 `rowKey` 来指定行对象的key,如果不指定,则会尝试从行对象中获取 `id` 或 `code` 字段作为key。\n */\nfunction useRowSelection<T extends object = Record<string, unknown>>(options?: UseRowSelectionOption<T>) {\n const { value, rowKey, onChange, checkable = true, cache, ...restOptions } = options || {};\n const keys = useMemo(() => value?.map((item) => getKey(item, rowKey)), [value, rowKey]);\n const selectedCacheRef = useRef(new Map(cache?.map((item) => [getKey(item, rowKey), item])));\n\n useEffect(() => {\n // Remove items that no longer exist in selectedCacheRef\n // When the parent component's directory type or domain changes, the value will be reset, and the selectedCacheRef needs to be cleared\n selectedCacheRef.current.forEach((item) => {\n const itemKey = getKey(item, rowKey);\n if (!(value || []).some((v) => getKey(v, rowKey) === itemKey)) {\n selectedCacheRef.current.delete(itemKey);\n }\n });\n }, [rowKey, value]);\n\n return checkable !== false\n ? ({\n ...restOptions,\n preserveSelectedRowKeys: true,\n selectedRowKeys: keys,\n onChange: (selectedKeys, selectedRows) => {\n // Remove the deselected items\n selectedCacheRef.current.forEach((item) => {\n const key = getKey(item, rowKey);\n if (!selectedKeys?.includes(key as Key)) {\n selectedCacheRef.current.delete(key);\n }\n });\n // Add new selected items\n selectedRows?.forEach((item) => {\n const key = getKey(item, rowKey);\n selectedCacheRef.current.set(key, item);\n });\n onChange?.(selectedKeys.map((id) => selectedCacheRef.current.get(id as string)).filter(Boolean) as T[]);\n },\n } as TableRowSelection<T>)\n : undefined;\n}\n\nfunction getKey<T extends object = Record<string, unknown>>(\n item: T,\n keyField?: keyof T | ((item: T) => string)\n): keyof T | string {\n if (!item) {\n return '';\n }\n if (typeof keyField === 'function') {\n return keyField(item);\n }\n return (\n (item[keyField!] as keyof T) ||\n ('id' in item ? (item['id'] as string) : '') ||\n ('code' in item ? (item['code'] as string) : '')\n );\n}\nexport default useRowSelection;\n"],"mappings":"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"}
@@ -6,8 +6,10 @@ export * from './useMovable';
6
6
  export { default as useMovable } from './useMovable';
7
7
  export * from './useProcessingText';
8
8
  export { default as useProcessingText } from './useProcessingText';
9
- export { default as useRefValue } from './useRefValue';
10
9
  export { default as useRefFunction } from './useRefFunction';
10
+ export { default as useRefValue } from './useRefValue';
11
+ export * from './useRowSelection';
12
+ export { default as useRowSelection } from './useRowSelection';
11
13
  export * from './useSplitter';
12
14
  export { default as useSplitter } from './useSplitter';
13
15
  export * from './useSSE';
@@ -37,6 +37,7 @@ __export(hooks_exports, {
37
37
  useProcessingText: () => import_useProcessingText.default,
38
38
  useRefFunction: () => import_useRefFunction.default,
39
39
  useRefValue: () => import_useRefValue.default,
40
+ useRowSelection: () => import_useRowSelection.default,
40
41
  useSSE: () => import_useSSE.default,
41
42
  useSplitter: () => import_useSplitter.default,
42
43
  useStompSocket: () => import_useStompSocket.default,
@@ -54,8 +55,10 @@ __reExport(hooks_exports, require("./useMovable"), module.exports);
54
55
  var import_useMovable = __toESM(require("./useMovable"));
55
56
  __reExport(hooks_exports, require("./useProcessingText"), module.exports);
56
57
  var import_useProcessingText = __toESM(require("./useProcessingText"));
57
- var import_useRefValue = __toESM(require("./useRefValue"));
58
58
  var import_useRefFunction = __toESM(require("./useRefFunction"));
59
+ var import_useRefValue = __toESM(require("./useRefValue"));
60
+ __reExport(hooks_exports, require("./useRowSelection"), module.exports);
61
+ var import_useRowSelection = __toESM(require("./useRowSelection"));
59
62
  __reExport(hooks_exports, require("./useSplitter"), module.exports);
60
63
  var import_useSplitter = __toESM(require("./useSplitter"));
61
64
  __reExport(hooks_exports, require("./useSSE"), module.exports);
@@ -76,6 +79,7 @@ var import_useValidatorBuilder = __toESM(require("./useValidatorBuilder"));
76
79
  useProcessingText,
77
80
  useRefFunction,
78
81
  useRefValue,
82
+ useRowSelection,
79
83
  useSSE,
80
84
  useSplitter,
81
85
  useStompSocket,
@@ -86,6 +90,7 @@ var import_useValidatorBuilder = __toESM(require("./useValidatorBuilder"));
86
90
  ...require("./useLocalStorage"),
87
91
  ...require("./useMovable"),
88
92
  ...require("./useProcessingText"),
93
+ ...require("./useRowSelection"),
89
94
  ...require("./useSplitter"),
90
95
  ...require("./useSSE"),
91
96
  ...require("./useStompSocket"),
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/hooks/index.ts"],
4
- "sourcesContent": ["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useLocalStorage';\nexport { default as useLocalStorage } from './useLocalStorage';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAE1C,yBAAuC;AAEvC,0BAAc,8BAJd;AAKA,6BAA2C;AAE3C,0BAAc,yBAPd;AAQA,wBAAsC;AAEtC,0BAAc,gCAVd;AAWA,+BAA6C;AAE7C,yBAAuC;AAEvC,4BAA0C;AAE1C,0BAAc,0BAjBd;AAkBA,yBAAuC;AAEvC,0BAAc,qBApBd;AAqBA,oBAAkC;AAElC,0BAAc,6BAvBd;AAwBA,4BAA0C;AAE1C,0BAAc,2BA1Bd;AA2BA,0BAAwC;AAGxC,2BAAyC;AAEzC,0BAAwC;AAGxC,iCAA+C;",
4
+ "sourcesContent": ["export { default as useAudioPlayer } from './useAudioPlayer';\n\nexport { default as useDebounce } from './useDebounce';\n\nexport * from './useLocalStorage';\nexport { default as useLocalStorage } from './useLocalStorage';\n\nexport * from './useMovable';\nexport { default as useMovable } from './useMovable';\n\nexport * from './useProcessingText';\nexport { default as useProcessingText } from './useProcessingText';\n\nexport { default as useRefFunction } from './useRefFunction';\n\nexport { default as useRefValue } from './useRefValue';\n\nexport * from './useRowSelection';\nexport { default as useRowSelection } from './useRowSelection';\n\nexport * from './useSplitter';\nexport { default as useSplitter } from './useSplitter';\n\nexport * from './useSSE';\nexport { default as useSSE } from './useSSE';\n\nexport * from './useStompSocket';\nexport { default as useStompSocket } from './useStompSocket';\n\nexport * from './useUserMedia';\nexport { default as useUserMedia } from './useUserMedia';\n\nexport type { ValidatorRuleMap } from './useValidators';\nexport { default as useValidators } from './useValidators';\n\nexport { default as useValidator } from './useValidator';\n\nexport type { Validator, RuleRegExpFlags, ValidatorRule, BuilderOptions } from './useValidatorBuilder';\nexport { default as useValidatorBuilder } from './useValidatorBuilder';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA0C;AAE1C,yBAAuC;AAEvC,0BAAc,8BAJd;AAKA,6BAA2C;AAE3C,0BAAc,yBAPd;AAQA,wBAAsC;AAEtC,0BAAc,gCAVd;AAWA,+BAA6C;AAE7C,4BAA0C;AAE1C,yBAAuC;AAEvC,0BAAc,8BAjBd;AAkBA,6BAA2C;AAE3C,0BAAc,0BApBd;AAqBA,yBAAuC;AAEvC,0BAAc,qBAvBd;AAwBA,oBAAkC;AAElC,0BAAc,6BA1Bd;AA2BA,4BAA0C;AAE1C,0BAAc,2BA7Bd;AA8BA,0BAAwC;AAGxC,2BAAyC;AAEzC,0BAAwC;AAGxC,iCAA+C;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,55 @@
1
+ import type { TableRowSelection } from 'antd/es/table/interface';
2
+ export type UseRowSelectionOption<T extends object = Record<string, unknown>> = Omit<TableRowSelection<T>, 'preserveSelectedRowKeys' | 'selectedRowKeys' | 'onChange'> & {
3
+ /**
4
+ * - **EN:** The selected row objects.
5
+ * - **CN:** 选中的行对象。
6
+ */
7
+ value?: T[];
8
+ /**
9
+ * - **EN:** Callback function triggered when the selected rows change.
10
+ * - **CN:** 当选中的行发生变化时触发的回调函数。
11
+ *
12
+ * @param value - The selected row objects | 选中的行对象
13
+ */
14
+ onChange?: (value: T[]) => void;
15
+ /**
16
+ * - **EN:** The field name or function to get the key of the object. If not set, the `id` or `code`
17
+ * field will be used as the key by default.
18
+ * - **CN:** 获取对象key的字段名或函数,如果不设置,则默认使用 `id` 或 `code` 字段作为key。
19
+ */
20
+ rowKey?: keyof T | ((item: T) => string);
21
+ /**
22
+ * - **EN:** Whether to support table selection. If set to `false`, the table row selection feature
23
+ * will be disabled.
24
+ * - **CN:** 是否支持表格选择,如果设置为`false`,则禁用table的行选择功能。
25
+ *
26
+ * @default true
27
+ */
28
+ checkable?: boolean;
29
+ /**
30
+ * - **EN:** Cache of all selected objects, used to initialize the internal cache.
31
+ *
32
+ * This usage is not very common and is generally used for persistent caching outside the Table,
33
+ * such as saving in localStorage or, in the case of a MicroApp, saving in the main application,
34
+ * so that when the Table is destroyed and re-entered, it can restore all previously selected
35
+ * cached objects (otherwise, data across pages will be lost).
36
+ * - **CN:** 所有被选中对象的缓存,用于初始化内部的缓存对象。
37
+ *
38
+ * 这种用法不太常见,一般用于在Table外进行持久化缓存,例如保存在localStorage中、或作为MicroApp时保存在主应用中,
39
+ * 从而在Table被销毁后再次进入时能恢复之前选中的所有缓存对象(否则跨页的数据会丢失)。
40
+ */
41
+ cache?: T[];
42
+ };
43
+ /**
44
+ * - **EN:** Generate the `rowSelection` property settings for the Table component, supporting
45
+ * cross-page selection. The `onChange` callback returns the selected row objects instead of the
46
+ * selected row keys.
47
+ *
48
+ * Use `rowKey` to specify the key of the row object. If not specified, it will try to get the `id`
49
+ * or `code` field from the row object as the key.
50
+ * - **CN:** 生成Table组件的rowSelection属性设置,支持跨页选中,`onChange`返回选中的行对象,而不是选中的行key。
51
+ *
52
+ * 使用 `rowKey` 来指定行对象的key,如果不指定,则会尝试从行对象中获取 `id` 或 `code` 字段作为key。
53
+ */
54
+ declare function useRowSelection<T extends object = Record<string, unknown>>(options?: UseRowSelectionOption<T>): TableRowSelection<T> | undefined;
55
+ export default useRowSelection;
@@ -0,0 +1,67 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useRowSelection.ts
20
+ var useRowSelection_exports = {};
21
+ __export(useRowSelection_exports, {
22
+ default: () => useRowSelection_default
23
+ });
24
+ module.exports = __toCommonJS(useRowSelection_exports);
25
+ var import_react = require("react");
26
+ function useRowSelection(options) {
27
+ const { value, rowKey, onChange, checkable = true, cache, ...restOptions } = options || {};
28
+ const keys = (0, import_react.useMemo)(() => value == null ? void 0 : value.map((item) => getKey(item, rowKey)), [value, rowKey]);
29
+ const selectedCacheRef = (0, import_react.useRef)(new Map(cache == null ? void 0 : cache.map((item) => [getKey(item, rowKey), item])));
30
+ (0, import_react.useEffect)(() => {
31
+ selectedCacheRef.current.forEach((item) => {
32
+ const itemKey = getKey(item, rowKey);
33
+ if (!(value || []).some((v) => getKey(v, rowKey) === itemKey)) {
34
+ selectedCacheRef.current.delete(itemKey);
35
+ }
36
+ });
37
+ }, [rowKey, value]);
38
+ return checkable !== false ? {
39
+ ...restOptions,
40
+ preserveSelectedRowKeys: true,
41
+ selectedRowKeys: keys,
42
+ onChange: (selectedKeys, selectedRows) => {
43
+ selectedCacheRef.current.forEach((item) => {
44
+ const key = getKey(item, rowKey);
45
+ if (!(selectedKeys == null ? void 0 : selectedKeys.includes(key))) {
46
+ selectedCacheRef.current.delete(key);
47
+ }
48
+ });
49
+ selectedRows == null ? void 0 : selectedRows.forEach((item) => {
50
+ const key = getKey(item, rowKey);
51
+ selectedCacheRef.current.set(key, item);
52
+ });
53
+ onChange == null ? void 0 : onChange(selectedKeys.map((id) => selectedCacheRef.current.get(id)).filter(Boolean));
54
+ }
55
+ } : void 0;
56
+ }
57
+ function getKey(item, keyField) {
58
+ if (!item) {
59
+ return "";
60
+ }
61
+ if (typeof keyField === "function") {
62
+ return keyField(item);
63
+ }
64
+ return item[keyField] || ("id" in item ? item["id"] : "") || ("code" in item ? item["code"] : "");
65
+ }
66
+ var useRowSelection_default = useRowSelection;
67
+ //# sourceMappingURL=useRowSelection.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/hooks/useRowSelection.ts"],
4
+ "sourcesContent": ["import type { Key } from 'react';\nimport { useEffect, useMemo, useRef } from 'react';\nimport type { TableRowSelection } from 'antd/es/table/interface';\n\nexport type UseRowSelectionOption<T extends object = Record<string, unknown>> = Omit<\n TableRowSelection<T>,\n 'preserveSelectedRowKeys' | 'selectedRowKeys' | 'onChange'\n> & {\n /**\n * - **EN:** The selected row objects.\n * - **CN:** 选中的行对象。\n */\n value?: T[];\n /**\n * - **EN:** Callback function triggered when the selected rows change.\n * - **CN:** 当选中的行发生变化时触发的回调函数。\n *\n * @param value - The selected row objects | 选中的行对象\n */\n onChange?: (value: T[]) => void;\n /**\n * - **EN:** The field name or function to get the key of the object. If not set, the `id` or `code`\n * field will be used as the key by default.\n * - **CN:** 获取对象key的字段名或函数,如果不设置,则默认使用 `id` 或 `code` 字段作为key。\n */\n rowKey?: keyof T | ((item: T) => string);\n /**\n * - **EN:** Whether to support table selection. If set to `false`, the table row selection feature\n * will be disabled.\n * - **CN:** 是否支持表格选择,如果设置为`false`,则禁用table的行选择功能。\n *\n * @default true\n */\n checkable?: boolean;\n /**\n * - **EN:** Cache of all selected objects, used to initialize the internal cache.\n *\n * This usage is not very common and is generally used for persistent caching outside the Table,\n * such as saving in localStorage or, in the case of a MicroApp, saving in the main application,\n * so that when the Table is destroyed and re-entered, it can restore all previously selected\n * cached objects (otherwise, data across pages will be lost).\n * - **CN:** 所有被选中对象的缓存,用于初始化内部的缓存对象。\n *\n * 这种用法不太常见,一般用于在Table外进行持久化缓存,例如保存在localStorage中、或作为MicroApp时保存在主应用中,\n * 从而在Table被销毁后再次进入时能恢复之前选中的所有缓存对象(否则跨页的数据会丢失)。\n */\n cache?: T[];\n};\n\n/**\n * - **EN:** Generate the `rowSelection` property settings for the Table component, supporting\n * cross-page selection. The `onChange` callback returns the selected row objects instead of the\n * selected row keys.\n *\n * Use `rowKey` to specify the key of the row object. If not specified, it will try to get the `id`\n * or `code` field from the row object as the key.\n * - **CN:** 生成Table组件的rowSelection属性设置,支持跨页选中,`onChange`返回选中的行对象,而不是选中的行key。\n *\n * 使用 `rowKey` 来指定行对象的key,如果不指定,则会尝试从行对象中获取 `id` 或 `code` 字段作为key。\n */\nfunction useRowSelection<T extends object = Record<string, unknown>>(options?: UseRowSelectionOption<T>) {\n const { value, rowKey, onChange, checkable = true, cache, ...restOptions } = options || {};\n const keys = useMemo(() => value?.map((item) => getKey(item, rowKey)), [value, rowKey]);\n const selectedCacheRef = useRef(new Map(cache?.map((item) => [getKey(item, rowKey), item])));\n\n useEffect(() => {\n // Remove items that no longer exist in selectedCacheRef\n // When the parent component's directory type or domain changes, the value will be reset, and the selectedCacheRef needs to be cleared\n selectedCacheRef.current.forEach((item) => {\n const itemKey = getKey(item, rowKey);\n if (!(value || []).some((v) => getKey(v, rowKey) === itemKey)) {\n selectedCacheRef.current.delete(itemKey);\n }\n });\n }, [rowKey, value]);\n\n return checkable !== false\n ? ({\n ...restOptions,\n preserveSelectedRowKeys: true,\n selectedRowKeys: keys,\n onChange: (selectedKeys, selectedRows) => {\n // Remove the deselected items\n selectedCacheRef.current.forEach((item) => {\n const key = getKey(item, rowKey);\n if (!selectedKeys?.includes(key as Key)) {\n selectedCacheRef.current.delete(key);\n }\n });\n // Add new selected items\n selectedRows?.forEach((item) => {\n const key = getKey(item, rowKey);\n selectedCacheRef.current.set(key, item);\n });\n onChange?.(selectedKeys.map((id) => selectedCacheRef.current.get(id as string)).filter(Boolean) as T[]);\n },\n } as TableRowSelection<T>)\n : undefined;\n}\n\nfunction getKey<T extends object = Record<string, unknown>>(\n item: T,\n keyField?: keyof T | ((item: T) => string)\n): keyof T | string {\n if (!item) {\n return '';\n }\n if (typeof keyField === 'function') {\n return keyField(item);\n }\n return (\n (item[keyField!] as keyof T) ||\n ('id' in item ? (item['id'] as string) : '') ||\n ('code' in item ? (item['code'] as string) : '')\n );\n}\nexport default useRowSelection;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA2C;AA2D3C,SAAS,gBAA4D,SAAoC;AACvG,QAAM,EAAE,OAAO,QAAQ,UAAU,YAAY,MAAM,OAAO,GAAG,YAAY,IAAI,WAAW,CAAC;AACzF,QAAM,WAAO,sBAAQ,MAAM,+BAAO,IAAI,CAAC,SAAS,OAAO,MAAM,MAAM,IAAI,CAAC,OAAO,MAAM,CAAC;AACtF,QAAM,uBAAmB,qBAAO,IAAI,IAAI,+BAAO,IAAI,CAAC,SAAS,CAAC,OAAO,MAAM,MAAM,GAAG,IAAI,EAAE,CAAC;AAE3F,8BAAU,MAAM;AAGd,qBAAiB,QAAQ,QAAQ,CAAC,SAAS;AACzC,YAAM,UAAU,OAAO,MAAM,MAAM;AACnC,UAAI,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,MAAM,OAAO,GAAG,MAAM,MAAM,OAAO,GAAG;AAC7D,yBAAiB,QAAQ,OAAO,OAAO;AAAA,MACzC;AAAA,IACF,CAAC;AAAA,EACH,GAAG,CAAC,QAAQ,KAAK,CAAC;AAElB,SAAO,cAAc,QAChB;AAAA,IACC,GAAG;AAAA,IACH,yBAAyB;AAAA,IACzB,iBAAiB;AAAA,IACjB,UAAU,CAAC,cAAc,iBAAiB;AAExC,uBAAiB,QAAQ,QAAQ,CAAC,SAAS;AACzC,cAAM,MAAM,OAAO,MAAM,MAAM;AAC/B,YAAI,EAAC,6CAAc,SAAS,OAAa;AACvC,2BAAiB,QAAQ,OAAO,GAAG;AAAA,QACrC;AAAA,MACF,CAAC;AAED,mDAAc,QAAQ,CAAC,SAAS;AAC9B,cAAM,MAAM,OAAO,MAAM,MAAM;AAC/B,yBAAiB,QAAQ,IAAI,KAAK,IAAI;AAAA,MACxC;AACA,2CAAW,aAAa,IAAI,CAAC,OAAO,iBAAiB,QAAQ,IAAI,EAAY,CAAC,EAAE,OAAO,OAAO;AAAA,IAChG;AAAA,EACF,IACA;AACN;AAEA,SAAS,OACP,MACA,UACkB;AAClB,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AACA,MAAI,OAAO,aAAa,YAAY;AAClC,WAAO,SAAS,IAAI;AAAA,EACtB;AACA,SACG,KAAK,QAAS,MACd,QAAQ,OAAQ,KAAK,IAAI,IAAe,QACxC,UAAU,OAAQ,KAAK,MAAM,IAAe;AAEjD;AACA,IAAO,0BAAQ;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tiny-codes/react-easy",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "description": "Simplify React and AntDesign development with practical components and hooks",
5
5
  "keywords": [
6
6
  "react",