@sheinx/hooks 3.5.0-beta.6 → 3.5.0-beta.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/cjs/common/use-position-style/check-position.d.ts +11 -0
  2. package/cjs/common/use-position-style/check-position.d.ts.map +1 -0
  3. package/cjs/common/use-position-style/check-position.js +90 -0
  4. package/cjs/common/use-position-style/index.d.ts.map +1 -1
  5. package/cjs/common/use-position-style/index.js +9 -9
  6. package/cjs/components/use-form/use-form.d.ts.map +1 -1
  7. package/cjs/components/use-form/use-form.js +4 -2
  8. package/cjs/components/use-form/use-form.type.d.ts +7 -0
  9. package/cjs/components/use-form/use-form.type.d.ts.map +1 -1
  10. package/cjs/components/use-image/use-image.type.d.ts +1 -1
  11. package/cjs/components/use-input/use-input-format.d.ts +1 -1
  12. package/cjs/components/use-input/use-input-number.d.ts +1 -1
  13. package/cjs/components/use-input/use-input-number.d.ts.map +1 -1
  14. package/cjs/components/use-input/use-input-number.js +5 -0
  15. package/cjs/components/use-table/use-table.type.d.ts +14 -0
  16. package/cjs/components/use-table/use-table.type.d.ts.map +1 -1
  17. package/cjs/utils/dom/element.d.ts +1 -1
  18. package/cjs/utils/dom/element.d.ts.map +1 -1
  19. package/esm/common/use-position-style/check-position.d.ts +11 -0
  20. package/esm/common/use-position-style/check-position.d.ts.map +1 -0
  21. package/esm/common/use-position-style/check-position.js +84 -0
  22. package/esm/common/use-position-style/index.d.ts.map +1 -1
  23. package/esm/common/use-position-style/index.js +9 -9
  24. package/esm/components/use-form/use-form.d.ts.map +1 -1
  25. package/esm/components/use-form/use-form.js +4 -2
  26. package/esm/components/use-form/use-form.type.d.ts +7 -0
  27. package/esm/components/use-form/use-form.type.d.ts.map +1 -1
  28. package/esm/components/use-image/use-image.type.d.ts +1 -1
  29. package/esm/components/use-input/use-input-format.d.ts +1 -1
  30. package/esm/components/use-input/use-input-number.d.ts +1 -1
  31. package/esm/components/use-input/use-input-number.d.ts.map +1 -1
  32. package/esm/components/use-input/use-input-number.js +5 -0
  33. package/esm/components/use-table/use-table.type.d.ts +14 -0
  34. package/esm/components/use-table/use-table.type.d.ts.map +1 -1
  35. package/esm/utils/dom/element.d.ts +1 -1
  36. package/esm/utils/dom/element.d.ts.map +1 -1
  37. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ interface Position {
2
+ top: number;
3
+ left: number;
4
+ }
5
+ interface UseCheckElementPositionOptions {
6
+ enable?: boolean;
7
+ scrollContainer?: HTMLElement | null;
8
+ }
9
+ export declare const useCheckElementPosition: (elementRef: React.RefObject<HTMLElement>, options?: UseCheckElementPositionOptions) => Position | null;
10
+ export {};
11
+ //# sourceMappingURL=check-position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-position.d.ts","sourceRoot":"","sources":["check-position.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,8BAA8B;IAEtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,uBAAuB,eACtB,MAAM,SAAS,CAAC,WAAW,CAAC,YAC/B,8BAA8B,KACtC,QAAQ,GAAG,IAyEb,CAAC"}
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useCheckElementPosition = void 0;
7
+ var _react = require("react");
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ 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."); }
10
+ 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); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ var useCheckElementPosition = exports.useCheckElementPosition = function useCheckElementPosition(elementRef) {
15
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
16
+ var enable = options.enable,
17
+ scrollContainer = options.scrollContainer;
18
+ var _useState = (0, _react.useState)({
19
+ top: 0,
20
+ left: 0
21
+ }),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ position = _useState2[0],
24
+ setPosition = _useState2[1];
25
+ var lastPosition = (0, _react.useRef)({
26
+ top: 0,
27
+ left: 0
28
+ });
29
+ var checkPosition = (0, _react.useCallback)(function () {
30
+ if (elementRef.current) {
31
+ var rect = elementRef.current.getBoundingClientRect();
32
+ var scrollContainerRect = scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.getBoundingClientRect();
33
+ var newPosition;
34
+ if (scrollContainerRect) {
35
+ newPosition = {
36
+ top: rect.top - scrollContainerRect.top,
37
+ left: rect.left - scrollContainerRect.left
38
+ };
39
+ } else {
40
+ newPosition = {
41
+ top: rect.top,
42
+ left: rect.left
43
+ };
44
+ }
45
+ if (newPosition.top !== lastPosition.current.top || newPosition.left !== lastPosition.current.left) {
46
+ setPosition(newPosition);
47
+ lastPosition.current = newPosition;
48
+ }
49
+ }
50
+ }, [elementRef, scrollContainer]);
51
+ (0, _react.useEffect)(function () {
52
+ var _window;
53
+ if (!enable) return;
54
+ var element = elementRef.current;
55
+ var container = scrollContainer || window;
56
+ if (!element) return;
57
+
58
+ // 初始检查
59
+ checkPosition();
60
+ var resizeObserver = null;
61
+ if ((_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
62
+ resizeObserver = new ResizeObserver(checkPosition);
63
+ resizeObserver.observe(element);
64
+ if (container instanceof Element) {
65
+ resizeObserver.observe(container);
66
+ }
67
+ }
68
+ // 滚动事件监听
69
+ container.addEventListener('scroll', checkPosition);
70
+
71
+ // 如果容器不是 window,我们仍然需要监听 window 的 resize 事件
72
+ if (container !== window) {
73
+ window.addEventListener('resize', checkPosition);
74
+ }
75
+
76
+ // 清理函数
77
+ return function () {
78
+ var _resizeObserver;
79
+ (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
80
+ container.removeEventListener('scroll', checkPosition);
81
+ if (container !== window) {
82
+ window.removeEventListener('resize', checkPosition);
83
+ }
84
+ };
85
+ }, [enable, elementRef, scrollContainer, checkPosition]);
86
+ if (!enable || !elementRef) {
87
+ return null;
88
+ }
89
+ return position;
90
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,CAAC;AAYb,KAAK,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,G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AAC,WAAW,CAAC,CAAC;IAE1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,eAAO,MAAM,gBAAgB,WAAY,mBAAmB;;;CA4S3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.usePositionStyle = exports.default = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _getPositionStyle = require("./get-position-style");
11
+ var _checkPosition = require("./check-position");
11
12
  var _shallowEqual = _interopRequireDefault(require("../../utils/shallow-equal"));
12
13
  var _usePersistFn = _interopRequireDefault(require("../use-persist-fn"));
13
14
  var _utils = require("../../utils");
14
- var _element = require("../../utils/dom/element");
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -26,8 +26,7 @@ var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right',
26
26
  var hideStyle = {
27
27
  pointerEvents: 'none',
28
28
  position: 'fixed',
29
- zIndex: -1000,
30
- opacity: 0
29
+ visibility: 'hidden'
31
30
  };
32
31
  var usePositionStyle = exports.usePositionStyle = function usePositionStyle(config) {
33
32
  var _ref = config || {},
@@ -55,7 +54,6 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
55
54
  arrayStyle = _useState4[0],
56
55
  setArrayStyle = _useState4[1];
57
56
  var _React$useRef = _react.default.useRef({
58
- element: null,
59
57
  containerRect: {
60
58
  left: 0,
61
59
  width: 0
@@ -69,10 +67,13 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
69
67
  width: 0
70
68
  },
71
69
  popUpHeight: 0,
72
- popUpWidth: 0,
73
- opsStyle: {}
70
+ popUpWidth: 0
74
71
  }),
75
72
  context = _React$useRef.current;
73
+ var parentElNewPosition = (0, _checkPosition.useCheckElementPosition)(parentElRef, {
74
+ scrollContainer: scrollElRef === null || scrollElRef === void 0 ? void 0 : scrollElRef.current,
75
+ enable: show && adjust
76
+ });
76
77
  var adjustPosition = function adjustPosition(position) {
77
78
  var winHeight = _utils.docSize.height;
78
79
  if (!verticalPosition.includes(position)) return position;
@@ -139,7 +140,6 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
139
140
  }
140
141
  var targetPosition = position;
141
142
  var rootContainer = getContainer() || document.body;
142
- var closestScrollContainer = absolute ? null : (0, _element.getClosestScrollContainer)(parentElRef.current);
143
143
  var containerRect = rootContainer.getBoundingClientRect();
144
144
  var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
145
145
  var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
@@ -158,7 +158,7 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
158
158
  var overRight = 0;
159
159
  var overLeft = 0;
160
160
  if (h === 'left') {
161
- style.left = rect.left - containerRect.left + containerScroll.left + ((closestScrollContainer === null || closestScrollContainer === void 0 ? void 0 : closestScrollContainer.scrollLeft) || 0);
161
+ style.left = rect.left - containerRect.left + containerScroll.left;
162
162
  style.transform = '';
163
163
  arrayStyle.left = "8px";
164
164
  if (adjust) {
@@ -347,7 +347,7 @@ var usePositionStyle = exports.usePositionStyle = function usePositionStyle(conf
347
347
  setArrayStyle(newArrayStyle || {});
348
348
  }
349
349
  });
350
- (0, _react.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth]);
350
+ (0, _react.useEffect)(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition]);
351
351
  return {
352
352
  style: style,
353
353
  arrayStyle: arrayStyle
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":";AA0BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyKC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BAVd,MAAM;oCAkED,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCAlFN,MAAM,GAAG,MAAM,EAAE,mBAAgB,QAAQ,IAAI,CAAC;qCAgJ5D,MAAM;gCA3CE,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;;;;;;oBAnDjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE;0BAVd,MAAM;gCAkED,OAAO;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46
46
  throttle = _props$throttle === void 0 ? 1000 : _props$throttle,
47
47
  size = props.size,
48
+ reserveAble = props.reserveAble,
48
49
  scrollParent = props.scrollParent;
49
50
  var deepSetOptions = {
50
51
  removeUndefined: removeUndefined,
@@ -443,9 +444,10 @@ var useForm = function useForm(props) {
443
444
  keepErrorHeight: keepErrorHeight,
444
445
  inline: inline,
445
446
  disabled: disabled,
446
- size: size
447
+ size: size,
448
+ reserveAble: reserveAble
447
449
  };
448
- }, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size]);
450
+ }, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size, reserveAble]);
449
451
  var updateValue = function updateValue() {
450
452
  if (props.value !== context.lastValue && props.value !== context.value) {
451
453
  context.value = (0, _utils.deepClone)(props.value) || emptyObj;
@@ -67,6 +67,13 @@ export interface FormCommonConfig extends FormLabelConfig {
67
67
  * @default 'default'
68
68
  */
69
69
  size?: 'small' | 'default' | 'large';
70
+ /**
71
+ * @en When set to true, the form items in Form will not automatically delete data after unmounting
72
+ * @cn 设置为 true 时,表单内所有组件的reserveAble都为 true : 卸载后不自动删除数据
73
+ * @default false
74
+ * @version 3.5.0
75
+ */
76
+ reserveAble?: boolean;
70
77
  }
71
78
  export interface FormFunc {
72
79
  setValue: (vals: {
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.type.d.ts","sourceRoot":"","sources":["use-form.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,GAAG,EACV,QAAQ,EAAE,UAAU,EACpB,MAAM,CAAC,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UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAElC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IAEjB,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEhJ,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACtC,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,UAAU,CACzE,mBAAmB,EACnB,MAAM,CACP,CAAC"}
@@ -58,7 +58,7 @@ export interface BaseImageProps {
58
58
  * @en Whether to load only when in view
59
59
  * @cn 是否仅在视图内加载
60
60
  * @default false
61
- * @version 3.4.5 3.4.4-beta.83.5.0
61
+ * @version 3.4.5
62
62
  */
63
63
  inViewOnly?: boolean;
64
64
  /**
@@ -5,7 +5,7 @@ declare const useInputFormat: (props: InputFormatProps) => {
5
5
  onBlur: (e: React.FocusEvent) => void;
6
6
  onFocus: (e: React.FocusEvent) => void;
7
7
  value: string | undefined;
8
- type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "checkbox" | "radio" | "hidden" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
8
+ type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "hidden" | "checkbox" | "radio" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
9
9
  };
10
10
  export default useInputFormat;
11
11
  //# sourceMappingURL=use-input-format.d.ts.map
@@ -7,7 +7,7 @@ declare const useNumberFormat: (props: InputNumberProps) => {
7
7
  onBlur: (e: React.FocusEvent<Element, Element>) => void;
8
8
  onFocus: (e: React.FocusEvent<Element, Element>) => void;
9
9
  value: string | undefined;
10
- type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "checkbox" | "radio" | "hidden" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
10
+ type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "hidden" | "checkbox" | "radio" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
11
11
  };
12
12
  export default useNumberFormat;
13
13
  //# sourceMappingURL=use-input-number.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;CAkJ/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;CAuJ/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -76,6 +76,11 @@ var useNumberFormat = function useNumberFormat(props) {
76
76
  setInternalInputValue(getStringValue(val));
77
77
  if (typeof val === 'string') {
78
78
  var num = parseFloat(val);
79
+ if (val === '') {
80
+ // 如果允许空值,则返回 null,否则返回 undefined
81
+ onChange === null || onChange === void 0 || onChange(allowNull ? null : undefined);
82
+ return;
83
+ }
79
84
  if (isNaN(num)) return;
80
85
  onChange === null || onChange === void 0 || onChange(num);
81
86
  } else {
@@ -66,6 +66,13 @@ export interface BaseTableProps<Item> {
66
66
  * @cn 排序取消事件
67
67
  */
68
68
  onSortCancel?: (preType: 'asc' | 'desc', key: KeygenResult, orders: SortItem[], sorter: string) => void;
69
+ /**
70
+ * @en sort directions
71
+ * @cn 排序方向
72
+ * @default ['asc', 'desc']
73
+ * @version 3.5.0
74
+ */
75
+ sortDirections?: ('asc' | 'desc')[];
69
76
  /**
70
77
  * @en Set columnResizable to true to make all columns scalable
71
78
  * @cn 设置 columnResizable 为 true,使所有列可伸缩
@@ -207,6 +214,13 @@ export interface TableColumnItem<DataItem> {
207
214
  * 服务端排序,不要返回值,自行处理即可。(旧用法)
208
215
  */
209
216
  sorter?: ((order: TableColumnOrder) => ((prevRowData: DataItem, nextRowData: DataItem) => number) | void) | string | TableColumnSorter;
217
+ /**
218
+ * @en sort directions
219
+ * @cn 排序方向
220
+ * @default ['asc', 'desc']
221
+ * @version 3.5.0
222
+ */
223
+ sortDirections?: ('asc' | 'desc')[];
210
224
  /**
211
225
  * @en The content of the header
212
226
  * @cn 表头显示内容
@@ -1 +1 @@
1
- {"version":3,"file":"use-table.type.d.ts","sourceRoot":"","sources":["use-table.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE9E,MAAM,MAAM,gBAAgB,GAA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gB;IAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
@@ -12,7 +12,7 @@ export declare const addResizeObserver: (el: HTMLElement, handler: any, options?
12
12
  timer?: number | undefined;
13
13
  }) => () => void;
14
14
  export declare function getParent(el: HTMLElement | null | Element, target?: string | HTMLElement): Element | null;
15
- export declare function getClosestScrollContainer(element: HTMLElement | null): Element | null;
15
+ export declare function getClosestScrollContainer(element: HTMLElement | null): HTMLElement | null;
16
16
  export declare function cssSupport(attr: keyof CSSStyleDeclaration, value: string): boolean;
17
17
  export declare const parsePxToNumber: (str: string) => number;
18
18
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,kBA+BpE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CA+BzF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface Position {
2
+ top: number;
3
+ left: number;
4
+ }
5
+ interface UseCheckElementPositionOptions {
6
+ enable?: boolean;
7
+ scrollContainer?: HTMLElement | null;
8
+ }
9
+ export declare const useCheckElementPosition: (elementRef: React.RefObject<HTMLElement>, options?: UseCheckElementPositionOptions) => Position | null;
10
+ export {};
11
+ //# sourceMappingURL=check-position.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-position.d.ts","sourceRoot":"","sources":["check-position.ts"],"names":[],"mappings":"AAEA,UAAU,QAAQ;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,8BAA8B;IAEtC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,uBAAuB,eACtB,MAAM,SAAS,CAAC,WAAW,CAAC,YAC/B,8BAA8B,KACtC,QAAQ,GAAG,IAyEb,CAAC"}
@@ -0,0 +1,84 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
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); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useState, useEffect, useRef, useCallback } from 'react';
8
+ export var useCheckElementPosition = function useCheckElementPosition(elementRef) {
9
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10
+ var enable = options.enable,
11
+ scrollContainer = options.scrollContainer;
12
+ var _useState = useState({
13
+ top: 0,
14
+ left: 0
15
+ }),
16
+ _useState2 = _slicedToArray(_useState, 2),
17
+ position = _useState2[0],
18
+ setPosition = _useState2[1];
19
+ var lastPosition = useRef({
20
+ top: 0,
21
+ left: 0
22
+ });
23
+ var checkPosition = useCallback(function () {
24
+ if (elementRef.current) {
25
+ var rect = elementRef.current.getBoundingClientRect();
26
+ var scrollContainerRect = scrollContainer === null || scrollContainer === void 0 ? void 0 : scrollContainer.getBoundingClientRect();
27
+ var newPosition;
28
+ if (scrollContainerRect) {
29
+ newPosition = {
30
+ top: rect.top - scrollContainerRect.top,
31
+ left: rect.left - scrollContainerRect.left
32
+ };
33
+ } else {
34
+ newPosition = {
35
+ top: rect.top,
36
+ left: rect.left
37
+ };
38
+ }
39
+ if (newPosition.top !== lastPosition.current.top || newPosition.left !== lastPosition.current.left) {
40
+ setPosition(newPosition);
41
+ lastPosition.current = newPosition;
42
+ }
43
+ }
44
+ }, [elementRef, scrollContainer]);
45
+ useEffect(function () {
46
+ var _window;
47
+ if (!enable) return;
48
+ var element = elementRef.current;
49
+ var container = scrollContainer || window;
50
+ if (!element) return;
51
+
52
+ // 初始检查
53
+ checkPosition();
54
+ var resizeObserver = null;
55
+ if ((_window = window) !== null && _window !== void 0 && _window.ResizeObserver) {
56
+ resizeObserver = new ResizeObserver(checkPosition);
57
+ resizeObserver.observe(element);
58
+ if (container instanceof Element) {
59
+ resizeObserver.observe(container);
60
+ }
61
+ }
62
+ // 滚动事件监听
63
+ container.addEventListener('scroll', checkPosition);
64
+
65
+ // 如果容器不是 window,我们仍然需要监听 window 的 resize 事件
66
+ if (container !== window) {
67
+ window.addEventListener('resize', checkPosition);
68
+ }
69
+
70
+ // 清理函数
71
+ return function () {
72
+ var _resizeObserver;
73
+ (_resizeObserver = resizeObserver) === null || _resizeObserver === void 0 || _resizeObserver.disconnect();
74
+ container.removeEventListener('scroll', checkPosition);
75
+ if (container !== window) {
76
+ window.removeEventListener('resize', checkPosition);
77
+ }
78
+ };
79
+ }, [enable, elementRef, scrollContainer, checkPosition]);
80
+ if (!enable || !elementRef) {
81
+ return null;
82
+ }
83
+ return position;
84
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,CAAC;AAYb,KAAK,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,OAAO,CAAC;AACpE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IAEd,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAE1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAQD,eAAO,MAAM,gBAAgB,WAAY,mBAAmB;;;CAqS3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,UAAU,GACV,cAAc,GACd,WAAW,GACX,MAAM,GACN,OAAO,CAAC;AACZ,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,cAAc,GACd,UAAU,GACV,WAAW,GACX,KAAK,GACL,QAAQ,CAAC;AAYb,KAAK,YAAY,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,OAAO,CAAC;AACpE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,YAAY,GAAG,SAAS,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IAEd,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAE1C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAEzC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3C,YAAY,EAAE,MAAM,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD,eAAO,MAAM,gBAAgB,WAAY,mBAAmB;;;CA4S3D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -7,17 +7,16 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
7
7
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  import React, { useEffect, useState } from 'react';
9
9
  import { getPositionStyle } from "./get-position-style";
10
+ import { useCheckElementPosition } from "./check-position";
10
11
  import shallowEqual from "../../utils/shallow-equal";
11
12
  import usePersistFn from "../use-persist-fn";
12
13
  import { docSize, isChromeLowerThan } from "../../utils";
13
- import { getClosestScrollContainer } from "../../utils/dom/element";
14
14
  var horizontalPosition = ['left-bottom', 'left-top', 'right-bottom', 'right-top', 'left', 'right'];
15
15
  var verticalPosition = ['bottom-left', 'bottom-right', 'top-left', 'top-right', 'bottom', 'top'];
16
16
  var hideStyle = {
17
17
  pointerEvents: 'none',
18
18
  position: 'fixed',
19
- zIndex: -1000,
20
- opacity: 0
19
+ visibility: 'hidden'
21
20
  };
22
21
  export var usePositionStyle = function usePositionStyle(config) {
23
22
  var _ref = config || {},
@@ -45,7 +44,6 @@ export var usePositionStyle = function usePositionStyle(config) {
45
44
  arrayStyle = _useState4[0],
46
45
  setArrayStyle = _useState4[1];
47
46
  var _React$useRef = React.useRef({
48
- element: null,
49
47
  containerRect: {
50
48
  left: 0,
51
49
  width: 0
@@ -59,10 +57,13 @@ export var usePositionStyle = function usePositionStyle(config) {
59
57
  width: 0
60
58
  },
61
59
  popUpHeight: 0,
62
- popUpWidth: 0,
63
- opsStyle: {}
60
+ popUpWidth: 0
64
61
  }),
65
62
  context = _React$useRef.current;
63
+ var parentElNewPosition = useCheckElementPosition(parentElRef, {
64
+ scrollContainer: scrollElRef === null || scrollElRef === void 0 ? void 0 : scrollElRef.current,
65
+ enable: show && adjust
66
+ });
66
67
  var adjustPosition = function adjustPosition(position) {
67
68
  var winHeight = docSize.height;
68
69
  if (!verticalPosition.includes(position)) return position;
@@ -129,7 +130,6 @@ export var usePositionStyle = function usePositionStyle(config) {
129
130
  }
130
131
  var targetPosition = position;
131
132
  var rootContainer = getContainer() || document.body;
132
- var closestScrollContainer = absolute ? null : getClosestScrollContainer(parentElRef.current);
133
133
  var containerRect = rootContainer.getBoundingClientRect();
134
134
  var bodyRect = (document.documentElement || document.body).getBoundingClientRect();
135
135
  var containerScrollBarWidth = rootContainer.offsetWidth - rootContainer.clientWidth;
@@ -148,7 +148,7 @@ export var usePositionStyle = function usePositionStyle(config) {
148
148
  var overRight = 0;
149
149
  var overLeft = 0;
150
150
  if (h === 'left') {
151
- style.left = rect.left - containerRect.left + containerScroll.left + ((closestScrollContainer === null || closestScrollContainer === void 0 ? void 0 : closestScrollContainer.scrollLeft) || 0);
151
+ style.left = rect.left - containerRect.left + containerScroll.left;
152
152
  style.transform = '';
153
153
  arrayStyle.left = "8px";
154
154
  if (adjust) {
@@ -337,7 +337,7 @@ export var usePositionStyle = function usePositionStyle(config) {
337
337
  setArrayStyle(newArrayStyle || {});
338
338
  }
339
339
  });
340
- useEffect(updateStyle, [show, position, absolute, updateKey, fixedWidth]);
340
+ useEffect(updateStyle, [show, position, absolute, updateKey, fixedWidth, parentElNewPosition]);
341
341
  return {
342
342
  style: style,
343
343
  arrayStyle: arrayStyle
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.d.ts","sourceRoot":"","sources":["use-form.ts"],"names":[],"mappings":";AA0BA,OAAO,EAEL,aAAa,EACb,YAAY,EACZ,gBAAgB,EAGjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAe,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI5D,QAAA,MAAM,OAAO;;;;;;;;;wBAyKC;gBAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;aAAE;8BAVd,MAAM;oCAkED,OAAO;;6BAfb,MAAM,KAAK,KAAK,GAAG,SAAS;;oCAdrB,MAAM,EAAE;sCAlFN,MAAM,GAAG,MAAM,EAAE,mBAAgB,QAAQ,IAAI,CAAC;qCAgJ5D,MAAM;gCA3CE,MAAM,SAAS,MAAM,UAAU,KAAK;gCAKpC,MAAM,SAAS,MAAM;;;;;;oBAnDjD;YAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,EAAE,C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Form = function useForm(props) {
36
36
  _props$throttle = props.throttle,
37
37
  throttle = _props$throttle === void 0 ? 1000 : _props$throttle,
38
38
  size = props.size,
39
+ reserveAble = props.reserveAble,
39
40
  scrollParent = props.scrollParent;
40
41
  var deepSetOptions = {
41
42
  removeUndefined: removeUndefined,
@@ -434,9 +435,10 @@ var useForm = function useForm(props) {
434
435
  keepErrorHeight: keepErrorHeight,
435
436
  inline: inline,
436
437
  disabled: disabled,
437
- size: size
438
+ size: size,
439
+ reserveAble: reserveAble
438
440
  };
439
- }, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size]);
441
+ }, [labelWidth, labelAlign, labelVerticalAlign, keepErrorHeight, inline, disabled, size, reserveAble]);
440
442
  var updateValue = function updateValue() {
441
443
  if (props.value !== context.lastValue && props.value !== context.value) {
442
444
  context.value = deepClone(props.value) || emptyObj;
@@ -67,6 +67,13 @@ export interface FormCommonConfig extends FormLabelConfig {
67
67
  * @default 'default'
68
68
  */
69
69
  size?: 'small' | 'default' | 'large';
70
+ /**
71
+ * @en When set to true, the form items in Form will not automatically delete data after unmounting
72
+ * @cn 设置为 true 时,表单内所有组件的reserveAble都为 true : 卸载后不自动删除数据
73
+ * @default false
74
+ * @version 3.5.0
75
+ */
76
+ reserveAble?: boolean;
70
77
  }
71
78
  export interface FormFunc {
72
79
  setValue: (vals: {
@@ -1 +1 @@
1
- {"version":3,"file":"use-form.type.d.ts","sourceRoot":"","sources":["use-form.type.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,UAAU,GAAG,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,GAAG,EACV,QAAQ,EA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AC,MAAM,CAAC,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAElC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IAEjB,SAAS,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;IAEhJ,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;IACrC,KAAK,EAAE,UAAU,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IACtC,YAAY,EAAE,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,GAAG,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,UAAU,CACzE,mBAAmB,EACnB,MAAM,CACP,CAAC"}
@@ -58,7 +58,7 @@ export interface BaseImageProps {
58
58
  * @en Whether to load only when in view
59
59
  * @cn 是否仅在视图内加载
60
60
  * @default false
61
- * @version 3.4.5 3.4.4-beta.83.5.0
61
+ * @version 3.4.5
62
62
  */
63
63
  inViewOnly?: boolean;
64
64
  /**
@@ -5,7 +5,7 @@ declare const useInputFormat: (props: InputFormatProps) => {
5
5
  onBlur: (e: React.FocusEvent) => void;
6
6
  onFocus: (e: React.FocusEvent) => void;
7
7
  value: string | undefined;
8
- type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "checkbox" | "radio" | "hidden" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
8
+ type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "hidden" | "checkbox" | "radio" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
9
9
  };
10
10
  export default useInputFormat;
11
11
  //# sourceMappingURL=use-input-format.d.ts.map
@@ -7,7 +7,7 @@ declare const useNumberFormat: (props: InputNumberProps) => {
7
7
  onBlur: (e: React.FocusEvent<Element, Element>) => void;
8
8
  onFocus: (e: React.FocusEvent<Element, Element>) => void;
9
9
  value: string | undefined;
10
- type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "checkbox" | "radio" | "hidden" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
10
+ type: "search" | "color" | "button" | "time" | "image" | "text" | "reset" | "submit" | "email" | "url" | "range" | "tel" | (string & {}) | "hidden" | "checkbox" | "radio" | "date" | "datetime-local" | "file" | "month" | "password" | "week" | undefined;
11
11
  };
12
12
  export default useNumberFormat;
13
13
  //# sourceMappingURL=use-input-number.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;CAkJ/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"use-input-number.d.ts","sourceRoot":"","sources":["use-input-number.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAK3D,QAAA,MAAM,eAAe,UAAW,gBAAgB;;;;;;;;CAuJ/C,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -67,6 +67,11 @@ var useNumberFormat = function useNumberFormat(props) {
67
67
  setInternalInputValue(getStringValue(val));
68
68
  if (typeof val === 'string') {
69
69
  var num = parseFloat(val);
70
+ if (val === '') {
71
+ // 如果允许空值,则返回 null,否则返回 undefined
72
+ onChange === null || onChange === void 0 || onChange(allowNull ? null : undefined);
73
+ return;
74
+ }
70
75
  if (isNaN(num)) return;
71
76
  onChange === null || onChange === void 0 || onChange(num);
72
77
  } else {
@@ -66,6 +66,13 @@ export interface BaseTableProps<Item> {
66
66
  * @cn 排序取消事件
67
67
  */
68
68
  onSortCancel?: (preType: 'asc' | 'desc', key: KeygenResult, orders: SortItem[], sorter: string) => void;
69
+ /**
70
+ * @en sort directions
71
+ * @cn 排序方向
72
+ * @default ['asc', 'desc']
73
+ * @version 3.5.0
74
+ */
75
+ sortDirections?: ('asc' | 'desc')[];
69
76
  /**
70
77
  * @en Set columnResizable to true to make all columns scalable
71
78
  * @cn 设置 columnResizable 为 true,使所有列可伸缩
@@ -207,6 +214,13 @@ export interface TableColumnItem<DataItem> {
207
214
  * 服务端排序,不要返回值,自行处理即可。(旧用法)
208
215
  */
209
216
  sorter?: ((order: TableColumnOrder) => ((prevRowData: DataItem, nextRowData: DataItem) => number) | void) | string | TableColumnSorter;
217
+ /**
218
+ * @en sort directions
219
+ * @cn 排序方向
220
+ * @default ['asc', 'desc']
221
+ * @version 3.5.0
222
+ */
223
+ sortDirections?: ('asc' | 'desc')[];
210
224
  /**
211
225
  * @en The content of the header
212
226
  * @cn 表头显示内容
@@ -1 +1 @@
1
- {"version":3,"file":"use-table.type.d.ts","sourceRoot":"","sources":["use-table.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE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CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC"}
@@ -12,7 +12,7 @@ export declare const addResizeObserver: (el: HTMLElement, handler: any, options?
12
12
  timer?: number | undefined;
13
13
  }) => () => void;
14
14
  export declare function getParent(el: HTMLElement | null | Element, target?: string | HTMLElement): Element | null;
15
- export declare function getClosestScrollContainer(element: HTMLElement | null): Element | null;
15
+ export declare function getClosestScrollContainer(element: HTMLElement | null): HTMLElement | null;
16
16
  export declare function cssSupport(attr: keyof CSSStyleDeclaration, value: string): boolean;
17
17
  export declare const parsePxToNumber: (str: string) => number;
18
18
  //# sourceMappingURL=element.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,kBA+BpE;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC"}
1
+ {"version":3,"file":"element.d.ts","sourceRoot":"","sources":["element.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,EACzB,WAAW,UAAQ,EACnB,SAAS,CAAC,EAAE,MAAM,GACjB,KAAK,CAAC,SAAS,CASjB;AAGD,eAAO,MAAM,iBAAiB,OACxB,WAAW,WACN,GAAG;;;gBA4Cb,CAAC;AAEF,wBAAgB,SAAS,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,kBAmBxF;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CA+BzF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,mBAAmB,EAAE,KAAK,EAAE,MAAM,WAYxE;AAED,eAAO,MAAM,eAAe,QAAS,MAAM,WAAwC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sheinx/hooks",
3
- "version": "3.5.0-beta.6",
3
+ "version": "3.5.0-beta.8",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",