@pisell/materials 1.0.974 → 1.0.976

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.
Files changed (79) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +4 -4
  6. package/build/lowcode/view.js +3 -3
  7. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +26 -4
  8. package/es/components/dataSourceComponents/dataSourceForm/serve.js +2 -2
  9. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +1 -1
  10. package/es/components/dataSourceComponents/dataSourceForm/urlUtils.js +1 -1
  11. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +19 -5
  12. package/lib/components/dataSourceComponents/dataSourceForm/serve.js +1 -1
  13. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +1 -1
  14. package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.js +1 -1
  15. package/package.json +2 -2
  16. package/es/components/appVersionControl/index.d.ts +0 -4
  17. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  18. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -5
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -101
  20. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -85
  21. package/es/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
  22. package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  23. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +0 -4
  24. package/es/components/hardwareErrorTip/demo.d.ts +0 -3
  25. package/es/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  26. package/es/components/hardwareErrorTip/index.d.ts +0 -19
  27. package/es/components/iconfont/index.d.ts +0 -8
  28. package/es/components/page/index.d.ts +0 -8
  29. package/es/components/pisellCardList/index.d.ts +0 -107
  30. package/es/components/pisellGoodPassCard/index.d.ts +0 -50
  31. package/es/components/pisellQRScanner/index.d.ts +0 -24
  32. package/es/components/pisellToast/index.d.ts +0 -17
  33. package/es/components/pisellWalletPassCard/index.d.ts +0 -146
  34. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
  35. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
  36. package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
  37. package/es/components/productCard/components/Action/index.d.ts +0 -3
  38. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  39. package/es/components/productCard/components/Header/index.d.ts +0 -3
  40. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  41. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
  42. package/es/components/productCard/index.d.ts +0 -7
  43. package/es/components/select/index.d.ts +0 -9
  44. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  45. package/es/components/table/Table/AddFieldModal/index.d.ts +0 -4
  46. package/es/components/walletCard/index.d.ts +0 -77
  47. package/es/index.d.ts +0 -150
  48. package/lib/components/appVersionControl/index.d.ts +0 -4
  49. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +0 -56
  50. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -5
  51. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -101
  52. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -85
  53. package/lib/components/dataSourceComponents/fields/Input.Mobile/WithMode.d.ts +0 -17
  54. package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.d.ts +0 -16
  55. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.d.ts +0 -4
  56. package/lib/components/hardwareErrorTip/demo.d.ts +0 -3
  57. package/lib/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  58. package/lib/components/hardwareErrorTip/index.d.ts +0 -19
  59. package/lib/components/iconfont/index.d.ts +0 -8
  60. package/lib/components/page/index.d.ts +0 -8
  61. package/lib/components/pisellCardList/index.d.ts +0 -107
  62. package/lib/components/pisellGoodPassCard/index.d.ts +0 -50
  63. package/lib/components/pisellQRScanner/index.d.ts +0 -24
  64. package/lib/components/pisellToast/index.d.ts +0 -17
  65. package/lib/components/pisellWalletPassCard/index.d.ts +0 -146
  66. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
  67. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
  68. package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
  69. package/lib/components/productCard/components/Action/index.d.ts +0 -3
  70. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  71. package/lib/components/productCard/components/Header/index.d.ts +0 -3
  72. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +0 -3
  73. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
  74. package/lib/components/productCard/index.d.ts +0 -7
  75. package/lib/components/select/index.d.ts +0 -9
  76. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  77. package/lib/components/table/Table/AddFieldModal/index.d.ts +0 -4
  78. package/lib/components/walletCard/index.d.ts +0 -77
  79. package/lib/index.d.ts +0 -150
@@ -1,101 +0,0 @@
1
- import React from 'react';
2
- import { DataSourceTableProps } from '../type';
3
- import { OperationItem } from '../type';
4
- interface UseTablePropsProps {
5
- data: any;
6
- originProps: DataSourceTableProps;
7
- openDrawer: (type: OperationItem) => void;
8
- closeDrawer: () => void;
9
- refreshData: () => void;
10
- handleFilterChange: (changedFields: any, allFields: any) => void;
11
- tableRef: any;
12
- getInitialValues: () => Record<string, any>;
13
- }
14
- /**
15
- * 处理table的props
16
- * 转换title
17
- * @param props
18
- * @returns
19
- */
20
- declare const useTableProps: (props: UseTablePropsProps) => {
21
- currentComponentId: any;
22
- title: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
23
- pagination: {
24
- total: number;
25
- current: number;
26
- pageSize: number;
27
- size: string;
28
- showSizeChanger: boolean;
29
- };
30
- columns: import("./useColumns").Column[];
31
- subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
32
- buttons: any[] | null;
33
- filter: {
34
- dom: any;
35
- items: any;
36
- } | null;
37
- onRow: (record: any) => any;
38
- actionButtons: any[] | null;
39
- __id?: string | undefined;
40
- currentSettingKey?: string | undefined;
41
- titleButtons?: {
42
- show: boolean;
43
- maxCount: number;
44
- items: OperationItem[];
45
- } | undefined;
46
- tableButtons?: {
47
- show: boolean;
48
- maxCount: number;
49
- items: OperationItem[];
50
- } | undefined;
51
- operation?: {
52
- show: boolean;
53
- title: string;
54
- width: number;
55
- align: "center" | "left" | "right";
56
- fixed: false | "left" | "right";
57
- type: "link" | "button";
58
- items: OperationItem[];
59
- } | undefined;
60
- operationContent?: {
61
- [key: string]: React.ReactNode;
62
- } | undefined;
63
- dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
64
- search?: {
65
- show: boolean;
66
- placeholder: string;
67
- } | undefined;
68
- __designMode: string;
69
- componentId: string;
70
- clickToDetail?: {
71
- show: boolean;
72
- useCustomAction: boolean;
73
- actionType: string;
74
- openMode: "modal" | "drawer";
75
- openContentSize: "small" | "middle" | "large";
76
- openTitle: string;
77
- key: string;
78
- } | undefined;
79
- filterBy?: Record<string, any> | undefined;
80
- sortBy: string;
81
- tabs?: {
82
- show: boolean;
83
- type: string;
84
- items: {
85
- name: string;
86
- filterBy: Record<string, any>;
87
- sortBy: string;
88
- }[];
89
- } | undefined;
90
- onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
91
- onDeleteFinish?: ((record: Record<string, any>) => void) | undefined;
92
- extraParams?: {
93
- list?: Record<string, any> | undefined;
94
- get?: Record<string, any> | undefined;
95
- update?: Record<string, any> | undefined;
96
- create?: Record<string, any> | undefined;
97
- destroy?: Record<string, any> | undefined;
98
- } | undefined;
99
- localSettings?: import("../../../table/types").LocalSettingsType | undefined;
100
- };
101
- export default useTableProps;
@@ -1,85 +0,0 @@
1
- /// <reference types="react" />
2
- import { ColumnType } from 'antd/es/table';
3
- import { LocalSettingsType } from '../../table/types';
4
- import { DataSourceType } from '../provider/dataSource/DataSourceContext';
5
- export declare type OperationItem = {
6
- label?: string;
7
- openMode: 'modal' | 'drawer' | 'custom';
8
- openContentSize: 'small' | 'middle' | 'large';
9
- openTitle: string;
10
- actionType: 'detail' | 'edit' | 'delete' | 'custom';
11
- key: string;
12
- buttonProps?: any;
13
- onClick?: (record: any) => void;
14
- afterClose?: () => void;
15
- };
16
- export interface DataSourceTableProps {
17
- __id?: string;
18
- currentComponentId?: string;
19
- currentSettingKey?: string;
20
- title?: string | React.ReactNode | (() => React.ReactNode);
21
- subTitle?: string | React.ReactNode | (() => React.ReactNode);
22
- titleButtons?: {
23
- show: boolean;
24
- maxCount: number;
25
- items: OperationItem[];
26
- };
27
- tableButtons?: {
28
- show: boolean;
29
- maxCount: number;
30
- items: OperationItem[];
31
- };
32
- buttons?: any[];
33
- operation?: {
34
- show: boolean;
35
- title: string;
36
- width: number;
37
- align: 'left' | 'center' | 'right';
38
- fixed: 'left' | 'right' | false;
39
- type: 'link' | 'button';
40
- items: OperationItem[];
41
- };
42
- operationContent?: {
43
- [key: string]: React.ReactNode;
44
- };
45
- dataSource: DataSourceType;
46
- columns: ColumnType<any>[];
47
- filter: any;
48
- search?: {
49
- show: boolean;
50
- placeholder: string;
51
- };
52
- __designMode: string;
53
- componentId: string;
54
- clickToDetail?: {
55
- show: boolean;
56
- useCustomAction: boolean;
57
- actionType: string;
58
- openMode: 'modal' | 'drawer';
59
- openContentSize: 'small' | 'middle' | 'large';
60
- openTitle: string;
61
- key: string;
62
- };
63
- onRow?: any;
64
- filterBy?: Record<string, any>;
65
- sortBy: string;
66
- tabs?: {
67
- show: boolean;
68
- type: string;
69
- items: {
70
- name: string;
71
- filterBy: Record<string, any>;
72
- sortBy: string;
73
- }[];
74
- };
75
- onValuesChange?: (changedValues: any, values: any) => void;
76
- onDeleteFinish?: (record: Record<string, any>) => void;
77
- extraParams?: {
78
- list?: Record<string, any>;
79
- get?: Record<string, any>;
80
- update?: Record<string, any>;
81
- create?: Record<string, any>;
82
- destroy?: Record<string, any>;
83
- };
84
- localSettings?: LocalSettingsType;
85
- }
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from 'antd';
3
- import { ModeType } from '../../dataSourceForm/type';
4
- declare type PhoneValue = string | {
5
- phone: string;
6
- countryCallingCode: string;
7
- countryCode?: string;
8
- };
9
- export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
10
- renderMode: ModeType;
11
- value?: PhoneValue;
12
- onChange?: (value: PhoneValue) => void;
13
- returnFormat?: 'string' | 'object';
14
- inputRef?: any;
15
- }
16
- declare const MobileNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
17
- export default MobileNumberInputWithMode;
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { InputProps } from 'antd';
3
- import { ModeType } from "../../dataSourceForm/type";
4
- declare type PhoneValue = string | {
5
- phone: string;
6
- countryCallingCode: string;
7
- };
8
- export interface PhoneInputProps extends Omit<InputProps, 'value' | 'onChange'> {
9
- renderMode: ModeType;
10
- value?: PhoneValue;
11
- onChange?: (value: PhoneValue) => void;
12
- returnFormat?: 'string' | 'object';
13
- inputRef?: any;
14
- }
15
- declare const PhoneNumberInputWithMode: React.FC<PhoneInputProps & import("../../dataSourceForm/utils").WithModeProps>;
16
- export default PhoneNumberInputWithMode;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import { VariablesContextType } from './VariablesContext';
3
- declare const VariablesProvider: React.FC<VariablesContextType>;
4
- export default VariablesProvider;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const HardwareErrorTipDemo: React.FC;
3
- export default HardwareErrorTipDemo;
@@ -1,28 +0,0 @@
1
- import './index.less';
2
- declare const DEVICE_TYPE_MAP: {
3
- readonly printer: any;
4
- readonly barcode_scanner: any;
5
- readonly cds: any;
6
- readonly kds: any;
7
- readonly display: any;
8
- readonly card_reader: any;
9
- readonly till: any;
10
- readonly scale: any;
11
- };
12
- export interface ErrorCardData {
13
- error_level: 0 | 1 | 2 | 3;
14
- error_message: string;
15
- error_code: string;
16
- time: string;
17
- device: {
18
- device_type: keyof typeof DEVICE_TYPE_MAP;
19
- device_name: string;
20
- device_idfa: string;
21
- };
22
- }
23
- interface IErrorCardProps {
24
- data: ErrorCardData;
25
- onClose?: () => void;
26
- }
27
- declare const ErrorCard: (props: IErrorCardProps) => JSX.Element | null;
28
- export default ErrorCard;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { type StatisticsData } from './errorTipStatistics';
3
- import { type ErrorCardData } from './errorCard';
4
- import { type LogCardData } from './logCard';
5
- import './index.less';
6
- interface HardwareErrorTipProps {
7
- statistics: StatisticsData;
8
- errors?: ErrorCardData[];
9
- logs?: LogCardData[];
10
- onExportLogs?: (logs: any) => void;
11
- onCloseError?: (error: ErrorCardData, index?: number) => void;
12
- onTabChange?: (activeTab: string) => void;
13
- activeTab?: string;
14
- isLoadingErrors?: boolean;
15
- isLoadingLogs?: boolean;
16
- style?: React.CSSProperties;
17
- }
18
- declare const HardwareErrorTip: React.FC<HardwareErrorTipProps>;
19
- export default HardwareErrorTip;
@@ -1,8 +0,0 @@
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;
@@ -1,8 +0,0 @@
1
- import { ConfigProviderProps } from '../config-provider';
2
- interface PageProps extends ConfigProviderProps {
3
- variablesConfig?: {
4
- disabledHistoryListener?: boolean;
5
- };
6
- }
7
- declare const Page: (props: PageProps) => JSX.Element;
8
- export default Page;
@@ -1,107 +0,0 @@
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
- validDateBySchedule?: boolean;
36
- /** 日程列表 */
37
- scheduleList?: any[];
38
- /** 是否展示详情按钮 */
39
- showDetail?: boolean;
40
- /** 是否展示二维码 */
41
- showQrCode?: boolean;
42
- /** 是否展示封面图 */
43
- showCover?: boolean;
44
- /** 是否余额货币单位 */
45
- showBalanceSymbol?: boolean;
46
- /** 卡片大小 */
47
- type?: 'default' | 'mini';
48
- /** 展示操作按钮 */
49
- showActions?: boolean;
50
- /** 操作按钮配置 */
51
- actions?: {
52
- /** 按钮展示方式 */
53
- layout: 'expanded' | 'collapsed';
54
- /** detail 按钮配置 */
55
- detail?: {
56
- visible: boolean;
57
- iconColor: string;
58
- };
59
- /** edit按钮配置 */
60
- edit?: {
61
- visible: boolean;
62
- iconColor: string;
63
- dialogTitle: string;
64
- enableDialog: boolean;
65
- fields: {
66
- name: string;
67
- label: string;
68
- };
69
- };
70
- };
71
- /** 编辑编辑按钮后,弹窗展示之前 */
72
- beforeEdit?: (value: any, index: number) => Promise<any> | boolean | void;
73
- /** 编辑弹窗点击提交 */
74
- onConfirmEdit?: (value: any, index: number, data: any) => void;
75
- /** 是否展示状态标识 */
76
- showStatus?: boolean;
77
- /** 名称标题字号字重颜色配置 */
78
- nameTitleStyle?: {
79
- fontSize: number;
80
- fontWeight: number;
81
- color: string;
82
- };
83
- /** 开启编辑金额 */
84
- enableEditAmount?: boolean;
85
- /** 编辑金额事件 */
86
- onConfirmEditAmount?: (value: number, index: number, data: any) => void;
87
- /** 是否使用外部详情处理 */
88
- useExternalDetail?: boolean;
89
- /** 详情事件 */
90
- onDetail?: (value: any, index: number) => void;
91
- /** 自定义余额格式化函数,如果提供则优先使用 */
92
- formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
93
- /** 自定义余额标题格式化函数,如果提供则优先使用 */
94
- formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
95
- /** 自定义使用金额格式化函数,如果提供则优先使用 */
96
- formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
97
- /** 自定义使用金额标题格式化函数,如果提供则优先使用 */
98
- formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
99
- /** 编辑金额前事件 */
100
- onBeforeEditAmount?: (value: any, index: number, data: any) => Promise<any> | boolean | void;
101
- /** 选项点击事件 */
102
- onItemClick?: (e: React.MouseEvent<HTMLDivElement>, option: any) => void;
103
- /** 是否展示选中状态的背景色 */
104
- showActiveBackground?: boolean;
105
- }
106
- declare const _default: React.NamedExoticComponent<PisellCardListProps>;
107
- export default _default;
@@ -1,50 +0,0 @@
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;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface PisellQRScannerProps {
4
- /** 是否可见 */
5
- visible: boolean;
6
- /** 是否显示上传图片按钮 */
7
- showUpload?: boolean;
8
- /** 关闭回调 */
9
- onClose: () => void;
10
- /** 扫码成功回调 */
11
- onScan: (value: string) => void;
12
- /**
13
- * 样式属性,可选
14
- * 注意: 不应传入renderMode等不必要属性
15
- */
16
- style?: React.CSSProperties;
17
- /** 类名,可选 */
18
- className?: string;
19
- }
20
- /**
21
- * 二维码扫描组件
22
- */
23
- declare const PisellQRScanner: React.FC<PisellQRScannerProps>;
24
- export default PisellQRScanner;
@@ -1,17 +0,0 @@
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 { useToast } from './squareToast';
17
- export default PisellToast;
@@ -1,146 +0,0 @@
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
- validDateBySchedule?: boolean;
57
- /** 日程列表 */
58
- scheduleList?: any[];
59
- /** 是否展示右上角详情按钮 */
60
- showDetail?: boolean;
61
- /** 是否展示qrCode */
62
- showQrCode?: boolean;
63
- /** 是否展示封面 */
64
- showCover?: boolean;
65
- /** 是否展示余额货币符号 */
66
- showBalanceSymbol?: boolean;
67
- /** 展示操作按钮 */
68
- showActions?: boolean;
69
- /** 操作按钮配置 */
70
- actions?: {
71
- /** 按钮展示方式 */
72
- layout: 'expanded' | 'collapsed';
73
- /** detail 按钮配置 */
74
- detail?: {
75
- visible: boolean;
76
- iconColor: string;
77
- };
78
- /** edit按钮配置 */
79
- edit?: {
80
- visible: boolean;
81
- iconColor: string;
82
- dialogTitle: string;
83
- enableDialog: boolean;
84
- fields: {
85
- name: string;
86
- label: string;
87
- };
88
- };
89
- };
90
- /** 编辑编辑按钮后,弹窗展示之前 */
91
- beforeEdit?: (value: any) => Promise<any> | boolean | void;
92
- /** 编辑弹窗点击提交 */
93
- onConfirmEdit?: (value: any) => void;
94
- /** 编辑金额事件 */
95
- onConfirmEditAmount?: (value: number) => void;
96
- /** 详情按钮点击事件 */
97
- onDetail?: (data: {
98
- id: number;
99
- name: string;
100
- storeName: string;
101
- balance?: number;
102
- redeem?: number;
103
- code: string;
104
- validDate: string;
105
- originData?: any;
106
- }) => void;
107
- /** 是否使用外部详情处理(当为 true 且提供了 onDetail 时,不显示内部模态框) */
108
- useExternalDetail?: boolean;
109
- /** 单选或者多选 */
110
- mode?: 'multiple' | 'single';
111
- /** 是否展示选中图标 */
112
- showActiveIcon?: boolean;
113
- /** 开启编辑金额 */
114
- enableEditAmount?: boolean;
115
- /** 显示状态标识 */
116
- showStatus?: boolean;
117
- /** 名称标题字号字重颜色配置 */
118
- nameTitleStyle?: {
119
- fontSize: number;
120
- fontWeight: number;
121
- color: string;
122
- };
123
- /** 卡片状态 */
124
- cardStatus?: 'used' | 'expired' | 'disabled' | 'conflict' | 'lastPayment';
125
- /** 自定义余额格式化函数,如果提供则优先使用 */
126
- formatBalance?: (balance?: number, option?: FormatOption) => React.ReactNode;
127
- /** 自定义余额标题格式化函数,如果提供则优先使用 */
128
- formatBalanceTitle?: (balanceTitle?: string, option?: FormatOption) => React.ReactNode;
129
- /** 自定义使用金额格式化函数,如果提供则优先使用 */
130
- formatRedeem?: (redeem?: number, option?: FormatOption) => React.ReactNode;
131
- /** 自定义使用金额标题格式化函数,如果提供则优先使用 */
132
- formatRedeemTitle?: (redeemTitle?: string, option?: FormatOption) => React.ReactNode;
133
- /** 最大使用金额 */
134
- maxRedeem?: number;
135
- /** 编辑金额前事件 */
136
- onBeforeEditAmount?: (value: any) => Promise<any> | boolean | void;
137
- /** 是否显示持有人 */
138
- showHolderName?: boolean;
139
- /** 持有人, 表单记录,展示时一般取main_field */
140
- holder?: any;
141
- /** 持有人点击回调 */
142
- onSetHolder?: (currentValue?: any) => void;
143
- [key: string]: any;
144
- }
145
- declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
146
- export default PisellWalletPassCard;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Holders: (props: any) => JSX.Element | null;
3
- export default Holders;
@@ -1,6 +0,0 @@
1
- import 'dayjs/locale/zh-cn';
2
- import 'dayjs/locale/en';
3
- import 'dayjs/locale/zh-tw';
4
- import './index.less';
5
- declare const TimeRange: (props: any) => JSX.Element | null;
6
- export default TimeRange;
@@ -1,10 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Action: ({ item, onAction }: any) => JSX.Element;
3
- export default Action;