assui 3.1.44 → 3.1.45
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.
|
@@ -5,7 +5,7 @@ export declare enum InputTypeEnum {
|
|
|
5
5
|
CONDITION_INPUT = "conditionInput",
|
|
6
6
|
SELECT = "select"
|
|
7
7
|
}
|
|
8
|
-
declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
8
|
+
export declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
9
9
|
declare type SelectOptionsType = {
|
|
10
10
|
value: number;
|
|
11
11
|
label: string;
|
|
@@ -32,7 +32,7 @@ export interface LabelConditionSelectInputProps {
|
|
|
32
32
|
/** onChange */
|
|
33
33
|
onChange?: (value: ValueType) => void;
|
|
34
34
|
/** onBlur */
|
|
35
|
-
onBlur?: (value: ValueType) => void;
|
|
35
|
+
onBlur?: (value: ValueType, blurSelectType: ChangeSelectType) => void;
|
|
36
36
|
/** 输入框类型 */
|
|
37
37
|
inputType?: InputTypeEnum;
|
|
38
38
|
/** select options */
|
|
@@ -138,8 +138,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
138
138
|
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.CONDITION_INPUT, finalSelectInputValue);
|
|
139
139
|
};
|
|
140
140
|
/** 联级选择框失去焦点 */
|
|
141
|
-
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
|
|
142
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
|
|
141
|
+
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur(blurSelectType) {
|
|
142
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue, blurSelectType);
|
|
143
143
|
};
|
|
144
144
|
/** 二级下拉框清空 */
|
|
145
145
|
var onTypeSelectClear = function onTypeSelectClear() {
|
|
@@ -152,7 +152,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
152
152
|
finalSelectValue: findAllSubSelectItems(optionsList, selectInputValue.selectValue)
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(finalSelectInputValue);
|
|
155
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(finalSelectInputValue, InputTypeEnum.CONDITION_INPUT);
|
|
156
156
|
};
|
|
157
157
|
/** 一级下拉框清空 */
|
|
158
158
|
var onSelectClear = function onSelectClear() {
|
|
@@ -160,7 +160,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
160
160
|
selectValue: undefined,
|
|
161
161
|
inputValue: undefined,
|
|
162
162
|
finalSelectValue: undefined
|
|
163
|
-
});
|
|
163
|
+
}, InputTypeEnum.CONDITION_INPUT);
|
|
164
164
|
};
|
|
165
165
|
// 是否展示输入框
|
|
166
166
|
var isShowInput = !isNil(selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue) && !(hiddenInputKeys === null || hiddenInputKeys === void 0 ? void 0 : hiddenInputKeys.includes(selectInputValue.selectValue));
|
|
@@ -168,7 +168,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
168
168
|
onChange: onInputChange,
|
|
169
169
|
className: "label-condition-select-second-input",
|
|
170
170
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
|
|
171
|
-
onBlur:
|
|
171
|
+
onBlur: function onBlur() {
|
|
172
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.CONDITION_INPUT);
|
|
173
|
+
}
|
|
172
174
|
})) : /*#__PURE__*/React.createElement("div", {
|
|
173
175
|
className: "label-condition-select-second-select"
|
|
174
176
|
}, /*#__PURE__*/React.createElement(LabelSelect, __assign({}, conditionSelectProps, {
|
|
@@ -180,7 +182,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
180
182
|
var _a;
|
|
181
183
|
(_a = subSelectRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
182
184
|
},
|
|
183
|
-
onBlur:
|
|
185
|
+
onBlur: function onBlur() {
|
|
186
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.CONDITION_INPUT);
|
|
187
|
+
},
|
|
184
188
|
onClear: onTypeSelectClear
|
|
185
189
|
})));
|
|
186
190
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -196,7 +200,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
196
200
|
onChange: onSelectChange,
|
|
197
201
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
198
202
|
options: optionsList,
|
|
199
|
-
onBlur:
|
|
203
|
+
onBlur: function onBlur() {
|
|
204
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.SELECT);
|
|
205
|
+
},
|
|
200
206
|
onClear: onSelectClear
|
|
201
207
|
}))), isShowInput && typeInput);
|
|
202
208
|
};
|
|
@@ -5,7 +5,7 @@ export declare enum InputTypeEnum {
|
|
|
5
5
|
CONDITION_INPUT = "conditionInput",
|
|
6
6
|
SELECT = "select"
|
|
7
7
|
}
|
|
8
|
-
declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
8
|
+
export declare type ChangeSelectType = typeof InputTypeEnum[keyof typeof InputTypeEnum];
|
|
9
9
|
declare type SelectOptionsType = {
|
|
10
10
|
value: number;
|
|
11
11
|
label: string;
|
|
@@ -32,7 +32,7 @@ export interface LabelConditionSelectInputProps {
|
|
|
32
32
|
/** onChange */
|
|
33
33
|
onChange?: (value: ValueType) => void;
|
|
34
34
|
/** onBlur */
|
|
35
|
-
onBlur?: (value: ValueType) => void;
|
|
35
|
+
onBlur?: (value: ValueType, blurSelectType: ChangeSelectType) => void;
|
|
36
36
|
/** 输入框类型 */
|
|
37
37
|
inputType?: InputTypeEnum;
|
|
38
38
|
/** select options */
|
|
@@ -182,8 +182,8 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
182
182
|
onChangeSelectType === null || onChangeSelectType === void 0 ? void 0 : onChangeSelectType(InputTypeEnum.CONDITION_INPUT, finalSelectInputValue);
|
|
183
183
|
};
|
|
184
184
|
/** 联级选择框失去焦点 */
|
|
185
|
-
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur() {
|
|
186
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue);
|
|
185
|
+
var onLabelConditionSelectInputBlur = function onLabelConditionSelectInputBlur(blurSelectType) {
|
|
186
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputValue, blurSelectType);
|
|
187
187
|
};
|
|
188
188
|
/** 二级下拉框清空 */
|
|
189
189
|
var onTypeSelectClear = function onTypeSelectClear() {
|
|
@@ -196,7 +196,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
196
196
|
finalSelectValue: findAllSubSelectItems(optionsList, selectInputValue.selectValue)
|
|
197
197
|
});
|
|
198
198
|
}
|
|
199
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(finalSelectInputValue);
|
|
199
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(finalSelectInputValue, InputTypeEnum.CONDITION_INPUT);
|
|
200
200
|
};
|
|
201
201
|
/** 一级下拉框清空 */
|
|
202
202
|
var onSelectClear = function onSelectClear() {
|
|
@@ -204,7 +204,7 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
204
204
|
selectValue: undefined,
|
|
205
205
|
inputValue: undefined,
|
|
206
206
|
finalSelectValue: undefined
|
|
207
|
-
});
|
|
207
|
+
}, InputTypeEnum.CONDITION_INPUT);
|
|
208
208
|
};
|
|
209
209
|
// 是否展示输入框
|
|
210
210
|
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));
|
|
@@ -212,7 +212,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
212
212
|
onChange: onInputChange,
|
|
213
213
|
className: "label-condition-select-second-input",
|
|
214
214
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.inputValue,
|
|
215
|
-
onBlur:
|
|
215
|
+
onBlur: function onBlur() {
|
|
216
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.CONDITION_INPUT);
|
|
217
|
+
}
|
|
216
218
|
})) : react_1["default"].createElement("div", {
|
|
217
219
|
className: "label-condition-select-second-select"
|
|
218
220
|
}, react_1["default"].createElement(label_select_1["default"], __assign({}, conditionSelectProps, {
|
|
@@ -224,7 +226,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
224
226
|
var _a;
|
|
225
227
|
(_a = subSelectRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
226
228
|
},
|
|
227
|
-
onBlur:
|
|
229
|
+
onBlur: function onBlur() {
|
|
230
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.CONDITION_INPUT);
|
|
231
|
+
},
|
|
228
232
|
onClear: onTypeSelectClear
|
|
229
233
|
})));
|
|
230
234
|
return react_1["default"].createElement("div", {
|
|
@@ -240,7 +244,9 @@ var LabelConditionSelect = function LabelConditionSelect(props) {
|
|
|
240
244
|
onChange: onSelectChange,
|
|
241
245
|
value: selectInputValue === null || selectInputValue === void 0 ? void 0 : selectInputValue.selectValue,
|
|
242
246
|
options: optionsList,
|
|
243
|
-
onBlur:
|
|
247
|
+
onBlur: function onBlur() {
|
|
248
|
+
return onLabelConditionSelectInputBlur(InputTypeEnum.SELECT);
|
|
249
|
+
},
|
|
244
250
|
onClear: onSelectClear
|
|
245
251
|
}))), isShowInput && typeInput);
|
|
246
252
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assui",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.45",
|
|
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": "
|
|
83
|
+
"gitHead": "26b823994025a58c6fb4572d340bf3b57866d1b9"
|
|
84
84
|
}
|