@pisell/materials 1.0.894 → 1.0.896
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 +4 -4
- package/build/lowcode/preview.js +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -23
- package/es/components/appVersionControl/index.d.ts +4 -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/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +99 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +80 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -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/index.d.ts +4 -4
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/es/components/drag-sort-tree/index.d.ts +3 -0
- package/es/components/hardwareErrorTip/demo.d.ts +3 -0
- package/es/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
- package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +12 -0
- package/es/components/hardwareErrorTip/index.d.ts +19 -0
- package/es/components/hardwareErrorTip/logCard/index.d.ts +27 -0
- package/es/components/hardwareErrorTip/types.d.ts +28 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellAdjustPrice/index.d.ts +4 -0
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellAdjustPrice/type.d.ts +20 -0
- package/es/components/pisellCardList/index.d.ts +93 -0
- package/es/components/pisellCardList/index.js +25 -1
- package/es/components/pisellCheckboxGroup/index.d.ts +38 -0
- package/es/components/pisellCheckboxGroup/index.js +2 -2
- package/es/components/pisellCheckboxGroup/index.less +13 -1
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellGoodPassCard/index.d.ts +50 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- package/es/components/pisellWalletPassCard/index.d.ts +44 -0
- package/es/components/pisellWalletPassCard/index.js +233 -66
- package/es/components/pisellWalletPassCard/index.less +37 -7
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/Header/Actions/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- 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.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -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/index.d.ts +7 -0
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Gallery/index.d.ts +5 -0
- package/es/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/es/components/table/Table/AddFieldModal/index.js +13 -13
- package/es/components/table/Table/AddFieldModal/index.less +11 -11
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- 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/index.d.ts +4 -0
- package/es/components/table/Table/utils.d.ts +173 -0
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/hooks/useTransDataSource.d.ts +12 -0
- package/es/components/table/types.d.ts +253 -0
- package/es/components/translation/index.d.ts +15 -0
- package/es/components/versionModal/index.d.ts +24 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +5 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.js +1 -1
- package/es/components/virtual-keyboard/index.d.ts +25 -0
- package/es/components/walletCard/index.d.ts +71 -0
- package/es/index.d.ts +143 -0
- package/es/locales/en-US.d.ts +316 -0
- package/es/locales/en-US.js +6 -2
- package/es/locales/zh-CN.d.ts +311 -0
- package/es/locales/zh-CN.js +6 -2
- package/es/locales/zh-TW.d.ts +311 -0
- package/es/locales/zh-TW.js +6 -2
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +4 -0
- 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/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +39 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +99 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +80 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +16 -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/index.d.ts +4 -4
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
- package/lib/components/drag-sort-tree/index.d.ts +3 -0
- package/lib/components/hardwareErrorTip/demo.d.ts +3 -0
- package/lib/components/hardwareErrorTip/errorCard/index.d.ts +28 -0
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +12 -0
- package/lib/components/hardwareErrorTip/index.d.ts +19 -0
- package/lib/components/hardwareErrorTip/logCard/index.d.ts +27 -0
- package/lib/components/hardwareErrorTip/types.d.ts +28 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +4 -0
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
- package/lib/components/pisellCardList/index.d.ts +93 -0
- package/lib/components/pisellCardList/index.js +25 -1
- package/lib/components/pisellCheckboxGroup/index.d.ts +38 -0
- package/lib/components/pisellCheckboxGroup/index.js +2 -1
- package/lib/components/pisellCheckboxGroup/index.less +13 -1
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellGoodPassCard/index.d.ts +50 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +44 -0
- package/lib/components/pisellWalletPassCard/index.js +187 -48
- package/lib/components/pisellWalletPassCard/index.less +37 -7
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +27 -0
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +12 -0
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +45 -0
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +10 -0
- package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/Actions/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- 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.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +13 -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/index.d.ts +7 -0
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Table/AddFieldModal/index.d.ts +1 -0
- package/lib/components/table/Table/AddFieldModal/index.js +9 -9
- package/lib/components/table/Table/AddFieldModal/index.less +11 -11
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- 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/index.d.ts +4 -0
- package/lib/components/table/Table/utils.d.ts +173 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/hooks/useTransDataSource.d.ts +12 -0
- package/lib/components/table/types.d.ts +253 -0
- package/lib/components/translation/index.d.ts +15 -0
- package/lib/components/versionModal/index.d.ts +24 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +5 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +1 -8
- package/lib/components/virtual-keyboard/index.d.ts +25 -0
- package/lib/components/walletCard/index.d.ts +71 -0
- package/lib/index.d.ts +143 -0
- package/lib/locales/en-US.d.ts +316 -0
- package/lib/locales/en-US.js +6 -2
- package/lib/locales/zh-CN.d.ts +311 -0
- package/lib/locales/zh-CN.js +6 -2
- package/lib/locales/zh-TW.d.ts +311 -0
- package/lib/locales/zh-TW.js +6 -2
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/pisell-card-list/meta.ts +50 -1
- package/lowcode/pisell-wallet-pass-card/actionsMeta.ts +7 -0
- package/package.json +5 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const defaultConfig: {
|
|
2
|
+
dark: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
containerBackgroundColor: string;
|
|
5
|
+
buttonBackgroundColor: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
resetButtonBackgroundColor: string;
|
|
8
|
+
resetButtonTextColor: string;
|
|
9
|
+
isDoneButtonFollowTheme: boolean;
|
|
10
|
+
doneButtonBackgroundColor: string;
|
|
11
|
+
doneButtonTextColor: string;
|
|
12
|
+
isShowMainText: boolean;
|
|
13
|
+
mainTextColor: string;
|
|
14
|
+
isShowSubText: boolean;
|
|
15
|
+
subTextColor: string;
|
|
16
|
+
};
|
|
17
|
+
light: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
containerBackgroundColor: string;
|
|
20
|
+
buttonBackgroundColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
resetButtonBackgroundColor: string;
|
|
23
|
+
resetButtonTextColor: string;
|
|
24
|
+
isDoneButtonFollowTheme: boolean;
|
|
25
|
+
doneButtonBackgroundColor: string;
|
|
26
|
+
doneButtonTextColor: string;
|
|
27
|
+
isShowMainText: boolean;
|
|
28
|
+
mainTextColor: string;
|
|
29
|
+
isShowSubText: boolean;
|
|
30
|
+
subTextColor: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface PisellAdjustPriceProps {
|
|
2
|
+
value?: number;
|
|
3
|
+
originValue: number;
|
|
4
|
+
defaultValue?: number;
|
|
5
|
+
onChange?: (val: number) => void;
|
|
6
|
+
selectType?: 'light' | 'dark';
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
containerBackgroundColor?: string;
|
|
9
|
+
buttonBackgroundColor?: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
resetButtonBackgroundColor?: string;
|
|
12
|
+
resetButtonTextColor?: string;
|
|
13
|
+
isDoneButtonFollowTheme?: boolean;
|
|
14
|
+
doneButtonBackgroundColor?: string;
|
|
15
|
+
doneButtonTextColor?: string;
|
|
16
|
+
isShowMainText?: boolean;
|
|
17
|
+
mainTextColor?: string;
|
|
18
|
+
isShowSubText?: boolean;
|
|
19
|
+
subTextColor?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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) => 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: string, index: number) => 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
|
+
declare const _default: React.NamedExoticComponent<PisellCardListProps>;
|
|
93
|
+
export default _default;
|
|
@@ -38,7 +38,14 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
38
38
|
empty = props.empty,
|
|
39
39
|
showEmpty = props.showEmpty,
|
|
40
40
|
showBalanceSymbol = props.showBalanceSymbol,
|
|
41
|
-
onChangeDebounce = props.onChangeDebounce
|
|
41
|
+
onChangeDebounce = props.onChangeDebounce,
|
|
42
|
+
showStatus = props.showStatus,
|
|
43
|
+
nameTitleStyle = props.nameTitleStyle,
|
|
44
|
+
enableEditAmount = props.enableEditAmount,
|
|
45
|
+
useExternalDetail = props.useExternalDetail,
|
|
46
|
+
onDetail = props.onDetail,
|
|
47
|
+
formatBalance = props.formatBalance,
|
|
48
|
+
formatBalanceTitle = props.formatBalanceTitle;
|
|
42
49
|
return data.length ? /*#__PURE__*/React.createElement(PisellCheckboxGroup, {
|
|
43
50
|
options: data,
|
|
44
51
|
value: value,
|
|
@@ -53,6 +60,11 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
53
60
|
renderOption: function renderOption(item, active, index) {
|
|
54
61
|
return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, item, {
|
|
55
62
|
active: active,
|
|
63
|
+
mode: mode,
|
|
64
|
+
showActiveIcon: true,
|
|
65
|
+
showStatus: showStatus || (item === null || item === void 0 ? void 0 : item.showStatus),
|
|
66
|
+
cardStatus: item === null || item === void 0 ? void 0 : item.cardStatus,
|
|
67
|
+
nameTitleStyle: nameTitleStyle || (item === null || item === void 0 ? void 0 : item.nameTitleStyle),
|
|
56
68
|
showName: showName || (item === null || item === void 0 ? void 0 : item.showName),
|
|
57
69
|
showBalance: showBalance || (item === null || item === void 0 ? void 0 : item.showBalance),
|
|
58
70
|
showCode: showCode || (item === null || item === void 0 ? void 0 : item.showCode),
|
|
@@ -65,14 +77,26 @@ var PisellCardList = function PisellCardList(props) {
|
|
|
65
77
|
showBalanceSymbol: showBalanceSymbol || (item === null || item === void 0 ? void 0 : item.showBalanceSymbol),
|
|
66
78
|
showActions: props.showActions || (item === null || item === void 0 ? void 0 : item.showActions),
|
|
67
79
|
actions: props.actions || (item === null || item === void 0 ? void 0 : item.actions),
|
|
80
|
+
enableEditAmount: enableEditAmount || (item === null || item === void 0 ? void 0 : item.enableEditAmount),
|
|
81
|
+
useExternalDetail: useExternalDetail || (item === null || item === void 0 ? void 0 : item.useExternalDetail),
|
|
82
|
+
onDetail: function onDetail(record) {
|
|
83
|
+
var _props$onDetail;
|
|
84
|
+
return props === null || props === void 0 || (_props$onDetail = props.onDetail) === null || _props$onDetail === void 0 ? void 0 : _props$onDetail.call(props, record, index);
|
|
85
|
+
},
|
|
68
86
|
beforeEdit: function beforeEdit(record) {
|
|
69
87
|
var _props$beforeEdit;
|
|
70
88
|
return props === null || props === void 0 || (_props$beforeEdit = props.beforeEdit) === null || _props$beforeEdit === void 0 ? void 0 : _props$beforeEdit.call(props, record, index);
|
|
71
89
|
},
|
|
90
|
+
onConfirmEditAmount: function onConfirmEditAmount(value) {
|
|
91
|
+
var _props$onConfirmEditA;
|
|
92
|
+
(_props$onConfirmEditA = props.onConfirmEditAmount) === null || _props$onConfirmEditA === void 0 || _props$onConfirmEditA.call(props, value, index);
|
|
93
|
+
},
|
|
72
94
|
onConfirmEdit: function onConfirmEdit(newVal) {
|
|
73
95
|
var _props$onConfirmEdit;
|
|
74
96
|
(_props$onConfirmEdit = props.onConfirmEdit) === null || _props$onConfirmEdit === void 0 || _props$onConfirmEdit.call(props, newVal, index);
|
|
75
97
|
},
|
|
98
|
+
formatBalance: formatBalance || (item === null || item === void 0 ? void 0 : item.formatBalance),
|
|
99
|
+
formatBalanceTitle: formatBalanceTitle || (item === null || item === void 0 ? void 0 : item.formatBalanceTitle),
|
|
76
100
|
type: type,
|
|
77
101
|
style: direction === 'vertical' || direction === 'horizontal' && fullWidth ? {
|
|
78
102
|
width: '100%'
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
error?: boolean;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
declare type PisellCheckboxGroupValue = string | string[] | any;
|
|
12
|
+
export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
13
|
+
platform?: PisellContextType['platform'];
|
|
14
|
+
direction?: 'horizontal' | 'vertical';
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
gap?: number;
|
|
17
|
+
padding?: number;
|
|
18
|
+
options: PisellCheckboxGroupOption[];
|
|
19
|
+
onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
|
|
20
|
+
value?: PisellCheckboxGroupValue;
|
|
21
|
+
renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
|
|
22
|
+
rowKey?: string;
|
|
23
|
+
mode?: 'multiple' | 'single';
|
|
24
|
+
iconPosition?: 'left' | 'right' | 'hide';
|
|
25
|
+
optionClassName?: string;
|
|
26
|
+
optionActiveClassName?: string;
|
|
27
|
+
onChangeDebounce?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @title: PisellCheckboxGroup
|
|
31
|
+
* @description: 选中组件
|
|
32
|
+
* @param {PisellCheckboxGroupProps} props
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: zhiwei.Wang
|
|
35
|
+
* @Date: 2024-08-16 10:34
|
|
36
|
+
*/
|
|
37
|
+
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
|
|
38
|
+
export default PisellCheckboxGroup;
|
|
@@ -183,9 +183,9 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
|
|
|
183
183
|
}), options.map(function (option, index) {
|
|
184
184
|
var active = _value.includes(option[rowKey]);
|
|
185
185
|
return /*#__PURE__*/React.createElement(PisellRow, {
|
|
186
|
-
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty({
|
|
186
|
+
className: classNames('pisell-checkbox-group-item', optionClassName, _defineProperty(_defineProperty({
|
|
187
187
|
'pisell-checkbox-group-item-active': active
|
|
188
|
-
}, optionActiveClassName, active)),
|
|
188
|
+
}, optionActiveClassName, active), 'pisell-checkbox-group-item-error', option.error)),
|
|
189
189
|
key: option[rowKey],
|
|
190
190
|
gap: 10,
|
|
191
191
|
style: rowStyle,
|
|
@@ -24,11 +24,23 @@
|
|
|
24
24
|
|
|
25
25
|
&.pisell-checkbox-group-item-active {
|
|
26
26
|
&::before {
|
|
27
|
-
border-width:
|
|
27
|
+
border-width: 4px;
|
|
28
28
|
border-color: var(--theme-color);
|
|
29
|
+
background: var(--Primary-50, #F9F5FF);
|
|
30
|
+
z-index: 1;
|
|
31
|
+
box-sizing: border-box;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
}
|
|
35
|
+
|
|
36
|
+
&.pisell-checkbox-group-item-error {
|
|
37
|
+
&::before {
|
|
38
|
+
border-color: var(--Error-500, #F04438);
|
|
39
|
+
border-width: 2px;
|
|
40
|
+
background: var(--Error-50, #FEF3F2);
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
32
44
|
}
|
|
33
45
|
}
|
|
34
46
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmptyProps } from 'antd';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export interface PisellEmptyProps extends EmptyProps {
|
|
6
|
+
/** 平台 */
|
|
7
|
+
platform?: PisellContextType['platform'];
|
|
8
|
+
/** 额外内容描述 */
|
|
9
|
+
extraDescription?: React.ReactNode;
|
|
10
|
+
/** 额外内容描述 */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** 自定义底部额外操作区域 */
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
/** 最大宽度 */
|
|
15
|
+
maxWidth?: number;
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
19
|
+
export default PisellEmpty;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
isInModal: boolean;
|
|
48
|
+
}
|
|
49
|
+
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
50
|
+
export default index;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellToastProps {
|
|
4
|
+
/** 提示内容 */
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
/** 自动关闭的延时,单位秒。设为 0 时不自动关闭 */
|
|
7
|
+
duration?: number;
|
|
8
|
+
/** 是否展示action */
|
|
9
|
+
showAction?: boolean;
|
|
10
|
+
/** action文案 */
|
|
11
|
+
actionText?: string;
|
|
12
|
+
/** 关闭时触发的回调函数 */
|
|
13
|
+
onClose?: () => void;
|
|
14
|
+
}
|
|
15
|
+
declare const PisellToast: (props: PisellToastProps) => void;
|
|
16
|
+
export default PisellToast;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import './index.less';
|
|
3
|
+
export interface FormatOption {
|
|
4
|
+
/** 原始 DOM 元素 */
|
|
5
|
+
originDom: React.ReactNode;
|
|
6
|
+
/** 是否选中状态 */
|
|
7
|
+
active: boolean;
|
|
8
|
+
/** 完整的组件数据 */
|
|
9
|
+
data: PisellWalletPassCardProps;
|
|
10
|
+
}
|
|
2
11
|
export interface PisellWalletPassCardProps {
|
|
3
12
|
id: number;
|
|
4
13
|
/** 卡片样式 */
|
|
@@ -78,6 +87,41 @@ export interface PisellWalletPassCardProps {
|
|
|
78
87
|
beforeEdit?: (value: any) => Promise<any> | boolean | void;
|
|
79
88
|
/** 编辑弹窗点击提交 */
|
|
80
89
|
onConfirmEdit?: (value: any) => void;
|
|
90
|
+
/** 编辑金额事件 */
|
|
91
|
+
onConfirmEditAmount?: (value: string) => 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';
|
|
121
|
+
/** 自定义余额格式化函数,如果提供则优先使用 */
|
|
122
|
+
formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
|
|
123
|
+
/** 自定义余额标题格式化函数,如果提供则优先使用 */
|
|
124
|
+
formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
|
|
81
125
|
[key: string]: any;
|
|
82
126
|
}
|
|
83
127
|
declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
|