onchain-uikit 3.9.4-alpha4 → 3.9.4-alpha40
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.cjs.js +401 -222
- package/dist/index.es.js +35753 -20037
- package/dist/index.umd.js +468 -289
- package/dist/onchain-uikit.css +2 -2
- package/lib/src/app/main/model/context.d.ts +2 -0
- package/lib/src/components/OnChainAdvancedSearch/index.d.ts +22 -3
- package/lib/src/components/OnChainAdvancedSearch/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainExcelTemplate/XlsxSheetManager.d.ts +5 -0
- package/lib/src/components/OnChainExcelTemplate/core.d.ts +14 -0
- package/lib/src/components/OnChainExcelTemplate/index.d.ts +5 -0
- package/lib/src/components/OnChainFormItem/index.d.ts +5 -5
- package/lib/src/components/OnChainGenAntImage/index.d.ts +1 -0
- package/lib/src/components/OnChainGlobalLoading/index.d.ts +3 -3
- package/lib/src/components/OnChainGlobalLoading/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainIcon/index.d.ts +7 -3
- package/lib/src/components/OnChainModal/index.d.ts +1 -0
- package/lib/src/components/OnChainPopoverTransfer/index.d.ts +4 -4
- package/lib/src/components/OnChainPopoverTransfer/select/index.d.ts +5 -5
- package/lib/src/components/OnChainPopupSelect/index.d.ts +4 -1
- package/lib/src/components/OnChainProvider/index.d.ts +2 -1
- package/lib/src/components/OnChainPublicTree/index.d.ts +2 -2
- package/lib/src/components/OnChainPublicTree/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainQueryBuilder/index.d.ts +14 -13
- package/lib/src/components/OnChainResourceTree/index.d.ts +2 -3
- package/lib/src/components/OnChainSearchSelect/index.d.ts +18 -0
- package/lib/src/components/OnChainSelectPopupForm/index.d.ts +2 -2
- package/lib/src/components/OnChainSelectPopupForm/select/index.d.ts +3 -3
- package/lib/src/components/OnChainTable/ContextMenu.d.ts +2 -2
- package/lib/src/components/OnChainTable/OnChainTableFormItem/index.d.ts +4 -3
- package/lib/src/components/OnChainTable/TableFooter.d.ts +2 -2
- package/lib/src/components/OnChainTable/TableUtils.d.ts +4 -4
- package/lib/src/components/OnChainTable/index.d.ts +6 -6
- package/lib/src/components/OnChainTable/index.stories.d.ts +4 -1
- package/lib/src/components/OnChainTable/useClipboard.d.ts +2 -2
- package/lib/src/components/OnChainTable/useColumn.d.ts +2 -2
- package/lib/src/components/OnChainTable/useCopy.d.ts +1 -2
- package/lib/src/components/OnChainTable/useDynamicHeight.d.ts +2 -2
- package/lib/src/components/OnChainTable/useFiltered.d.ts +2 -2
- package/lib/src/components/OnChainTable/usePaste.d.ts +1 -2
- package/lib/src/components/OnChainTableSelection/index.d.ts +8 -5
- package/lib/src/components/OnChainTableSelection/index.stories.d.ts +1 -1
- package/lib/src/components/OnChainUniverExcel/data.d.ts +2 -0
- package/lib/src/components/OnChainUniverExcel/index.d.ts +14 -0
- package/lib/src/components/OnChainUniverExcel/plugin.d.ts +1 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/controller.d.ts +11 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/menu/export.d.ts +13 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/menu/generate.d.ts +12 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/menu/import.d.ts +19 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/menu/save.d.ts +3 -0
- package/lib/src/components/OnChainUniverExcel/plugins/controllers/menu/saveDatabase.d.ts +12 -0
- package/lib/src/components/OnChainUniverExcel/plugins/index.d.ts +42 -0
- package/lib/src/components/OnChainUniverExcel/plugins/locale/en-US.d.ts +15 -0
- package/lib/src/components/OnChainUniverExcel/plugins/locale/zh-CN.d.ts +15 -0
- package/lib/src/components/OnChainVTable/ListTable.d.ts +30 -0
- package/lib/src/components/OnChainVTable/components/index.d.ts +1 -0
- package/lib/src/components/OnChainVTable/components/tooltip.d.ts +9 -0
- package/lib/src/components/OnChainVTable/const.d.ts +47 -0
- package/lib/src/components/OnChainVTable/demo.d.ts +1 -0
- package/lib/src/components/OnChainVTable/feature/customMergeCell.d.ts +33 -0
- package/lib/src/components/OnChainVTable/feature/fill-handle.d.ts +6 -0
- package/lib/src/components/OnChainVTable/feature/history-edit.d.ts +435 -0
- package/lib/src/components/OnChainVTable/feature/index.d.ts +6 -0
- package/lib/src/components/OnChainVTable/feature/right-click-menu.d.ts +24 -0
- package/lib/src/components/OnChainVTable/feature/style.d.ts +17 -0
- package/lib/src/components/OnChainVTable/feature/tooltip.d.ts +9 -0
- package/lib/src/components/OnChainVTable/feature/types.d.ts +34 -0
- package/lib/src/components/OnChainVTable/feature/utils.d.ts +141 -0
- package/lib/src/components/OnChainVTable/index.d.ts +6 -0
- package/lib/src/components/OnChainVTable/index.stories.d.ts +87 -0
- package/lib/src/components/OnChainVTable/type.d.ts +114 -0
- package/lib/src/index.d.ts +50 -2
- package/lib/src/types/gantt.d.ts +1 -1
- package/lib/src/typings.d.ts +3 -3
- package/lib/src/utils/utility.d.ts +3 -1
- package/lib/typings.d.ts +3 -1
- package/package.json +9 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FRange } from '@univerjs/sheets/facade';
|
|
3
|
+
export interface OnChainUniverExcelProps {
|
|
4
|
+
dragDataRef?: any;
|
|
5
|
+
onDragEnd?: (range: FRange) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const OnChainUniverExcel: React.ForwardRefExoticComponent<OnChainUniverExcelProps & React.RefAttributes<any>>;
|
|
8
|
+
export default OnChainUniverExcel;
|
|
9
|
+
export declare const waitUserSelectExcelFile: (params: {
|
|
10
|
+
onSelect?: (result: File) => void;
|
|
11
|
+
onCancel?: () => void;
|
|
12
|
+
onError?: (error: any) => void;
|
|
13
|
+
accept?: string;
|
|
14
|
+
}) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Disposable, ICommandService, IConfigService } from '@univerjs/core';
|
|
2
|
+
import { ComponentManager, IShortcutService, IMenuManagerService } from '@univerjs/ui';
|
|
3
|
+
export declare class CustomMenuController extends Disposable {
|
|
4
|
+
private readonly _commandService;
|
|
5
|
+
private readonly _menuMangerService;
|
|
6
|
+
private readonly _componentManager;
|
|
7
|
+
private readonly _shortcutService;
|
|
8
|
+
private readonly _configService;
|
|
9
|
+
constructor(_commandService: ICommandService, _menuMangerService: IMenuManagerService, _componentManager: ComponentManager, _shortcutService: IShortcutService, _configService: IConfigService);
|
|
10
|
+
private _init;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IMenuButtonItem } from '@univerjs/ui';
|
|
2
|
+
import { ICustomMenuPulginParams } from '../..';
|
|
3
|
+
declare function CustomMenuItemExportButtonFactory(): IMenuButtonItem<string>;
|
|
4
|
+
declare const CustomExportMenu: (config?: ICustomMenuPulginParams) => {
|
|
5
|
+
operation: ICommand;
|
|
6
|
+
shortcut: IShortcutItem;
|
|
7
|
+
menu: typeof CustomMenuItemExportButtonFactory;
|
|
8
|
+
icon: {
|
|
9
|
+
name: string;
|
|
10
|
+
component: any;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default CustomExportMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IMenuButtonItem } from '@univerjs/ui';
|
|
2
|
+
import { ICustomMenuPulginParams } from '../..';
|
|
3
|
+
declare function CustomMenuItemExportButtonFactory(): IMenuButtonItem<string>;
|
|
4
|
+
declare const CustomGenerateMenu: (config?: ICustomMenuPulginParams) => {
|
|
5
|
+
operation: ICommand;
|
|
6
|
+
menu: typeof CustomMenuItemExportButtonFactory;
|
|
7
|
+
icon: {
|
|
8
|
+
name: string;
|
|
9
|
+
component: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default CustomGenerateMenu;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IMenuButtonItem } from '@univerjs/ui';
|
|
2
|
+
import { ICustomMenuPulginParams } from '../..';
|
|
3
|
+
export declare const waitUserSelectExcelFile: (params: {
|
|
4
|
+
onSelect?: (result: File) => void;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
onError?: (error: any) => void;
|
|
7
|
+
accept?: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
declare function CustomMenuItemImportButtonFactory(): IMenuButtonItem<string>;
|
|
10
|
+
declare const CustomImportMenu: (config?: ICustomMenuPulginParams) => {
|
|
11
|
+
operation: ICommand;
|
|
12
|
+
shortcut: IShortcutItem;
|
|
13
|
+
menu: typeof CustomMenuItemImportButtonFactory;
|
|
14
|
+
icon: {
|
|
15
|
+
name: string;
|
|
16
|
+
component: any;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default CustomImportMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IMenuButtonItem } from '@univerjs/ui';
|
|
2
|
+
import { ICustomMenuPulginParams } from '../..';
|
|
3
|
+
declare function CustomMenuItemExportButtonFactory(): IMenuButtonItem<string>;
|
|
4
|
+
declare const CustomSaveDatabaseMenu: (config?: ICustomMenuPulginParams) => {
|
|
5
|
+
operation: ICommand;
|
|
6
|
+
menu: typeof CustomMenuItemExportButtonFactory;
|
|
7
|
+
icon: {
|
|
8
|
+
name: string;
|
|
9
|
+
component: any;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default CustomSaveDatabaseMenu;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LocaleService, Plugin, Injector, ICommand, IConfigService, Univer, IAccessor } from '@univerjs/core';
|
|
2
|
+
import { IMenuButtonItem, IShortcutItem } from '@univerjs/ui';
|
|
3
|
+
export interface ICustomMenuPluginConfig {
|
|
4
|
+
instance: Univer;
|
|
5
|
+
menu: Array<{
|
|
6
|
+
operation: ICommand<object, boolean>;
|
|
7
|
+
shortcut?: IShortcutItem<object>;
|
|
8
|
+
menu: () => IMenuButtonItem<string>;
|
|
9
|
+
icon?: {
|
|
10
|
+
name: string;
|
|
11
|
+
component: any;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
}
|
|
15
|
+
export interface UniverMenuConfig {
|
|
16
|
+
id: string;
|
|
17
|
+
operation: ICommand<object, boolean>;
|
|
18
|
+
shortcut?: IShortcutItem<object>;
|
|
19
|
+
menu?: (accessor: IAccessor) => IMenuButtonItem<string>;
|
|
20
|
+
icon?: {
|
|
21
|
+
name: string;
|
|
22
|
+
component: any;
|
|
23
|
+
};
|
|
24
|
+
onlyOperation?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface ICustomMenuPulginParams {
|
|
27
|
+
[key: string]: any;
|
|
28
|
+
before?: () => void | Promise<any>;
|
|
29
|
+
after?: (param?: any) => void;
|
|
30
|
+
}
|
|
31
|
+
export declare const CUSTOM_PLUGIN_CONFIG = "CUSTOM_PLUGIN_CONFIG";
|
|
32
|
+
export declare class UniverSheetsCustomMenuPlugin extends Plugin {
|
|
33
|
+
readonly config: ICustomMenuPluginConfig;
|
|
34
|
+
protected readonly _injector: Injector;
|
|
35
|
+
private readonly _localeService;
|
|
36
|
+
private readonly _configService;
|
|
37
|
+
static type: any;
|
|
38
|
+
static pluginName: string;
|
|
39
|
+
constructor(config: ICustomMenuPluginConfig, _injector: Injector, _localeService: LocaleService, _configService: IConfigService);
|
|
40
|
+
onReady(): void;
|
|
41
|
+
onStarting(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
customMenu: {
|
|
3
|
+
export: string;
|
|
4
|
+
import: string;
|
|
5
|
+
saveDatabase: string;
|
|
6
|
+
generate: string;
|
|
7
|
+
};
|
|
8
|
+
shortcut: {
|
|
9
|
+
export: string;
|
|
10
|
+
import: string;
|
|
11
|
+
saveDatabase: string;
|
|
12
|
+
generate: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
customMenu: {
|
|
3
|
+
export: string;
|
|
4
|
+
import: string;
|
|
5
|
+
saveDatabase: string;
|
|
6
|
+
generate: string;
|
|
7
|
+
};
|
|
8
|
+
shortcut: {
|
|
9
|
+
export: string;
|
|
10
|
+
import: string;
|
|
11
|
+
saveDatabase: string;
|
|
12
|
+
generate: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ListTable as BasicsListTable } from '@visactor/vtable';
|
|
2
|
+
import { ListTableConstructorOptions, TableEventHandlersEventArgumentMap, TableEventHandlersReturnMap } from '@visactor/vtable/es/ts-types';
|
|
3
|
+
import { CustomEventName, OnChainVTableProps } from './type';
|
|
4
|
+
import { HistoryEdit } from './feature';
|
|
5
|
+
import { CustomEditor } from './editor';
|
|
6
|
+
import { WholeRow } from './feature/types';
|
|
7
|
+
type Options<Row extends WholeRow> = ListTableConstructorOptions & Pick<OnChainVTableProps<Row>, 'rowKey' | 'namespace' | 'extra'>;
|
|
8
|
+
export declare class ListTable<Row extends WholeRow> extends BasicsListTable {
|
|
9
|
+
readonly rowKey: string;
|
|
10
|
+
readonly namespace: string;
|
|
11
|
+
readonly modifyMark: boolean;
|
|
12
|
+
readonly historyEdit: HistoryEdit<Row>;
|
|
13
|
+
get correctOptions(): Options<Row>;
|
|
14
|
+
get records(): Row[];
|
|
15
|
+
get hasHeader(): boolean;
|
|
16
|
+
get hasNumberColumn(): boolean;
|
|
17
|
+
get isGroup(): boolean;
|
|
18
|
+
constructor(container: HTMLElement, options: Options<Row>);
|
|
19
|
+
updateDimension(dimension: string): void;
|
|
20
|
+
getInsertionRecords(param: number | Row[]): any[];
|
|
21
|
+
setRecords(records: Row[]): void;
|
|
22
|
+
fireListeners<TYPE extends keyof TableEventHandlersEventArgumentMap>(type: TYPE, event: TableEventHandlersEventArgumentMap[TYPE]): TableEventHandlersReturnMap[TYPE][];
|
|
23
|
+
handleTargetBindEvent<TYPE extends CustomEventName>(type: TYPE, event: TableEventHandlersEventArgumentMap[TYPE]): void;
|
|
24
|
+
validationValues(startCol: number, startRow: number, values: (string | number)[][]): Promise<[number, number, (string | number)[][]]>;
|
|
25
|
+
changeCellValidationValue(col: number, row: number, value: string | number | null, workOnEditableCell?: boolean): Promise<void>;
|
|
26
|
+
changeCellValidationValues(startCol: number, startRow: number, values: (string | number)[][], workOnEditableCell?: boolean): Promise<void>;
|
|
27
|
+
getEditor<T extends React.FC>(col: number, row: number): CustomEditor<T, Row>;
|
|
28
|
+
getCopyValue(): string | null;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { VTableTooltip } from './tooltip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Placement } from '../const';
|
|
2
|
+
import { VTableTooltipOptions } from '../feature/types';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
export declare const VTableTooltip: React.FC<{
|
|
5
|
+
placement?: Placement;
|
|
6
|
+
minWidth?: string | number;
|
|
7
|
+
options?: VTableTooltipOptions;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
declare enum EditorSymbol {
|
|
2
|
+
Input = "Input",
|
|
3
|
+
Number = "Number"
|
|
4
|
+
}
|
|
5
|
+
/** 右键菜单 menuKey */
|
|
6
|
+
declare enum RightClickMenuKey {
|
|
7
|
+
Copy = "copy",
|
|
8
|
+
Shear = "shear",
|
|
9
|
+
Paste = "paste",
|
|
10
|
+
Delete = "delete",
|
|
11
|
+
InsertDown = "insert_down",
|
|
12
|
+
InsertDownEmpty = "insert_down_empty",
|
|
13
|
+
DeleteRow = "delete_row"
|
|
14
|
+
}
|
|
15
|
+
declare enum Placement {
|
|
16
|
+
top = "top",
|
|
17
|
+
bottom = "bottom",
|
|
18
|
+
left = "left",
|
|
19
|
+
right = "right"
|
|
20
|
+
}
|
|
21
|
+
declare enum RecordResult {
|
|
22
|
+
Termination = "termination"
|
|
23
|
+
}
|
|
24
|
+
declare enum RecordType {
|
|
25
|
+
Update = "update",
|
|
26
|
+
Raw = "Raw",
|
|
27
|
+
Delete = "delete"
|
|
28
|
+
}
|
|
29
|
+
declare const DeleteCellSymbol: String;
|
|
30
|
+
declare const antDConfigProvider: {
|
|
31
|
+
locale: any;
|
|
32
|
+
theme: {
|
|
33
|
+
token: {
|
|
34
|
+
colorPrimary: string;
|
|
35
|
+
colorText: string;
|
|
36
|
+
fontSize: number;
|
|
37
|
+
};
|
|
38
|
+
components: {
|
|
39
|
+
Table: {};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
prefixCls: string;
|
|
43
|
+
input: {
|
|
44
|
+
autoComplete: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export { RightClickMenuKey, EditorSymbol, Placement, RecordResult, RecordType, DeleteCellSymbol, antDConfigProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PlmVTableDemo: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { default as VTable } from '@visactor/vtable';
|
|
2
|
+
import { ICustomLayout, ICustomRender, ITextStyleOption } from '@visactor/vtable/es/ts-types';
|
|
3
|
+
import { ListTable } from '../ListTable';
|
|
4
|
+
import { WholeRow } from './types';
|
|
5
|
+
export type CustomMergeRender<Row extends WholeRow> = (param: {
|
|
6
|
+
table: ListTable<Row>;
|
|
7
|
+
data: Row;
|
|
8
|
+
col: number;
|
|
9
|
+
row: number;
|
|
10
|
+
isEmpty: boolean;
|
|
11
|
+
isButton: boolean;
|
|
12
|
+
isTitle: boolean;
|
|
13
|
+
}) => {
|
|
14
|
+
text?: string;
|
|
15
|
+
style?: ITextStyleOption;
|
|
16
|
+
customLayout?: ICustomLayout;
|
|
17
|
+
customRender?: ICustomRender;
|
|
18
|
+
};
|
|
19
|
+
export declare function customMergeCell<Row extends WholeRow>(col: number, row: number, table: ListTable<Row>, render?: CustomMergeRender<Row>): ReturnType<VTable.TYPES.CustomMergeCellFunc>;
|
|
20
|
+
export declare function getRowTree<Row extends WholeRow>({ data, dimension, childrenKey, extra, }: {
|
|
21
|
+
data: Row[];
|
|
22
|
+
dimension: string;
|
|
23
|
+
childrenKey?: string;
|
|
24
|
+
extra?: {
|
|
25
|
+
bottomName?: string;
|
|
26
|
+
};
|
|
27
|
+
}): {
|
|
28
|
+
data: Row[];
|
|
29
|
+
rowTree: never[];
|
|
30
|
+
};
|
|
31
|
+
type ListTableOptions<Row extends WholeRow> = ConstructorParameters<typeof ListTable<Row>>[1];
|
|
32
|
+
export declare function getGroupOptions<Row extends WholeRow>(options: ListTableOptions<Row>): ListTableOptions<Row>;
|
|
33
|
+
export {};
|