assui 3.0.59 → 3.0.61

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.
@@ -72,8 +72,10 @@ var LabelDatePicker = function LabelDatePicker(props) {
72
72
  value = _b[0],
73
73
  onChangeValue = _b[1];
74
74
  useClickAway(function () {
75
+ if (focus) {
76
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
77
+ }
75
78
  onFocus(false);
76
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
77
79
  }, containerRef);
78
80
  var onStartChange = function onStartChange(startInterval) {
79
81
  onChangeValue(__assign(__assign({}, value), {
@@ -92,6 +94,11 @@ var LabelDatePicker = function LabelDatePicker(props) {
92
94
  }
93
95
  (_a = startNumberRef.current) === null || _a === void 0 ? void 0 : _a.focus();
94
96
  };
97
+ var onHandleFocus = function onHandleFocus() {
98
+ if (!focus) {
99
+ onFocus(true);
100
+ }
101
+ };
95
102
  var resultValue = value || defaultValue;
96
103
  return /*#__PURE__*/React.createElement("div", {
97
104
  ref: containerRef,
@@ -114,6 +121,7 @@ var LabelDatePicker = function LabelDatePicker(props) {
114
121
  dataType: dataType
115
122
  }, endNumberInputProps, {
116
123
  ref: startNumberRef,
124
+ onFocus: onHandleFocus,
117
125
  onChange: onStartChange,
118
126
  value: resultValue.startInterval
119
127
  }))), /*#__PURE__*/React.createElement("div", {
@@ -123,6 +131,7 @@ var LabelDatePicker = function LabelDatePicker(props) {
123
131
  }, /*#__PURE__*/React.createElement(NumberInput, __assign({
124
132
  bordered: false,
125
133
  enableMinus: enableMinus,
134
+ onFocus: onFocus,
126
135
  numberType: numberType,
127
136
  precision: precision,
128
137
  dataType: dataType
@@ -82,8 +82,10 @@ var LabelDatePicker = function LabelDatePicker(props) {
82
82
  value = _b[0],
83
83
  onChangeValue = _b[1];
84
84
  (0, useClickAway_1["default"])(function () {
85
+ if (focus) {
86
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
87
+ }
85
88
  onFocus(false);
86
- onBlur === null || onBlur === void 0 ? void 0 : onBlur(value);
87
89
  }, containerRef);
88
90
  var onStartChange = function onStartChange(startInterval) {
89
91
  onChangeValue(__assign(__assign({}, value), {
@@ -102,6 +104,11 @@ var LabelDatePicker = function LabelDatePicker(props) {
102
104
  }
103
105
  (_a = startNumberRef.current) === null || _a === void 0 ? void 0 : _a.focus();
104
106
  };
107
+ var onHandleFocus = function onHandleFocus() {
108
+ if (!focus) {
109
+ onFocus(true);
110
+ }
111
+ };
105
112
  var resultValue = value || defaultValue;
106
113
  return react_1["default"].createElement("div", {
107
114
  ref: containerRef,
@@ -124,6 +131,7 @@ var LabelDatePicker = function LabelDatePicker(props) {
124
131
  dataType: dataType
125
132
  }, endNumberInputProps, {
126
133
  ref: startNumberRef,
134
+ onFocus: onHandleFocus,
127
135
  onChange: onStartChange,
128
136
  value: resultValue.startInterval
129
137
  }))), react_1["default"].createElement("div", {
@@ -133,6 +141,7 @@ var LabelDatePicker = function LabelDatePicker(props) {
133
141
  }, react_1["default"].createElement(number_input_1["default"], __assign({
134
142
  bordered: false,
135
143
  enableMinus: enableMinus,
144
+ onFocus: onFocus,
136
145
  numberType: numberType,
137
146
  precision: precision,
138
147
  dataType: dataType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.0.59",
3
+ "version": "3.0.61",
4
4
  "description": "react ui library",
5
5
  "author": "jason <usochen@gmail.com>",
6
6
  "main": "./lib/index.js",
@@ -80,5 +80,5 @@
80
80
  "node": ">=10.0.0"
81
81
  },
82
82
  "license": "MIT",
83
- "gitHead": "de4dae336227d141698fc5a9f28a88940b8a016a"
83
+ "gitHead": "8ecc9b6b2d069371622c5d53778581ef78663401"
84
84
  }