@arim-aisdc/public-components 2.2.2 → 2.2.3

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.
@@ -417,7 +417,8 @@ var CustomForm = function CustomForm(_ref, ref) {
417
417
  suffixIcon: /*#__PURE__*/_jsx("i", {
418
418
  className: "iconfont-other icon-other-calendar"
419
419
  }),
420
- placeholder: item.inputTips
420
+ placeholder: item.inputTips,
421
+ presets: item === null || item === void 0 ? void 0 : item.presets
421
422
  });
422
423
  break;
423
424
  case CustomFormItemType.DateRang:
@@ -442,7 +443,8 @@ var CustomForm = function CustomForm(_ref, ref) {
442
443
  placeholder: [item.inputTips, item.inputTips],
443
444
  picker: item === null || item === void 0 ? void 0 : item.picker,
444
445
  disabledDate: item === null || item === void 0 ? void 0 : item.disabledDate,
445
- allowClear: item.allowClear === false ? false : true
446
+ allowClear: item.allowClear === false ? false : true,
447
+ presets: item === null || item === void 0 ? void 0 : item.presets
446
448
  });
447
449
  break;
448
450
  case CustomFormItemType.Interval:
@@ -130,7 +130,7 @@ var UploadImg = function UploadImg(_ref) {
130
130
  })]
131
131
  });
132
132
  return /*#__PURE__*/_jsx(Upload, {
133
- accept: ".jpg, .jpeg, .png, .gif, .bmp, .webp, .svg",
133
+ accept: ".jpg, .jpeg, .png, .gif",
134
134
  listType: "picture-card",
135
135
  name: "file",
136
136
  showUploadList: false,
@@ -1,6 +1,7 @@
1
1
  import { FormProps } from 'antd';
2
2
  import { FormLabelAlign } from 'antd/es/form/interface';
3
3
  import { MouseEventHandler, ReactNode } from 'react';
4
+ import type { TimeRangePickerProps, TimePickerProps } from 'antd';
4
5
  export interface fieldType {
5
6
  field: string;
6
7
  label?: string;
@@ -124,6 +125,8 @@ export type CustomSearchFieldType = {
124
125
  baseUrl?: string;
125
126
  token?: any;
126
127
  method?: 'POST' | 'PUT' | 'PATCH';
128
+ /**预设常用的日期范围 { label: React.ReactNode, value: Dayjs | (() => Dayjs) | Dayjs[] }[]*/
129
+ presets?: TimeRangePickerProps['presets'] | TimePickerProps['presets'];
127
130
  };
128
131
  export interface CustomFormProps {
129
132
  data: CustomSearchFieldType[];
@@ -344,7 +344,8 @@ var QueryFilter = function QueryFilter(_ref, ref) {
344
344
  className: "iconfont-other icon-other-calendar"
345
345
  }),
346
346
  placeholder: item.inputTips,
347
- allowClear: item === null || item === void 0 ? void 0 : item.allowClear
347
+ allowClear: item === null || item === void 0 ? void 0 : item.allowClear,
348
+ presets: item === null || item === void 0 ? void 0 : item.presets
348
349
  });
349
350
  break;
350
351
  case FormItemType.DateRang:
@@ -372,7 +373,8 @@ var QueryFilter = function QueryFilter(_ref, ref) {
372
373
  picker: item === null || item === void 0 ? void 0 : item.picker,
373
374
  disabledDate: item === null || item === void 0 ? void 0 : item.disabledDate,
374
375
  disabledTime: item === null || item === void 0 ? void 0 : item.disabledTime,
375
- allowClear: item === null || item === void 0 ? void 0 : item.allowClear
376
+ allowClear: item === null || item === void 0 ? void 0 : item.allowClear,
377
+ presets: item === null || item === void 0 ? void 0 : item.presets
376
378
  });
377
379
  break;
378
380
  case FormItemType.Interval:
@@ -1,5 +1,5 @@
1
1
  import QueryFilter, { typeList, useDynamicSearchFiled } from './QueryFilter';
2
- export { FormItemType, TimeFormatType } from './type';
2
+ export { FormItemType, TimeFormatType, PickerType } from './type';
3
3
  export type { QueryFilterProps, fieldType, inputValueType, searchFieldType } from './type';
4
4
  export { typeList, useDynamicSearchFiled };
5
5
  export default QueryFilter;
@@ -1,4 +1,4 @@
1
1
  import QueryFilter, { typeList, useDynamicSearchFiled } from "./QueryFilter";
2
- export { FormItemType, TimeFormatType } from "./type";
2
+ export { FormItemType, TimeFormatType, PickerType } from "./type";
3
3
  export { typeList, useDynamicSearchFiled };
4
4
  export default QueryFilter;
@@ -1,5 +1,6 @@
1
1
  import { FormProps } from 'antd';
2
2
  import { MouseEventHandler } from 'react';
3
+ import type { TimeRangePickerProps, TimePickerProps } from 'antd';
3
4
  export declare enum FormItemType {
4
5
  Text = "text",
5
6
  TextArea = "textArea",
@@ -137,6 +138,8 @@ export type searchFieldType = {
137
138
  displayRender?: (labels: string[]) => string;
138
139
  /**级联选择器是否多选 */
139
140
  multiple?: boolean;
141
+ /**预设常用的日期范围 { label: React.ReactNode, value: Dayjs | (() => Dayjs) | Dayjs[] }[]*/
142
+ presets?: TimeRangePickerProps['presets'] | TimePickerProps['presets'];
140
143
  };
141
144
  export interface QueryFilterProps {
142
145
  data: searchFieldType[];
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
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) => 1 | 0 | -1;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",