@pisell/materials 6.4.18 → 6.4.19
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/index.js +1 -1
- package/build/lowcode/meta.js +3 -3
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +15 -15
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +15 -15
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
- package/es/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/Upload/index.js +4 -3
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/pisellAdjustPrice/index.d.ts +0 -1
- package/es/components/pisellCardList/index.d.ts +103 -0
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- package/es/components/pisellText/components/Editable/index.js +130 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.d.ts +9 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/pisellWalletPassCard/index.d.ts +136 -0
- package/es/components/productCard/index.d.ts +7 -0
- package/es/components/productCard/utils.d.ts +31 -0
- package/es/components/productCard/utils.js +1 -8
- package/es/components/select/index.d.ts +9 -0
- package/es/components/select/index.js +4 -2
- package/es/components/sortableList/index.d.ts +11 -0
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/index.js +7 -3
- package/es/components/table/hooks/useTransColumns.d.ts +14 -0
- package/es/components/table/hooks/useTransColumns.js +1 -1
- package/es/components/table/index.d.ts +4 -0
- package/es/components/table/index.js +3 -1
- package/es/components/table/serve.d.ts +13 -0
- package/es/components/table/serve.js +8 -0
- package/es/components/tabs/index.d.ts +17 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/es/components/walletCard/index.d.ts +11 -11
- package/es/components/walletCard/index.js +51 -40
- package/es/index.d.ts +145 -0
- package/es/locales/en-US.d.ts +307 -0
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.d.ts +302 -0
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.d.ts +302 -0
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +2 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.js +2 -1
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -1
- package/lib/components/pisellCardList/index.d.ts +103 -0
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
- package/lib/components/pisellText/components/Editable/index.js +139 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.d.ts +9 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +136 -0
- package/lib/components/productCard/index.d.ts +7 -0
- package/lib/components/productCard/utils.d.ts +31 -0
- package/lib/components/productCard/utils.js +1 -8
- package/lib/components/select/index.d.ts +9 -0
- package/lib/components/select/index.js +7 -2
- package/lib/components/sortableList/index.d.ts +11 -0
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/index.js +8 -4
- package/lib/components/table/hooks/useTransColumns.d.ts +14 -0
- package/lib/components/table/hooks/useTransColumns.js +1 -1
- package/lib/components/table/index.d.ts +4 -0
- package/lib/components/table/index.js +3 -1
- package/lib/components/table/serve.d.ts +13 -0
- package/lib/components/table/serve.js +8 -0
- package/lib/components/tabs/index.d.ts +17 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/lib/components/walletCard/index.d.ts +11 -11
- package/lib/components/walletCard/index.js +47 -29
- package/lib/index.d.ts +145 -0
- package/lib/locales/en-US.d.ts +307 -0
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.d.ts +302 -0
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.d.ts +302 -0
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +16 -14
- package/package.json +2 -2
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/pisellToast/index.d.ts +0 -17
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/components/Header/index.d.ts +0 -4
- package/es/components/productCard/components/Sales/index.d.ts +0 -4
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/pisellToast/index.d.ts +0 -17
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -11
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -13
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -4
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -7
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/index.d.ts +0 -4
- package/lib/components/productCard/components/Sales/index.d.ts +0 -4
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -14
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
|
@@ -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;
|
|
@@ -389,7 +389,9 @@ export var withFormItem = function withFormItem(WrappedComponent, overlayProps)
|
|
|
389
389
|
rules: rules
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
|
-
return _objectSpread(_objectSpread({}, otherProps || {}), (overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps) || {})
|
|
392
|
+
return _objectSpread(_objectSpread(_objectSpread({}, otherProps || {}), (overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps) || {}), {}, {
|
|
393
|
+
onChange: undefined
|
|
394
|
+
});
|
|
393
395
|
}, [overlayProps === null || overlayProps === void 0 ? void 0 : overlayProps.otherFormItemProps, otherProps]);
|
|
394
396
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
395
397
|
required: required,
|
|
@@ -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
|
+
};
|
|
@@ -65,11 +65,13 @@ export var useCountries = function useCountries() {
|
|
|
65
65
|
data = _useRequest.data,
|
|
66
66
|
run = _useRequest.run;
|
|
67
67
|
useEffect(function () {
|
|
68
|
+
debugger;
|
|
68
69
|
if (!isShop) {
|
|
69
70
|
run();
|
|
70
71
|
}
|
|
71
72
|
}, [isShop]);
|
|
72
73
|
var currentData = useMemo(function () {
|
|
74
|
+
debugger;
|
|
73
75
|
if (isShop) {
|
|
74
76
|
var _appHelper$utils;
|
|
75
77
|
var codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils = appHelper.utils) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.store) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.getState()) === null || _appHelper$utils === void 0 || (_appHelper$utils = _appHelper$utils.global) === null || _appHelper$utils === void 0 ? void 0 : _appHelper$utils.codeList;
|
|
@@ -29,10 +29,11 @@ var Upload = withFormItem(UploadWithMode, {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
+
return {
|
|
33
|
+
rules: [].concat(_toConsumableArray((others === null || others === void 0 ? void 0 : others.rules) || []), [rule])
|
|
34
|
+
};
|
|
32
35
|
}
|
|
33
|
-
return {
|
|
34
|
-
rules: [].concat(_toConsumableArray((others === null || others === void 0 ? void 0 : others.rules) || []), [rule])
|
|
35
|
-
};
|
|
36
|
+
return {};
|
|
36
37
|
}
|
|
37
38
|
});
|
|
38
39
|
export default Upload;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface IconFontProps extends IconComponentProps {
|
|
4
|
+
type: string;
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
6
|
+
}
|
|
7
|
+
declare const IconFont: React.FC<IconFontProps>;
|
|
8
|
+
export default IconFont;
|
|
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
2
2
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
var MyIcon = createFromIconfontCN({
|
|
5
|
-
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.
|
|
5
|
+
scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont1.18.js' // 在 iconfont.cn 上生成
|
|
6
6
|
});
|
|
7
7
|
var IconFont = function IconFont(props) {
|
|
8
8
|
return /*#__PURE__*/React.createElement(MyIcon, _extends({}, props, {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
import { PisellWalletPassCardProps, FormatOption } 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
|
+
showDetail?: boolean;
|
|
36
|
+
/** 是否展示二维码 */
|
|
37
|
+
showQrCode?: boolean;
|
|
38
|
+
/** 是否展示封面图 */
|
|
39
|
+
showCover?: boolean;
|
|
40
|
+
/** 是否余额货币单位 */
|
|
41
|
+
showBalanceSymbol?: boolean;
|
|
42
|
+
/** 卡片大小 */
|
|
43
|
+
type?: 'default' | 'mini';
|
|
44
|
+
/** 展示操作按钮 */
|
|
45
|
+
showActions?: boolean;
|
|
46
|
+
/** 操作按钮配置 */
|
|
47
|
+
actions?: {
|
|
48
|
+
/** 按钮展示方式 */
|
|
49
|
+
layout: 'expanded' | 'collapsed';
|
|
50
|
+
/** detail 按钮配置 */
|
|
51
|
+
detail?: {
|
|
52
|
+
visible: boolean;
|
|
53
|
+
iconColor: string;
|
|
54
|
+
};
|
|
55
|
+
/** edit按钮配置 */
|
|
56
|
+
edit?: {
|
|
57
|
+
visible: boolean;
|
|
58
|
+
iconColor: string;
|
|
59
|
+
dialogTitle: string;
|
|
60
|
+
enableDialog: boolean;
|
|
61
|
+
fields: {
|
|
62
|
+
name: string;
|
|
63
|
+
label: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
68
|
+
beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
|
|
69
|
+
/** 编辑弹窗点击提交 */
|
|
70
|
+
onConfirmEdit?: (value: any, index: number, data: any) => void;
|
|
71
|
+
/** 是否展示状态标识 */
|
|
72
|
+
showStatus?: boolean;
|
|
73
|
+
/** 名称标题字号字重颜色配置 */
|
|
74
|
+
nameTitleStyle?: {
|
|
75
|
+
fontSize: number;
|
|
76
|
+
fontWeight: number;
|
|
77
|
+
color: string;
|
|
78
|
+
};
|
|
79
|
+
/** 开启编辑金额 */
|
|
80
|
+
enableEditAmount?: boolean;
|
|
81
|
+
/** 编辑金额事件 */
|
|
82
|
+
onConfirmEditAmount?: (value: number, index: number, data: any) => void;
|
|
83
|
+
/** 是否使用外部详情处理 */
|
|
84
|
+
useExternalDetail?: boolean;
|
|
85
|
+
/** 详情事件 */
|
|
86
|
+
onDetail?: (value: any, index: number) => void;
|
|
87
|
+
/** 自定义余额格式化函数,如果提供则优先使用 */
|
|
88
|
+
formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
|
|
89
|
+
/** 自定义余额标题格式化函数,如果提供则优先使用 */
|
|
90
|
+
formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
91
|
+
/** 自定义使用金额格式化函数,如果提供则优先使用 */
|
|
92
|
+
formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
|
|
93
|
+
/** 自定义使用金额标题格式化函数,如果提供则优先使用 */
|
|
94
|
+
formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
95
|
+
/** 编辑金额前事件 */
|
|
96
|
+
onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
|
|
97
|
+
/** 选项点击事件 */
|
|
98
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
|
|
99
|
+
/** 是否展示选中状态的背景色 */
|
|
100
|
+
showActiveBackground?: boolean;
|
|
101
|
+
}
|
|
102
|
+
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
103
|
+
export default _default;
|
|
@@ -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,130 @@
|
|
|
1
|
+
var _excluded = ["value", "children", "editable", "onChange", "className", "size"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import React, { useState, useMemo } from 'react';
|
|
13
|
+
import { Input } from 'antd';
|
|
14
|
+
import Icon from "../../../icon";
|
|
15
|
+
import { locales } from '@pisell/utils';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
18
|
+
import Translation from "../../../translation";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
var Editable = function Editable(props) {
|
|
21
|
+
var value = props.value,
|
|
22
|
+
children = props.children,
|
|
23
|
+
_props$editable = props.editable,
|
|
24
|
+
editable = _props$editable === void 0 ? false : _props$editable,
|
|
25
|
+
onChange = props.onChange,
|
|
26
|
+
className = props.className,
|
|
27
|
+
_props$size = props.size,
|
|
28
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
29
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
30
|
+
var context = useEngineContext();
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
isEditing = _useState2[0],
|
|
34
|
+
setIsEditing = _useState2[1];
|
|
35
|
+
// 解析编辑配置
|
|
36
|
+
var editableConfig = useMemo(function () {
|
|
37
|
+
if (typeof editable === 'boolean') {
|
|
38
|
+
return editable ? {} : null;
|
|
39
|
+
}
|
|
40
|
+
return editable || null;
|
|
41
|
+
}, [editable]);
|
|
42
|
+
var currentLocale = useMemo(function () {
|
|
43
|
+
var _context$appHelper$ut;
|
|
44
|
+
var locale = (_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale');
|
|
45
|
+
return locales.formatLocale(locale);
|
|
46
|
+
}, []);
|
|
47
|
+
var displayValue = useMemo(function () {
|
|
48
|
+
if (typeof children === 'string') return children;
|
|
49
|
+
if (typeof value === 'string') {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
if (value && _typeof(value) === 'object') {
|
|
53
|
+
return value[currentLocale] || '';
|
|
54
|
+
}
|
|
55
|
+
return '';
|
|
56
|
+
}, [value, currentLocale, children]);
|
|
57
|
+
|
|
58
|
+
// 判断是否为多语言对象
|
|
59
|
+
var isMultiLanguage = useMemo(function () {
|
|
60
|
+
return !!value && _typeof(value) === 'object';
|
|
61
|
+
}, [value]);
|
|
62
|
+
|
|
63
|
+
// 编辑功能
|
|
64
|
+
var handleEdit = function handleEdit() {
|
|
65
|
+
if (editableConfig !== null && editableConfig !== void 0 && editableConfig.disabled) return;
|
|
66
|
+
setIsEditing(true);
|
|
67
|
+
};
|
|
68
|
+
var handleInputChange = function handleInputChange(newValue) {
|
|
69
|
+
if (!onChange) return;
|
|
70
|
+
onChange(newValue);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 编辑模式渲染
|
|
74
|
+
if (isEditing && editableConfig) {
|
|
75
|
+
// 如果是多语言对象,使用 Translation 组件
|
|
76
|
+
if (isMultiLanguage) {
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: classNames('pisell-text-editable-editing', className)
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Translation, {
|
|
80
|
+
value: value,
|
|
81
|
+
onChange: handleInputChange,
|
|
82
|
+
onPressEnter: function onPressEnter() {
|
|
83
|
+
return setIsEditing(false);
|
|
84
|
+
}
|
|
85
|
+
// onBlur={() => setIsEditing(false)}
|
|
86
|
+
,
|
|
87
|
+
maxLength: editableConfig.maxLength,
|
|
88
|
+
size: size,
|
|
89
|
+
autoFocus: true
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 普通字符串,使用 Input 组件
|
|
94
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
95
|
+
value: displayValue,
|
|
96
|
+
onChange: function onChange(e) {
|
|
97
|
+
return handleInputChange(e.target.value);
|
|
98
|
+
},
|
|
99
|
+
onPressEnter: function onPressEnter() {
|
|
100
|
+
return setIsEditing(false);
|
|
101
|
+
}
|
|
102
|
+
// onBlur={() => setIsEditing(false)}
|
|
103
|
+
,
|
|
104
|
+
maxLength: editableConfig.maxLength,
|
|
105
|
+
size: size,
|
|
106
|
+
autoFocus: true,
|
|
107
|
+
className: classNames('pisell-text-editable-input', className),
|
|
108
|
+
style: others.style
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 正常显示模式
|
|
113
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
114
|
+
className: classNames('pisell-text-editable', className, {
|
|
115
|
+
'pisell-text-editable-enabled': editableConfig && !editableConfig.disabled
|
|
116
|
+
})
|
|
117
|
+
}, others), displayValue, editableConfig && !editableConfig.disabled && !isEditing && /*#__PURE__*/React.createElement("span", {
|
|
118
|
+
className: "pisell-text-editable-edit-icon",
|
|
119
|
+
onClick: function onClick(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
handleEdit();
|
|
123
|
+
},
|
|
124
|
+
title: "\u70B9\u51FB\u7F16\u8F91"
|
|
125
|
+
}, editableConfig.icon || /*#__PURE__*/React.createElement(Icon, {
|
|
126
|
+
type: "pisell2-edit-05",
|
|
127
|
+
size: 16
|
|
128
|
+
})));
|
|
129
|
+
};
|
|
130
|
+
export default Editable;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-text-editable {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&-enabled {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-edit-icon {
|
|
9
|
+
margin-left: 4px;
|
|
10
|
+
color: rgba(0, 0, 0, 0.45);
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: #1890ff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 确保内部的图标不会阻止点击事件
|
|
22
|
+
* {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-input {
|
|
28
|
+
min-width: 100px;
|
|
29
|
+
|
|
30
|
+
&.ant-input {
|
|
31
|
+
border: 1px solid #1890ff;
|
|
32
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-editing {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -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;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Amount from "./components/Amount";
|
|
3
|
+
import Editable from "./components/Editable";
|
|
3
4
|
var PisellText = function PisellText(props) {
|
|
4
5
|
return /*#__PURE__*/React.createElement("span", props);
|
|
5
6
|
};
|
|
6
7
|
PisellText.Amount = Amount;
|
|
8
|
+
PisellText.Editable = Editable;
|
|
7
9
|
export default PisellText;
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface FormatOption {
|
|
4
|
+
/** 原始 DOM 元素 */
|
|
5
|
+
originDom: React.ReactNode;
|
|
6
|
+
/** 是否选中状态 */
|
|
7
|
+
active: boolean;
|
|
8
|
+
/** 完整的组件数据 */
|
|
9
|
+
data: PisellWalletPassCardProps;
|
|
10
|
+
}
|
|
11
|
+
export interface PisellWalletPassCardProps {
|
|
12
|
+
id: number;
|
|
13
|
+
/** 卡片样式 */
|
|
14
|
+
type: 'default' | 'mini';
|
|
15
|
+
/** 商品名称 */
|
|
16
|
+
name: string;
|
|
17
|
+
/** 二维码 */
|
|
18
|
+
qrCode: string;
|
|
19
|
+
/** 共享店铺名称 */
|
|
20
|
+
storeName: string;
|
|
21
|
+
/** 余额 */
|
|
22
|
+
balance?: number;
|
|
23
|
+
/** 识别码编号 */
|
|
24
|
+
code: string;
|
|
25
|
+
/** 有效期 */
|
|
26
|
+
validDate: string;
|
|
27
|
+
/** 使用金额 */
|
|
28
|
+
redeem?: number;
|
|
29
|
+
/** 是否禁用 */
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/** 禁用原因 */
|
|
32
|
+
disabledReason?: string;
|
|
33
|
+
/** 是否展示禁用原因 */
|
|
34
|
+
showDisabledReason?: boolean;
|
|
35
|
+
/** 封面图 */
|
|
36
|
+
cover?: string;
|
|
37
|
+
/** 余额标题文案 */
|
|
38
|
+
balanceTitle?: string;
|
|
39
|
+
/** 使用金额标题文案 */
|
|
40
|
+
redeemTitle?: string;
|
|
41
|
+
/** 是否选中 */
|
|
42
|
+
active?: boolean;
|
|
43
|
+
/** 是否展示商品名称 */
|
|
44
|
+
showName?: boolean;
|
|
45
|
+
/** 是否展示共享店铺名称 */
|
|
46
|
+
showStoreName?: boolean | ((data: any) => boolean);
|
|
47
|
+
/** 是否展示使用金额 */
|
|
48
|
+
showRedeem?: boolean;
|
|
49
|
+
/** 是否展示余额 */
|
|
50
|
+
showBalance?: boolean;
|
|
51
|
+
/** 是否展示识别码编号 */
|
|
52
|
+
showCode?: boolean;
|
|
53
|
+
/** 是否展示有效期 */
|
|
54
|
+
showValidDate?: boolean;
|
|
55
|
+
/** 是否展示右上角详情按钮 */
|
|
56
|
+
showDetail?: boolean;
|
|
57
|
+
/** 是否展示qrCode */
|
|
58
|
+
showQrCode?: boolean;
|
|
59
|
+
/** 是否展示封面 */
|
|
60
|
+
showCover?: boolean;
|
|
61
|
+
/** 是否展示余额货币符号 */
|
|
62
|
+
showBalanceSymbol?: boolean;
|
|
63
|
+
/** 展示操作按钮 */
|
|
64
|
+
showActions?: boolean;
|
|
65
|
+
/** 操作按钮配置 */
|
|
66
|
+
actions?: {
|
|
67
|
+
/** 按钮展示方式 */
|
|
68
|
+
layout: 'expanded' | 'collapsed';
|
|
69
|
+
/** detail 按钮配置 */
|
|
70
|
+
detail?: {
|
|
71
|
+
visible: boolean;
|
|
72
|
+
iconColor: string;
|
|
73
|
+
};
|
|
74
|
+
/** edit按钮配置 */
|
|
75
|
+
edit?: {
|
|
76
|
+
visible: boolean;
|
|
77
|
+
iconColor: string;
|
|
78
|
+
dialogTitle: string;
|
|
79
|
+
enableDialog: boolean;
|
|
80
|
+
fields: {
|
|
81
|
+
name: string;
|
|
82
|
+
label: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
/** 编辑编辑按钮后,弹窗展示之前 */
|
|
87
|
+
beforeEdit?: (value: any) => Promise<any> | boolean | void;
|
|
88
|
+
/** 编辑弹窗点击提交 */
|
|
89
|
+
onConfirmEdit?: (value: any) => void;
|
|
90
|
+
/** 编辑金额事件 */
|
|
91
|
+
onConfirmEditAmount?: (value: number) => void;
|
|
92
|
+
/** 详情按钮点击事件 */
|
|
93
|
+
onDetail?: (data: {
|
|
94
|
+
id: number;
|
|
95
|
+
name: string;
|
|
96
|
+
storeName: string;
|
|
97
|
+
balance?: number;
|
|
98
|
+
redeem?: number;
|
|
99
|
+
code: string;
|
|
100
|
+
validDate: string;
|
|
101
|
+
originData?: any;
|
|
102
|
+
}) => void;
|
|
103
|
+
/** 是否使用外部详情处理(当为 true 且提供了 onDetail 时,不显示内部模态框) */
|
|
104
|
+
useExternalDetail?: boolean;
|
|
105
|
+
/** 单选或者多选 */
|
|
106
|
+
mode?: 'multiple' | 'single';
|
|
107
|
+
/** 是否展示选中图标 */
|
|
108
|
+
showActiveIcon?: boolean;
|
|
109
|
+
/** 开启编辑金额 */
|
|
110
|
+
enableEditAmount?: boolean;
|
|
111
|
+
/** 显示状态标识 */
|
|
112
|
+
showStatus?: boolean;
|
|
113
|
+
/** 名称标题字号字重颜色配置 */
|
|
114
|
+
nameTitleStyle?: {
|
|
115
|
+
fontSize: number;
|
|
116
|
+
fontWeight: number;
|
|
117
|
+
color: string;
|
|
118
|
+
};
|
|
119
|
+
/** 卡片状态 */
|
|
120
|
+
cardStatus?: 'used' | 'expired' | 'disabled' | 'conflict' | 'lastPayment';
|
|
121
|
+
/** 自定义余额格式化函数,如果提供则优先使用 */
|
|
122
|
+
formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
|
|
123
|
+
/** 自定义余额标题格式化函数,如果提供则优先使用 */
|
|
124
|
+
formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
125
|
+
/** 自定义使用金额格式化函数,如果提供则优先使用 */
|
|
126
|
+
formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
|
|
127
|
+
/** 自定义使用金额标题格式化函数,如果提供则优先使用 */
|
|
128
|
+
formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
129
|
+
/** 最大使用金额 */
|
|
130
|
+
maxRedeem?: number;
|
|
131
|
+
/** 编辑金额前事件 */
|
|
132
|
+
onBeforeEditAmount?: (value: any) => Promise<any> | boolean | void;
|
|
133
|
+
[key: string]: any;
|
|
134
|
+
}
|
|
135
|
+
declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
|
|
136
|
+
export default PisellWalletPassCard;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import 'dayjs/locale/zh-cn';
|
|
2
|
+
import 'dayjs/locale/en';
|
|
3
|
+
import 'dayjs/locale/zh-tw';
|
|
4
|
+
/**
|
|
5
|
+
* @title: 是否英文
|
|
6
|
+
* @description:
|
|
7
|
+
* @param {any} item
|
|
8
|
+
* @return {*}
|
|
9
|
+
* @Author: WangHan
|
|
10
|
+
* @Date: 2024-12-28 22:49
|
|
11
|
+
*/
|
|
12
|
+
export declare const isEn: (item: any) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @title: 跨日预约时间
|
|
15
|
+
* @description:
|
|
16
|
+
* @param {any} item
|
|
17
|
+
* @return {*}
|
|
18
|
+
* @Author: WangHan
|
|
19
|
+
* @Date: 2024-12-28 22:50
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
+
/**
|
|
23
|
+
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {any} item
|
|
26
|
+
* @param {any} currentDate
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: zhiwei.Wang
|
|
29
|
+
* @Date: 2024-04-26 14:04
|
|
30
|
+
*/
|
|
31
|
+
export declare const getServiceTime: (item: any, currentDate: any) => string;
|