@pisell/materials 3.3.72 → 3.3.74
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +143 -143
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +24 -24
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/filter/types.d.ts +46 -0
- package/es/components/page/index.d.ts +6 -0
- package/es/components/pisellAdjustPrice/index.d.ts +9 -0
- package/es/components/pisellCardList/index.d.ts +77 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +37 -0
- package/es/components/pisellGoodPassCard/index.d.ts +49 -0
- package/es/components/pisellQRScanner/index.d.ts +24 -0
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- package/es/components/pisellText/index.d.ts +9 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- package/es/components/pisellWalletPassCard/index.d.ts +94 -0
- package/es/components/pisellWalletPassCard/index.js +70 -58
- package/es/components/pisellWalletPassCard/index.less +95 -34
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Sales/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/es/components/productCard/index.d.ts +5 -0
- package/es/components/productCard/utils.d.ts +31 -0
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/sortableList/index.d.ts +11 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/index.d.ts +17 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/table/hooks/useTransColumns.d.ts +14 -0
- package/es/components/table/index.d.ts +4 -0
- package/es/components/table/serve.d.ts +13 -0
- package/es/components/tabs/index.d.ts +17 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +13 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
- package/es/components/virtual-keyboard/index.d.ts +14 -0
- package/es/components/walletCard/index.js +57 -9
- package/es/components/walletCard/index.less +63 -2
- package/es/index.d.ts +142 -0
- package/es/locales/en-US.js +3 -1
- package/es/locales/zh-CN.js +3 -1
- package/es/locales/zh-TW.js +3 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +17 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/filter/types.d.ts +46 -0
- package/lib/components/page/index.d.ts +6 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +9 -0
- package/lib/components/pisellCardList/index.d.ts +77 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +37 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +49 -0
- package/lib/components/pisellQRScanner/index.d.ts +24 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
- package/lib/components/pisellText/index.d.ts +9 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +94 -0
- package/lib/components/pisellWalletPassCard/index.js +52 -30
- package/lib/components/pisellWalletPassCard/index.less +95 -34
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Sales/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +1 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -0
- package/lib/components/productCard/index.d.ts +5 -0
- package/lib/components/productCard/utils.d.ts +31 -0
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/sortableList/index.d.ts +11 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/index.d.ts +17 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/AddFieldModal/index.d.ts +3 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
- package/lib/components/table/index.d.ts +4 -0
- package/lib/components/table/serve.d.ts +13 -0
- package/lib/components/tabs/index.d.ts +17 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +19 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +13 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
- package/lib/components/virtual-keyboard/index.d.ts +14 -0
- package/lib/components/walletCard/index.js +47 -7
- package/lib/components/walletCard/index.less +63 -2
- package/lib/index.d.ts +142 -0
- package/lib/locales/en-US.js +3 -1
- package/lib/locales/zh-CN.js +3 -1
- package/lib/locales/zh-TW.js +3 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/es/components/productCard/components/Time/index.d.ts +0 -3
- package/es/components/table/types.d.ts +0 -268
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -84
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +0 -16
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -12
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/index.d.ts +0 -3
- package/lib/components/table/types.d.ts +0 -268
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -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?: "default" | "custom" | "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 { DataSourceTableProps } from './type';
|
|
3
|
+
export interface TableRef {
|
|
4
|
+
refreshCurrentPage: () => void;
|
|
5
|
+
refreshData: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<DataSourceTableProps & React.RefAttributes<TableRef>>;
|
|
8
|
+
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
getInitialValues: () => Record<string, any>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 处理table的props
|
|
16
|
+
* 转换title
|
|
17
|
+
* @param props
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
|
+
currentComponentId: any;
|
|
22
|
+
title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
23
|
+
pagination: {
|
|
24
|
+
total: number;
|
|
25
|
+
current: number;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
size: string;
|
|
28
|
+
showSizeChanger: boolean;
|
|
29
|
+
};
|
|
30
|
+
columns: import("./useColumns").Column[];
|
|
31
|
+
subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
|
|
32
|
+
buttons: any[] | null;
|
|
33
|
+
filter: {
|
|
34
|
+
dom: any;
|
|
35
|
+
items: any;
|
|
36
|
+
} | null;
|
|
37
|
+
onRow: (record: any) => any;
|
|
38
|
+
actionButtons: any[] | null;
|
|
39
|
+
__id?: string | undefined;
|
|
40
|
+
currentSettingKey?: string | undefined;
|
|
41
|
+
titleButtons?: {
|
|
42
|
+
show: boolean;
|
|
43
|
+
maxCount: number;
|
|
44
|
+
items: OperationItem[];
|
|
45
|
+
} | undefined;
|
|
46
|
+
tableButtons?: {
|
|
47
|
+
show: boolean;
|
|
48
|
+
maxCount: number;
|
|
49
|
+
items: OperationItem[];
|
|
50
|
+
} | undefined;
|
|
51
|
+
operation?: {
|
|
52
|
+
show: boolean;
|
|
53
|
+
title: string;
|
|
54
|
+
width: number;
|
|
55
|
+
align: "center" | "left" | "right";
|
|
56
|
+
fixed: false | "left" | "right";
|
|
57
|
+
type: "button" | "link";
|
|
58
|
+
items: OperationItem[];
|
|
59
|
+
} | undefined;
|
|
60
|
+
operationContent?: {
|
|
61
|
+
[key: string]: React.ReactNode;
|
|
62
|
+
} | undefined;
|
|
63
|
+
dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
|
|
64
|
+
search?: {
|
|
65
|
+
show: boolean;
|
|
66
|
+
placeholder: string;
|
|
67
|
+
} | undefined;
|
|
68
|
+
__designMode: string;
|
|
69
|
+
componentId: string;
|
|
70
|
+
clickToDetail?: {
|
|
71
|
+
show: boolean;
|
|
72
|
+
useCustomAction: boolean;
|
|
73
|
+
actionType: string;
|
|
74
|
+
openMode: "modal" | "drawer";
|
|
75
|
+
openContentSize: "large" | "middle" | "small";
|
|
76
|
+
openTitle: string;
|
|
77
|
+
key: string;
|
|
78
|
+
} | undefined;
|
|
79
|
+
filterBy?: Record<string, any> | undefined;
|
|
80
|
+
sortBy: string;
|
|
81
|
+
tabs?: {
|
|
82
|
+
show: boolean;
|
|
83
|
+
type: string;
|
|
84
|
+
items: {
|
|
85
|
+
name: string;
|
|
86
|
+
filterBy: Record<string, any>;
|
|
87
|
+
sortBy: string;
|
|
88
|
+
}[];
|
|
89
|
+
} | undefined;
|
|
90
|
+
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
91
|
+
extraParams?: {
|
|
92
|
+
list?: Record<string, any> | undefined;
|
|
93
|
+
get?: Record<string, any> | undefined;
|
|
94
|
+
update?: Record<string, any> | undefined;
|
|
95
|
+
create?: Record<string, any> | undefined;
|
|
96
|
+
destroy?: Record<string, any> | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
localSettings?: import("../../../table/types").LocalSettingsType | undefined;
|
|
99
|
+
};
|
|
100
|
+
export default useTableProps;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from '../../dataSourceForm/type';
|
|
4
|
+
declare type PhoneValue = string | {
|
|
5
|
+
phone: string;
|
|
6
|
+
countryCallingCode: string;
|
|
7
|
+
countryCode?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
10
|
+
renderMode: ModeType;
|
|
11
|
+
value?: PhoneValue;
|
|
12
|
+
onChange?: (value: PhoneValue) => void;
|
|
13
|
+
returnFormat?: 'string' | 'object';
|
|
14
|
+
inputRef?: any;
|
|
15
|
+
}
|
|
16
|
+
declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
17
|
+
export default MobileNumberInputWithMode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from 'antd';
|
|
3
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
4
|
+
declare type PhoneValue = string | {
|
|
5
|
+
phone: string;
|
|
6
|
+
countryCallingCode: string;
|
|
7
|
+
};
|
|
8
|
+
export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
|
|
9
|
+
renderMode: ModeType;
|
|
10
|
+
value?: PhoneValue;
|
|
11
|
+
onChange?: (value: PhoneValue) => void;
|
|
12
|
+
returnFormat?: 'string' | 'object';
|
|
13
|
+
inputRef?: any;
|
|
14
|
+
}
|
|
15
|
+
declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
|
|
16
|
+
export default PhoneNumberInputWithMode;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取nocobase数据列表
|
|
3
|
+
*/
|
|
4
|
+
export declare const getCountryDataList: () => Promise<any>;
|
|
5
|
+
export declare const getShopCountryDataList: (locale?: any) => Promise<any>;
|
|
6
|
+
export interface Country {
|
|
7
|
+
id: number;
|
|
8
|
+
name: {
|
|
9
|
+
en: string;
|
|
10
|
+
'zh-CN': string;
|
|
11
|
+
'zh-HK': string;
|
|
12
|
+
original: string;
|
|
13
|
+
};
|
|
14
|
+
code: string;
|
|
15
|
+
calling_code: string;
|
|
16
|
+
currency_code: string;
|
|
17
|
+
sort: number;
|
|
18
|
+
status: string;
|
|
19
|
+
created_at: string;
|
|
20
|
+
updated_at: string;
|
|
21
|
+
prefix: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const useCountries: () => {
|
|
24
|
+
data: Country[];
|
|
25
|
+
};
|
|
@@ -59,11 +59,7 @@ declare const formFieldMap: {
|
|
|
59
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
60
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
};
|
|
62
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
63
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
64
|
-
} & {
|
|
65
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
66
|
-
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
67
63
|
JSON: import("react").FC<any>;
|
|
68
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
69
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -83,7 +79,11 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
83
79
|
name?: string | undefined;
|
|
84
80
|
fieldKey?: string | undefined;
|
|
85
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
86
|
-
}) | (import("react").FC<{}> & {
|
|
82
|
+
}) | import("react").FC<any> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
87
87
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
88
|
} & {
|
|
89
89
|
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ValueProps, SortType } from '../types';
|
|
3
|
+
declare type IdType = string | number;
|
|
4
|
+
declare type TreeItemProps = {
|
|
5
|
+
id: string | number;
|
|
6
|
+
key: string | number;
|
|
7
|
+
item: ValueProps | any;
|
|
8
|
+
depth: number;
|
|
9
|
+
lists: any[];
|
|
10
|
+
childrenProps?: SortType;
|
|
11
|
+
sensors?: any;
|
|
12
|
+
expandedKeys?: IdType[];
|
|
13
|
+
setExpandedKeys?: any;
|
|
14
|
+
onSelectKeys?: (ids: IdType) => void;
|
|
15
|
+
onChange?: (value: any[]) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
18
|
+
export default TreeItem;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ModeType } from "../table/types";
|
|
2
|
+
/**
|
|
3
|
+
* 筛选总配置
|
|
4
|
+
*/
|
|
5
|
+
export declare type FilterType = {
|
|
6
|
+
/** 筛选是否展示 */
|
|
7
|
+
show: boolean;
|
|
8
|
+
/** 筛选项排序按钮是否展示 */
|
|
9
|
+
sortButtonShow: boolean;
|
|
10
|
+
/** 筛选列表 */
|
|
11
|
+
list: FilterItemProps[];
|
|
12
|
+
items?: string[];
|
|
13
|
+
/** 快速筛选最大长度 */
|
|
14
|
+
quickFilterMaxLength: number;
|
|
15
|
+
/** 配置存储模式 */
|
|
16
|
+
storageMode: "" | "localStorage";
|
|
17
|
+
/** 筛选列表项dom */
|
|
18
|
+
dom?: any;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 筛选列表项配置
|
|
22
|
+
*/
|
|
23
|
+
export declare type FilterItemProps = {
|
|
24
|
+
type: "single" | "input" | "datePicker" | "rangePicker" | "search";
|
|
25
|
+
name?: string | string[];
|
|
26
|
+
key: string;
|
|
27
|
+
props: object;
|
|
28
|
+
label?: string;
|
|
29
|
+
sort?: boolean;
|
|
30
|
+
localFilter?: boolean;
|
|
31
|
+
other: Record<string, any>;
|
|
32
|
+
isCustom?: boolean;
|
|
33
|
+
columnKey?: string;
|
|
34
|
+
isHidden?: boolean;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 筛选组件属性
|
|
38
|
+
*/
|
|
39
|
+
export interface FilterProps {
|
|
40
|
+
filter: FilterType;
|
|
41
|
+
isRenderFormContent: boolean;
|
|
42
|
+
onValuesChange?: () => void;
|
|
43
|
+
tableId?: string;
|
|
44
|
+
viewMode?: ModeType;
|
|
45
|
+
isMobile?: boolean;
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
export interface PisellAdjustPriceProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
originValue: number;
|
|
5
|
+
defaultValue?: number;
|
|
6
|
+
onChange?: (val: number) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const PisellAdjustPrice: (props: PisellAdjustPriceProps) => JSX.Element;
|
|
9
|
+
export default PisellAdjustPrice;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
|
|
5
|
+
import './index.less';
|
|
6
|
+
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
7
|
+
platform?: PisellContextType['platform'];
|
|
8
|
+
/** 当用户查看完所有记录时,底部会显示此消息 */
|
|
9
|
+
endMessage?: React.ReactNode;
|
|
10
|
+
/** 加载下次数据时的加载站位 */
|
|
11
|
+
loader?: React.ReactNode;
|
|
12
|
+
/** 是否有更多数据 */
|
|
13
|
+
hasMore: boolean;
|
|
14
|
+
/** 加载更多数据回调 */
|
|
15
|
+
loadMoreData?: () => Promise<void>;
|
|
16
|
+
/** 当前list数据 */
|
|
17
|
+
data: PisellWalletPassCardProps[];
|
|
18
|
+
/** list空数据时展示内容 */
|
|
19
|
+
empty?: React.ReactNode;
|
|
20
|
+
/** 是否展示空状态 */
|
|
21
|
+
showEmpty?: boolean;
|
|
22
|
+
/** 是否展示卡片名称 */
|
|
23
|
+
showName?: boolean;
|
|
24
|
+
/** 是否展示店铺名称 */
|
|
25
|
+
showStoreName?: boolean;
|
|
26
|
+
/** 是否展示核销金额 */
|
|
27
|
+
showRedeem?: boolean;
|
|
28
|
+
/** 是否展示余额 */
|
|
29
|
+
showBalance?: boolean;
|
|
30
|
+
/** 是否展示编码 */
|
|
31
|
+
showCode?: boolean;
|
|
32
|
+
/** 是否展示到期时间 */
|
|
33
|
+
showValidDate?: boolean;
|
|
34
|
+
/** 使用日程信息计算有效期 */
|
|
35
|
+
validDateBySchedule?: boolean;
|
|
36
|
+
/** 日程列表 */
|
|
37
|
+
scheduleList?: any[];
|
|
38
|
+
/** 是否展示详情按钮 */
|
|
39
|
+
showDetail?: boolean;
|
|
40
|
+
/** 是否展示二维码 */
|
|
41
|
+
showQrCode?: boolean;
|
|
42
|
+
/** 是否展示封面图 */
|
|
43
|
+
showCover?: boolean;
|
|
44
|
+
/** 是否余额货币单位 */
|
|
45
|
+
showBalanceSymbol?: boolean;
|
|
46
|
+
/** 卡片大小 */
|
|
47
|
+
type?: 'default' | 'mini';
|
|
48
|
+
/** 展示操作按钮 */
|
|
49
|
+
showActions?: boolean;
|
|
50
|
+
/** 操作按钮配置 */
|
|
51
|
+
actions?: {
|
|
52
|
+
/** 按钮展示方式 */
|
|
53
|
+
layout: 'expanded' | 'collapsed';
|
|
54
|
+
/** detail 按钮配置 */
|
|
55
|
+
detail?: {
|
|
56
|
+
visible: boolean;
|
|
57
|
+
iconColor: string;
|
|
58
|
+
};
|
|
59
|
+
/** edit按钮配置 */
|
|
60
|
+
edit?: {
|
|
61
|
+
visible: boolean;
|
|
62
|
+
iconColor: string;
|
|
63
|
+
dialogTitle: string;
|
|
64
|
+
enableDialog: boolean;
|
|
65
|
+
fields: {
|
|
66
|
+
name: string;
|
|
67
|
+
label: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
72
|
+
beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
|
|
73
|
+
/** 编辑弹窗点击提交 */
|
|
74
|
+
onConfirmEdit?: (value: any, index: number) => void;
|
|
75
|
+
}
|
|
76
|
+
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellCheckboxGroupOption {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
declare type PisellCheckboxGroupValue = string | string[] | any;
|
|
11
|
+
export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
platform?: PisellContextType['platform'];
|
|
13
|
+
direction?: 'horizontal' | 'vertical';
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
gap?: number;
|
|
16
|
+
padding?: number;
|
|
17
|
+
options: PisellCheckboxGroupOption[];
|
|
18
|
+
onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
|
|
19
|
+
value?: PisellCheckboxGroupValue;
|
|
20
|
+
renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
|
|
21
|
+
rowKey?: string;
|
|
22
|
+
mode?: 'multiple' | 'single';
|
|
23
|
+
iconPosition?: 'left' | 'right' | 'hide';
|
|
24
|
+
optionClassName?: string;
|
|
25
|
+
optionActiveClassName?: string;
|
|
26
|
+
onChangeDebounce?: boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @title: PisellCheckboxGroup
|
|
30
|
+
* @description: 选中组件
|
|
31
|
+
* @param {PisellCheckboxGroupProps} props
|
|
32
|
+
* @return {*}
|
|
33
|
+
* @Author: zhiwei.Wang
|
|
34
|
+
* @Date: 2024-08-16 10:34
|
|
35
|
+
*/
|
|
36
|
+
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
|
|
37
|
+
export default PisellCheckboxGroup;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ApplicableProductDetails {
|
|
4
|
+
amount: string;
|
|
5
|
+
type: string;
|
|
6
|
+
resource_id: number;
|
|
7
|
+
title: string;
|
|
8
|
+
original_amount: string;
|
|
9
|
+
}
|
|
10
|
+
interface Discount {
|
|
11
|
+
id: number;
|
|
12
|
+
product_name: string;
|
|
13
|
+
encoded: string;
|
|
14
|
+
code: string;
|
|
15
|
+
tag: string;
|
|
16
|
+
expire_time?: string;
|
|
17
|
+
product_id: number;
|
|
18
|
+
relation_type: string;
|
|
19
|
+
par_value: string;
|
|
20
|
+
used_par_value: string;
|
|
21
|
+
limit_status: string;
|
|
22
|
+
limited_relation_product_data: any;
|
|
23
|
+
balance: string;
|
|
24
|
+
format_title: any;
|
|
25
|
+
product: any;
|
|
26
|
+
savedAmount: number;
|
|
27
|
+
isDisabled: boolean;
|
|
28
|
+
isSelected?: boolean;
|
|
29
|
+
isAvailable?: boolean;
|
|
30
|
+
isUsed?: boolean;
|
|
31
|
+
applicableProductIds?: number[];
|
|
32
|
+
applicableProductDetails: ApplicableProductDetails[];
|
|
33
|
+
appliedProductDetails: any[];
|
|
34
|
+
}
|
|
35
|
+
export interface PisellGoodPassCardProps {
|
|
36
|
+
/**数据源 */
|
|
37
|
+
dataSource: Array<Discount>;
|
|
38
|
+
/**事件 */
|
|
39
|
+
onChange?: (current: {
|
|
40
|
+
id: string | number;
|
|
41
|
+
isSelected: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
/**样式 */
|
|
44
|
+
style: React.CSSProperties;
|
|
45
|
+
/**快捷展示排序 */
|
|
46
|
+
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
|
+
}
|
|
48
|
+
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
49
|
+
export default index;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellQRScannerProps {
|
|
4
|
+
/** 是否可见 */
|
|
5
|
+
visible: boolean;
|
|
6
|
+
/** 是否显示上传图片按钮 */
|
|
7
|
+
showUpload?: boolean;
|
|
8
|
+
/** 关闭回调 */
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
/** 扫码成功回调 */
|
|
11
|
+
onScan: (value: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* 样式属性,可选
|
|
14
|
+
* 注意: 不应传入renderMode等不必要属性
|
|
15
|
+
*/
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
/** 类名,可选 */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 二维码扫描组件
|
|
22
|
+
*/
|
|
23
|
+
declare const PisellQRScanner: React.FC<PisellQRScannerProps>;
|
|
24
|
+
export default PisellQRScanner;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../../../pisell-config-provider/context';
|
|
3
|
+
export interface AmountProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** 平台 */
|
|
5
|
+
platform?: PisellContextType['platform'];
|
|
6
|
+
/** 当前数值 */
|
|
7
|
+
value?: number | string;
|
|
8
|
+
/** 小数点后位数 默认是小数点后2位 */
|
|
9
|
+
precision?: number;
|
|
10
|
+
/** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
|
|
11
|
+
showCurrencySymbol?: boolean;
|
|
12
|
+
/** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
|
|
13
|
+
useThousandsSeparator?: boolean;
|
|
14
|
+
/** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
|
|
15
|
+
hideDecimalForWholeNumbers?: boolean;
|
|
16
|
+
/** 货币符号 */
|
|
17
|
+
symbol?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Amount: (props: AmountProps) => JSX.Element;
|
|
20
|
+
export default Amount;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type MultiLanguageValue = {
|
|
4
|
+
en: string;
|
|
5
|
+
'zh-CN': string;
|
|
6
|
+
'zh-HK': string;
|
|
7
|
+
};
|
|
8
|
+
export interface EditableConfig {
|
|
9
|
+
/** 是否禁用编辑 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** 最大长度 */
|
|
12
|
+
maxLength?: number;
|
|
13
|
+
/** 编辑图标 */
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface EditableProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
+
/** 文本内容,支持字符串或多语言对象 */
|
|
18
|
+
value?: string | MultiLanguageValue;
|
|
19
|
+
/** 子节点内容,优先级高于 value */
|
|
20
|
+
children?: string;
|
|
21
|
+
/** 可编辑配置,boolean 时使用默认配置 */
|
|
22
|
+
editable?: boolean | EditableConfig;
|
|
23
|
+
/** 编辑变更回调 */
|
|
24
|
+
onChange?: (value: string | MultiLanguageValue) => void;
|
|
25
|
+
/** 输入框尺寸 */
|
|
26
|
+
size?: 'large' | 'middle' | 'small';
|
|
27
|
+
}
|
|
28
|
+
declare const Editable: React.FC<EditableProps>;
|
|
29
|
+
export default Editable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface PisellTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
}
|
|
4
|
+
declare const PisellText: {
|
|
5
|
+
(props: PisellTextProps): JSX.Element;
|
|
6
|
+
Amount: (props: import("./components/Amount").AmountProps) => JSX.Element;
|
|
7
|
+
Editable: React.FC<import("./components/Editable").EditableProps>;
|
|
8
|
+
};
|
|
9
|
+
export default PisellText;
|