onchain-uikit 5.0.2 → 5.0.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.
- package/dist/index.js +46092 -55267
- package/dist/onchain-uikit.css +2 -2
- package/dist/xlsx.js +64 -65
- package/lib/src/components/OnChainAI/index.d.ts +1 -3
- package/lib/src/components/OnChainAI/index.stories.d.ts +1 -14
- package/lib/src/components/OnChainAI/welcome.d.ts +1 -6
- package/lib/src/components/OnChainGenAntImage/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainHoopsViewer/hoops-web-viewer.d.mts +3 -3
- package/lib/src/components/OnChainProvider/index.d.ts +4 -1
- package/lib/src/components/OnChainProvider/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainTable/index.d.ts +4 -0
- package/lib/src/components/OnChainTable/index.stories.d.ts +2 -4
- package/lib/src/components/OnChainTable/pure.d.ts +1 -0
- package/lib/src/components/OnChainTable/useDynamicHeight.d.ts +9 -7
- package/lib/src/components/OnChainVTable/feature/history-edit.d.ts +16 -0
- package/lib/src/index.d.ts +2 -2
- package/lib/src/utils/OnChainUpload.d.ts +23 -0
- package/package.json +10 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { TableProps } from 'antd';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
import { OnChainTableProps } from '.';
|
|
4
|
-
|
|
5
|
-
scroll: TableProps<any>[
|
|
6
|
-
hideFooter
|
|
4
|
+
interface Props {
|
|
5
|
+
scroll: TableProps<any>['scroll'];
|
|
6
|
+
hideFooter?: boolean;
|
|
7
7
|
fullScreenMinusHeight?: number;
|
|
8
|
-
contentRef: React.MutableRefObject<
|
|
9
|
-
tableRef: React.MutableRefObject<
|
|
10
|
-
onTableHeightChange
|
|
8
|
+
contentRef: React.MutableRefObject<any>;
|
|
9
|
+
tableRef: React.MutableRefObject<any>;
|
|
10
|
+
onTableHeightChange?: OnChainTableProps['onTableHeightChange'];
|
|
11
11
|
scrollUpdate?: (isFullscreen: boolean, autoHeight: number) => void;
|
|
12
|
-
|
|
12
|
+
wrapRef?: React.RefObject<HTMLDivElement>;
|
|
13
|
+
}
|
|
14
|
+
declare const useDynamicHeight: (props: Props, deps: boolean) => number;
|
|
13
15
|
export { useDynamicHeight };
|
|
@@ -49,6 +49,8 @@ export declare class BasicsCellModify<Row extends WholeRow> {
|
|
|
49
49
|
get globallyUnique(): Readonly<{
|
|
50
50
|
col: number;
|
|
51
51
|
row: number;
|
|
52
|
+
recordIndex?: number | number[];
|
|
53
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
52
54
|
rawValue: string | number;
|
|
53
55
|
currentValue: string | number;
|
|
54
56
|
changedValue: string | number;
|
|
@@ -61,6 +63,8 @@ export declare class BasicsCellModify<Row extends WholeRow> {
|
|
|
61
63
|
getModifyAttr<T extends ModifyRecordKeys>(key: T): {
|
|
62
64
|
col: number;
|
|
63
65
|
row: number;
|
|
66
|
+
recordIndex?: number | number[];
|
|
67
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
64
68
|
rawValue: string | number;
|
|
65
69
|
currentValue: string | number;
|
|
66
70
|
changedValue: string | number;
|
|
@@ -167,6 +171,8 @@ declare class InsertRowRecord<Row extends WholeRow> extends BasicsSpecialHistory
|
|
|
167
171
|
readonly cellRecords: Set<{
|
|
168
172
|
col: number;
|
|
169
173
|
row: number;
|
|
174
|
+
recordIndex?: number | number[];
|
|
175
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
170
176
|
rawValue: string | number;
|
|
171
177
|
currentValue: string | number;
|
|
172
178
|
changedValue: string | number;
|
|
@@ -175,6 +181,8 @@ declare class InsertRowRecord<Row extends WholeRow> extends BasicsSpecialHistory
|
|
|
175
181
|
readonly rowRecordMap: Map<Row, Set<{
|
|
176
182
|
col: number;
|
|
177
183
|
row: number;
|
|
184
|
+
recordIndex?: number | number[];
|
|
185
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
178
186
|
rawValue: string | number;
|
|
179
187
|
currentValue: string | number;
|
|
180
188
|
changedValue: string | number;
|
|
@@ -183,6 +191,8 @@ declare class InsertRowRecord<Row extends WholeRow> extends BasicsSpecialHistory
|
|
|
183
191
|
readonly autonomyCells: Set<{
|
|
184
192
|
col: number;
|
|
185
193
|
row: number;
|
|
194
|
+
recordIndex?: number | number[];
|
|
195
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
186
196
|
rawValue: string | number;
|
|
187
197
|
currentValue: string | number;
|
|
188
198
|
changedValue: string | number;
|
|
@@ -332,6 +342,8 @@ declare class BasicsHistoryStack<Row extends WholeRow> {
|
|
|
332
342
|
get history(): Set<{
|
|
333
343
|
col: number;
|
|
334
344
|
row: number;
|
|
345
|
+
recordIndex?: number | number[];
|
|
346
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
335
347
|
rawValue: string | number;
|
|
336
348
|
currentValue: string | number;
|
|
337
349
|
changedValue: string | number;
|
|
@@ -390,6 +402,8 @@ export declare class HistoryEdit<Row extends WholeRow> extends BasicsHistoryStac
|
|
|
390
402
|
forward(): Set<{
|
|
391
403
|
col: number;
|
|
392
404
|
row: number;
|
|
405
|
+
recordIndex?: number | number[];
|
|
406
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
393
407
|
rawValue: string | number;
|
|
394
408
|
currentValue: string | number;
|
|
395
409
|
changedValue: string | number;
|
|
@@ -398,6 +412,8 @@ export declare class HistoryEdit<Row extends WholeRow> extends BasicsHistoryStac
|
|
|
398
412
|
backward(): Set<{
|
|
399
413
|
col: number;
|
|
400
414
|
row: number;
|
|
415
|
+
recordIndex?: number | number[];
|
|
416
|
+
field?: import('@visactor/vtable/es/ts-types').FieldDef;
|
|
401
417
|
rawValue: string | number;
|
|
402
418
|
currentValue: string | number;
|
|
403
419
|
changedValue: string | number;
|
package/lib/src/index.d.ts
CHANGED
|
@@ -32,7 +32,6 @@ import { default as OnChainScrollBarAssembly } from './components/OnChainScrollB
|
|
|
32
32
|
import { default as OnChainSelectPopupForm } from './components/OnChainSelectPopupForm';
|
|
33
33
|
import { default as OnChainPublicTree } from './components/OnChainPublicTree';
|
|
34
34
|
import { default as OnChainTable } from './components/OnChainTable';
|
|
35
|
-
import { default as OnChainAI } from './components/OnChainAI';
|
|
36
35
|
import { default as OnChainProgress } from './components/OnChainProgress';
|
|
37
36
|
import { default as OnChainTabs } from './components/OnChainTabs';
|
|
38
37
|
import { default as zhCN } from 'antd/locale/zh_CN';
|
|
@@ -42,6 +41,7 @@ import { TableRowSelection } from 'antd/lib/table/interface';
|
|
|
42
41
|
import { CheckboxOptionType } from 'antd/lib/checkbox';
|
|
43
42
|
import { TransferDirection, TransferItem } from 'antd/es/transfer';
|
|
44
43
|
import { TransferListBodyProps } from 'antd/es/transfer/ListBody';
|
|
44
|
+
import { FileUploader } from './utils/OnChainUpload';
|
|
45
45
|
export * from './components/OnChainProvider';
|
|
46
46
|
export * from './components/OnChainSelect';
|
|
47
47
|
export * from './components/OnChainIcon';
|
|
@@ -80,4 +80,4 @@ export * from 'antd/es/typography/Paragraph';
|
|
|
80
80
|
export * from 'antd/es/transfer/ListBody';
|
|
81
81
|
export * from './components/OnChainImageEditor';
|
|
82
82
|
export type { DefaultOptionType, TableRowSelection, CheckboxOptionType, TransferDirection, TransferItem, TransferListBodyProps };
|
|
83
|
-
export {
|
|
83
|
+
export { FileUploader, OnChainTable, OnChainProvider, OnChainSelect, OnChainIcon, OnChainBadge, OnChainHighLightWords, zhCN, en_US, OnChainInput, OnChainLoading, OnChainLoadingSkCube, OnChainGlobalLoading, OnChainMarkdown, OnChainModal, OnChainMosaic, OnChainScrollBar, OnChainViewerError, Paragraph, OnChainDropMenu, OnChainCompositeForm, OnChainExcelViewer, OnChainGauge, OnChainForm, OnChainFormItem, OnChainGenAntImage, OnChainImage, OnChainTableSelection, OnChainResourceTree, OnChainImageEditor, OnChainAdvancedSearch, OnChainPopupSelect, OnChainQueryBuilder, OnChainScrollBarAssembly, OnChainSelectPopupForm, OnChainPublicTree, OnChainProgress, OnChainTabs, CollapsePanel, };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface UploadOptions {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
getToken: () => string;
|
|
4
|
+
chunkSize?: number;
|
|
5
|
+
onSuccess?: (file: any, response: any) => void;
|
|
6
|
+
onError?: (error: any) => void;
|
|
7
|
+
onProgress?: (progress: number, file: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class FileUploader {
|
|
10
|
+
private uppy;
|
|
11
|
+
private options;
|
|
12
|
+
constructor(options: UploadOptions);
|
|
13
|
+
private bindEvents;
|
|
14
|
+
/**
|
|
15
|
+
* 上传文件
|
|
16
|
+
*/
|
|
17
|
+
upload(file: File): Promise<string>;
|
|
18
|
+
/**
|
|
19
|
+
* 销毁实例(很重要,避免内存泄漏)
|
|
20
|
+
*/
|
|
21
|
+
destroy(): void;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "onchain-uikit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build",
|
|
@@ -31,12 +31,13 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"antd": "
|
|
34
|
+
"antd": "6.3.3",
|
|
35
|
+
"react": "18.x",
|
|
36
|
+
"react-dom": "18.x"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
39
|
"@ahooksjs/use-request": "^2.8.15",
|
|
38
40
|
"@ant-design/icons": "^4.7.0",
|
|
39
|
-
"@ant-design/x": "^1.0.5",
|
|
40
41
|
"@storybook/theming": "^8.5.8",
|
|
41
42
|
"@uppy/core": "^3.5.1",
|
|
42
43
|
"@uppy/react": "^3.1.0",
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
"@visactor/vtable": "^1.17.0",
|
|
45
46
|
"@zwight/luckyexcel": "1.1.6",
|
|
46
47
|
"ahooks": "^3.1.9",
|
|
47
|
-
"antd": "
|
|
48
|
+
"antd": "6.3.3",
|
|
48
49
|
"async-validator": "^4.2.5",
|
|
49
50
|
"fabric": "5.2.4",
|
|
50
51
|
"lodash": "^4.17.21",
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
"openai": "^4.85.3",
|
|
54
55
|
"path-to-regexp": "^8.2.0",
|
|
55
56
|
"qier-progress": "^1.0.4",
|
|
57
|
+
"rc-picker": "^4.11.3",
|
|
56
58
|
"react": "18.x",
|
|
57
59
|
"react-contexify": "5.0.0",
|
|
58
60
|
"react-custom-scrollbars": "^4.2.1",
|
|
@@ -86,6 +88,8 @@
|
|
|
86
88
|
"@vitejs/plugin-react": "^4.3.4",
|
|
87
89
|
"babel-plugin-import": "^1.13.8",
|
|
88
90
|
"cross-env": "^7.0.3",
|
|
91
|
+
"echarts": "^5.4.3",
|
|
92
|
+
"echarts-for-react": "^3.0.2",
|
|
89
93
|
"eslint": "^9.17.0",
|
|
90
94
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
91
95
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
@@ -97,13 +101,11 @@
|
|
|
97
101
|
"typescript": "~5.6.2",
|
|
98
102
|
"typescript-eslint": "^8.18.2",
|
|
99
103
|
"vite": "^6.0.5",
|
|
100
|
-
"vite-plugin-dts": "^4.5.0"
|
|
101
|
-
"echarts": "^5.4.3",
|
|
102
|
-
"echarts-for-react": "^3.0.2"
|
|
104
|
+
"vite-plugin-dts": "^4.5.0"
|
|
103
105
|
},
|
|
104
106
|
"eslintConfig": {
|
|
105
107
|
"extends": [
|
|
106
108
|
"plugin:storybook/recommended"
|
|
107
109
|
]
|
|
108
110
|
}
|
|
109
|
-
}
|
|
111
|
+
}
|