onchain-uikit 3.9.4-alpha40 → 3.9.4-alpha42

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.
Files changed (36) hide show
  1. package/dist/index.cjs.js +157 -157
  2. package/dist/index.es.js +8046 -8100
  3. package/dist/index.umd.js +133 -133
  4. package/dist/{xlsx-C9f7-NIf.mjs → xlsx-C5C5EQYJ.mjs} +14 -8
  5. package/dist/{xlsx-DtQJwEPb.js → xlsx-CWPQLUZU.js} +15 -15
  6. package/lib/src/app/main/model/context.d.ts +9 -7
  7. package/lib/src/components/PlmIcon/index.d.ts +30 -0
  8. package/lib/src/components/PlmIcon/index.stories.d.ts +15 -0
  9. package/lib/src/components/PlmLoading/PlmLoading.stories.d.ts +14 -0
  10. package/lib/src/components/PlmLoading/index.d.ts +7 -0
  11. package/lib/src/components/PlmLoadingSkCube/PlmLoadingSkCube.stories.d.ts +14 -0
  12. package/lib/src/components/PlmLoadingSkCube/index.d.ts +6 -0
  13. package/lib/src/components/PlmMarkdown/PlmLoading.stories.d.ts +14 -0
  14. package/lib/src/components/PlmMarkdown/index.d.ts +15 -0
  15. package/lib/src/components/PlmMosaic/index.d.ts +5 -0
  16. package/lib/src/components/PlmMosaic/index.stories.d.ts +14 -0
  17. package/lib/src/components/PlmSelect/index.d.ts +20 -0
  18. package/lib/src/components/PlmSelect/index.stories.d.ts +21 -0
  19. package/lib/src/extend/ButtonAuth.d.ts +11 -0
  20. package/lib/src/extend/Ti5ButtonAuth.d.ts +6 -0
  21. package/lib/src/index.d.ts +2 -2
  22. package/lib/src/language/translate.d.ts +3 -4
  23. package/lib/src/stories/Button.d.ts +14 -0
  24. package/lib/src/stories/Button.stories.d.ts +23 -0
  25. package/lib/src/stories/Header.d.ts +11 -0
  26. package/lib/src/stories/Header.stories.d.ts +18 -0
  27. package/lib/src/stories/OnChainProvider.d.ts +15 -0
  28. package/lib/src/stories/Page.d.ts +2 -0
  29. package/lib/src/stories/Page.stories.d.ts +12 -0
  30. package/lib/src/stories/PlmMosaic.stories.d.ts +14 -0
  31. package/lib/src/stories/PlmSelect/PlmSelect.stories.d.ts +21 -0
  32. package/lib/src/stories/PlmSelect/index.d.ts +20 -0
  33. package/lib/src/stories/XsButton.d.ts +22 -0
  34. package/lib/src/stories/XsButton.stories.d.ts +14 -0
  35. package/package.json +1 -1
  36. package/lib/src/components/PlmSearchSelect/index.d.ts +0 -18
@@ -7,8 +7,6 @@ export interface ContextData {
7
7
  iconScriptUrl?: string;
8
8
  /** 图标前缀是否固定为icon- */
9
9
  isOnlyPrefixIcon?: boolean;
10
- /** 国际化语言 */
11
- languageMap?: Record<string, any>;
12
10
  /** 额外的Form组件 */
13
11
  formItemCom?: Record<string, React.FC<any>>;
14
12
  /** 覆盖a跳转标签 */
@@ -19,14 +17,18 @@ export interface ContextData {
19
17
  * 根据patchCode翻译国际化文本
20
18
  * @param key pathCode
21
19
  * @param extra
22
- * @param languageMap 国际化语言
23
20
  * @returns
24
21
  */
25
22
  translate?: (
26
23
  /** pathCode路径 */
27
- key: string, extra?: {
24
+ key: string, extra: {
28
25
  variate?: object;
29
- placeholder?: string;
30
- }, languageMap?: Record<string, string | undefined>) => string;
26
+ placeholder: string;
27
+ }) => string;
31
28
  }
32
- export declare const ModelContext: React.Context<ContextData | undefined>;
29
+ export type CxtType = ContextData & Pick<Required<ContextData>, 'translate'>;
30
+ export declare class GlobalModelContext {
31
+ static cxt: CxtType;
32
+ static initCxt(cxt: CxtType): void;
33
+ }
34
+ export declare const ModelContext: React.Context<CxtType>;
@@ -0,0 +1,30 @@
1
+ import { default as React } from 'react';
2
+ import { PopoverProps, TooltipProps } from 'antd';
3
+ export interface PlmIconProps {
4
+ /** 图标名称 */
5
+ type: string;
6
+ /** true(icon-) false(icon-front-) */
7
+ isBackend?: boolean;
8
+ /** 是否自动处理前缀,默认自动处理,否则直接使用type不需要前缀 */
9
+ autoPrefix?: boolean;
10
+ StorageApicode?: string;
11
+ className?: string;
12
+ disabled?: boolean;
13
+ backgroundColor?: string;
14
+ number?: number;
15
+ style?: React.CSSProperties | undefined;
16
+ divStyle?: any;
17
+ color?: string;
18
+ marginTop?: string;
19
+ button?: boolean;
20
+ tooltip?: TooltipProps;
21
+ popover?: PopoverProps;
22
+ placement?: string | boolean;
23
+ children?: React.ReactNode;
24
+ onClick?: (e?: any) => void;
25
+ onDivClick?: () => void;
26
+ onMouseEnter?: () => void;
27
+ onMouseLeave?: () => void;
28
+ }
29
+ declare const PlmIcon: ({ autoPrefix, ...props }: PlmIconProps) => import("react/jsx-runtime").JSX.Element;
30
+ export default PlmIcon;
@@ -0,0 +1,15 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ autoPrefix, ...props }: import('.').PlmIconProps) => import("react/jsx-runtime").JSX.Element;
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
+ export declare const Init2: Story;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ loadingSize, ...props }: import('../PlmLoading').PlmLoadingProps) => import("react/jsx-runtime").JSX.Element;
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;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface PlmLoadingProps {
3
+ loadingSize?: number;
4
+ children?: React.ReactNode;
5
+ }
6
+ declare const PlmLoading: ({ loadingSize, ...props }: PlmLoadingProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default PlmLoading;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import('../PlmLoadingSkCube').PlmLoadingSkCubeProps) => import("react/jsx-runtime").JSX.Element;
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;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface PlmLoadingSkCubeProps {
3
+ children?: React.ReactNode;
4
+ }
5
+ declare const PlmLoadingSkCube: (props: PlmLoadingSkCubeProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default PlmLoadingSkCube;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ ...props }: import('../PlmMarkdown').PlmMarkdownProps) => import("react/jsx-runtime").JSX.Element;
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;
@@ -0,0 +1,15 @@
1
+ export interface PlmMarkdownProps {
2
+ value?: string;
3
+ readOnly: boolean;
4
+ onChange?: (value: string) => void;
5
+ height?: number;
6
+ OSS_URL?: string;
7
+ token?: string;
8
+ toPostFileRecord?: ({ file, response, type }: {
9
+ file: any;
10
+ response: any;
11
+ type: any;
12
+ }) => void;
13
+ }
14
+ declare const PlmMarkdown: ({ ...props }: PlmMarkdownProps) => import("react/jsx-runtime").JSX.Element;
15
+ export default PlmMarkdown;
@@ -0,0 +1,5 @@
1
+ export interface PlmMosaicProps {
2
+ inLine?: Boolean;
3
+ }
4
+ declare const PlmMosaic: (props: PlmMosaicProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default PlmMosaic;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import('.').PlmMosaicProps) => import("react/jsx-runtime").JSX.Element;
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 InLineTrue: Story;
@@ -0,0 +1,20 @@
1
+ import { BaseComponentProps } from '../../typings';
2
+ import { SelectProps } from 'antd';
3
+ export interface PlmSelectProps extends BaseComponentProps, SelectProps<any> {
4
+ pane?: {
5
+ cols?: number;
6
+ item?: BaseComponentProps;
7
+ };
8
+ /** 分页信息 */
9
+ pagination?: {
10
+ /**网络请求URL select走分页路线 */
11
+ url: string;
12
+ page: number;
13
+ pageSize: number;
14
+ total: number;
15
+ };
16
+ }
17
+ export interface PlmSelectForwardRefProps {
18
+ }
19
+ declare const PlmSelect: import('react').ForwardRefExoticComponent<Omit<PlmSelectProps, "ref"> & import('react').RefAttributes<unknown>>;
20
+ export default PlmSelect;
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').ForwardRefExoticComponent<Omit<import('.').PlmSelectProps, "ref"> & import('react').RefAttributes<unknown>>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {};
10
+ args: {
11
+ /** 列表值 */
12
+ options: {
13
+ label: string;
14
+ value: string;
15
+ }[];
16
+ };
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Large: Story;
21
+ export declare const Small: Story;
@@ -0,0 +1,11 @@
1
+ export interface ButtonAuthRequestBody {
2
+ userAuth: any;
3
+ instanceInfo: any;
4
+ tabInfo: any;
5
+ button: any;
6
+ }
7
+ declare class ButtonAuth {
8
+ constructor();
9
+ prefixClickAuth(body: ButtonAuthRequestBody): boolean;
10
+ }
11
+ export default ButtonAuth;
@@ -0,0 +1,6 @@
1
+ import { default as ButtonAuth, ButtonAuthRequestBody } from './ButtonAuth';
2
+ declare class Ti5ButtonAuth extends ButtonAuth {
3
+ constructor();
4
+ prefixClickAuth(body: ButtonAuthRequestBody): boolean;
5
+ }
6
+ export default Ti5ButtonAuth;
@@ -76,5 +76,5 @@ export * from './components/OnChainTabs';
76
76
  export * from 'antd';
77
77
  export * from 'antd/es/typography/Paragraph';
78
78
  export * from 'antd/es/transfer/ListBody';
79
- export type { DefaultOptionType, TableRowSelection, CheckboxOptionType, TransferDirection, TransferItem, TransferListBodyProps };
80
- export { OnChainAI, OnChainTable, OnChainProvider, OnChainSelect, OnChainIcon, OnChainBadge, OnChainHighLightWords, zhCN, en_US, OnChainInput, OnChainLoading, OnChainLoadingSkCube, OnChainGlobalLoading, OnChainMarkdown, OnChainModal, OnChainMosaic, OnChainScrollBar, OnChainViewerError, Paragraph, OnChainDropMenu, OnChainCompositeForm, OnChainExcelViewer, OnChainForm, OnChainFormItem, OnChainGenAntImage, OnChainImage, OnChainTableSelection, OnChainResourceTree, OnChainAdvancedSearch, OnChainPopupSelect, OnChainQueryBuilder, OnChainScrollBarAssembly, OnChainSelectPopupForm, OnChainPublicTree, OnChainProgress, OnChainTabs, CollapsePanel };
79
+ export type { DefaultOptionType, TableRowSelection, CheckboxOptionType, TransferDirection, TransferItem, TransferListBodyProps, };
80
+ export { OnChainAI, OnChainTable, OnChainProvider, OnChainSelect, OnChainIcon, OnChainBadge, OnChainHighLightWords, zhCN, en_US, OnChainInput, OnChainLoading, OnChainLoadingSkCube, OnChainGlobalLoading, OnChainMarkdown, OnChainModal, OnChainMosaic, OnChainScrollBar, OnChainViewerError, Paragraph, OnChainDropMenu, OnChainCompositeForm, OnChainExcelViewer, OnChainForm, OnChainFormItem, OnChainGenAntImage, OnChainImage, OnChainTableSelection, OnChainResourceTree, OnChainAdvancedSearch, OnChainPopupSelect, OnChainQueryBuilder, OnChainScrollBarAssembly, OnChainSelectPopupForm, OnChainPublicTree, OnChainProgress, OnChainTabs, CollapsePanel, };
@@ -1,5 +1,4 @@
1
- import { ContextData } from '../app/main/model/context';
2
- export declare const template: (pathCode: string, extra?: {
1
+ export declare const template: (pathCode: string, extra: {
3
2
  variate?: object;
4
- placeholder?: string;
5
- }, contextData?: ContextData) => string;
3
+ placeholder: string;
4
+ }) => string;
@@ -0,0 +1,14 @@
1
+ export interface ButtonProps {
2
+ /** Is this the principal call to action on the page? */
3
+ primary?: boolean;
4
+ /** What background color to use */
5
+ backgroundColor?: string;
6
+ /** How large should the button be? */
7
+ size?: 'small' | 'medium' | 'large';
8
+ /** Button contents */
9
+ label: string;
10
+ /** Optional click handler */
11
+ onClick?: () => void;
12
+ }
13
+ /** Primary UI component for user interaction */
14
+ export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ primary, size, backgroundColor, label, ...props }: import('./Button').ButtonProps) => import("react/jsx-runtime").JSX.Element;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {
10
+ backgroundColor: {
11
+ control: "color";
12
+ };
13
+ };
14
+ args: {
15
+ onClick: import('@vitest/spy').Mock<(...args: any[]) => any>;
16
+ };
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Primary: Story;
21
+ export declare const Secondary: Story;
22
+ export declare const Large: Story;
23
+ export declare const Small: Story;
@@ -0,0 +1,11 @@
1
+ type User = {
2
+ name: string;
3
+ };
4
+ export interface HeaderProps {
5
+ user?: User;
6
+ onLogin?: () => void;
7
+ onLogout?: () => void;
8
+ onCreateAccount?: () => void;
9
+ }
10
+ export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,18 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: ({ user, onLogin, onLogout, onCreateAccount }: import('./Header').HeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ tags: string[];
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ args: {
10
+ onLogin: import('@vitest/spy').Mock<(...args: any[]) => any>;
11
+ onLogout: import('@vitest/spy').Mock<(...args: any[]) => any>;
12
+ onCreateAccount: import('@vitest/spy').Mock<(...args: any[]) => any>;
13
+ };
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof meta>;
17
+ export declare const LoggedIn: Story;
18
+ export declare const LoggedOut: Story;
@@ -0,0 +1,15 @@
1
+ import { ContextData } from '../app/main/model/context';
2
+ import { default as React } from 'react';
3
+ /**
4
+ * Antd Provider
5
+ */
6
+ export interface OnChainProviderProps {
7
+ /** context共享对象 */
8
+ contextData?: ContextData;
9
+ /** 设置统一样式前缀 */
10
+ prefixCls?: string;
11
+ /** 内容 */
12
+ children?: React.ReactNode;
13
+ }
14
+ declare const OnChainProvider: ({ prefixCls, ...props }: OnChainProviderProps, ref: any) => import("react/jsx-runtime").JSX.Element;
15
+ export default OnChainProvider;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const Page: React.FC;
@@ -0,0 +1,12 @@
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
+ };
9
+ export default meta;
10
+ type Story = StoryObj<typeof meta>;
11
+ export declare const LoggedOut: Story;
12
+ export declare const LoggedIn: Story;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import('../components/PlmMosaic').PlmMosaicProps) => import("react/jsx-runtime").JSX.Element;
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 InLineTrue: Story;
@@ -0,0 +1,21 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: import('react').ForwardRefExoticComponent<Omit<import('.').PlmSelectProps, "ref"> & import('react').RefAttributes<unknown>>;
5
+ parameters: {
6
+ layout: string;
7
+ };
8
+ tags: string[];
9
+ argTypes: {};
10
+ args: {
11
+ /** 列表值 */
12
+ options: {
13
+ label: string;
14
+ value: string;
15
+ }[];
16
+ };
17
+ };
18
+ export default meta;
19
+ type Story = StoryObj<typeof meta>;
20
+ export declare const Large: Story;
21
+ export declare const Small: Story;
@@ -0,0 +1,20 @@
1
+ import { BaseComponentProps } from '../../typings';
2
+ import { SelectProps } from 'antd';
3
+ export interface PlmSelectProps extends BaseComponentProps, SelectProps<any> {
4
+ pane?: {
5
+ cols?: number;
6
+ item?: BaseComponentProps;
7
+ };
8
+ /** 分页信息 */
9
+ pagination: {
10
+ /**网络请求URL */
11
+ url: string;
12
+ page: number;
13
+ pageSize: number;
14
+ total: number;
15
+ };
16
+ }
17
+ export interface PlmSelectForwardRefProps {
18
+ }
19
+ declare const PlmSelect: import('react').ForwardRefExoticComponent<Omit<PlmSelectProps, "ref"> & import('react').RefAttributes<unknown>>;
20
+ export default PlmSelect;
@@ -0,0 +1,22 @@
1
+ import { ButtonType } from 'antd/lib/button';
2
+ export interface XsButtonProps {
3
+ /** 按钮文本 */
4
+ label: string;
5
+ /** 按钮类型 */
6
+ btnType?: ButtonType;
7
+ /** 按钮类型2 */
8
+ btnType2?: 'default' | 'primary' | 'ghost' | 'dashed' | 'link' | 'text';
9
+ /** Optional click handler */
10
+ onClick?: () => void;
11
+ /** 自定义对象 */
12
+ custObj?: custObjTemp;
13
+ }
14
+ /** 对象 */
15
+ type custObjTemp = {
16
+ /** 年龄 */
17
+ name?: string;
18
+ /** 姓名 */
19
+ age?: number;
20
+ };
21
+ declare const XsButton: (props: XsButtonProps, ref: any) => import("react/jsx-runtime").JSX.Element;
22
+ export default XsButton;
@@ -0,0 +1,14 @@
1
+ import { StoryObj } from '@storybook/react';
2
+ declare const meta: {
3
+ title: string;
4
+ component: (props: import('./XsButton').XsButtonProps, ref: any) => import("react/jsx-runtime").JSX.Element;
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "onchain-uikit",
3
3
  "private": false,
4
- "version": "3.9.4-alpha40",
4
+ "version": "3.9.4-alpha42",
5
5
  "scripts": {
6
6
  "dev": "vite",
7
7
  "build": "vite build",
@@ -1,18 +0,0 @@
1
- import { SelectProps } from 'antd';
2
- import { FC } from 'react';
3
- export interface PlmPopupSelectProps {
4
- url: any;
5
- onChange?: (url: string) => {};
6
- value?: any;
7
- fieldNames?: Object;
8
- params?: Object;
9
- ischeckbox?: boolean;
10
- getPageList?: (...arg: any[]) => any;
11
- }
12
- export interface DebounceSelectProps<ValueType = any> extends Omit<SelectProps<ValueType>, 'options' | 'children'> {
13
- fetchOptions: (search: string, props: any) => Promise<ValueType[]>;
14
- debounceTimeout?: number;
15
- options: ValueType[];
16
- }
17
- declare const PlmSearchSelect: FC<PlmPopupSelectProps>;
18
- export default PlmSearchSelect;