@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,48 @@
1
+ import React, { useMemo } from 'react';
2
+ import { locales } from '@pisell/utils';
3
+ import { Alert } from 'antd';
4
+ import "../../index.less";
5
+ var Warning = function Warning(_ref) {
6
+ var errorMessage = _ref.errorMessage,
7
+ osWainTips = _ref.osWainTips;
8
+ /**
9
+ * @title: 错误提示列表
10
+ * @description: 错误提示列表
11
+ * @param {*} useMemo
12
+ * @return {*}
13
+ * @Author: WangHan
14
+ * @Date: 2025-07-23 10:10
15
+ */
16
+ var errorLists = useMemo(function () {
17
+ if (errorMessage) {
18
+ // 如果errorMessage是数组,则返回数组
19
+ if (Array.isArray(errorMessage)) {
20
+ return errorMessage;
21
+ }
22
+
23
+ // 如果errorMessage是字符串,则返回字符串
24
+ if (typeof errorMessage === 'string') {
25
+ return [errorMessage];
26
+ }
27
+ }
28
+ if ((osWainTips === null || osWainTips === void 0 ? void 0 : osWainTips.length) > 0) {
29
+ return osWainTips.map(function (item) {
30
+ return locales.getText(item);
31
+ });
32
+ }
33
+ return [];
34
+ }, [errorMessage, osWainTips]);
35
+ if ((errorLists === null || errorLists === void 0 ? void 0 : errorLists.length) === 0) {
36
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
37
+ }
38
+ return /*#__PURE__*/React.createElement(React.Fragment, null, errorLists.map(function (item, index) {
39
+ return /*#__PURE__*/React.createElement(Alert, {
40
+ key: index,
41
+ message: item,
42
+ type: "warning",
43
+ showIcon: true,
44
+ className: "pisell-lowcode-product-card-error"
45
+ });
46
+ }));
47
+ };
48
+ export default Warning;
@@ -10,7 +10,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  import React, { useMemo, useRef } from 'react';
12
12
  import classNames from 'classnames';
13
- import { Alert } from 'antd';
14
13
  import { locales } from '@pisell/utils';
15
14
  import CardPro from "../cardPro";
16
15
  import Header from "./components/Header";
@@ -26,6 +25,7 @@ import UseOpenNote from "./hooks/useOpenNote";
26
25
  import localeTexts from "./locales";
27
26
  import { defaultValue } from "./status";
28
27
  import useEngineContext from "../../hooks/useEngineContext";
28
+ import Warning from "./components/Warning";
29
29
  import "./index.less";
30
30
  var ProductCard = function ProductCard(props) {
31
31
  var _utils$storage, _dataSource$items;
@@ -64,7 +64,9 @@ var ProductCard = function ProductCard(props) {
64
64
  isShowAction = dataSource.isShowAction,
65
65
  actionText = dataSource.actionText,
66
66
  errorMessage = dataSource.errorMessage,
67
- isNormalProduct = dataSource.isNormalProduct;
67
+ isNormalProduct = dataSource.isNormalProduct,
68
+ _dataSource$osWainTip = dataSource.osWainTips,
69
+ osWainTips = _dataSource$osWainTip === void 0 ? [] : _dataSource$osWainTip;
68
70
 
69
71
  /**
70
72
  * @title: 显示图片
@@ -159,12 +161,10 @@ var ProductCard = function ProductCard(props) {
159
161
  onAction: function onAction() {
160
162
  return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
161
163
  }
162
- }) : null, errorMessage ? /*#__PURE__*/React.createElement(Alert, {
163
- message: errorMessage,
164
- type: "warning",
165
- showIcon: true,
166
- className: "pisell-lowcode-product-card-error"
167
- }) : null), /*#__PURE__*/React.createElement(UseOpenNote, {
164
+ }) : null, /*#__PURE__*/React.createElement(Warning, {
165
+ errorMessage: errorMessage,
166
+ osWainTips: osWainTips
167
+ })), /*#__PURE__*/React.createElement(UseOpenNote, {
168
168
  ref: useOpenNoteRef,
169
169
  onNoteChange: function onNoteChange(e) {
170
170
  onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
@@ -37,7 +37,8 @@ export default {
37
37
  'pisell2.product.card.add.holder.modal.cancel': 'Cancel',
38
38
  'pisell2.product.card.add.holder.modal.clear': 'Clear',
39
39
  'pisell2.product.card.add.holder.modal.apply': 'Apply',
40
- 'pisell2.product.card.add.holder.modal.add': 'Add New'
40
+ 'pisell2.product.card.add.holder.modal.add': 'Add New',
41
+ 'pisell2.product.card.closing-soon.warning': 'The venue will close soon. Please make sure you have enough time for your visit.'
41
42
  },
42
43
  'zh-CN': {
43
44
  'pisell2.product.card.edit': '编辑',
@@ -77,7 +78,8 @@ export default {
77
78
  'pisell2.product.card.add.holder.modal.cancel': '取消',
78
79
  'pisell2.product.card.add.holder.modal.clear': '清除',
79
80
  'pisell2.product.card.add.holder.modal.apply': '应用',
80
- 'pisell2.product.card.add.holder.modal.add': '添加'
81
+ 'pisell2.product.card.add.holder.modal.add': '添加',
82
+ 'pisell2.product.card.closing-soon.warning': '当前入场时间临近营业结束,请确认是否仍要购买。'
81
83
  },
82
84
  'zh-HK': {
83
85
  'pisell2.product.card.edit': '編輯',
@@ -117,6 +119,7 @@ export default {
117
119
  'pisell2.product.card.add.holder.modal.cancel': '取消',
118
120
  'pisell2.product.card.add.holder.modal.clear': '清除',
119
121
  'pisell2.product.card.add.holder.modal.apply': '應用',
120
- 'pisell2.product.card.add.holder.modal.add': '添加'
122
+ 'pisell2.product.card.add.holder.modal.add': '添加',
123
+ 'pisell2.product.card.closing-soon.warning': '當前入場時間臨近營業結束,請確認是否仍要購買。'
121
124
  }
122
125
  };
@@ -64,5 +64,7 @@ export var defaultValue = {
64
64
  isShowPackageNote: true,
65
65
  isShowEditProduct: false,
66
66
  locale: 'en-US',
67
- symbol: '$'
67
+ symbol: '$',
68
+ // os层自定义错误提示
69
+ osWainTips: []
68
70
  };