@arim-aisdc/public-components 2.2.1 → 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.
@@ -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 | JSX.Element | Element;
20
+ text: string | Element | JSX.Element;
21
21
  units?: string;
22
22
  width?: string;
23
23
  labelWidth?: string;
@@ -399,6 +399,7 @@ var CustomForm = function CustomForm(_ref, ref) {
399
399
  case CustomFormItemType.DateTime:
400
400
  element = /*#__PURE__*/_jsx(DatePicker, {
401
401
  showTime: true,
402
+ picker: (item === null || item === void 0 ? void 0 : item.picker) || 'date',
402
403
  style: {
403
404
  width: item !== null && item !== void 0 && item.wapperWidth ? item === null || item === void 0 ? void 0 : item.wapperWidth : '100%'
404
405
  }
@@ -416,7 +417,8 @@ var CustomForm = function CustomForm(_ref, ref) {
416
417
  suffixIcon: /*#__PURE__*/_jsx("i", {
417
418
  className: "iconfont-other icon-other-calendar"
418
419
  }),
419
- placeholder: item.inputTips
420
+ placeholder: item.inputTips,
421
+ presets: item === null || item === void 0 ? void 0 : item.presets
420
422
  });
421
423
  break;
422
424
  case CustomFormItemType.DateRang:
@@ -441,7 +443,8 @@ var CustomForm = function CustomForm(_ref, ref) {
441
443
  placeholder: [item.inputTips, item.inputTips],
442
444
  picker: item === null || item === void 0 ? void 0 : item.picker,
443
445
  disabledDate: item === null || item === void 0 ? void 0 : item.disabledDate,
444
- allowClear: item.allowClear === false ? false : true
446
+ allowClear: item.allowClear === false ? false : true,
447
+ presets: item === null || item === void 0 ? void 0 : item.presets
445
448
  });
446
449
  break;
447
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;
@@ -58,6 +59,8 @@ export declare enum PickerType {
58
59
  Week = "week",
59
60
  Quarter = "quarter "
60
61
  }
62
+ type PanelMode = 'time' | 'date' | 'week' | 'month' | 'quarter' | 'year' | 'decade';
63
+ export type PickerMode = Exclude<PanelMode, 'datetime' | 'decade'>;
61
64
  export type CustomSearchFieldType = {
62
65
  field: string;
63
66
  label?: ReactNode | string;
@@ -70,7 +73,7 @@ export type CustomSearchFieldType = {
70
73
  maxLength?: number;
71
74
  rows?: number;
72
75
  wapperWidth?: number;
73
- picker?: PickerType;
76
+ picker?: PickerType | PickerMode;
74
77
  defaultFormat?: any;
75
78
  showTimeFormat?: any;
76
79
  allowClear?: boolean;
@@ -121,7 +124,9 @@ export type CustomSearchFieldType = {
121
124
  labelInValue?: boolean;
122
125
  baseUrl?: string;
123
126
  token?: any;
124
- method?: "POST" | "PUT" | "PATCH";
127
+ method?: 'POST' | 'PUT' | 'PATCH';
128
+ /**预设常用的日期范围 { label: React.ReactNode, value: Dayjs | (() => Dayjs) | Dayjs[] }[]*/
129
+ presets?: TimeRangePickerProps['presets'] | TimePickerProps['presets'];
125
130
  };
126
131
  export interface CustomFormProps {
127
132
  data: CustomSearchFieldType[];
@@ -159,3 +164,4 @@ export interface CustomFormProps {
159
164
  labelAlign?: FormLabelAlign;
160
165
  btnSpan?: number;
161
166
  }
167
+ export {};
@@ -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;
@@ -133,6 +133,9 @@
133
133
  box-sizing: border-box;
134
134
  height: fit-content;
135
135
  flex: 1;
136
+ .cell-wapper {
137
+ line-height: @global-table-max-header-cell-wapper-line-height;
138
+ }
136
139
  }
137
140
 
138
141
  .table-header-scroll {
@@ -146,6 +149,9 @@
146
149
  overflow: auto scroll;
147
150
  font-weight: @global-table-max-body-font-weight;
148
151
  // background: @tableColor2;
152
+ .tbody-tr-td {
153
+ line-height: @global-table-body-tbody-tr-td-line-height;
154
+ }
149
155
 
150
156
  &::-webkit-scrollbar {
151
157
  width: 10px;
@@ -66,4 +66,5 @@
66
66
  @global-table-max-scrollbar-track: var(--global-table-max-scrollbar-track, #E8E8E8);
67
67
  @global-table-max-header-font-weight: var(--global-table-max-header-font-weight);
68
68
  @global-table-max-body-font-weight: var(--global-table-max-body-font-weight);
69
-
69
+ @global-table-max-header-cell-wapper-line-height: var(--global-table-max-header-cell-wapper-line-height, 16px);
70
+ @global-table-body-tbody-tr-td-line-height: var(--global-table-body-tbody-tr-td-line-height, 32px);
@@ -14,19 +14,22 @@ var tableMaxCommonStyle = {
14
14
  '--global-table-max-center-border-radius': 'unset',
15
15
  '--global-table-max-center-border-bottom': 'none',
16
16
  '--global-table-max-header-font-weight': '400',
17
- '--global-table-max-body-font-weight': '400'
17
+ '--global-table-max-body-font-weight': '400',
18
+ '--global-table-max-header-cell-wapper-line-height': '16px',
19
+ '--global-table-body-tbody-tr-td-line-height': '32px'
18
20
  };
19
21
  var tableMaxCommonStyleTwo = {
20
22
  '--global-table-max-padding-top': '8px',
21
23
  '--global-table-max-padding-left': '8px',
22
24
  '--global-table-max-padding-right': '16px',
23
25
  '--global-table-max-padding-bottom': '7px',
24
- '--global-table-max-border': '1px solid #D9D9D9',
25
26
  '--global-table-max-footer-border-radius': '0px 0px 8px 8px',
26
27
  '--global-table-max-center-border-radius': '8px 8px 0px 0px',
27
28
  '--global-table-max-center-border-bottom': 'none',
28
29
  '--global-table-max-header-font-weight': '500',
29
- '--global-table-max-body-font-weight': '400'
30
+ '--global-table-max-body-font-weight': '400',
31
+ '--global-table-max-header-cell-wapper-line-height': '32px',
32
+ '--global-table-body-tbody-tr-td-line-height': '42px'
30
33
  };
31
34
  export var PublicThemeVariablesConfig = {
32
35
  light: _objectSpread({
@@ -268,7 +271,8 @@ export var PublicThemeVariablesConfigTwo = {
268
271
  // 卡片、表格body背景色 -1
269
272
  '--global-card-effect-background-color': '#E8E8E8',
270
273
  '--global-default-text-color': '#242A30',
271
- '--global-table-max-scrollbar-track': '#E8E8E8'
274
+ '--global-table-max-scrollbar-track': '#E8E8E8',
275
+ '--global-table-max-border': '1px solid #D9D9D9'
272
276
  }, tableMaxCommonStyleTwo),
273
277
  dark: _objectSpread({
274
278
  '--global-curd-input-background-color': '#494c5dff',
@@ -349,7 +353,8 @@ export var PublicThemeVariablesConfigTwo = {
349
353
  // 卡片、表格body背景色 -1
350
354
  '--global-card-effect-background-color': '#1E345B',
351
355
  '--global-default-text-color': '#fff',
352
- '--global-table-max-scrollbar-track': '#334155'
356
+ '--global-table-max-scrollbar-track': '#334155',
357
+ '--global-table-max-border': '1px solid #475569'
353
358
  }, tableMaxCommonStyleTwo)
354
359
  };
355
360
  export var publicThemeMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",