@hw-component/form 1.10.52 → 1.10.55

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.
@@ -4,7 +4,7 @@ import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWitho
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import { DatePicker } from 'antd';
6
6
  import { useGetTimeKey, useRangeValueProvider, useRangePickerTimeVal } from './hooks.js';
7
- import { useMemo } from 'react';
7
+ import React, { useMemo } from 'react';
8
8
  import { useMatchConfigProps } from '../hooks/index.js';
9
9
  import HFormConnect from '../Form/HFormConnect.js';
10
10
 
@@ -114,7 +114,7 @@ var HRangePicker = function HRangePicker(_ref, ref) {
114
114
  }
115
115
  }, props));
116
116
  };
117
- var Index = HFormConnect(HRangePicker);
117
+ var Index = HFormConnect(/*#__PURE__*/React.forwardRef(HRangePicker));
118
118
  var HRangePicker$1 = {
119
119
  Component: Index,
120
120
  placeholder: function placeholder(_ref3) {
@@ -49,4 +49,8 @@ export interface HTimeRangePickerProps extends Omit<TimeRangePickerProps, "forma
49
49
  format?: string;
50
50
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
51
51
  }
52
+ export interface HRangePickerPropsRef {
53
+ blur: VoidFunction;
54
+ focus: VoidFunction;
55
+ }
52
56
  export {};
@@ -117,7 +117,7 @@ var HRangePicker = function HRangePicker(_ref, ref) {
117
117
  }
118
118
  }, props));
119
119
  };
120
- var Index = HFormConnect.default(HRangePicker);
120
+ var Index = HFormConnect.default(/*#__PURE__*/React.forwardRef(HRangePicker));
121
121
  var HRangePicker$1 = {
122
122
  Component: Index,
123
123
  placeholder: function placeholder(_ref3) {
@@ -49,4 +49,8 @@ export interface HTimeRangePickerProps extends Omit<TimeRangePickerProps, "forma
49
49
  format?: string;
50
50
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
51
51
  }
52
+ export interface HRangePickerPropsRef {
53
+ blur: VoidFunction;
54
+ focus: VoidFunction;
55
+ }
52
56
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.52",
3
+ "version": "1.10.55",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  import { DatePicker } from "antd";
2
- import type { HRangePickerProps } from "./modal";
2
+ import type {HRangePickerProps, HRangePickerPropsRef} from "./modal";
3
3
  import {
4
4
  useGetTimeKey,
5
5
  useRangePickerTimeVal,
@@ -14,7 +14,8 @@ import type { Moment } from "moment";
14
14
 
15
15
  const RangePicker = DatePicker.RangePicker as any;
16
16
 
17
- const HRangePicker: React.ForwardRefRenderFunction<any,HRangePickerProps> = ({
17
+
18
+ const HRangePicker: React.ForwardRefRenderFunction<HRangePickerPropsRef,HRangePickerProps> = ({
18
19
  value,
19
20
  onChange,
20
21
  showTime = true,
@@ -111,7 +112,7 @@ const HRangePicker: React.ForwardRefRenderFunction<any,HRangePickerProps> = ({
111
112
  />
112
113
  );
113
114
  };
114
- const Index = HFormConnect(HRangePicker);
115
+ const Index = HFormConnect(React.forwardRef(HRangePicker) as any);
115
116
  export default {
116
117
  Component: Index,
117
118
  placeholder: ({ label }: HItemProps) => {
@@ -63,3 +63,8 @@ export interface HTimeRangePickerProps
63
63
  format?: string;
64
64
  addFormat?: (config: Record<string, addFormatItemModal>) => void;
65
65
  }
66
+
67
+ export interface HRangePickerPropsRef{
68
+ blur:VoidFunction;
69
+ focus:VoidFunction;
70
+ }