onchain-uikit 5.0.4 → 6.0.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.
@@ -1 +1,3 @@
1
- export {};
1
+ import { default as React } from 'react';
2
+ declare const Independent: React.FC;
3
+ export default Independent;
@@ -1 +1,14 @@
1
- export {};
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').FC<{}>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {};
10
+ args: {};
11
+ };
12
+ export default meta;
13
+ type Story = StoryObj<typeof meta>;
14
+ export declare const Init: Story;
@@ -15,8 +15,6 @@ export interface OnChainCompositeFormForm {
15
15
  size?: 'large' | 'middle' | 'small';
16
16
  /** 输入框类型,12:Input,13:InputNumber*/
17
17
  valueType?: '12' | '13';
18
- inputStyle?: any;
19
- selectStyle?: any;
20
18
  /** 是否只读 */
21
19
  readOnly: boolean;
22
20
  options: DefaultOptionType[];
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: import('react').FC<import('antd').ImageProps>;
4
+ component: import('react').FC<import('rc-image').ImageProps>;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -17048,7 +17048,7 @@ declare function $c(s: any, t: any): string;
17048
17048
  declare function xf(s: any, t: any, e: any, i: any, n: any): _[];
17049
17049
  declare function av(s: any, t: any, e: any, i: any, n: any): void;
17050
17050
  declare function dv(s: any): string;
17051
- declare function rv(s: any, t: any, e: any, i: any, n: any, r: any): 1 | 2 | 0;
17051
+ declare function rv(s: any, t: any, e: any, i: any, n: any, r: any): 0 | 1 | 2;
17052
17052
  declare function zo(s: any, t: any, e: any, i: any, n: any, r: any): boolean;
17053
17053
  declare function Sm(s: any, t: any, e: any, i: any): boolean;
17054
17054
  declare function gv(s: any): boolean;
@@ -18620,9 +18620,9 @@ declare class Z_ {
18620
18620
  drawPolygons(t: any): SVGPolygonElement[];
18621
18621
  drawRectangle(t: any): SVGRectElement;
18622
18622
  drawRectangles(t: any): SVGRectElement[];
18623
- drawTextBox(t: any): (SVGRectElement | SVGTextElement)[];
18624
- drawTextBoxes(t: any): (SVGRectElement | SVGTextElement)[][];
18625
- _addTextBoxElement(t: any, e: any, i: any): (SVGRectElement | SVGTextElement)[];
18623
+ drawTextBox(t: any): (SVGTextElement | SVGRectElement)[];
18624
+ drawTextBoxes(t: any): (SVGTextElement | SVGRectElement)[][];
18625
+ _addTextBoxElement(t: any, e: any, i: any): (SVGTextElement | SVGRectElement)[];
18626
18626
  _renderEndcaps(t: any, e: any, i: any, n: any): void;
18627
18627
  _createTextElement(t: any, e: any, i: any): SVGTextElement;
18628
18628
  _addTextElement(t: any, e: any, i: any): SVGTextElement;
@@ -1,7 +1,6 @@
1
1
  import { ContextData } from '../../app/main/model/context';
2
2
  import { ConfigProviderProps } from 'antd';
3
3
  import { default as React } from 'react';
4
- import { AliasToken } from 'antd/lib/theme/interface';
5
4
  /**
6
5
  * Antd Provider
7
6
  */
@@ -12,11 +11,9 @@ export interface OnChainProviderProps extends ConfigProviderProps {
12
11
  prefixCls?: string;
13
12
  /** 内容 */
14
13
  children?: React.ReactNode;
15
- /** 主题 */
16
- token?: Partial<AliasToken>;
17
14
  }
18
15
  /**
19
16
  * icon、AntD、国际化等全局配置
20
17
  */
21
- declare const OnChainProvider: ({ prefixCls, token, ...props }: OnChainProviderProps, ref: any) => import("react/jsx-runtime").JSX.Element;
18
+ declare const OnChainProvider: ({ prefixCls, ...props }: OnChainProviderProps, ref: any) => import("react/jsx-runtime").JSX.Element;
22
19
  export default OnChainProvider;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ prefixCls, token, ...props }: import('.').OnChainProviderProps, ref: any) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ prefixCls, ...props }: import('.').OnChainProviderProps, ref: any) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -13,7 +13,7 @@ export interface OnChainPublicTree {
13
13
  conditionEdit: (val: any) => void;
14
14
  addRun: (val: any) => void;
15
15
  editRun: (val: any) => void;
16
- conditionDelete: (val: any, record: any) => Promise<any>;
16
+ conditionDelete: (val: any) => Promise<any>;
17
17
  deleteFolder: (val: any) => Promise<any>;
18
18
  }
19
19
  declare const publicTree: React.FC<OnChainPublicTree>;
@@ -31,7 +31,6 @@ type ExtendColumnType = BasicsColumn & CompatibleITabColumn;
31
31
  export type singleColumnType = ExtendColumnType;
32
32
  export type TableColumnsType = ExtendColumnType[];
33
33
  export interface OnChainTableProps extends Omit<TableProps<any>, 'onScroll'>, BaseComponentProps {
34
- customClassName?: string;
35
34
  selectedCell?: Record<string, any>;
36
35
  columns: TableColumnsType;
37
36
  onSubmit?: (values: any, col: any) => void;
@@ -81,9 +80,6 @@ export interface OnChainTableProps extends Omit<TableProps<any>, 'onScroll'>, Ba
81
80
  /** 自定义渲染底部数据 */
82
81
  tableFooterDateRender?: TableFooterDataRender;
83
82
  tableFooterClassName?: string;
84
- disabledResizable?: boolean;
85
- /** 自定义包裹容器的ref,用于计算表格滚动高度。如果设置了这个ref,则会根据这个容器的高度来计算表格滚动高度 */
86
- wrapRef?: React.RefObject<HTMLDivElement>;
87
83
  }
88
84
  export type OnChainColumn = Partial<ExtendColumnType>;
89
85
  export type OnChainTableColumnProps = Partial<ExtendColumnType>[];
@@ -13,11 +13,13 @@ declare const meta: {
13
13
  };
14
14
  args: {
15
15
  /** 列表值 */
16
- dataSource: any[];
16
+ dataSource: {
17
+ label: string;
18
+ value: string;
19
+ }[];
17
20
  columns: {
18
21
  dataIndex: string;
19
22
  title: string;
20
- width: number;
21
23
  search: {
22
24
  type: string;
23
25
  };
@@ -1,15 +1,13 @@
1
1
  import { TableProps } from 'antd';
2
2
  import { default as React } from 'react';
3
3
  import { OnChainTableProps } from '.';
4
- interface Props {
5
- scroll: TableProps<any>['scroll'];
6
- hideFooter?: boolean;
4
+ declare const useDynamicHeight: ({ hideFooter, contentRef, tableRef, scroll, fullScreenMinusHeight, scrollUpdate, onTableHeightChange, }: {
5
+ scroll: TableProps<any>["scroll"];
6
+ hideFooter: boolean | undefined;
7
7
  fullScreenMinusHeight?: number;
8
- contentRef: React.MutableRefObject<any>;
9
- tableRef: React.MutableRefObject<any>;
10
- onTableHeightChange?: OnChainTableProps['onTableHeightChange'];
8
+ contentRef: React.MutableRefObject<null>;
9
+ tableRef: React.MutableRefObject<null>;
10
+ onTableHeightChange: OnChainTableProps["onTableHeightChange"];
11
11
  scrollUpdate?: (isFullscreen: boolean, autoHeight: number) => void;
12
- wrapRef?: React.RefObject<HTMLDivElement>;
13
- }
14
- declare const useDynamicHeight: (props: Props, deps: boolean) => number;
12
+ }, deps: boolean) => number;
15
13
  export { useDynamicHeight };
@@ -2,7 +2,6 @@ import { default as React } from 'react';
2
2
  import { BaseComponentProps } from '../../typings';
3
3
  export interface Panes {
4
4
  tab: string | React.ReactNode;
5
- show?: boolean;
6
5
  tabKey: string | number;
7
6
  }
8
7
  export interface OnChainInstanceTabsProps extends BaseComponentProps {
@@ -13,7 +13,7 @@ export interface OnChainUniverExcelProps {
13
13
  }
14
14
  export { getExportExcel, exportExcel };
15
15
  export interface OnChainUniverExcelRef {
16
- univerAPI: FUniver;
16
+ univerAPI: React.MutableRefObject<FUniver | undefined>;
17
17
  insertImageToActiveCell: (base64: string) => void;
18
18
  setCellValueToRange: (string: string, range: FRange) => void;
19
19
  getActiveCell: () => FRange | null | undefined;
@@ -1,83 +1,3 @@
1
- import { default as CollapsePanel } from 'antd/es/collapse/CollapsePanel';
2
- import { default as OnChainProvider } from './components/OnChainProvider';
3
- import { default as OnChainSelect } from './components/OnChainSelect';
4
- import { default as Paragraph } from 'antd/es/typography/Paragraph';
5
- import { default as OnChainIcon } from './components/OnChainIcon';
6
- import { default as OnChainBadge } from './components/OnChainBadge';
7
- import { default as OnChainHighLightWords } from './components/OnChainHighLightWords';
8
- import { default as OnChainInput } from './components/OnChainInput';
9
- import { default as OnChainLoading } from './components/OnChainLoading';
10
- import { default as OnChainLoadingSkCube } from './components/OnChainLoadingSkCube';
11
- import { default as OnChainGlobalLoading } from './components/OnChainGlobalLoading';
12
- import { default as OnChainMarkdown } from './components/OnChainMarkdown';
13
- import { default as OnChainModal } from './components/OnChainModal';
14
- import { default as OnChainMosaic } from './components/OnChainMosaic';
15
- import { default as OnChainImageEditor } from './components/OnChainImageEditor';
16
- import { default as OnChainScrollBar } from './components/OnChainScrollBar';
17
- import { default as OnChainViewerError } from './components/OnChainViewerError';
18
- import { default as OnChainDropMenu } from './components/OnChainDropMenu';
19
- import { default as OnChainCompositeForm } from './components/OnChainCompositeForm';
20
- import { default as OnChainExcelViewer } from './components/OnChainExcelViewer';
21
- import { default as OnChainGauge } from './components/OnChainGauge';
22
- import { default as OnChainForm } from './components/OnChainForm';
23
- import { default as OnChainFormItem } from './components/OnChainFormItem';
24
- import { default as OnChainGenAntImage } from './components/OnChainGenAntImage';
25
- import { default as OnChainImage } from './components/OnChainImage';
26
- import { default as OnChainTableSelection } from './components/OnChainTableSelection';
27
- import { default as OnChainResourceTree } from './components/OnChainResourceTree';
28
- import { default as OnChainAdvancedSearch } from './components/OnChainAdvancedSearch';
29
- import { default as OnChainPopupSelect } from './components/OnChainPopupSelect';
30
- import { default as OnChainQueryBuilder } from './components/OnChainQueryBuilder';
31
- import { default as OnChainScrollBarAssembly } from './components/OnChainScrollBarAssembly';
32
- import { default as OnChainSelectPopupForm } from './components/OnChainSelectPopupForm';
33
- import { default as OnChainPublicTree } from './components/OnChainPublicTree';
34
- import { default as OnChainTable } from './components/OnChainTable';
35
- import { default as OnChainProgress } from './components/OnChainProgress';
36
- import { default as OnChainTabs } from './components/OnChainTabs';
37
- import { default as zhCN } from 'antd/locale/zh_CN';
38
- import { default as en_US } from 'antd/locale/en_US';
39
- import { DefaultOptionType } from 'antd/lib/select';
40
- import { TableRowSelection } from 'antd/lib/table/interface';
41
- import { CheckboxOptionType } from 'antd/lib/checkbox';
42
- import { TransferDirection, TransferItem } from 'antd/es/transfer';
43
- import { TransferListBodyProps } from 'antd/es/transfer/ListBody';
44
- import { FileUploader } from './utils/OnChainUpload';
45
- export * from './components/OnChainProvider';
46
- export * from './components/OnChainSelect';
47
- export * from './components/OnChainIcon';
48
- export * from './components/OnChainBadge';
49
- export * from './components/OnChainHighLightWords';
50
- export * from './components/OnChainInput';
51
- export * from './components/OnChainLoading';
52
- export * from './components/OnChainLoadingSkCube';
53
- export * from './components/OnChainGlobalLoading';
54
- export * from './components/OnChainMarkdown';
55
- export * from './components/OnChainModal';
56
- export * from './components/OnChainMosaic';
57
- export * from './components/OnChainScrollBar';
58
- export * from './components/OnChainViewerError';
59
- export * from './components/OnChainDropMenu';
60
- export * from './components/OnChainCompositeForm';
61
- export * from './components/OnChainExcelViewer';
62
- export * from './components/OnChainForm';
63
- export * from './components/OnChainFormItem';
64
- export * from './components/OnChainGenAntImage';
65
- export * from './components/OnChainImage';
66
- export * from './components/OnChainTableSelection';
67
- export * from './components/OnChainResourceTree';
68
- export * from './components/OnChainAdvancedSearch';
69
- export * from './components/OnChainPopupSelect';
70
- export * from './components/OnChainQueryBuilder';
71
- export * from './components/OnChainScrollBarAssembly';
72
- export * from './components/OnChainSelectPopupForm';
73
- export * from './components/OnChainPublicTree';
74
- export * from './components/OnChainTable';
75
- export * from './components/OnChainAI';
76
- export * from './components/OnChainProgress';
77
- export * from './components/OnChainTabs';
78
- export * from 'antd';
79
- export * from 'antd/es/typography/Paragraph';
80
- export * from 'antd/es/transfer/ListBody';
81
- export * from './components/OnChainImageEditor';
82
- export type { DefaultOptionType, TableRowSelection, CheckboxOptionType, TransferDirection, TransferItem, TransferListBodyProps };
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, };
1
+ import { default as OnChainUniverExcel } from './components/OnChainUniverExcel';
2
+ import { getExportExcel } from './components/OnChainUniverExcel/plugins/controllers/menu/import';
3
+ export { getExportExcel, OnChainUniverExcel, };
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ declare const OnChainKey: React.FC;
3
+ export default OnChainKey;
@@ -36,7 +36,7 @@ export declare class utility {
36
36
  static isMac(): boolean;
37
37
  static makeDestructurable<T extends Record<string, unknown>, A extends readonly [any, ...any]>(obj: T, arr: A): T & A;
38
38
  /** 数组对象扁平化 (返回的数据顺序与 antd table tree 相同,有使用的地方依赖这个顺序) */
39
- static ArrayAttributeFlat<T = Record<string, any>>(params?: T[], attr?: string, fn?: (item: T) => void): T[];
39
+ static ArrayAttributeFlat<T = Record<string, any>>(params: T[], attr?: string, fn?: (item: T) => void): T[];
40
40
  static getTreeRelationNoRecursion<T = any>({ data, lookup, childrenKey, }: {
41
41
  data: T[];
42
42
  lookup: (item: T, index: number) => boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onchain-uikit",
3
3
  "private": false,
4
- "version": "5.0.4",
4
+ "version": "6.0.1",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build",