assui 3.1.39 → 3.1.40

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.
@@ -25,7 +25,10 @@ export interface ConditionSelectInputProps {
25
25
  conditionInputProps?: ConditionInputProps;
26
26
  /** 联动selectProps */
27
27
  conditionSelectProps?: SelectProps;
28
+ /** onChange */
28
29
  onChange?: (value: ValueType) => void;
30
+ /** onBlur */
31
+ onBlur?: (value: ValueType) => void;
29
32
  /** 输入框类型 */
30
33
  inputType?: InputTypeEnum;
31
34
  /** select options */
@@ -55,7 +55,8 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
55
55
  _b = props.inputType,
56
56
  inputType = _b === void 0 ? InputTypeEnum.CONDITION_INPUT : _b,
57
57
  _c = props.optionsList,
58
- optionsList = _c === void 0 ? [] : _c;
58
+ optionsList = _c === void 0 ? [] : _c,
59
+ onBlur = props.onBlur;
59
60
  var isInput = inputType === InputTypeEnum.CONDITION_INPUT;
60
61
  var _d = __read(useControllableValue(props), 2),
61
62
  selectInputValue = _d[0],
@@ -104,19 +105,24 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
104
105
  inputValue: inputValue
105
106
  });
106
107
  };
108
+ var onConditionSelectInputBlur = function onConditionSelectInputBlur() {
109
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
110
+ };
107
111
  // 是否展示输入框
108
112
  var isShowInput = !isNil(selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue) && !(hiddenInputKeys === null || hiddenInputKeys === void 0 ? void 0 : hiddenInputKeys.includes(selectInputValue.selectValue));
109
113
  var typeInput = isInput ? /*#__PURE__*/React.createElement("div", {
110
114
  className: "condition-select-input"
111
115
  }, /*#__PURE__*/React.createElement(ConditionInput, __assign({}, conditionInputProps, {
112
116
  onChange: onInputChange,
113
- value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue
117
+ value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
118
+ onBlur: onConditionSelectInputBlur
114
119
  }))) : /*#__PURE__*/React.createElement("div", {
115
120
  className: "condition-select-select-input"
116
121
  }, /*#__PURE__*/React.createElement(Select, __assign({}, conditionSelectProps, {
117
122
  onChange: onTypeSelectChange,
118
123
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
119
- options: subSelectOptions
124
+ options: subSelectOptions,
125
+ onBlur: onConditionSelectInputBlur
120
126
  })));
121
127
  return /*#__PURE__*/React.createElement("div", {
122
128
  className: "condition-select-wrap"
@@ -128,7 +134,8 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
128
134
  }, /*#__PURE__*/React.createElement(Select, __assign({}, selectProps, {
129
135
  onChange: onSelectChange,
130
136
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
131
- options: optionsList
137
+ options: optionsList,
138
+ onBlur: onConditionSelectInputBlur
132
139
  }))), isShowInput && typeInput);
133
140
  };
134
141
  export default ConditionSelectInput;
@@ -28,6 +28,8 @@ export interface LabelConditionSelectInputProps {
28
28
  conditionSelectProps?: LabelSelectProps;
29
29
  /** onChange */
30
30
  onChange?: (value: ValueType) => void;
31
+ /** onBlur */
32
+ onBlur?: (value: ValueType) => void;
31
33
  /** 输入框类型 */
32
34
  inputType?: InputTypeEnum;
33
35
  /** select options */
@@ -57,7 +57,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
57
57
  _c = props.optionsList,
58
58
  optionsList = _c === void 0 ? [] : _c,
59
59
  label = props.label,
60
- className = props.className;
60
+ className = props.className,
61
+ onBlur = props.onBlur;
61
62
  var isInput = inputType === InputTypeEnum.CONDITION_INPUT;
62
63
  var _d = __read(useControllableValue(props), 2),
63
64
  selectInputValue = _d[0],
@@ -106,18 +107,23 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
106
107
  inputValue: inputValue
107
108
  });
108
109
  };
110
+ var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
111
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
112
+ };
109
113
  // 是否展示输入框
110
114
  var isShowInput = !isNil(selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue) && !(hiddenInputKeys === null || hiddenInputKeys === void 0 ? void 0 : hiddenInputKeys.includes(selectInputValue.selectValue));
111
115
  var typeInput = isInput ? /*#__PURE__*/React.createElement(LabelConditionInput, __assign({}, conditionInputProps, {
112
116
  onChange: onInputChange,
113
117
  className: "label-condition-select-second-input",
114
- value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue
118
+ value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
119
+ onBlur: onLabelConditionSelectInputBlur
115
120
  })) : /*#__PURE__*/React.createElement("div", {
116
121
  className: "label-condition-select-second-select"
117
122
  }, /*#__PURE__*/React.createElement(LabelSelect, __assign({}, conditionSelectProps, {
118
123
  onChange: onTypeSelectChange,
119
124
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
120
- options: subSelectOptions
125
+ options: subSelectOptions,
126
+ onBlur: onLabelConditionSelectInputBlur
121
127
  })));
122
128
  return /*#__PURE__*/React.createElement("div", {
123
129
  className: classNames('label-condition-select', className)
@@ -131,7 +137,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
131
137
  }, selectProps, {
132
138
  onChange: onSelectChange,
133
139
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
134
- options: optionsList
140
+ options: optionsList,
141
+ onBlur: onLabelConditionSelectInputBlur
135
142
  }))), isShowInput && typeInput);
136
143
  };
137
144
  export default LabelConditionSelect;
@@ -25,7 +25,10 @@ export interface ConditionSelectInputProps {
25
25
  conditionInputProps?: ConditionInputProps;
26
26
  /** 联动selectProps */
27
27
  conditionSelectProps?: SelectProps;
28
+ /** onChange */
28
29
  onChange?: (value: ValueType) => void;
30
+ /** onBlur */
31
+ onBlur?: (value: ValueType) => void;
29
32
  /** 输入框类型 */
30
33
  inputType?: InputTypeEnum;
31
34
  /** select options */
@@ -99,7 +99,8 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
99
99
  _b = props.inputType,
100
100
  inputType = _b === void 0 ? InputTypeEnum.CONDITION_INPUT : _b,
101
101
  _c = props.optionsList,
102
- optionsList = _c === void 0 ? [] : _c;
102
+ optionsList = _c === void 0 ? [] : _c,
103
+ onBlur = props.onBlur;
103
104
  var isInput = inputType === InputTypeEnum.CONDITION_INPUT;
104
105
  var _d = __read((0, useControllableValue_1["default"])(props), 2),
105
106
  selectInputValue = _d[0],
@@ -148,19 +149,24 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
148
149
  inputValue: inputValue
149
150
  });
150
151
  };
152
+ var onConditionSelectInputBlur = function onConditionSelectInputBlur() {
153
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
154
+ };
151
155
  // 是否展示输入框
152
156
  var isShowInput = !(0, isNil_1["default"])(selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue) && !(hiddenInputKeys === null || hiddenInputKeys === void 0 ? void 0 : hiddenInputKeys.includes(selectInputValue.selectValue));
153
157
  var typeInput = isInput ? react_1["default"].createElement("div", {
154
158
  className: "condition-select-input"
155
159
  }, react_1["default"].createElement(condition_input_1["default"], __assign({}, conditionInputProps, {
156
160
  onChange: onInputChange,
157
- value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue
161
+ value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
162
+ onBlur: onConditionSelectInputBlur
158
163
  }))) : react_1["default"].createElement("div", {
159
164
  className: "condition-select-select-input"
160
165
  }, react_1["default"].createElement(select_1["default"], __assign({}, conditionSelectProps, {
161
166
  onChange: onTypeSelectChange,
162
167
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
163
- options: subSelectOptions
168
+ options: subSelectOptions,
169
+ onBlur: onConditionSelectInputBlur
164
170
  })));
165
171
  return react_1["default"].createElement("div", {
166
172
  className: "condition-select-wrap"
@@ -172,7 +178,8 @@ var ConditionSelectInput = function ConditionSelectInput(props) {
172
178
  }, react_1["default"].createElement(select_1["default"], __assign({}, selectProps, {
173
179
  onChange: onSelectChange,
174
180
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
175
- options: optionsList
181
+ options: optionsList,
182
+ onBlur: onConditionSelectInputBlur
176
183
  }))), isShowInput && typeInput);
177
184
  };
178
185
  exports["default"] = ConditionSelectInput;
@@ -28,6 +28,8 @@ export interface LabelConditionSelectInputProps {
28
28
  conditionSelectProps?: LabelSelectProps;
29
29
  /** onChange */
30
30
  onChange?: (value: ValueType) => void;
31
+ /** onBlur */
32
+ onBlur?: (value: ValueType) => void;
31
33
  /** 输入框类型 */
32
34
  inputType?: InputTypeEnum;
33
35
  /** select options */
@@ -101,7 +101,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
101
101
  _c = props.optionsList,
102
102
  optionsList = _c === void 0 ? [] : _c,
103
103
  label = props.label,
104
- className = props.className;
104
+ className = props.className,
105
+ onBlur = props.onBlur;
105
106
  var isInput = inputType === InputTypeEnum.CONDITION_INPUT;
106
107
  var _d = __read((0, useControllableValue_1["default"])(props), 2),
107
108
  selectInputValue = _d[0],
@@ -150,18 +151,23 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
150
151
  inputValue: inputValue
151
152
  });
152
153
  };
154
+ var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
155
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
156
+ };
153
157
  // 是否展示输入框
154
158
  var isShowInput = !(0, isNil_1["default"])(selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue) && !(hiddenInputKeys === null || hiddenInputKeys === void 0 ? void 0 : hiddenInputKeys.includes(selectInputValue.selectValue));
155
159
  var typeInput = isInput ? react_1["default"].createElement(label_condition_input_1["default"], __assign({}, conditionInputProps, {
156
160
  onChange: onInputChange,
157
161
  className: "label-condition-select-second-input",
158
- value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue
162
+ value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
163
+ onBlur: onLabelConditionSelectInputBlur
159
164
  })) : react_1["default"].createElement("div", {
160
165
  className: "label-condition-select-second-select"
161
166
  }, react_1["default"].createElement(label_select_1["default"], __assign({}, conditionSelectProps, {
162
167
  onChange: onTypeSelectChange,
163
168
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
164
- options: subSelectOptions
169
+ options: subSelectOptions,
170
+ onBlur: onLabelConditionSelectInputBlur
165
171
  })));
166
172
  return react_1["default"].createElement("div", {
167
173
  className: (0, classnames_1["default"])('label-condition-select', className)
@@ -175,7 +181,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
175
181
  }, selectProps, {
176
182
  onChange: onSelectChange,
177
183
  value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
178
- options: optionsList
184
+ options: optionsList,
185
+ onBlur: onLabelConditionSelectInputBlur
179
186
  }))), isShowInput && typeInput);
180
187
  };
181
188
  exports["default"] = LabelConditionSelect;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assui",
3
- "version": "3.1.39",
3
+ "version": "3.1.40",
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": "4afcd51627b4018b8ce4786236c590e28692f58e"
83
+ "gitHead": "1a38927df029a25a9bb5b92680d3d4ba9ad26091"
84
84
  }