@arim-aisdc/public-components 2.3.88 → 2.3.89
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.
- package/dist/components/BaseInfo/BaseInfo.d.ts +1 -1
- package/dist/components/TableMax/components/ColumnFilterV2/TextFilter/index.js +10 -8
- package/dist/components/TableMax/components/ColumnFilterV2/TextFilter/index.less +11 -3
- package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
- package/dist/components/TableMax/utils.js +2 -2
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string |
|
|
20
|
+
text: string | Element | JSX.Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -124,7 +124,7 @@ var TextFilter = function TextFilter(_ref) {
|
|
|
124
124
|
// 构建最终的 filterValue
|
|
125
125
|
var buildResult = useCallback(function (finalFilterValue, finalOperator) {
|
|
126
126
|
var _map$finalOperator;
|
|
127
|
-
var map = _defineProperty(_defineProperty({}, FilterOperator.IsNotNull, '
|
|
127
|
+
var map = _defineProperty(_defineProperty({}, FilterOperator.IsNotNull, 'NOTNULL'), FilterOperator.IsNull, 'NULL');
|
|
128
128
|
var result = {
|
|
129
129
|
filterValue: (_map$finalOperator = map[finalOperator]) !== null && _map$finalOperator !== void 0 ? _map$finalOperator : finalFilterValue,
|
|
130
130
|
operator: finalOperator
|
|
@@ -227,11 +227,11 @@ var TextFilter = function TextFilter(_ref) {
|
|
|
227
227
|
};
|
|
228
228
|
}, []);
|
|
229
229
|
|
|
230
|
-
// Quick input for NULL/
|
|
230
|
+
// Quick input for NULL/NOTNULL
|
|
231
231
|
var renderQuickInput = useCallback(function () {
|
|
232
232
|
if (!openNullValueFilter) return null;
|
|
233
233
|
var isNullSelected = typeof value === 'string' && value.toUpperCase().trim() === 'NULL';
|
|
234
|
-
var isNotNullSelected = typeof value === 'string' && (value.toUpperCase().trim() === '
|
|
234
|
+
var isNotNullSelected = typeof value === 'string' && (value.toUpperCase().trim() === 'NOTNULL' || value.toUpperCase().trim() === 'NOTNULL');
|
|
235
235
|
return /*#__PURE__*/_jsxs("div", {
|
|
236
236
|
className: "quickly-input",
|
|
237
237
|
children: [/*#__PURE__*/_jsx("p", {
|
|
@@ -251,10 +251,10 @@ var TextFilter = function TextFilter(_ref) {
|
|
|
251
251
|
onClick: function onClick() {
|
|
252
252
|
return onChange({
|
|
253
253
|
operator: FilterOperator.IsNotNull,
|
|
254
|
-
filterValue: '
|
|
254
|
+
filterValue: 'NOTNULL'
|
|
255
255
|
});
|
|
256
256
|
},
|
|
257
|
-
children: "\u975E\u7A7A\u503C(
|
|
257
|
+
children: "\u975E\u7A7A\u503C(NOTNULL)"
|
|
258
258
|
})]
|
|
259
259
|
});
|
|
260
260
|
}, [openNullValueFilter, value, onChange]);
|
|
@@ -290,9 +290,11 @@ var TextFilter = function TextFilter(_ref) {
|
|
|
290
290
|
onChange: handleBetweenValue1Change,
|
|
291
291
|
placeholder: '起始值',
|
|
292
292
|
allowClear: true
|
|
293
|
-
}), /*#__PURE__*/_jsx("
|
|
294
|
-
className: "
|
|
295
|
-
children: "
|
|
293
|
+
}), /*#__PURE__*/_jsx("p", {
|
|
294
|
+
className: "split-wrapper",
|
|
295
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
296
|
+
className: "horizontal-line"
|
|
297
|
+
})
|
|
296
298
|
}), /*#__PURE__*/_jsx(Input, {
|
|
297
299
|
className: "text-filter-input",
|
|
298
300
|
value: betweenValue2,
|
|
@@ -49,11 +49,19 @@
|
|
|
49
49
|
width: 100%
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
.split-wrapper {
|
|
53
|
+
margin: 5px 0px;
|
|
54
|
+
display: flex;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
.horizontal-line {
|
|
57
|
+
height: 2px;
|
|
58
|
+
display: inline-block;
|
|
59
|
+
background: @tableColor4;
|
|
60
|
+
width: 12px;
|
|
55
61
|
}
|
|
56
62
|
}
|
|
63
|
+
|
|
64
|
+
}
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
.quickly-input {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|
|
@@ -201,7 +201,7 @@ export var getFormatFiltersV2 = function getFormatFiltersV2(columns, originFilte
|
|
|
201
201
|
res.operator = JSON.stringify(res.value) === '["NULL"]' ? FilterOperator.IsNull : FilterOperator.In;
|
|
202
202
|
} else if (filterType === FilterType.Input || filterType === FilterType.AutoComplete) {
|
|
203
203
|
// Input组件
|
|
204
|
-
if (
|
|
204
|
+
if (typeof value === 'string') {
|
|
205
205
|
var _value$toUpperCase;
|
|
206
206
|
var upperValue = value === null || value === void 0 || (_value$toUpperCase = value.toUpperCase()) === null || _value$toUpperCase === void 0 ? void 0 : _value$toUpperCase.trim();
|
|
207
207
|
res.value = splitString(value + '');
|
|
@@ -209,10 +209,10 @@ export var getFormatFiltersV2 = function getFormatFiltersV2(columns, originFilte
|
|
|
209
209
|
} else {
|
|
210
210
|
var _operatorMap$_upperVa;
|
|
211
211
|
// 1. 简化变量处理:合并空值判断 + 类型转换
|
|
212
|
-
var _upperValue = (value === null || value === void 0 ? void 0 : value.toString().toUpperCase().trim()) || '';
|
|
213
212
|
var _ref7 = value || {},
|
|
214
213
|
filterValue = _ref7.filterValue,
|
|
215
214
|
operator = _ref7.operator;
|
|
215
|
+
var _upperValue = (filterValue === null || filterValue === void 0 ? void 0 : filterValue.toString().toUpperCase().trim()) || '';
|
|
216
216
|
|
|
217
217
|
// 2. 拆分 operator 逻辑:用对象映射替代多层三元,更易维护
|
|
218
218
|
var operatorMap = {
|