bj-web-components 0.2.16 → 0.2.18
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/README.md +205 -205
- package/dist/index.d.ts +28 -4
- package/dist/style.css +1 -1
- package/dist/web/Table/BTable.js +1 -1
- package/dist/web/Table/BTable.mjs +447 -414
- package/dist/web.d.ts +28 -4
- package/package.json +92 -92
package/dist/web.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
2
3
|
import { FocusEvent as FocusEvent_2 } from 'react';
|
|
3
4
|
import { FocusEventHandler } from 'react';
|
|
4
5
|
import { ForwardRefExoticComponent } from 'react';
|
|
5
6
|
import { HTMLAttributes } from 'react';
|
|
6
7
|
import { InputHTMLAttributes } from 'react';
|
|
7
|
-
import { JSX } from 'react
|
|
8
|
+
import { JSX } from 'react';
|
|
8
9
|
import { Key } from 'react';
|
|
9
10
|
import { KeyboardEvent as KeyboardEvent_2 } from 'react';
|
|
10
11
|
import { KeyboardEventHandler } from 'react';
|
|
@@ -246,7 +247,7 @@ export declare const BTable: typeof BTable_2 & {
|
|
|
246
247
|
ColumnGroup: typeof ColumnGroup;
|
|
247
248
|
};
|
|
248
249
|
|
|
249
|
-
declare function BTable_2<RecordType extends object>({ columns, dataSource, rowKey, rowSelection, pagination, loading, bordered, size, showHeader, emptyText, emptyImage, emptyHeight, t, className, style, rowClassName, sortDirections, onChange, children, title, footer, summary, tableLayout, components, onRow, onHeaderRow, id, scroll, locale, }: TableProps<RecordType>): JSX.Element;
|
|
250
|
+
declare function BTable_2<RecordType extends object>({ columns, dataSource, rowKey, preserveSelectedRowKeys, rowSelection, pagination, loading, bordered, size, showHeader, emptyText, emptyImage, emptyHeight, t, className, style, rowClassName, sortDirections, onChange, children, title, footer, summary, tableLayout, components, onRow, onHeaderRow, id, scroll, locale, groupCollapse, }: TableProps<RecordType>): JSX.Element;
|
|
250
251
|
|
|
251
252
|
export declare function BTabs({ activeKey, children, centered, className, defaultActiveKey, id, items, onChange, onTabClick, style, tabBarGutter, tabBarStyle, tabPosition, type, }: BTabsProps): JSX.Element;
|
|
252
253
|
|
|
@@ -784,6 +785,25 @@ export declare type GetRowKey<RecordType> = (record: RecordType, index?: number)
|
|
|
784
785
|
|
|
785
786
|
declare const Group: ForwardRefExoticComponent<BCheckBoxGroupProps & RefAttributes<HTMLDivElement>>;
|
|
786
787
|
|
|
788
|
+
export declare interface GroupCollapseConfig<RecordType> {
|
|
789
|
+
/** Identify group header records. Defaults to `record.isGroup`. */
|
|
790
|
+
isGroupRow?: (record: RecordType, index: number) => boolean;
|
|
791
|
+
/** Return the stable key for a group header. Defaults to `record.groupId`. */
|
|
792
|
+
groupKey?: (record: RecordType, index: number) => TableKey;
|
|
793
|
+
/** Return the stable keys of the group's child records. */
|
|
794
|
+
childrenKeys?: (record: RecordType, index: number) => readonly TableKey[];
|
|
795
|
+
expandedKeys?: readonly TableKey[];
|
|
796
|
+
defaultExpandedKeys?: readonly TableKey[];
|
|
797
|
+
onExpandedKeysChange?: (expandedKeys: readonly TableKey[], record: RecordType, expanded: boolean) => void;
|
|
798
|
+
render?: (props: GroupCollapseRenderProps<RecordType>) => ReactNode;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
export declare interface GroupCollapseRenderProps<RecordType> {
|
|
802
|
+
record: RecordType;
|
|
803
|
+
expanded: boolean;
|
|
804
|
+
onToggle: () => void;
|
|
805
|
+
}
|
|
806
|
+
|
|
787
807
|
export declare type ModalLang = 'zh' | 'en';
|
|
788
808
|
|
|
789
809
|
export declare type ModalMode = 'standard' | 'bilingual' | 'single';
|
|
@@ -848,7 +868,7 @@ export declare interface ProductFieldOption {
|
|
|
848
868
|
searchText?: string;
|
|
849
869
|
}
|
|
850
870
|
|
|
851
|
-
export declare function ProgressTooltip({ placement, title, progress, className, style, }: ProgressTooltipProps): JSX.Element;
|
|
871
|
+
export declare function ProgressTooltip({ placement, title, progress, className, style, }: ProgressTooltipProps): default_2.JSX.Element;
|
|
852
872
|
|
|
853
873
|
export declare interface ProgressTooltipProps extends BaseTooltipProps {
|
|
854
874
|
title?: string;
|
|
@@ -1001,6 +1021,8 @@ export declare interface TableLocale {
|
|
|
1001
1021
|
|
|
1002
1022
|
export declare interface TablePaginationConfig extends PaginationProps {
|
|
1003
1023
|
position?: Array<'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'none'>;
|
|
1024
|
+
/** Render the supplied data as the current server-side page without local slicing. */
|
|
1025
|
+
serverPagination?: boolean;
|
|
1004
1026
|
}
|
|
1005
1027
|
|
|
1006
1028
|
export declare interface TableProps<RecordType extends object> {
|
|
@@ -1008,6 +1030,8 @@ export declare interface TableProps<RecordType extends object> {
|
|
|
1008
1030
|
children?: ReactNode;
|
|
1009
1031
|
dataSource?: readonly RecordType[];
|
|
1010
1032
|
rowKey?: keyof RecordType | string | GetRowKey<RecordType>;
|
|
1033
|
+
/** Whether to preserve selected keys that are not in the current visible rows after pagination or filtering. */
|
|
1034
|
+
preserveSelectedRowKeys?: boolean;
|
|
1011
1035
|
rowSelection?: TableRowSelection<RecordType>;
|
|
1012
1036
|
pagination?: false | TablePaginationConfig;
|
|
1013
1037
|
loading?: boolean | {
|
|
@@ -1050,6 +1074,7 @@ export declare interface TableProps<RecordType extends object> {
|
|
|
1050
1074
|
onRow?: GetComponentProps<RecordType>;
|
|
1051
1075
|
onHeaderRow?: GetComponentProps<readonly ColumnType<RecordType>[]>;
|
|
1052
1076
|
expandable?: ExpandableConfig<RecordType>;
|
|
1077
|
+
groupCollapse?: GroupCollapseConfig<RecordType>;
|
|
1053
1078
|
locale?: TableLocale;
|
|
1054
1079
|
sortDirections?: SortOrder[];
|
|
1055
1080
|
showSorterTooltip?: boolean | {
|
|
@@ -1061,7 +1086,6 @@ export declare interface TableProps<RecordType extends object> {
|
|
|
1061
1086
|
}
|
|
1062
1087
|
|
|
1063
1088
|
export declare interface TableRowSelection<RecordType> {
|
|
1064
|
-
preserveSelectedRowKeys?: boolean;
|
|
1065
1089
|
type?: TableSelectionType;
|
|
1066
1090
|
selectedRowKeys?: TableKey[];
|
|
1067
1091
|
defaultSelectedRowKeys?: TableKey[];
|
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bj-web-components",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"ui",
|
|
8
|
-
"component",
|
|
9
|
-
"design-system",
|
|
10
|
-
"web",
|
|
11
|
-
"mobile",
|
|
12
|
-
"miniapp"
|
|
13
|
-
],
|
|
14
|
-
"author": "hkm-hfrl",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": ""
|
|
19
|
-
},
|
|
20
|
-
"private": false,
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
|
-
"module": "./dist/index.mjs",
|
|
23
|
-
"types": "./dist/index.d.ts",
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
|
-
"import": "./dist/index.mjs",
|
|
28
|
-
"require": "./dist/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./react": {
|
|
31
|
-
"types": "./dist/react.d.ts",
|
|
32
|
-
"import": "./dist/react.mjs",
|
|
33
|
-
"require": "./dist/react.js"
|
|
34
|
-
},
|
|
35
|
-
"./web": {
|
|
36
|
-
"types": "./dist/web.d.ts",
|
|
37
|
-
"import": "./dist/web.mjs",
|
|
38
|
-
"require": "./dist/web.js"
|
|
39
|
-
},
|
|
40
|
-
"./mobile": {
|
|
41
|
-
"types": "./dist/mobile.d.ts",
|
|
42
|
-
"import": "./dist/mobile.mjs",
|
|
43
|
-
"require": "./dist/mobile.js"
|
|
44
|
-
},
|
|
45
|
-
"./miniapp": {
|
|
46
|
-
"types": "./dist/miniapp.d.ts",
|
|
47
|
-
"import": "./dist/miniapp.mjs",
|
|
48
|
-
"require": "./dist/miniapp.js"
|
|
49
|
-
},
|
|
50
|
-
"./shared": {
|
|
51
|
-
"types": "./dist/shared.d.ts",
|
|
52
|
-
"import": "./dist/shared.mjs",
|
|
53
|
-
"require": "./dist/shared.js"
|
|
54
|
-
},
|
|
55
|
-
"./style": "./dist/style.css"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"dist"
|
|
59
|
-
],
|
|
60
|
-
"scripts": {
|
|
61
|
-
"dev": "vite",
|
|
62
|
-
"build": "vite build --mode lib --minify false",
|
|
63
|
-
"build:dev": "vite build --mode lib --watch --minify false",
|
|
64
|
-
"build:docs": "vite build",
|
|
65
|
-
"preview": "vite preview",
|
|
66
|
-
"lint": "eslint",
|
|
67
|
-
"build:lib": "vite build --mode lib",
|
|
68
|
-
"build:lib:watch": "vite build --mode lib --watch"
|
|
69
|
-
},
|
|
70
|
-
"peerDependencies": {
|
|
71
|
-
"react": ">=17.0.2",
|
|
72
|
-
"react-dom": ">=17.0.2"
|
|
73
|
-
},
|
|
74
|
-
"devDependencies": {
|
|
75
|
-
"@tailwindcss/postcss": "^4",
|
|
76
|
-
"@types/node": "^20",
|
|
77
|
-
"@types/react": "^19",
|
|
78
|
-
"@types/react-dom": "^19",
|
|
79
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
80
|
-
"antd": "^6.3.3",
|
|
81
|
-
"eslint": "^9",
|
|
82
|
-
"less": "^4.6.4",
|
|
83
|
-
"lucide-react": "^0.577.0",
|
|
84
|
-
"react": "19.2.3",
|
|
85
|
-
"react-dom": "19.2.3",
|
|
86
|
-
"react-router-dom": "^6.30.3",
|
|
87
|
-
"tailwindcss": "^4",
|
|
88
|
-
"typescript": "^5",
|
|
89
|
-
"vite": "^6.0.7",
|
|
90
|
-
"vite-plugin-dts": "^4.3.0"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "bj-web-components",
|
|
3
|
+
"version": "0.2.18",
|
|
4
|
+
"description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"ui",
|
|
8
|
+
"component",
|
|
9
|
+
"design-system",
|
|
10
|
+
"web",
|
|
11
|
+
"mobile",
|
|
12
|
+
"miniapp"
|
|
13
|
+
],
|
|
14
|
+
"author": "hkm-hfrl",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": ""
|
|
19
|
+
},
|
|
20
|
+
"private": false,
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"module": "./dist/index.mjs",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./react": {
|
|
31
|
+
"types": "./dist/react.d.ts",
|
|
32
|
+
"import": "./dist/react.mjs",
|
|
33
|
+
"require": "./dist/react.js"
|
|
34
|
+
},
|
|
35
|
+
"./web": {
|
|
36
|
+
"types": "./dist/web.d.ts",
|
|
37
|
+
"import": "./dist/web.mjs",
|
|
38
|
+
"require": "./dist/web.js"
|
|
39
|
+
},
|
|
40
|
+
"./mobile": {
|
|
41
|
+
"types": "./dist/mobile.d.ts",
|
|
42
|
+
"import": "./dist/mobile.mjs",
|
|
43
|
+
"require": "./dist/mobile.js"
|
|
44
|
+
},
|
|
45
|
+
"./miniapp": {
|
|
46
|
+
"types": "./dist/miniapp.d.ts",
|
|
47
|
+
"import": "./dist/miniapp.mjs",
|
|
48
|
+
"require": "./dist/miniapp.js"
|
|
49
|
+
},
|
|
50
|
+
"./shared": {
|
|
51
|
+
"types": "./dist/shared.d.ts",
|
|
52
|
+
"import": "./dist/shared.mjs",
|
|
53
|
+
"require": "./dist/shared.js"
|
|
54
|
+
},
|
|
55
|
+
"./style": "./dist/style.css"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"dev": "vite",
|
|
62
|
+
"build": "vite build --mode lib --minify false",
|
|
63
|
+
"build:dev": "vite build --mode lib --watch --minify false",
|
|
64
|
+
"build:docs": "vite build",
|
|
65
|
+
"preview": "vite preview",
|
|
66
|
+
"lint": "eslint",
|
|
67
|
+
"build:lib": "vite build --mode lib",
|
|
68
|
+
"build:lib:watch": "vite build --mode lib --watch"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": ">=17.0.2",
|
|
72
|
+
"react-dom": ">=17.0.2"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@tailwindcss/postcss": "^4",
|
|
76
|
+
"@types/node": "^20",
|
|
77
|
+
"@types/react": "^19",
|
|
78
|
+
"@types/react-dom": "^19",
|
|
79
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
80
|
+
"antd": "^6.3.3",
|
|
81
|
+
"eslint": "^9",
|
|
82
|
+
"less": "^4.6.4",
|
|
83
|
+
"lucide-react": "^0.577.0",
|
|
84
|
+
"react": "19.2.3",
|
|
85
|
+
"react-dom": "19.2.3",
|
|
86
|
+
"react-router-dom": "^6.30.3",
|
|
87
|
+
"tailwindcss": "^4",
|
|
88
|
+
"typescript": "^5",
|
|
89
|
+
"vite": "^6.0.7",
|
|
90
|
+
"vite-plugin-dts": "^4.3.0"
|
|
91
|
+
}
|
|
92
|
+
}
|