@pisell/materials 3.3.18 → 3.3.21
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/batch-editor/index.d.ts +1 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/cardMetricItem/index.d.ts +12 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +18 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/filter/index.d.ts +1 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/page/index.d.ts +5 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellCard/index.d.ts +19 -0
- package/es/components/pisellCardList/index.d.ts +73 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +36 -0
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellGoodPassCard/index.d.ts +47 -0
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/es/components/pisellInformationEntry/index.d.ts +33 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellStatisticList/index.d.ts +21 -0
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellWalletPassCard/index.d.ts +85 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +3 -0
- package/es/components/productCard/components/Divider/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/EditButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/Header/index.js +18 -2
- package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/Note/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +20 -0
- package/es/components/productCard/components/Sales/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/index.js +2 -1
- package/es/components/productCard/locales.d.ts +63 -0
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/types.d.ts +83 -0
- package/es/components/productCard/utils.d.ts +31 -0
- package/es/components/record-view/index.d.ts +37 -0
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/index.d.ts +5 -0
- package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/utils.d.ts +161 -0
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/tabs/index.d.ts +16 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +65 -0
- package/es/index.d.ts +141 -0
- package/es/locales/en-US.d.ts +273 -0
- package/es/locales/index.d.ts +1 -0
- package/es/locales/zh-CN.d.ts +268 -0
- package/es/locales/zh-TW.d.ts +268 -0
- package/es/utils/index.d.ts +4 -0
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/batch-editor/index.d.ts +1 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/cardMetricItem/index.d.ts +12 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +97 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +18 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +7 -6
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/filter/index.d.ts +1 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/page/index.d.ts +5 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellCard/index.d.ts +19 -0
- package/lib/components/pisellCardList/index.d.ts +73 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +36 -0
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +47 -0
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/lib/components/pisellInformationEntry/index.d.ts +33 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellStatisticList/index.d.ts +21 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +85 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +3 -0
- package/lib/components/productCard/components/Divider/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/index.js +5 -2
- package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/Note/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
- package/lib/components/productCard/components/Sales/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/productCard/hooks/useOpenNote.d.ts +3 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/index.js +2 -1
- package/lib/components/productCard/locales.d.ts +63 -0
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/types.d.ts +83 -0
- package/lib/components/productCard/utils.d.ts +31 -0
- package/lib/components/record-view/index.d.ts +37 -0
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/tabs/index.d.ts +16 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +65 -0
- package/lib/index.d.ts +141 -0
- package/lib/locales/en-US.d.ts +273 -0
- package/lib/locales/index.d.ts +1 -0
- package/lib/locales/zh-CN.d.ts +268 -0
- package/lib/locales/zh-TW.d.ts +268 -0
- package/lib/utils/index.d.ts +4 -0
- package/package.json +3 -3
|
@@ -5,7 +5,7 @@ export declare const paginationConfig: {
|
|
|
5
5
|
className: string;
|
|
6
6
|
defaultCurrent: number;
|
|
7
7
|
showTotal: (total: number, range: [number, number]) => string;
|
|
8
|
-
itemRender: (page: number, type: "page" | "
|
|
8
|
+
itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
|
|
9
9
|
responsive: boolean;
|
|
10
10
|
size: string;
|
|
11
11
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface TimeSlot {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
time: string;
|
|
7
|
+
remainingCount: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface TimeResourceSelectorProps {
|
|
11
|
+
timeSlots?: TimeSlot[];
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
showUnavailable?: boolean;
|
|
14
|
+
defaultExpanded?: boolean;
|
|
15
|
+
defaultSelectFirst?: boolean;
|
|
16
|
+
onChange?: (values: string | string[]) => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
declare const TimeResourceSelector: React.FC<TimeResourceSelectorProps>;
|
|
21
|
+
export default TimeResourceSelector;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonGroupListItemProps } from './../buttonGroupPreview';
|
|
3
|
+
interface ButtonGroupEditProps {
|
|
4
|
+
buttonList: ButtonGroupListItemProps[];
|
|
5
|
+
buttonGroupList: ButtonGroupListItemProps[][];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupEditProps & React.RefAttributes<any>>>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuProps, ButtonProps } from 'antd';
|
|
3
|
+
export interface ButtonGroupListItemProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
isMore?: boolean;
|
|
6
|
+
menuData?: MenuProps['items'];
|
|
7
|
+
buttonProps?: ButtonProps;
|
|
8
|
+
}
|
|
9
|
+
interface ButtonConfigProps {
|
|
10
|
+
[id: string]: ButtonGroupListItemProps;
|
|
11
|
+
}
|
|
12
|
+
export declare type ButtonGroupListProps = ButtonGroupListItemProps[][];
|
|
13
|
+
interface ButtonGroupPreviewProps {
|
|
14
|
+
buttonConfig?: ButtonConfigProps;
|
|
15
|
+
buttonGroupList?: ButtonGroupListProps;
|
|
16
|
+
updateButtonProps?: ButtonGroupListItemProps;
|
|
17
|
+
}
|
|
18
|
+
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ButtonGroupPreviewProps & React.RefAttributes<any>>>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellStatisticProps {
|
|
4
|
+
title: string;
|
|
5
|
+
number: string | number;
|
|
6
|
+
hint?: React.ReactNode;
|
|
7
|
+
tags?: React.ReactNode;
|
|
8
|
+
showCurrencySymbol?: boolean;
|
|
9
|
+
style?: any;
|
|
10
|
+
}
|
|
11
|
+
declare const CardMetricItem: (props: PisellStatisticProps) => JSX.Element;
|
|
12
|
+
export default CardMetricItem;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface CollapseProps {
|
|
4
|
+
panelBackground?: string;
|
|
5
|
+
panelMarginBottom?: string | 0;
|
|
6
|
+
panelBorderRadius?: string | 0;
|
|
7
|
+
items: any[];
|
|
8
|
+
showHeader?: boolean;
|
|
9
|
+
headerColor?: string | '#101828';
|
|
10
|
+
headerFontSize?: string | 14;
|
|
11
|
+
expandIcon?: any;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
}
|
|
14
|
+
declare const Collapse: React.FC<CollapseProps>;
|
|
15
|
+
export default Collapse;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormInstance } from 'antd';
|
|
3
|
+
import { ModeType } from './type';
|
|
4
|
+
import './style.less';
|
|
5
|
+
export interface WithModeProps {
|
|
6
|
+
renderMode?: ModeType;
|
|
7
|
+
value?: any;
|
|
8
|
+
onChange?: (value: any) => void;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @title: 增加renderMode属性
|
|
13
|
+
* @description: 基于renderMode属性控制渲染模式
|
|
14
|
+
* @return: *
|
|
15
|
+
* @Author: shengjie.zuo
|
|
16
|
+
* @Date: 2024-11-23 17:13:18
|
|
17
|
+
*/
|
|
18
|
+
export declare const withMode: <P extends object>(FieldComponent: React.ComponentType<P>, ReadPrettyComponent?: React.ComponentType<P & {
|
|
19
|
+
renderMode: ModeType;
|
|
20
|
+
}> | undefined, transformProps?: ((props: P, renderMode: ModeType) => P) | undefined) => React.FC<P & WithModeProps>;
|
|
21
|
+
export interface WithFormItemProps {
|
|
22
|
+
name: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
mode?: ModeType;
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
}
|
|
27
|
+
export declare const formItemNameReplace: (name: string) => string;
|
|
28
|
+
export declare const formItemNameReverse: (name: string) => string;
|
|
29
|
+
export declare const isValidDomain: (value: string) => boolean;
|
|
30
|
+
/**
|
|
31
|
+
* @title: 追加formItem层
|
|
32
|
+
* @description:
|
|
33
|
+
* @return: *
|
|
34
|
+
* @Author: shengjie.zuo
|
|
35
|
+
* @Date: 2024-11-23 17:14:25
|
|
36
|
+
*/
|
|
37
|
+
export declare const withFormItem: <P extends object>(WrappedComponent: React.ComponentType<P>, overlayProps?: {
|
|
38
|
+
otherFormItemProps?: Record<string, any> | ((props: Record<string, any>, others?: Record<string, any>) => Record<string, any>) | undefined;
|
|
39
|
+
innerProps?: Record<string, any> | undefined;
|
|
40
|
+
} | undefined) => React.FC<P & WithFormItemProps>;
|
|
41
|
+
export declare const withDataSource: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
42
|
+
dataSource?: any;
|
|
43
|
+
}) => JSX.Element;
|
|
44
|
+
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
|
+
options?: any;
|
|
46
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
47
|
+
labelField: string;
|
|
48
|
+
valueField: string;
|
|
49
|
+
extraParams?: Record<string, any> | undefined;
|
|
50
|
+
}) => JSX.Element;
|
|
51
|
+
export declare const getNestedValue: (obj: Record<string, any>, path: string) => Record<string, any>;
|
|
52
|
+
export declare const renderValueWithMap: (value: any, valueMap?: Record<string, string>, renderMode?: ModeType) => JSX.Element | null;
|
|
53
|
+
export declare function toArr(str: string | number | (string | number)[]): (string | number)[];
|
|
54
|
+
export declare const filterSystemFields: (params: Record<string, any>) => Record<string, any>;
|
|
55
|
+
export declare const transformFormObjToArrayWithUntouched: (obj: Record<string, any>) => any[];
|
|
56
|
+
export declare const setFormFieldsUntouched: (form: FormInstance) => void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellMenuProps } from '../../pisellMenu/types';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 数据源表单组件
|
|
5
|
+
* @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
|
|
6
|
+
*/
|
|
7
|
+
declare const DataSourceMenu: React.ForwardRefExoticComponent<PisellMenuProps & React.RefAttributes<any>>;
|
|
8
|
+
export default DataSourceMenu;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellMenuProps } from '../../pisellMenu/types';
|
|
3
|
+
/**
|
|
4
|
+
* @title: 数据源表单组件
|
|
5
|
+
* @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
|
|
6
|
+
*/
|
|
7
|
+
declare const DataSourceMenu: (props: PisellMenuProps, ref: React.Ref<any>) => JSX.Element;
|
|
8
|
+
export default DataSourceMenu;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Drawer } from 'antd';
|
|
2
|
+
import { OperationItem } from '../type';
|
|
3
|
+
declare const useDrawerState: (operationContent?: {
|
|
4
|
+
[key: string]: import("react").ReactNode;
|
|
5
|
+
} | undefined) => {
|
|
6
|
+
drawerVisible: boolean;
|
|
7
|
+
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
+
openDrawer: (item: OperationItem) => void;
|
|
9
|
+
closeDrawer: () => void;
|
|
10
|
+
drawerContent: import("react").ReactNode;
|
|
11
|
+
Container: {
|
|
12
|
+
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
+
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
+
};
|
|
21
|
+
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
+
};
|
|
25
|
+
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
+
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
+
destroy: () => void;
|
|
28
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
+
};
|
|
30
|
+
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
+
destroy: () => void;
|
|
32
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
+
};
|
|
34
|
+
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
+
} | typeof Drawer;
|
|
36
|
+
containerProps: {};
|
|
37
|
+
};
|
|
38
|
+
export default useDrawerState;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DataSourceTableProps } from '../type';
|
|
3
|
+
import { OperationItem } from '../type';
|
|
4
|
+
interface UseTablePropsProps {
|
|
5
|
+
data: any;
|
|
6
|
+
originProps: DataSourceTableProps;
|
|
7
|
+
openDrawer: (type: OperationItem) => void;
|
|
8
|
+
closeDrawer: () => void;
|
|
9
|
+
refreshData: () => void;
|
|
10
|
+
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
11
|
+
tableRef: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 处理table的props
|
|
15
|
+
* 转换title
|
|
16
|
+
* @param props
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
21
|
+
pagination: {
|
|
22
|
+
total: number;
|
|
23
|
+
current: number;
|
|
24
|
+
pageSize: number;
|
|
25
|
+
size: string;
|
|
26
|
+
showSizeChanger: boolean;
|
|
27
|
+
};
|
|
28
|
+
columns: import("./useColumns").Column[];
|
|
29
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
30
|
+
buttons: any[] | null;
|
|
31
|
+
filter: JSX.Element | null;
|
|
32
|
+
onRow: (record: any) => any;
|
|
33
|
+
actionButtons: any[] | null;
|
|
34
|
+
titleButtons?: {
|
|
35
|
+
show: boolean;
|
|
36
|
+
maxCount: number;
|
|
37
|
+
items: OperationItem[];
|
|
38
|
+
} | undefined;
|
|
39
|
+
tableButtons?: {
|
|
40
|
+
show: boolean;
|
|
41
|
+
maxCount: number;
|
|
42
|
+
items: OperationItem[];
|
|
43
|
+
} | undefined;
|
|
44
|
+
operation?: {
|
|
45
|
+
show: boolean;
|
|
46
|
+
title: string; /**
|
|
47
|
+
* 处理table的props
|
|
48
|
+
* 转换title
|
|
49
|
+
* @param props
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
width: number;
|
|
53
|
+
align: "center" | "left" | "right";
|
|
54
|
+
fixed: false | "left" | "right";
|
|
55
|
+
type: "button" | "link";
|
|
56
|
+
items: OperationItem[];
|
|
57
|
+
} | undefined;
|
|
58
|
+
operationContent?: {
|
|
59
|
+
[key: string]: React.ReactNode;
|
|
60
|
+
} | undefined;
|
|
61
|
+
dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
|
|
62
|
+
search?: {
|
|
63
|
+
show: boolean;
|
|
64
|
+
placeholder: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
__designMode: string;
|
|
67
|
+
componentId: string;
|
|
68
|
+
clickToDetail?: {
|
|
69
|
+
show: boolean;
|
|
70
|
+
useCustomAction: boolean;
|
|
71
|
+
actionType: string;
|
|
72
|
+
openMode: "modal" | "drawer";
|
|
73
|
+
openContentSize: "small" | "middle" | "large";
|
|
74
|
+
openTitle: string;
|
|
75
|
+
key: string;
|
|
76
|
+
} | undefined;
|
|
77
|
+
filterBy?: Record<string, any> | undefined;
|
|
78
|
+
sortBy: string;
|
|
79
|
+
tabs?: {
|
|
80
|
+
show: boolean;
|
|
81
|
+
type: string;
|
|
82
|
+
items: {
|
|
83
|
+
name: string;
|
|
84
|
+
filterBy: Record<string, any>;
|
|
85
|
+
sortBy: string;
|
|
86
|
+
}[];
|
|
87
|
+
} | undefined;
|
|
88
|
+
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
89
|
+
extraParams?: {
|
|
90
|
+
list?: Record<string, any> | undefined;
|
|
91
|
+
get?: Record<string, any> | undefined;
|
|
92
|
+
update?: Record<string, any> | undefined;
|
|
93
|
+
create?: Record<string, any> | undefined;
|
|
94
|
+
destroy?: Record<string, any> | undefined;
|
|
95
|
+
} | undefined;
|
|
96
|
+
};
|
|
97
|
+
export default useTableProps;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
+
export declare type OperationItem = {
|
|
5
|
+
label?: string;
|
|
6
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
+
openTitle: string;
|
|
9
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
+
key: string;
|
|
11
|
+
buttonProps?: any;
|
|
12
|
+
onClick?: (record: any) => void;
|
|
13
|
+
};
|
|
14
|
+
export interface DataSourceTableProps {
|
|
15
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
+
titleButtons?: {
|
|
18
|
+
show: boolean;
|
|
19
|
+
maxCount: number;
|
|
20
|
+
items: OperationItem[];
|
|
21
|
+
};
|
|
22
|
+
tableButtons?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
items: OperationItem[];
|
|
26
|
+
};
|
|
27
|
+
buttons?: any[];
|
|
28
|
+
operation?: {
|
|
29
|
+
show: boolean;
|
|
30
|
+
title: string;
|
|
31
|
+
width: number;
|
|
32
|
+
align: 'left' | 'center' | 'right';
|
|
33
|
+
fixed: 'left' | 'right' | false;
|
|
34
|
+
type: 'link' | 'button';
|
|
35
|
+
items: OperationItem[];
|
|
36
|
+
};
|
|
37
|
+
operationContent?: {
|
|
38
|
+
[key: string]: React.ReactNode;
|
|
39
|
+
};
|
|
40
|
+
dataSource: DataSourceType;
|
|
41
|
+
columns: ColumnType<any>[];
|
|
42
|
+
filter: any;
|
|
43
|
+
search?: {
|
|
44
|
+
show: boolean;
|
|
45
|
+
placeholder: string;
|
|
46
|
+
};
|
|
47
|
+
__designMode: string;
|
|
48
|
+
componentId: string;
|
|
49
|
+
clickToDetail?: {
|
|
50
|
+
show: boolean;
|
|
51
|
+
useCustomAction: boolean;
|
|
52
|
+
actionType: string;
|
|
53
|
+
openMode: 'modal' | 'drawer';
|
|
54
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
55
|
+
openTitle: string;
|
|
56
|
+
key: string;
|
|
57
|
+
};
|
|
58
|
+
onRow?: any;
|
|
59
|
+
filterBy?: Record<string, any>;
|
|
60
|
+
sortBy: string;
|
|
61
|
+
tabs?: {
|
|
62
|
+
show: boolean;
|
|
63
|
+
type: string;
|
|
64
|
+
items: {
|
|
65
|
+
name: string;
|
|
66
|
+
filterBy: Record<string, any>;
|
|
67
|
+
sortBy: string;
|
|
68
|
+
}[];
|
|
69
|
+
};
|
|
70
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
71
|
+
extraParams?: {
|
|
72
|
+
list?: Record<string, any>;
|
|
73
|
+
get?: Record<string, any>;
|
|
74
|
+
update?: Record<string, any>;
|
|
75
|
+
create?: Record<string, any>;
|
|
76
|
+
destroy?: Record<string, any>;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
4
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
5
|
+
renderMode: ModeType;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
10
|
+
export default MobileNumberInputWithMode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export interface Country {
|
|
6
|
+
id: number;
|
|
7
|
+
name: {
|
|
8
|
+
en: string;
|
|
9
|
+
"zh-CN": string;
|
|
10
|
+
"zh-HK": string;
|
|
11
|
+
original: string;
|
|
12
|
+
};
|
|
13
|
+
code: string;
|
|
14
|
+
calling_code: string;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
sort: number;
|
|
17
|
+
status: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
prefix: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useCountries: () => {
|
|
23
|
+
data: Country[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
4
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
5
|
+
renderMode: ModeType;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
10
|
+
export default PhoneNumberInputWithMode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export interface Country {
|
|
6
|
+
id: number;
|
|
7
|
+
name: {
|
|
8
|
+
en: string;
|
|
9
|
+
"zh-CN": string;
|
|
10
|
+
"zh-HK": string;
|
|
11
|
+
original: string;
|
|
12
|
+
};
|
|
13
|
+
code: string;
|
|
14
|
+
calling_code: string;
|
|
15
|
+
currency_code: string;
|
|
16
|
+
sort: number;
|
|
17
|
+
status: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
prefix: string;
|
|
21
|
+
}
|
|
22
|
+
export declare const useCountries: () => {
|
|
23
|
+
data: Country[];
|
|
24
|
+
};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "saas" | "xzero";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
2
|
options?: any;
|
|
3
|
-
optionSourceType?: "
|
|
3
|
+
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
4
4
|
labelField: string;
|
|
5
5
|
valueField: string;
|
|
6
6
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase媒体数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getMediaTypeList: () => Promise<any>;
|
|
5
|
+
export interface MediaType {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
maxsize: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const useMediaConfig: (mediaConfig?: any) => {
|
|
11
|
+
data: {
|
|
12
|
+
upload_onetime_limit: any;
|
|
13
|
+
upload_maxsize: any;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare const useMediaTypes: () => {
|
|
17
|
+
data: MediaType[];
|
|
18
|
+
getExtensionsByIds: (ids: number[]) => string[];
|
|
19
|
+
getMaxSizeByIds: (ids: number[]) => Record<number, number>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { RcFile } from 'antd/es/upload';
|
|
2
|
+
export declare const filetypes: Record<string, any>;
|
|
3
|
+
/**
|
|
4
|
+
* @Title: 获取 阿里云 Signature
|
|
5
|
+
* @Describe:
|
|
6
|
+
* @Author: Wzw
|
|
7
|
+
*/
|
|
8
|
+
export declare const getPolicy: () => Promise<any>;
|
|
9
|
+
export declare const getPolicyFile: () => Promise<any>;
|
|
10
|
+
/**
|
|
11
|
+
* @Title: 获取图片尺寸
|
|
12
|
+
* @Describe:
|
|
13
|
+
* @Author: Wzw
|
|
14
|
+
* @param {*} async
|
|
15
|
+
*/
|
|
16
|
+
export declare const getImageWidth: (file: any) => Promise<{
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* @Title: 重新生成文件名
|
|
22
|
+
* @Describe:
|
|
23
|
+
* @Author: Wzw
|
|
24
|
+
* @param {string} file
|
|
25
|
+
*/
|
|
26
|
+
export declare const formatFileName: (file?: any) => Promise<string>;
|
|
27
|
+
export declare const uploadFileAli: (file: any) => Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* @Title: base64转file
|
|
30
|
+
* @Describe:
|
|
31
|
+
* @Author: Wzw
|
|
32
|
+
* @param {any} dataurl
|
|
33
|
+
* @param {string} filename
|
|
34
|
+
*/
|
|
35
|
+
export declare const dataURLtoFile: (dataurl: any, filename: string) => File;
|
|
36
|
+
/**
|
|
37
|
+
* @Title: 获取视频封面
|
|
38
|
+
* @Describe:
|
|
39
|
+
* @Author: Wzw
|
|
40
|
+
* @param {any} file
|
|
41
|
+
*/
|
|
42
|
+
export declare const getVideoCover: (file: any) => Promise<unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* @Title: 获取腾讯云 Signature
|
|
45
|
+
* @Describe:
|
|
46
|
+
* @Author: Wzw
|
|
47
|
+
*/
|
|
48
|
+
export declare const getSignature: () => Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* @Title: 上传到腾讯云
|
|
51
|
+
* @Describe:
|
|
52
|
+
* @Author: Wzw
|
|
53
|
+
* @param {any} file
|
|
54
|
+
*/
|
|
55
|
+
export declare const uploadFileTencent: (file: any) => Promise<unknown>;
|
|
56
|
+
export declare const uploadFile: (file: RcFile) => Promise<any>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UploadFile as AntdUploadFile } from 'antd/es/upload/interface';
|
|
2
|
+
import type { UploadValue, UploadChangeHandler } from './types';
|
|
3
|
+
export interface UploadFile extends AntdUploadFile {
|
|
4
|
+
metadata?: {
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
duration?: number;
|
|
8
|
+
bitrate?: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface UploadProps {
|
|
12
|
+
renderMode?: string;
|
|
13
|
+
fieldKey: string;
|
|
14
|
+
maxSize?: number;
|
|
15
|
+
minCount?: number;
|
|
16
|
+
maxCount?: number;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
presetType?: string[];
|
|
19
|
+
presetTypeString?: string[];
|
|
20
|
+
customType?: string[];
|
|
21
|
+
enablePresetType?: boolean;
|
|
22
|
+
enableCustomType?: boolean;
|
|
23
|
+
allowPreview?: boolean;
|
|
24
|
+
value?: UploadValue;
|
|
25
|
+
typeMaxSizeMap?: Record<string, number>;
|
|
26
|
+
enableMultilingual?: boolean;
|
|
27
|
+
onChange?: UploadChangeHandler;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
mediaUploadUrl?: string;
|
|
30
|
+
getHeaders?: () => Record<string, string>;
|
|
31
|
+
mediaConfig?: {
|
|
32
|
+
data: {
|
|
33
|
+
upload_onetime_limit: number;
|
|
34
|
+
upload_maxsize: number;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}
|