@pisell/materials 6.4.1 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +17 -18
- package/es/components/date-picker/datePickerCpt.d.ts +0 -1
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/lowCodePage/index.d.ts +0 -1
- package/es/components/page/index.d.ts +0 -1
- package/es/components/pisell-config-provider/context.d.ts +22 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellAdjustPrice/index.d.ts +4 -0
- package/es/components/pisellAdjustPrice/type.d.ts +22 -0
- package/es/components/pisellCardList/index.d.ts +103 -0
- package/es/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/pisellToast/index.d.ts +16 -0
- 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/AmountFooter/index.d.ts +0 -1
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/es/components/productCard/components/Header/index.d.ts +3 -0
- package/es/components/productCard/components/Note/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/index.d.ts +0 -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/SelectHolderMultiple/index.d.ts +0 -1
- 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/locales.d.ts +84 -0
- package/es/components/qrcode/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/index.d.ts +5 -0
- package/es/components/table/Table/AddFieldModal/index.d.ts +4 -0
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +161 -0
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/translation/index.d.ts +14 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/es/components/virtual-keyboard/index.d.ts +25 -0
- package/es/components/walletCard/Guide/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +67 -0
- package/es/locales/en-US.d.ts +284 -0
- package/es/locales/zh-CN.d.ts +279 -0
- package/es/locales/zh-TW.d.ts +279 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +56 -0
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +98 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +10 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +17 -18
- package/lib/components/date-picker/datePickerCpt.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/lowCodePage/index.d.ts +0 -1
- package/lib/components/page/index.d.ts +0 -1
- package/lib/components/pisell-config-provider/context.d.ts +22 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellAdjustPrice/index.d.ts +4 -0
- package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
- package/lib/components/pisellCardList/index.d.ts +103 -0
- package/lib/components/pisellCheckboxGroup/index.d.ts +40 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/pisellToast/index.d.ts +16 -0
- 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/AmountFooter/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/EditButton/index.d.ts +0 -1
- package/lib/components/productCard/components/Header/index.d.ts +3 -0
- package/lib/components/productCard/components/Note/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/index.d.ts +0 -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/SelectHolderMultiple/index.d.ts +0 -1
- 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/locales.d.ts +84 -0
- package/lib/components/qrcode/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Table/AddFieldModal/index.d.ts +4 -0
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/translation/index.d.ts +14 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Number/index.d.ts +5 -0
- package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
- package/lib/components/virtual-keyboard/index.d.ts +25 -0
- package/lib/components/walletCard/Guide/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +67 -0
- package/lib/locales/en-US.d.ts +284 -0
- package/lib/locales/zh-CN.d.ts +279 -0
- package/lib/locales/zh-TW.d.ts +279 -0
- package/package.json +11 -11
|
@@ -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,40 @@
|
|
|
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
|
+
onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: PisellCheckboxGroupOption) => void;
|
|
29
|
+
showActiveBackground?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @title: PisellCheckboxGroup
|
|
33
|
+
* @description: 选中组件
|
|
34
|
+
* @param {PisellCheckboxGroupProps} props
|
|
35
|
+
* @return {*}
|
|
36
|
+
* @Author: zhiwei.Wang
|
|
37
|
+
* @Date: 2024-08-16 10:34
|
|
38
|
+
*/
|
|
39
|
+
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
|
|
40
|
+
export default PisellCheckboxGroup;
|
|
@@ -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
|
+
[key: string]: any;
|
|
15
|
+
/** 最大宽度 */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
19
|
+
export default PisellEmpty;
|
|
@@ -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,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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface InputItem {
|
|
2
|
+
start_date: string;
|
|
3
|
+
end_date: string;
|
|
4
|
+
total: number;
|
|
5
|
+
num: number;
|
|
6
|
+
}
|
|
7
|
+
interface OutputItem {
|
|
8
|
+
start_date: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
total: number;
|
|
11
|
+
num: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
holder_id?: any;
|
|
17
|
+
};
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
/** 作为主商品卡片展示
|
|
20
|
+
* 1. 影响商品数量 tag 的位置
|
|
21
|
+
* 2. isMain 且 type 为 a5,展示holder
|
|
22
|
+
*/
|
|
23
|
+
isMainProduct?: boolean;
|
|
24
|
+
type?: 'a2' | 'a5';
|
|
25
|
+
}
|
|
26
|
+
declare const BasicInfo: (props: IProps) => JSX.Element;
|
|
27
|
+
export default BasicInfo;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 金额是否是负
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {string} type
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2024-11-22 10:01
|
|
8
|
+
*/
|
|
9
|
+
export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
10
|
+
/**
|
|
11
|
+
* @title: 金额格式化
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {number} price
|
|
14
|
+
* @param {string} amountSymbol
|
|
15
|
+
* @param {number} digit
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Author: WangHan
|
|
18
|
+
* @Date: 2024-11-22 10:58
|
|
19
|
+
*/
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface IProps {
|
|
3
|
+
hideDivider?: boolean;
|
|
4
|
+
dataSource: {
|
|
5
|
+
symbol?: string;
|
|
6
|
+
relation_products?: any[];
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
};
|
|
9
|
+
isShowImage?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => JSX.Element | null;
|
|
12
|
+
export default Sales;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type NativeProps<S extends string = never> = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties & Partial<Record<S, string>>;
|
|
6
|
+
};
|
|
7
|
+
declare type PropagationEvent = 'click';
|
|
8
|
+
import './index.less';
|
|
9
|
+
declare type SideType = 'left' | 'right';
|
|
10
|
+
export declare type SwipeActionRef = {
|
|
11
|
+
close: () => void;
|
|
12
|
+
show: (side?: SideType) => void;
|
|
13
|
+
};
|
|
14
|
+
declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
|
+
export declare type Action = {
|
|
16
|
+
key: string | number;
|
|
17
|
+
text: ReactNode;
|
|
18
|
+
color?: ActionColor | string;
|
|
19
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare type SwipeActionProps = {
|
|
22
|
+
rightActions?: Action[];
|
|
23
|
+
leftActions?: Action[];
|
|
24
|
+
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
25
|
+
closeOnTouchOutside?: boolean;
|
|
26
|
+
closeOnAction?: boolean;
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
stopPropagation?: PropagationEvent[];
|
|
29
|
+
onActionsReveal?: (side: SideType) => void;
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
escapeDom?: string;
|
|
32
|
+
} & NativeProps<'--background'>;
|
|
33
|
+
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
34
|
+
rightActions?: Action[] | undefined;
|
|
35
|
+
leftActions?: Action[] | undefined;
|
|
36
|
+
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
37
|
+
closeOnTouchOutside?: boolean | undefined;
|
|
38
|
+
closeOnAction?: boolean | undefined;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
stopPropagation?: "click"[] | undefined;
|
|
41
|
+
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
42
|
+
onClose?: (() => void) | undefined;
|
|
43
|
+
escapeDom?: string | undefined;
|
|
44
|
+
} & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
import { ProductCardTypes } from '../types';
|
|
3
|
+
interface ISKUCardProps extends ProductCardTypes {
|
|
4
|
+
type: 'a2' | 'a5';
|
|
5
|
+
rightActions: any[];
|
|
6
|
+
escapeDom?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PREFIX = "pisell-cart-sku-card";
|
|
9
|
+
declare const CartSkuCard: (props: ISKUCardProps) => JSX.Element;
|
|
10
|
+
export default CartSkuCard;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.product.card.discount.reason': string;
|
|
4
|
+
'pisell2.cart.sku-card.more': string;
|
|
5
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
6
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
7
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
8
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
9
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
10
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
11
|
+
'pisell2.product.card.discount.note': string;
|
|
12
|
+
'pisell2.product.card.edit': string;
|
|
13
|
+
'pisell2.product.card.discount.add.note': string;
|
|
14
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
15
|
+
'pisell2.product.card.confirm': string;
|
|
16
|
+
'pisell2.product.card.cancel': string;
|
|
17
|
+
'pisell2.product.card.note.pla': string;
|
|
18
|
+
'pisell2.product.card.items.package': string;
|
|
19
|
+
'pisell2.product.card.view-all': string;
|
|
20
|
+
'pisell2.product.card.view-less': string;
|
|
21
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
22
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
23
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
24
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
25
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
26
|
+
'pisell2.product.card.sales': string;
|
|
27
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
28
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
29
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
30
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
31
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
32
|
+
};
|
|
33
|
+
'zh-CN': {
|
|
34
|
+
'pisell2.product.card.discount.reason': string;
|
|
35
|
+
'pisell2.cart.sku-card.more': string;
|
|
36
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
37
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
38
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
39
|
+
'pisell2.product.card.edit': string;
|
|
40
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
41
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
42
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
43
|
+
'pisell2.product.card.discount.note': string;
|
|
44
|
+
'pisell2.product.card.discount.add.note': string;
|
|
45
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
46
|
+
'pisell2.product.card.confirm': string;
|
|
47
|
+
'pisell2.product.card.cancel': string;
|
|
48
|
+
'pisell2.product.card.note.pla': string;
|
|
49
|
+
'pisell2.product.card.items.package': string;
|
|
50
|
+
'pisell2.product.card.view-all': string;
|
|
51
|
+
'pisell2.product.card.view-less': string;
|
|
52
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
53
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
54
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
55
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
56
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
57
|
+
'pisell2.product.card.sales': string;
|
|
58
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
59
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
60
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
61
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
62
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
63
|
+
};
|
|
64
|
+
'zh-HK': {
|
|
65
|
+
'pisell2.product.card.discount.reason': string;
|
|
66
|
+
'pisell2.cart.sku-card.more': string;
|
|
67
|
+
'pisell2.cart.sku-card.packages.title': string;
|
|
68
|
+
'pisell2.cart.sku-card.sales.title': string;
|
|
69
|
+
'pisell2.cart.sku-card.actions.delete': string;
|
|
70
|
+
'pisell2.product.card.edit': string;
|
|
71
|
+
'pisell2.product.card.day': (val: number) => string;
|
|
72
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
73
|
+
'pisell2.product.card.minute': (val: number) => string;
|
|
74
|
+
'pisell2.product.card.discount.note': string;
|
|
75
|
+
'pisell2.product.card.discount.add.note': string;
|
|
76
|
+
'pisell2.product.card.discount.edit.note': string;
|
|
77
|
+
'pisell2.product.card.confirm': string;
|
|
78
|
+
'pisell2.product.card.cancel': string;
|
|
79
|
+
'pisell2.product.card.note.pla': string;
|
|
80
|
+
'pisell2.product.card.items.package': string;
|
|
81
|
+
'pisell2.product.card.view-all': string;
|
|
82
|
+
'pisell2.product.card.view-less': string;
|
|
83
|
+
'pisell2.product.card.add.holder.button.text': (val: string) => string;
|
|
84
|
+
'pisell2.product.card.add.holder.placeholder': (val: string) => string;
|
|
85
|
+
'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
|
|
86
|
+
'pisell2.product.card.add.holder.modal.title.1': string;
|
|
87
|
+
'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
|
|
88
|
+
'pisell2.product.card.sales': string;
|
|
89
|
+
'pisell2.product.card.add.holder.modal.cancel': string;
|
|
90
|
+
'pisell2.product.card.add.holder.modal.clear': string;
|
|
91
|
+
'pisell2.product.card.add.holder.modal.apply': string;
|
|
92
|
+
'pisell2.product.card.add.holder.modal.add': string;
|
|
93
|
+
'pisell2.product.card.closing-soon.warning': string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface SelectHolderModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: (value: any) => void;
|
|
6
|
+
lists: any[];
|
|
7
|
+
value: any[];
|
|
8
|
+
holderMaxCount: number;
|
|
9
|
+
addHolderButtonText: string;
|
|
10
|
+
onAdd: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const SelectHolderModal: (props: SelectHolderModalProps) => JSX.Element;
|
|
13
|
+
export default SelectHolderModal;
|
package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const SelectHolderMultiple: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
|
|
3
2
|
export default SelectHolderMultiple;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
interface ResourceItem {
|
|
3
|
+
id: string | number;
|
|
4
|
+
label: string;
|
|
5
|
+
isError?: boolean;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
interface SelectResourceProps {
|
|
9
|
+
lists: ResourceItem[];
|
|
10
|
+
value: any;
|
|
11
|
+
onChange: (val: any) => void;
|
|
12
|
+
resourceMode?: 'multiple' | 'tags' | undefined;
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
isParallelResource?: boolean;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
declare const SelectResource: ({ lists, value, onChange, resourceMode, allowClear, onClearResource, maxLength, isErrorResource, resourceErrorText, ...props }: SelectResourceProps) => JSX.Element;
|
|
18
|
+
export default SelectResource;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
|
|
3
|
+
export default Time;
|