@arim-aisdc/public-components 2.3.78 → 2.3.79

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.
@@ -40,7 +40,7 @@ export var DateRange = function DateRange(_ref) {
40
40
  var _useTranslation = useTranslation(),
41
41
  _useTranslation2 = _slicedToArray(_useTranslation, 1),
42
42
  t = _useTranslation2[0];
43
- var _ref2 = columnDef.filterComProps || {},
43
+ var _ref2 = (columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterComProps) || {},
44
44
  _ref2$format = _ref2.format,
45
45
  format = _ref2$format === void 0 ? defaultDateFormat : _ref2$format,
46
46
  _ref2$rangePresets = _ref2.rangePresets,
@@ -273,12 +273,12 @@ var Filter = function Filter(_ref) {
273
273
  className: "single-com-wrapper",
274
274
  children: /*#__PURE__*/_jsx(DatePicker, {
275
275
  value: columnFilterValue ? dayjs(columnFilterValue) : undefined,
276
- showTime: (_columnDef$filterComP = columnDef.filterComProps) === null || _columnDef$filterComP === void 0 ? void 0 : _columnDef$filterComP.showTime,
277
- format: ((_columnDef$filterComP2 = columnDef.filterComProps) === null || _columnDef$filterComP2 === void 0 ? void 0 : _columnDef$filterComP2.format) || defaultDateFormat,
278
- picker: ((_columnDef$filterComP3 = columnDef.filterComProps) === null || _columnDef$filterComP3 === void 0 ? void 0 : _columnDef$filterComP3.picker) || 'date',
276
+ showTime: columnDef === null || columnDef === void 0 || (_columnDef$filterComP = columnDef.filterComProps) === null || _columnDef$filterComP === void 0 ? void 0 : _columnDef$filterComP.showTime,
277
+ format: (columnDef === null || columnDef === void 0 || (_columnDef$filterComP2 = columnDef.filterComProps) === null || _columnDef$filterComP2 === void 0 ? void 0 : _columnDef$filterComP2.format) || defaultDateFormat,
278
+ picker: (columnDef === null || columnDef === void 0 || (_columnDef$filterComP3 = columnDef.filterComProps) === null || _columnDef$filterComP3 === void 0 ? void 0 : _columnDef$filterComP3.picker) || 'date',
279
279
  onChange: function onChange(date) {
280
280
  var _columnDef$filterComP4;
281
- return handleChangeFilterValue(date ? date.format(((_columnDef$filterComP4 = columnDef.filterComProps) === null || _columnDef$filterComP4 === void 0 ? void 0 : _columnDef$filterComP4.format) || defaultDateFormat) : undefined);
281
+ return handleChangeFilterValue(date ? date.format((columnDef === null || columnDef === void 0 || (_columnDef$filterComP4 = columnDef.filterComProps) === null || _columnDef$filterComP4 === void 0 ? void 0 : _columnDef$filterComP4.format) || defaultDateFormat) : undefined);
282
282
  },
283
283
  style: {
284
284
  width: 188
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
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;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
6
6
  declare const customSortFns: {
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;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
@@ -111,7 +111,7 @@ export var getFormatFilters = function getFormatFilters(columns, originFilters)
111
111
  var _ref4 = curColumn || {},
112
112
  filterType = _ref4.filterType,
113
113
  filterKey = _ref4.filterKey;
114
- var _ref5 = curColumn.filterComProps || {},
114
+ var _ref5 = (curColumn === null || curColumn === void 0 ? void 0 : curColumn.filterComProps) || {},
115
115
  _ref5$format = _ref5.format,
116
116
  format = _ref5$format === void 0 ? defaultDateFormat : _ref5$format;
117
117
  // 优先取formattedFilterKey作为key
@@ -163,7 +163,7 @@ export var getFormatFiltersV2 = function getFormatFiltersV2(columns, originFilte
163
163
  var _ref6 = curColumn || {},
164
164
  filterType = _ref6.filterType,
165
165
  filterKey = _ref6.filterKey;
166
- // const { format = defaultDateFormat } = curColumn.filterComProps || {};
166
+ // const { format = defaultDateFormat } = curColumn?.filterComProps || {};
167
167
  // 优先取formattedFilterKey作为key
168
168
  var formatKey = filterKey || id;
169
169
  var res = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.78",
3
+ "version": "2.3.79",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",