@pisell/materials 1.0.850 → 1.0.851

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 (123) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.js +13 -13
  8. package/build/lowcode/view.js +14 -14
  9. package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
  10. package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  11. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +33 -0
  13. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  14. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
  15. package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
  16. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  17. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  18. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
  19. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  20. package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
  21. package/es/components/dataSourceComponents/fields/utils.d.ts +3 -0
  22. package/es/components/date-picker/datePickerCpt.d.ts +9 -0
  23. package/es/components/filter/index.d.ts +1 -0
  24. package/es/components/list/index.d.ts +1 -0
  25. package/es/components/lowCodePage/index.d.ts +1 -0
  26. package/es/components/media/index.js +340 -0
  27. package/es/components/media/index.less +100 -0
  28. package/es/components/pisellAvatar/index.d.ts +19 -0
  29. package/es/components/pisellCardList/index.d.ts +73 -0
  30. package/es/components/pisellCheckboxGroup/index.d.ts +36 -0
  31. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  32. package/es/components/pisellGoodPassCard/index.d.ts +49 -0
  33. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  34. package/es/components/pisellInformationEntry/index.d.ts +33 -0
  35. package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
  36. package/es/components/pisellLoading/index.d.ts +1 -0
  37. package/es/components/pisellText/components/Amount/index.d.ts +20 -0
  38. package/es/components/pisellWalletPassCard/index.d.ts +85 -0
  39. package/es/components/productCard/components/Header/EditButton/index.d.ts +4 -0
  40. package/es/components/productCard/components/Header/index.d.ts +4 -0
  41. package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
  42. package/es/components/productCard/components/Note/index.d.ts +1 -0
  43. package/es/components/productCard/components/Packages/components/options/index.d.ts +1 -0
  44. package/es/components/productCard/components/Packages/index.d.ts +1 -0
  45. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  46. package/es/components/productCard/components/Sales/index.d.ts +4 -0
  47. package/es/components/productCard/components/Time/components/Like/index.d.ts +10 -0
  48. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +14 -0
  49. package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +3 -0
  50. package/es/components/productCard/components/Warning/index.js +48 -0
  51. package/es/components/productCard/index.js +8 -8
  52. package/es/components/productCard/locales.js +6 -3
  53. package/es/components/productCard/status.js +3 -1
  54. package/es/components/productCard/utils.d.ts +31 -0
  55. package/es/components/qrcode/index.d.ts +1 -0
  56. package/es/components/table/BasicTable/index.d.ts +1 -0
  57. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
  58. package/es/components/table/Table/fields/date/Show/index.d.ts +1 -0
  59. package/es/components/table/Table/fields/link/Show/index.d.ts +1 -0
  60. package/es/components/table/Table/fields/select/index.d.ts +1 -0
  61. package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  62. package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
  63. package/es/components/table/View/index.d.ts +1 -0
  64. package/es/components/walletCard/Guide/index.d.ts +4 -0
  65. package/es/utils/platform.d.ts +1 -1
  66. package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +1 -0
  67. package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +1 -0
  68. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  69. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +33 -0
  70. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  71. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +1 -0
  72. package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +1 -0
  73. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  74. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  75. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +1 -0
  76. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  77. package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
  78. package/lib/components/dataSourceComponents/fields/utils.d.ts +3 -0
  79. package/lib/components/date-picker/datePickerCpt.d.ts +9 -0
  80. package/lib/components/filter/index.d.ts +1 -0
  81. package/lib/components/list/index.d.ts +1 -0
  82. package/lib/components/lowCodePage/index.d.ts +1 -0
  83. package/lib/components/media/index.js +265 -0
  84. package/lib/components/media/index.less +100 -0
  85. package/lib/components/pisellAvatar/index.d.ts +19 -0
  86. package/lib/components/pisellCardList/index.d.ts +73 -0
  87. package/lib/components/pisellCheckboxGroup/index.d.ts +36 -0
  88. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  89. package/lib/components/pisellGoodPassCard/index.d.ts +49 -0
  90. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  91. package/lib/components/pisellInformationEntry/index.d.ts +33 -0
  92. package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
  93. package/lib/components/pisellLoading/index.d.ts +1 -0
  94. package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
  95. package/lib/components/pisellWalletPassCard/index.d.ts +85 -0
  96. package/lib/components/productCard/components/Header/EditButton/index.d.ts +4 -0
  97. package/lib/components/productCard/components/Header/index.d.ts +4 -0
  98. package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
  99. package/lib/components/productCard/components/Note/index.d.ts +1 -0
  100. package/lib/components/productCard/components/Packages/components/options/index.d.ts +1 -0
  101. package/lib/components/productCard/components/Packages/index.d.ts +1 -0
  102. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  103. package/lib/components/productCard/components/Sales/index.d.ts +4 -0
  104. package/lib/components/productCard/components/Time/components/Like/index.d.ts +10 -0
  105. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +14 -0
  106. package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +3 -0
  107. package/lib/components/productCard/components/Warning/index.js +68 -0
  108. package/lib/components/productCard/index.js +4 -11
  109. package/lib/components/productCard/locales.js +6 -3
  110. package/lib/components/productCard/status.js +3 -1
  111. package/lib/components/productCard/utils.d.ts +31 -0
  112. package/lib/components/qrcode/index.d.ts +1 -0
  113. package/lib/components/table/BasicTable/index.d.ts +1 -0
  114. package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +1 -0
  115. package/lib/components/table/Table/fields/date/Show/index.d.ts +1 -0
  116. package/lib/components/table/Table/fields/link/Show/index.d.ts +1 -0
  117. package/lib/components/table/Table/fields/select/index.d.ts +1 -0
  118. package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  119. package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
  120. package/lib/components/table/View/index.d.ts +1 -0
  121. package/lib/components/walletCard/Guide/index.d.ts +4 -0
  122. package/lib/utils/platform.d.ts +1 -1
  123. package/package.json +3 -3
@@ -0,0 +1,100 @@
1
+ .pisell-media {
2
+ .pisell-media-current-files {
3
+ margin-top: 8px;
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ gap: 8px;
7
+
8
+ .pisell-media-file-item {
9
+ position: relative;
10
+ border: 1px solid #d9d9d9;
11
+ border-radius: 6px;
12
+ padding: 4px;
13
+ display: flex;
14
+ align-items: center;
15
+ gap: 8px;
16
+
17
+ .pisell-media-file-actions {
18
+ position: absolute;
19
+ top: 4px;
20
+ right: 4px;
21
+ opacity: 0;
22
+ transition: opacity 0.2s;
23
+ }
24
+
25
+ &:hover .pisell-media-file-actions {
26
+ opacity: 1;
27
+ }
28
+ }
29
+ }
30
+
31
+ .pisell-media-modal {
32
+ .pisell-media-upload {
33
+ margin-bottom: 16px;
34
+ padding-bottom: 16px;
35
+ border-bottom: 1px solid #f0f0f0;
36
+ }
37
+
38
+ .pisell-media-list {
39
+ display: grid;
40
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
41
+ gap: 12px;
42
+ max-height: 400px;
43
+ overflow-y: auto;
44
+
45
+ .pisell-media-item {
46
+ border: 2px solid transparent;
47
+ border-radius: 8px;
48
+ padding: 8px;
49
+ cursor: pointer;
50
+ background: #fafafa;
51
+ transition: all 0.2s;
52
+ display: flex;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ text-align: center;
56
+ min-height: 120px;
57
+
58
+ &:hover {
59
+ border-color: #1890ff;
60
+ background: #f0f8ff;
61
+ }
62
+
63
+ &.selected {
64
+ border-color: #1890ff;
65
+ background: #e6f7ff;
66
+ }
67
+
68
+ .pisell-media-item-info {
69
+ margin-top: 8px;
70
+ width: 100%;
71
+
72
+ .pisell-media-item-name {
73
+ font-size: 12px;
74
+ color: #333;
75
+ margin-bottom: 4px;
76
+ overflow: hidden;
77
+ text-overflow: ellipsis;
78
+ white-space: nowrap;
79
+ }
80
+
81
+ .pisell-media-item-size {
82
+ font-size: 10px;
83
+ color: #999;
84
+ }
85
+ }
86
+ }
87
+ }
88
+
89
+ .pisell-media-selected {
90
+ margin-top: 16px;
91
+ padding: 8px 12px;
92
+ background: #f6ffed;
93
+ border: 1px solid #b7eb8f;
94
+ border-radius: 6px;
95
+ color: #52c41a;
96
+ font-size: 14px;
97
+ text-align: center;
98
+ }
99
+ }
100
+ }
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { AvatarProps } from 'antd';
3
+ import './index.less';
4
+ export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
5
+ export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
6
+ shape?: 'circle' | 'square';
7
+ size?: AvatarSize;
8
+ src?: string;
9
+ alt?: string;
10
+ icon?: React.ReactNode;
11
+ children?: React.ReactNode;
12
+ className?: string;
13
+ style?: React.CSSProperties;
14
+ useTextAvatar?: boolean;
15
+ borderRadius?: number;
16
+ onError?: () => boolean;
17
+ }
18
+ declare const PisellAvatar: React.FC<PisellAvatarProps>;
19
+ export default PisellAvatar;
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
3
+ import { PisellContextType } from '../pisell-config-provider/context';
4
+ import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
5
+ import './index.less';
6
+ export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
7
+ platform?: PisellContextType['platform'];
8
+ /** 当用户查看完所有记录时,底部会显示此消息 */
9
+ endMessage?: React.ReactNode;
10
+ /** 加载下次数据时的加载站位 */
11
+ loader?: React.ReactNode;
12
+ /** 是否有更多数据 */
13
+ hasMore: boolean;
14
+ /** 加载更多数据回调 */
15
+ loadMoreData?: () => Promise<void>;
16
+ /** 当前list数据 */
17
+ data: PisellWalletPassCardProps[];
18
+ /** list空数据时展示内容 */
19
+ empty?: React.ReactNode;
20
+ /** 是否展示空状态 */
21
+ showEmpty?: boolean;
22
+ /** 是否展示卡片名称 */
23
+ showName?: boolean;
24
+ /** 是否展示店铺名称 */
25
+ showStoreName?: boolean;
26
+ /** 是否展示核销金额 */
27
+ showRedeem?: boolean;
28
+ /** 是否展示余额 */
29
+ showBalance?: boolean;
30
+ /** 是否展示编码 */
31
+ showCode?: boolean;
32
+ /** 是否展示到期时间 */
33
+ showValidDate?: boolean;
34
+ /** 是否展示详情按钮 */
35
+ 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
+ declare const _default: React.NamedExoticComponent<PisellCardListProps>;
73
+ export default _default;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from '../pisell-config-provider/context';
3
+ import './index.less';
4
+ export interface PisellCheckboxGroupOption {
5
+ label: string;
6
+ value: string;
7
+ disabled?: boolean;
8
+ [key: string]: any;
9
+ }
10
+ declare type PisellCheckboxGroupValue = string | string[] | any;
11
+ export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
12
+ platform?: PisellContextType['platform'];
13
+ direction?: 'horizontal' | 'vertical';
14
+ fullWidth?: boolean;
15
+ gap?: number;
16
+ padding?: number;
17
+ options: PisellCheckboxGroupOption[];
18
+ onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
19
+ value?: PisellCheckboxGroupValue;
20
+ renderOption?: (option: PisellCheckboxGroupOption, active: boolean, index: number) => React.ReactNode;
21
+ rowKey?: string;
22
+ mode?: 'multiple' | 'single';
23
+ iconPosition?: 'left' | 'right' | 'hide';
24
+ optionClassName?: string;
25
+ optionActiveClassName?: string;
26
+ }
27
+ /**
28
+ * @title: PisellCheckboxGroup
29
+ * @description: 选中组件
30
+ * @param {PisellCheckboxGroupProps} props
31
+ * @return {*}
32
+ * @Author: zhiwei.Wang
33
+ * @Date: 2024-08-16 10:34
34
+ */
35
+ declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
36
+ export default PisellCheckboxGroup;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellCustomCheckboxGroupProps {
4
+ dataSource?: any[];
5
+ disabled?: boolean;
6
+ allowAdd?: boolean;
7
+ isMultiple?: boolean;
8
+ id?: string | string[];
9
+ onClick?: (value: any) => void;
10
+ onAdd?: () => void;
11
+ renderAddItem?: (item: any) => React.ReactNode;
12
+ [key: string]: any;
13
+ className?: string;
14
+ }
15
+ declare const PisellCustomCheckboxGroup: React.FC<PisellCustomCheckboxGroupProps>;
16
+ export default PisellCustomCheckboxGroup;
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface ApplicableProductDetails {
4
+ amount: string;
5
+ type: string;
6
+ resource_id: number;
7
+ title: string;
8
+ original_amount: string;
9
+ }
10
+ interface Discount {
11
+ id: number;
12
+ product_name: string;
13
+ encoded: string;
14
+ code: string;
15
+ tag: string;
16
+ expire_time?: string;
17
+ product_id: number;
18
+ relation_type: string;
19
+ par_value: string;
20
+ used_par_value: string;
21
+ limit_status: string;
22
+ limited_relation_product_data: any;
23
+ balance: string;
24
+ format_title: any;
25
+ product: any;
26
+ savedAmount: number;
27
+ isDisabled: boolean;
28
+ isSelected?: boolean;
29
+ isAvailable?: boolean;
30
+ isUsed?: boolean;
31
+ applicableProductIds?: number[];
32
+ applicableProductDetails: ApplicableProductDetails[];
33
+ appliedProductDetails: any[];
34
+ }
35
+ export interface PisellGoodPassCardProps {
36
+ /**数据源 */
37
+ dataSource: Array<Discount>;
38
+ /**事件 */
39
+ onChange?: (current: {
40
+ id: string | number;
41
+ isSelected: boolean;
42
+ }) => void;
43
+ /**样式 */
44
+ style: React.CSSProperties;
45
+ /**快捷展示排序 */
46
+ mixedSort?: (val: Discount[]) => Discount[];
47
+ }
48
+ declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
49
+ export default index;
@@ -0,0 +1,4 @@
1
+ export declare const useNativeScanner: (onChange?: ((val: string) => void) | undefined) => {
2
+ activeNativeScanner: () => void;
3
+ isTerminal: any;
4
+ };
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from '../pisell-config-provider/context';
3
+ import './index.less';
4
+ export declare type EntryModeType = {
5
+ /**
6
+ * 录入模式名称
7
+ * scanCode: 扫码录入
8
+ * input: 手动录入
9
+ * scanner: 扫码枪录入
10
+ * nfc: NFC录入
11
+ */
12
+ type: 'scanCode' | 'input' | 'scanner' | 'nfc';
13
+ /**
14
+ * 录入模式文案 没有使用默认文案
15
+ */
16
+ name?: string;
17
+ };
18
+ export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
19
+ /** 平台 */
20
+ platform?: PisellContextType['platform'];
21
+ /** 录入模式 */
22
+ entryModes: EntryModeType[];
23
+ /** 标题文案 */
24
+ title?: React.ReactNode;
25
+ /** 搜索框描述文案 */
26
+ searchDescribe?: React.ReactNode;
27
+ /** 录入信息值改变 */
28
+ onChange?: (val: string) => void;
29
+ /** 录入类型切换时候触发的 */
30
+ onChangeType?: (val: null | EntryModeType['type']) => void;
31
+ }
32
+ declare const PisellInformationEntry: (props: PisellInformationEntryProps) => JSX.Element;
33
+ export default PisellInformationEntry;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InputProps, ButtonProps } from 'antd';
2
3
  import { PisellContextType } from "../../../pisell-config-provider/context";
3
4
  export interface CopyProps extends InputProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SpinProps } from 'antd';
2
3
  import './index.less';
3
4
  declare type MaskType = {
@@ -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,85 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ export interface PisellWalletPassCardProps {
4
+ id: number;
5
+ /** 卡片样式 */
6
+ type: 'default' | 'mini';
7
+ /** 商品名称 */
8
+ name: string;
9
+ /** 二维码 */
10
+ qrCode: string;
11
+ /** 共享店铺名称 */
12
+ storeName: string;
13
+ /** 余额 */
14
+ balance?: number;
15
+ /** 识别码编号 */
16
+ code: string;
17
+ /** 有效期 */
18
+ validDate: string;
19
+ /** 使用金额 */
20
+ redeem?: number;
21
+ /** 是否禁用 */
22
+ disabled?: boolean;
23
+ /** 禁用原因 */
24
+ disabledReason?: string;
25
+ /** 是否展示禁用原因 */
26
+ showDisabledReason?: boolean;
27
+ /** 封面图 */
28
+ cover?: string;
29
+ /** 余额标题文案 */
30
+ balanceTitle?: string;
31
+ /** 使用金额标题文案 */
32
+ redeemTitle?: string;
33
+ /** 是否选中 */
34
+ active?: boolean;
35
+ /** 是否展示商品名称 */
36
+ showName?: boolean;
37
+ /** 是否展示共享店铺名称 */
38
+ showStoreName?: boolean;
39
+ /** 是否展示使用金额 */
40
+ showRedeem?: boolean;
41
+ /** 是否展示余额 */
42
+ showBalance?: boolean;
43
+ /** 是否展示识别码编号 */
44
+ showCode?: boolean;
45
+ /** 是否展示有效期 */
46
+ showValidDate?: boolean;
47
+ /** 是否展示右上角详情按钮 */
48
+ showDetail?: boolean;
49
+ /** 是否展示qrCode */
50
+ showQrCode?: boolean;
51
+ /** 是否展示封面 */
52
+ showCover?: boolean;
53
+ /** 是否展示余额货币符号 */
54
+ showBalanceSymbol?: boolean;
55
+ /** 展示操作按钮 */
56
+ showActions?: boolean;
57
+ /** 操作按钮配置 */
58
+ actions?: {
59
+ /** 按钮展示方式 */
60
+ layout: 'expanded' | 'collapsed';
61
+ /** detail 按钮配置 */
62
+ detail?: {
63
+ visible: boolean;
64
+ iconColor: string;
65
+ };
66
+ /** edit按钮配置 */
67
+ edit?: {
68
+ visible: boolean;
69
+ iconColor: string;
70
+ dialogTitle: string;
71
+ enableDialog: boolean;
72
+ fields: {
73
+ name: string;
74
+ label: string;
75
+ };
76
+ };
77
+ };
78
+ /** 编辑编辑按钮后,弹窗展示之前 */
79
+ beforeEdit?: (value: any) => Promise<any> | boolean | void;
80
+ /** 编辑弹窗点击提交 */
81
+ onConfirmEdit?: (value: any) => void;
82
+ [key: string]: any;
83
+ }
84
+ declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
85
+ export default PisellWalletPassCard;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const EditButton: ({ onEdit }: any) => JSX.Element;
4
+ export default EditButton;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const Header: (props: any) => JSX.Element;
4
+ export default Header;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
4
+ export default MultiDay;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Note: (props: any) => JSX.Element | null;
3
4
  export default Note;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Options: ({ options, amountSymbol }: any) => JSX.Element | null;
3
4
  export default Options;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Packages: ({ item, isShowPackageNote }: any) => JSX.Element | null;
3
4
  export default Packages;
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
17
17
  * @Author: WangHan
18
18
  * @Date: 2024-11-22 10:58
19
19
  */
20
- export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const Sales: ({ item, isShowNote }: any) => JSX.Element | null;
4
+ export default Sales;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const Like: ({ status, onLike, className, style, isShowChangeResource, }: {
4
+ style?: any;
5
+ status: string;
6
+ onLike?: any;
7
+ className?: string | undefined;
8
+ isShowChangeResource?: boolean | undefined;
9
+ }) => JSX.Element;
10
+ export default Like;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ interface SelectHolderModalProps {
4
+ visible: boolean;
5
+ onClose: () => void;
6
+ onConfirm: (value: any) => void;
7
+ lists: any[];
8
+ value: any[];
9
+ holderMaxCount: number;
10
+ addHolderButtonText: string;
11
+ onAdd: () => void;
12
+ }
13
+ declare const SelectHolderModal: (props: SelectHolderModalProps) => JSX.Element;
14
+ export default SelectHolderModal;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const SelectHolderMultiple: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => JSX.Element;
3
+ export default SelectHolderMultiple;
@@ -0,0 +1,68 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/productCard/components/Warning/index.tsx
30
+ var Warning_exports = {};
31
+ __export(Warning_exports, {
32
+ default: () => Warning_default
33
+ });
34
+ module.exports = __toCommonJS(Warning_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
37
+ var import_antd = require("antd");
38
+ var import__ = require("../../index.less");
39
+ var Warning = ({ errorMessage, osWainTips }) => {
40
+ const errorLists = (0, import_react.useMemo)(() => {
41
+ if (errorMessage) {
42
+ if (Array.isArray(errorMessage)) {
43
+ return errorMessage;
44
+ }
45
+ if (typeof errorMessage === "string") {
46
+ return [errorMessage];
47
+ }
48
+ }
49
+ if ((osWainTips == null ? void 0 : osWainTips.length) > 0) {
50
+ return osWainTips.map((item) => import_utils.locales.getText(item));
51
+ }
52
+ return [];
53
+ }, [errorMessage, osWainTips]);
54
+ if ((errorLists == null ? void 0 : errorLists.length) === 0) {
55
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
56
+ }
57
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, errorLists.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
58
+ import_antd.Alert,
59
+ {
60
+ key: index,
61
+ message: item,
62
+ type: "warning",
63
+ showIcon: true,
64
+ className: "pisell-lowcode-product-card-error"
65
+ }
66
+ )));
67
+ };
68
+ var Warning_default = Warning;
@@ -34,7 +34,6 @@ __export(productCard_exports, {
34
34
  module.exports = __toCommonJS(productCard_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_classnames = __toESM(require("classnames"));
37
- var import_antd = require("antd");
38
37
  var import_utils = require("@pisell/utils");
39
38
  var import_cardPro = __toESM(require("../cardPro"));
40
39
  var import_Header = __toESM(require("./components/Header"));
@@ -50,6 +49,7 @@ var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
50
49
  var import_locales = __toESM(require("./locales"));
51
50
  var import_status = require("./status");
52
51
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
52
+ var import_Warning = __toESM(require("./components/Warning"));
53
53
  var import_index = require("./index.less");
54
54
  var ProductCard = (props) => {
55
55
  var _a, _b;
@@ -84,7 +84,8 @@ var ProductCard = (props) => {
84
84
  isShowAction,
85
85
  actionText,
86
86
  errorMessage,
87
- isNormalProduct
87
+ isNormalProduct,
88
+ osWainTips = []
88
89
  } = dataSource;
89
90
  const showImage = (0, import_react.useMemo)(() => {
90
91
  return isShowImage && image;
@@ -180,15 +181,7 @@ var ProductCard = (props) => {
180
181
  onAction: () => onAction == null ? void 0 : onAction(dataSource)
181
182
  }
182
183
  ) : null,
183
- errorMessage ? /* @__PURE__ */ import_react.default.createElement(
184
- import_antd.Alert,
185
- {
186
- message: errorMessage,
187
- type: "warning",
188
- showIcon: true,
189
- className: "pisell-lowcode-product-card-error"
190
- }
191
- ) : null
184
+ /* @__PURE__ */ import_react.default.createElement(import_Warning.default, { errorMessage, osWainTips })
192
185
  ), /* @__PURE__ */ import_react.default.createElement(
193
186
  import_useOpenNote.default,
194
187
  {