xmirror-components 1.0.39 → 1.0.40-alpha.1
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/build/dist/index.cjs +41 -109
- package/build/dist/index.mjs +4229 -10397
- package/build/es/components/AntdApp/index.d.ts +1 -2
- package/build/es/components/AntdApp/index.js +2 -5
- package/build/es/components/CheckboxValue/index.d.ts +1 -1
- package/build/es/components/CheckboxValue/index.js +2 -2
- package/build/es/components/ConfigProvider/index.d.ts +1 -1
- package/build/es/components/ConfigProvider/index.js +3 -3
- package/build/es/components/GlobalLoading/index.d.ts +1 -2
- package/build/es/components/GlobalLoading/index.js +8 -19
- package/build/es/components/IconButton/index.js +5 -6
- package/build/es/components/IconFont/index.js +5 -5
- package/build/es/components/IntlProvider/index.d.ts +1 -1
- package/build/es/components/IntlProvider/index.js +3 -2
- package/build/es/components/SearchArea/Item/index.d.ts +2 -2
- package/build/es/components/SearchArea/Item/index.js +4 -2
- package/build/es/components/SearchArea/ToggleButton/index.d.ts +1 -2
- package/build/es/components/SearchArea/ToggleButton/index.js +3 -4
- package/build/es/components/SearchArea/index.js +13 -24
- package/build/es/components/SwitchValue/index.d.ts +1 -1
- package/build/es/components/SwitchValue/index.js +2 -2
- package/build/es/components/Table/Footer/index.d.ts +1 -2
- package/build/es/components/Table/Footer/index.js +10 -20
- package/build/es/components/Table/PopoverSetColumns/index.d.ts +1 -2
- package/build/es/components/Table/PopoverSetColumns/index.js +9 -12
- package/build/es/components/Table/PopoverSetColumns/styles.d.ts +0 -4
- package/build/es/components/Table/PopoverSetColumns/styles.js +2 -3
- package/build/es/components/Table/ResizableColumns/index.js +4 -5
- package/build/es/components/Table/index.js +8 -11
- package/build/es/components/TagGroup/index.d.ts +40 -0
- package/build/es/components/TagGroup/index.js +33 -0
- package/build/es/hooks/useTable/index.js +30 -14
- package/build/lib/components/AntdApp/index.js +2 -5
- package/build/lib/components/CheckboxValue/index.js +2 -5
- package/build/lib/components/ConfigProvider/index.js +3 -3
- package/build/lib/components/GlobalLoading/index.js +8 -52
- package/build/lib/components/IconButton/index.js +5 -6
- package/build/lib/components/IconFont/index.js +5 -38
- package/build/lib/components/IntlProvider/index.js +3 -2
- package/build/lib/components/SearchArea/Item/index.js +4 -2
- package/build/lib/components/SearchArea/ToggleButton/index.js +3 -37
- package/build/lib/components/SearchArea/index.js +13 -57
- package/build/lib/components/SwitchValue/index.js +2 -5
- package/build/lib/components/Table/Footer/index.js +10 -53
- package/build/lib/components/Table/PopoverSetColumns/index.js +9 -45
- package/build/lib/components/Table/PopoverSetColumns/styles.js +3 -4
- package/build/lib/components/Table/ResizableColumns/index.js +4 -38
- package/build/lib/components/Table/index.js +8 -44
- package/build/lib/components/TagGroup/index.js +35 -0
- package/build/lib/hooks/useTable/index.js +30 -14
- package/build/lib/index.d.ts +9 -7
- package/build/package.json +9 -7
- package/build/types/components/AntdApp/index.d.ts +1 -2
- package/build/types/components/CheckboxValue/index.d.ts +1 -1
- package/build/types/components/ConfigProvider/index.d.ts +1 -1
- package/build/types/components/GlobalLoading/index.d.ts +1 -2
- package/build/types/components/IntlProvider/index.d.ts +1 -1
- package/build/types/components/SearchArea/Item/index.d.ts +2 -2
- package/build/types/components/SearchArea/ToggleButton/index.d.ts +1 -2
- package/build/types/components/SwitchValue/index.d.ts +1 -1
- package/build/types/components/Table/Footer/index.d.ts +1 -2
- package/build/types/components/Table/PopoverSetColumns/index.d.ts +1 -2
- package/build/types/components/Table/PopoverSetColumns/styles.d.ts +0 -4
- package/build/types/components/TagGroup/index.d.ts +40 -0
- package/package.json +9 -7
package/build/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { ColumnTitleProps } from 'antd/es/table/interface';
|
|
|
7
7
|
import { default as default_2 } from 'react';
|
|
8
8
|
import { FormItemProps } from 'antd';
|
|
9
9
|
import { FormProps } from 'antd';
|
|
10
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
10
11
|
import { MessageInstance } from 'antd/es/message/interface';
|
|
11
12
|
import { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
12
13
|
import { NotificationInstance } from 'antd/es/notification/interface';
|
|
@@ -21,7 +22,7 @@ import { TableProps } from 'antd';
|
|
|
21
22
|
|
|
22
23
|
export declare function App({ children, config, ...props }: AppProps & {
|
|
23
24
|
config?: ConfigProviderConfigProps;
|
|
24
|
-
}):
|
|
25
|
+
}): JSX_2.Element;
|
|
25
26
|
|
|
26
27
|
declare interface ButtonTooltipProps {
|
|
27
28
|
/**
|
|
@@ -47,7 +48,7 @@ declare interface ButtonTooltipProps {
|
|
|
47
48
|
children?: default_2.ReactNode;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
export declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) =>
|
|
51
|
+
export declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => JSX_2.Element;
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* checkbox 可自定义 value 和 label
|
|
@@ -128,7 +129,7 @@ declare interface ConfigContextProps {
|
|
|
128
129
|
useSearchParams: UseSearchParamsOptions;
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
export declare function ConfigProvider({ children, config }: ConfigProviderProps):
|
|
132
|
+
export declare function ConfigProvider({ children, config }: ConfigProviderProps): JSX_2.Element;
|
|
132
133
|
|
|
133
134
|
declare type ConfigProviderConfigProps = Partial<ConfigContextProps>;
|
|
134
135
|
|
|
@@ -137,7 +138,7 @@ declare interface ConfigProviderProps {
|
|
|
137
138
|
config: ConfigProviderConfigProps;
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
export declare function GlobalLoading():
|
|
141
|
+
export declare function GlobalLoading(): JSX_2.Element;
|
|
141
142
|
|
|
142
143
|
export declare const IconButton: default_2.ForwardRefExoticComponent<IconButtonProps & default_2.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
|
|
143
144
|
|
|
@@ -210,10 +211,11 @@ declare type IconFontProps = (IconFontCommonProps & default_2.SVGProps<SVGSVGEle
|
|
|
210
211
|
/**
|
|
211
212
|
* 筛选项
|
|
212
213
|
* @param props
|
|
214
|
+
* @param children
|
|
213
215
|
* @return {JSX.Element}
|
|
214
216
|
* @constructor
|
|
215
217
|
*/
|
|
216
|
-
declare function Index({ children, ...props }: FormItemProps):
|
|
218
|
+
declare function Index({ children, ...props }: FormItemProps): JSX_2.Element;
|
|
217
219
|
|
|
218
220
|
declare interface InternalSearchAreaProps extends FormProps<any> {
|
|
219
221
|
loading?: boolean;
|
|
@@ -400,7 +402,7 @@ export declare let setGlobalLoading: (_value: boolean) => void;
|
|
|
400
402
|
/**
|
|
401
403
|
* Switch 可自定义 value
|
|
402
404
|
*/
|
|
403
|
-
export declare const SwitchValue: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) =>
|
|
405
|
+
export declare const SwitchValue: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) => JSX_2.Element;
|
|
404
406
|
|
|
405
407
|
/**
|
|
406
408
|
* Switch 可自定义 value
|
|
@@ -460,7 +462,7 @@ declare interface TableComponentProps<RecordType = AnyObject> extends Omit<Table
|
|
|
460
462
|
* @return {JSX.Element}
|
|
461
463
|
* @constructor
|
|
462
464
|
*/
|
|
463
|
-
declare function ToggleButton({ panel, onChange }: ToggleButtonProps):
|
|
465
|
+
declare function ToggleButton({ panel, onChange }: ToggleButtonProps): JSX_2.Element;
|
|
464
466
|
|
|
465
467
|
declare interface ToggleButtonProps {
|
|
466
468
|
panel: {
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
27
27
|
"@ant-design/icons": ">=5.0.0",
|
|
28
28
|
"ahooks": ">=3.0.0",
|
|
29
|
-
"antd": "^
|
|
29
|
+
"antd": "^6.3.4",
|
|
30
30
|
"lodash-es": ">=4.17.0",
|
|
31
31
|
"react": ">=18.0.0",
|
|
32
32
|
"react-dom": ">=18.0.0",
|
|
33
33
|
"react-intl": "^7.1.14",
|
|
34
34
|
"react-router-dom": "^6.30.2",
|
|
35
|
-
"react-transition-group": ">=4.4.
|
|
35
|
+
"react-transition-group": ">=4.4.5"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@emotion/react": "^11.14.0",
|
|
@@ -44,18 +44,20 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/lodash-es": "^4.17.12",
|
|
46
46
|
"@types/node": "^22.13.10",
|
|
47
|
-
"@types/react": "^18.
|
|
48
|
-
"@types/react-dom": "^18.
|
|
47
|
+
"@types/react": "^18.3.28",
|
|
48
|
+
"@types/react-dom": "^18.3.7",
|
|
49
49
|
"@types/react-transition-group": "^4.4.12",
|
|
50
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
50
|
+
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
51
51
|
"eslint": "^9.21.0",
|
|
52
52
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
53
53
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
54
54
|
"globals": "^15.15.0",
|
|
55
55
|
"less": "^4.3.0",
|
|
56
|
+
"react": "^18.3.1",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
56
58
|
"typescript": "~5.7.2",
|
|
57
59
|
"typescript-eslint": "^8.24.1",
|
|
58
|
-
"vite": "^
|
|
60
|
+
"vite": "^8.0.3",
|
|
59
61
|
"vite-plugin-dts": "^4.5.3"
|
|
60
62
|
},
|
|
61
63
|
"keywords": [
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type AppProps } from 'antd';
|
|
3
2
|
import { type MessageInstance } from 'antd/es/message/interface';
|
|
4
3
|
import { type NotificationInstance } from 'antd/es/notification/interface';
|
|
@@ -9,6 +8,6 @@ declare let notification: NotificationInstance;
|
|
|
9
8
|
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
10
9
|
declare function Index({ children, config, ...props }: AppProps & {
|
|
11
10
|
config?: ConfigProviderConfigProps;
|
|
12
|
-
}):
|
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export { message, notification, modal };
|
|
14
13
|
export default Index;
|
|
@@ -36,5 +36,5 @@ interface CheckboxValueProps<T = any, F = any> extends Omit<React.ComponentProps
|
|
|
36
36
|
*/
|
|
37
37
|
children?: React.ReactNode;
|
|
38
38
|
}
|
|
39
|
-
declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) =>
|
|
39
|
+
declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export default CheckboxValue;
|
|
@@ -6,4 +6,4 @@ interface ConfigProviderProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
config: ConfigProviderConfigProps;
|
|
8
8
|
}
|
|
9
|
-
export default function ConfigProvider({ children, config }: ConfigProviderProps):
|
|
9
|
+
export default function ConfigProvider({ children, config }: ConfigProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
declare let setGlobalLoading: (_value: boolean) => void;
|
|
3
|
-
declare function GlobalLoading():
|
|
2
|
+
declare function GlobalLoading(): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export { setGlobalLoading };
|
|
5
4
|
export default GlobalLoading;
|
|
@@ -8,5 +8,5 @@ interface IntlProviderProps {
|
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
config: IntlProviderConfigProps;
|
|
10
10
|
}
|
|
11
|
-
export default function IntlProvider({ children, config }: IntlProviderProps):
|
|
11
|
+
export default function IntlProvider({ children, config }: IntlProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export { FormattedMessage, useIntl };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type FormItemProps } from 'antd';
|
|
3
2
|
/**
|
|
4
3
|
* 筛选项
|
|
5
4
|
* @param props
|
|
5
|
+
* @param children
|
|
6
6
|
* @return {JSX.Element}
|
|
7
7
|
* @constructor
|
|
8
8
|
*/
|
|
9
|
-
declare function Index({ children, ...props }: FormItemProps):
|
|
9
|
+
declare function Index({ children, ...props }: FormItemProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export default Index;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
interface ToggleButtonProps {
|
|
3
2
|
panel: {
|
|
4
3
|
show: boolean;
|
|
@@ -11,5 +10,5 @@ interface ToggleButtonProps {
|
|
|
11
10
|
* @return {JSX.Element}
|
|
12
11
|
* @constructor
|
|
13
12
|
*/
|
|
14
|
-
declare function ToggleButton({ panel, onChange }: ToggleButtonProps):
|
|
13
|
+
declare function ToggleButton({ panel, onChange }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
export default ToggleButton;
|
|
@@ -26,5 +26,5 @@ interface SwitchValueProps<T = boolean | string | number, F = boolean | string |
|
|
|
26
26
|
/**
|
|
27
27
|
* Switch 可自定义 value
|
|
28
28
|
*/
|
|
29
|
-
declare const Index: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) =>
|
|
29
|
+
declare const Index: ({ checked, onChange, trueValue, falseValue, ...props }: SwitchValueProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
export default Index;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { TableComponentProps } from '../types';
|
|
3
|
-
declare function Index(props: TableComponentProps):
|
|
2
|
+
declare function Index(props: TableComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
export default Index;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { type TableComponentProps } from '../types';
|
|
3
2
|
interface PopoverSetColumnsProps {
|
|
4
3
|
order: string[];
|
|
@@ -9,5 +8,5 @@ interface PopoverSetColumnsProps {
|
|
|
9
8
|
columnsSort: TableComponentProps['columnsSort'];
|
|
10
9
|
onChangeVisible: (newVisibleItems: string[]) => void;
|
|
11
10
|
}
|
|
12
|
-
declare function PopoverSetColumns({ order, visibleItems, columns, onChangeOrder, columnsVisible, columnsSort, onChangeVisible }: PopoverSetColumnsProps):
|
|
11
|
+
declare function PopoverSetColumns({ order, visibleItems, columns, onChangeOrder, columnsVisible, columnsSort, onChangeVisible }: PopoverSetColumnsProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export default PopoverSetColumns;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export declare const PopoverWrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
-
theme?: import("@emotion/react").Theme;
|
|
3
|
-
as?: React.ElementType;
|
|
4
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
1
|
export declare const ColumnsSettingWrapper: import("@emotion/styled").StyledComponent<{
|
|
6
2
|
theme?: import("@emotion/react").Theme;
|
|
7
3
|
as?: React.ElementType;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from 'antd';
|
|
3
|
+
import { type CheckboxChangeEvent } from 'antd/es/checkbox';
|
|
4
|
+
/**
|
|
5
|
+
* checkbox 可自定义 value 和 label
|
|
6
|
+
* 使用场景:
|
|
7
|
+
* 1. 需要自定义 value 和 label
|
|
8
|
+
*/
|
|
9
|
+
interface CheckboxValueProps<T = any, F = any> extends Omit<React.ComponentProps<typeof Checkbox>, 'checked' | 'onChange'> {
|
|
10
|
+
/**
|
|
11
|
+
* 选中值
|
|
12
|
+
*/
|
|
13
|
+
trueValue?: T;
|
|
14
|
+
/**
|
|
15
|
+
* 未选中值
|
|
16
|
+
*/
|
|
17
|
+
falseValue?: F;
|
|
18
|
+
/**
|
|
19
|
+
* 选中值
|
|
20
|
+
*/
|
|
21
|
+
checked?: T | F;
|
|
22
|
+
/**
|
|
23
|
+
* 选中事件
|
|
24
|
+
*/
|
|
25
|
+
onChange?: (value: T | F, event: CheckboxChangeEvent) => void;
|
|
26
|
+
/**
|
|
27
|
+
* 选中标签
|
|
28
|
+
*/
|
|
29
|
+
trueLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 未选中标签
|
|
32
|
+
*/
|
|
33
|
+
falseLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* 子元素
|
|
36
|
+
*/
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
declare const CheckboxValue: <T = any, F = any>({ checked, onChange, trueValue, falseValue, trueLabel, falseLabel, children, ...props }: CheckboxValueProps<T, F>) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export default CheckboxValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmirror-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40-alpha.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "build/lib/index.js",
|
|
6
6
|
"module": "build/es/index.js",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"@ahooksjs/use-url-state": "^3.5.1",
|
|
27
27
|
"@ant-design/icons": ">=5.0.0",
|
|
28
28
|
"ahooks": ">=3.0.0",
|
|
29
|
-
"antd": "^
|
|
29
|
+
"antd": "^6.3.4",
|
|
30
30
|
"lodash-es": ">=4.17.0",
|
|
31
31
|
"react": ">=18.0.0",
|
|
32
32
|
"react-dom": ">=18.0.0",
|
|
33
33
|
"react-intl": "^7.1.14",
|
|
34
34
|
"react-router-dom": "^6.30.2",
|
|
35
|
-
"react-transition-group": ">=4.4.
|
|
35
|
+
"react-transition-group": ">=4.4.5"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@emotion/react": "^11.14.0",
|
|
@@ -44,18 +44,20 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/lodash-es": "^4.17.12",
|
|
46
46
|
"@types/node": "^22.13.10",
|
|
47
|
-
"@types/react": "^18.
|
|
48
|
-
"@types/react-dom": "^18.
|
|
47
|
+
"@types/react": "^18.3.28",
|
|
48
|
+
"@types/react-dom": "^18.3.7",
|
|
49
49
|
"@types/react-transition-group": "^4.4.12",
|
|
50
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
50
|
+
"@vitejs/plugin-react-swc": "^4.3.0",
|
|
51
51
|
"eslint": "^9.21.0",
|
|
52
52
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
53
53
|
"eslint-plugin-react-refresh": "^0.4.19",
|
|
54
54
|
"globals": "^15.15.0",
|
|
55
55
|
"less": "^4.3.0",
|
|
56
|
+
"react": "^18.3.1",
|
|
57
|
+
"react-dom": "^18.3.1",
|
|
56
58
|
"typescript": "~5.7.2",
|
|
57
59
|
"typescript-eslint": "^8.24.1",
|
|
58
|
-
"vite": "^
|
|
60
|
+
"vite": "^8.0.3",
|
|
59
61
|
"vite-plugin-dts": "^4.5.3"
|
|
60
62
|
},
|
|
61
63
|
"keywords": [
|