@arim-aisdc/public-components 0.0.46 → 0.0.48

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.
@@ -133,26 +133,26 @@ table {
133
133
 
134
134
  .custom-light-select:not(.custom-light-select-customize-input) .custom-light-select-selector {
135
135
  border-radius: 2px;
136
- background-color: #f5f6f7ff;
136
+ background-color: @global-curd-input-background-color;
137
137
  padding: 0 2px;
138
138
  }
139
139
 
140
140
  .custom-dark-select:not(.custom-dark-select-customize-input) .custom-dark-select-selector {
141
141
  border-radius: 2px;
142
- background-color: #494c5dff;
142
+ background-color: @global-curd-input-background-color;
143
143
  padding: 0 2px;
144
144
  }
145
145
 
146
146
  .custom-light-input-number {
147
147
  width: 100% !important;
148
148
  border-radius: 2px;
149
- background-color: #f5f6f7ff;
149
+ background-color: @global-curd-input-background-color;
150
150
  }
151
151
 
152
152
  .custom-dark-input-number {
153
153
  width: 100% !important;
154
154
  border-radius: 2px;
155
- background-color: #494c5dff;
155
+ background-color: @global-curd-input-background-color;
156
156
  }
157
157
 
158
158
  .custom-dark-select-single .custom-dark-select-selector .custom-dark-select-selection-search {
@@ -171,23 +171,23 @@ table {
171
171
 
172
172
  .custom-dark-picker {
173
173
  padding: 4px;
174
- background: #494c5dff;
174
+ background: @global-curd-input-background-color;
175
175
  }
176
176
 
177
177
  .custom-dark-input-affix-wrapper,
178
178
  .custom-dark-picker-input .custom-dark-picker-clear {
179
- background: #494c5dff;
179
+ background: @global-curd-input-background-color;
180
180
  }
181
181
 
182
182
  .custom-light-picker {
183
183
  padding: 4px;
184
- background: #f5f6f7ff;
184
+ background: @global-curd-input-background-color;
185
185
  }
186
186
 
187
187
  .custom-light-input-affix-wrapper,
188
188
  .custom-light-input,
189
189
  .custom-light-picker-input .custom-light-picker-clear {
190
- background: #f5f6f7ff;
190
+ background: @global-curd-input-background-color;
191
191
  }
192
192
  }
193
193
  }
@@ -30,7 +30,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
30
  import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons';
31
31
  import { getCoreRowModel, getExpandedRowModel, getFacetedUniqueValues, getFilteredRowModel, getSortedRowModel, useReactTable } from '@tanstack/react-table';
32
32
  import { produce } from 'immer';
33
- import { cloneDeep } from 'lodash';
33
+ import { cloneDeep, debounce } from 'lodash';
34
34
  import moment from 'moment';
35
35
  import React, { createContext, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
36
36
  import { DndProvider } from 'react-dnd';
@@ -613,12 +613,17 @@ var TableMax = function TableMax(_ref) {
613
613
  }
614
614
  }));
615
615
  }, [tableContainerWidth, hasVerticalScrollBar, table.getState().columnSizing]);
616
+ var _rowSelectionChange = useCallback(debounce(function (rowOriginal, row) {
617
+ if (rowSelectionChange) {
618
+ rowSelectionChange(rowOriginal, row);
619
+ }
620
+ }, 100), [rowSelectionChange]);
616
621
 
617
622
  // 多选数据变化回调
618
623
  useEffect(function () {
619
624
  var rowObjs = table.getSelectedRowModel().rows;
620
625
  // eslint-disable-next-line @typescript-eslint/no-unused-expressions
621
- rowSelectionChange && rowSelectionChange(rowObjs.map(function (item) {
626
+ _rowSelectionChange(rowObjs.map(function (item) {
622
627
  return item.original;
623
628
  }), rowObjs);
624
629
  }, [rowSelection]);
@@ -23,15 +23,33 @@
23
23
  .custom-dark-input,
24
24
  .custom-dark-input-affix-wrapper,
25
25
  .custom-dark-switch {
26
- background-color: #494c5dff;
26
+ background-color: @global-curd-input-background-color;
27
27
  }
28
28
 
29
29
  .custom-dark-switch-checked {
30
- background-color: #fa541c;
30
+ background-color: @global-primary-color;
31
31
  }
32
32
 
33
33
  .custom-dark-picker-clear,
34
34
  .custom-dark-select-clear {
35
- background-color: #494c5dff;
35
+ background-color: @global-curd-input-background-color;
36
+ }
37
+
38
+ .custom-light-select,
39
+ .custom-light-picker,
40
+ .custom-light-input-number,
41
+ .custom-light-input,
42
+ .custom-light-input-affix-wrapper,
43
+ .custom-light-switch {
44
+ background-color: @global-curd-input-background-color;
45
+ }
46
+
47
+ .custom-light-switch-checked {
48
+ background-color: @global-primary-color;
49
+ }
50
+
51
+ .custom-light-picker-clear,
52
+ .custom-light-select-clear {
53
+ background-color: @global-curd-input-background-color;
36
54
  }
37
55
  }
@@ -43,7 +43,7 @@
43
43
  margin-bottom: 10px;
44
44
 
45
45
  .reset {
46
- color: #fa541cff;
46
+ color: @global-primary-color;
47
47
  }
48
48
  }
49
49
 
@@ -109,6 +109,6 @@
109
109
  color: @globalColor1;
110
110
 
111
111
  &:hover {
112
- color: #fa541c;
112
+ color: @global-primary-color;
113
113
  }
114
114
  }
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
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;
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 | -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;
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;
@@ -34,7 +34,7 @@
34
34
  // margin-bottom: 6px;
35
35
 
36
36
  &:hover {
37
- color: #fa541c;
37
+ color: @global-primary-color;
38
38
  }
39
39
  }
40
40
 
@@ -1,5 +1,9 @@
1
1
 
2
2
  // @primary-color: #fa541c; // 全局主色
3
+ @global-primary-color: var(--global-primary-color, #fa541c); // 全局主色
4
+
5
+ // 输入框背景色
6
+ @global-curd-input-background-color: var(--global-curd-input-background-color, #494c5dff);
3
7
 
4
8
  @scrollThumb: var(--scrollThumb, rgba(255, 255, 255, 0.2));
5
9
  @scrollThumbHover: var(--scrollThumbHover, rgba(255, 255, 255, 0.3));
@@ -1,2 +1,2 @@
1
- import { VariablesConfigType } from "../components/ThemeProvider";
1
+ import { VariablesConfigType } from '../components/ThemeProvider';
2
2
  export declare const PublicThemeVariablesConfig: VariablesConfigType;
@@ -1,5 +1,7 @@
1
1
  export var PublicThemeVariablesConfig = {
2
- "light": {
2
+ light: {
3
+ '--global-curd-input-background-color': '#f5f6f7ff',
4
+ '--global-primary-color': '#fa541c',
3
5
  '--scrollThumb': 'rgba(0, 0, 0, 0.2)',
4
6
  '--scrollThumbHover': 'rgba(0, 0, 0, 0.3)',
5
7
  '--sliderRightBorder': '#221919',
@@ -54,7 +56,9 @@ export var PublicThemeVariablesConfig = {
54
56
  '--tableColor7': '#F5F6F7' // 表格列设置区列表元素边框颜色
55
57
  },
56
58
 
57
- "dark": {
59
+ dark: {
60
+ '--global-curd-input-background-color': '#494c5dff',
61
+ '--global-primary-color': '#fa541c',
58
62
  '--primaryColor': 'blue',
59
63
  '--split-line': '#5E6175',
60
64
  '--scrollThumb': 'rgba(255, 255, 255, 0.2)',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",