@pisell/private-materials 6.3.33 → 6.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -8
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/customSelect/index.js +18 -3
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +98 -66
- package/es/components/walletList/serve.d.ts +4 -0
- package/es/components/walletList/serve.js +46 -13
- package/es/components/walletList/types/index.d.ts +12 -12
- package/es/components/walletList/types/index.js +2 -2
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/es/plus/productSelect/CategoryTabs/index.js +6 -3
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/es/plus/productSelect/utils.js +0 -1
- package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/es/plus/walletEditor/WalletEditor.js +316 -0
- package/es/plus/walletEditor/WalletEditor.less +129 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
- package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
- package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/es/plus/walletEditor/index.d.ts +3 -0
- package/es/plus/walletEditor/index.js +3 -0
- package/es/plus/walletEditor/locales.d.ts +126 -0
- package/es/plus/walletEditor/locales.js +143 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletEditor/types.js +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
- package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
- package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/passList/index.js +115 -0
- package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
- package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
- package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/es/plus/walletPassGallery/index.d.ts +6 -0
- package/es/plus/walletPassGallery/index.js +602 -0
- package/es/plus/walletPassGallery/index.less +115 -0
- package/es/plus/walletPassGallery/locales.d.ts +270 -0
- package/es/plus/walletPassGallery/locales.js +279 -0
- package/es/plus/walletPassGallery/serve.d.ts +218 -0
- package/es/plus/walletPassGallery/serve.js +289 -0
- package/es/pro/Login2.0/Login2.js +8 -1
- package/es/pro/Login2.0/locales.js +93 -93
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/customSelect/index.js +22 -3
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +90 -51
- package/lib/components/walletList/serve.d.ts +4 -0
- package/lib/components/walletList/serve.js +12 -0
- package/lib/components/walletList/types/index.d.ts +12 -12
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/lib/plus/productSelect/utils.js +0 -1
- package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/lib/plus/walletEditor/WalletEditor.js +354 -0
- package/lib/plus/walletEditor/WalletEditor.less +129 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
- package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/lib/plus/walletEditor/index.d.ts +3 -0
- package/lib/plus/walletEditor/index.js +42 -0
- package/lib/plus/walletEditor/locales.d.ts +126 -0
- package/lib/plus/walletEditor/locales.js +167 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletEditor/types.js +17 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
- package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
- package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/lib/plus/walletPassGallery/index.d.ts +6 -0
- package/lib/plus/walletPassGallery/index.js +498 -0
- package/lib/plus/walletPassGallery/index.less +115 -0
- package/lib/plus/walletPassGallery/locales.d.ts +270 -0
- package/lib/plus/walletPassGallery/locales.js +299 -0
- package/lib/plus/walletPassGallery/serve.d.ts +218 -0
- package/lib/plus/walletPassGallery/serve.js +98 -0
- package/lib/pro/Login2.0/Login2.js +6 -0
- package/lib/pro/Login2.0/locales.js +93 -93
- package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
- package/lowcode/wallet-editor/meta.ts +57 -0
- package/lowcode/wallet-editor/snippets.ts +13 -0
- package/lowcode/wallet-pass-gallery/meta.ts +35 -0
- package/package.json +3 -3
- package/lowcode/wallet/meta.ts +0 -79
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
walletName: string;
|
|
4
|
+
validityPeriod: string;
|
|
5
|
+
linkedPasses: string;
|
|
6
|
+
linkedPassesDesc: string;
|
|
7
|
+
sort: string;
|
|
8
|
+
status: string;
|
|
9
|
+
distributionConditions: string;
|
|
10
|
+
selectPasses: string;
|
|
11
|
+
backgroundImage: string;
|
|
12
|
+
advancedSettings: string;
|
|
13
|
+
sendConfig: string;
|
|
14
|
+
displaySettings: string;
|
|
15
|
+
viewPreview: string;
|
|
16
|
+
coverImage: string;
|
|
17
|
+
icon: string;
|
|
18
|
+
upload: string;
|
|
19
|
+
enable: string;
|
|
20
|
+
disable: string;
|
|
21
|
+
barCode: string;
|
|
22
|
+
qrCode: string;
|
|
23
|
+
day: string;
|
|
24
|
+
days: string;
|
|
25
|
+
month: string;
|
|
26
|
+
months: string;
|
|
27
|
+
year: string;
|
|
28
|
+
years: string;
|
|
29
|
+
forever: string;
|
|
30
|
+
custom: string;
|
|
31
|
+
balance: string;
|
|
32
|
+
point: string;
|
|
33
|
+
voucher: string;
|
|
34
|
+
discount: string;
|
|
35
|
+
rechargeable: string;
|
|
36
|
+
pleaseInputWalletName: string;
|
|
37
|
+
enterCoverImageURL: string;
|
|
38
|
+
enterJSONConfig: string;
|
|
39
|
+
selectValidityPeriod: string;
|
|
40
|
+
selectCustomDate: string;
|
|
41
|
+
registerToIssue: string;
|
|
42
|
+
};
|
|
43
|
+
'zh-CN': {
|
|
44
|
+
walletName: string;
|
|
45
|
+
validityPeriod: string;
|
|
46
|
+
linkedPasses: string;
|
|
47
|
+
linkedPassesDesc: string;
|
|
48
|
+
sort: string;
|
|
49
|
+
status: string;
|
|
50
|
+
distributionConditions: string;
|
|
51
|
+
selectPasses: string;
|
|
52
|
+
backgroundImage: string;
|
|
53
|
+
advancedSettings: string;
|
|
54
|
+
sendConfig: string;
|
|
55
|
+
displaySettings: string;
|
|
56
|
+
viewPreview: string;
|
|
57
|
+
coverImage: string;
|
|
58
|
+
icon: string;
|
|
59
|
+
upload: string;
|
|
60
|
+
enable: string;
|
|
61
|
+
disable: string;
|
|
62
|
+
barCode: string;
|
|
63
|
+
qrCode: string;
|
|
64
|
+
day: string;
|
|
65
|
+
days: string;
|
|
66
|
+
month: string;
|
|
67
|
+
months: string;
|
|
68
|
+
year: string;
|
|
69
|
+
years: string;
|
|
70
|
+
forever: string;
|
|
71
|
+
custom: string;
|
|
72
|
+
balance: string;
|
|
73
|
+
point: string;
|
|
74
|
+
voucher: string;
|
|
75
|
+
discount: string;
|
|
76
|
+
rechargeable: string;
|
|
77
|
+
pleaseInputWalletName: string;
|
|
78
|
+
enterCoverImageURL: string;
|
|
79
|
+
enterJSONConfig: string;
|
|
80
|
+
selectValidityPeriod: string;
|
|
81
|
+
selectCustomDate: string;
|
|
82
|
+
registerToIssue: string;
|
|
83
|
+
};
|
|
84
|
+
'zh-HK': {
|
|
85
|
+
walletName: string;
|
|
86
|
+
validityPeriod: string;
|
|
87
|
+
linkedPasses: string;
|
|
88
|
+
linkedPassesDesc: string;
|
|
89
|
+
sort: string;
|
|
90
|
+
status: string;
|
|
91
|
+
distributionConditions: string;
|
|
92
|
+
selectPasses: string;
|
|
93
|
+
backgroundImage: string;
|
|
94
|
+
advancedSettings: string;
|
|
95
|
+
sendConfig: string;
|
|
96
|
+
displaySettings: string;
|
|
97
|
+
viewPreview: string;
|
|
98
|
+
coverImage: string;
|
|
99
|
+
icon: string;
|
|
100
|
+
upload: string;
|
|
101
|
+
enable: string;
|
|
102
|
+
disable: string;
|
|
103
|
+
barCode: string;
|
|
104
|
+
qrCode: string;
|
|
105
|
+
day: string;
|
|
106
|
+
days: string;
|
|
107
|
+
month: string;
|
|
108
|
+
months: string;
|
|
109
|
+
year: string;
|
|
110
|
+
years: string;
|
|
111
|
+
forever: string;
|
|
112
|
+
custom: string;
|
|
113
|
+
balance: string;
|
|
114
|
+
point: string;
|
|
115
|
+
voucher: string;
|
|
116
|
+
discount: string;
|
|
117
|
+
rechargeable: string;
|
|
118
|
+
pleaseInputWalletName: string;
|
|
119
|
+
enterCoverImageURL: string;
|
|
120
|
+
enterJSONConfig: string;
|
|
121
|
+
selectValidityPeriod: string;
|
|
122
|
+
selectCustomDate: string;
|
|
123
|
+
registerToIssue: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
export default _default;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
// Form Labels
|
|
4
|
+
walletName: 'Wallet name',
|
|
5
|
+
validityPeriod: 'Validity Period',
|
|
6
|
+
linkedPasses: 'Linked passes',
|
|
7
|
+
linkedPassesDesc: 'Select the passes that will be available in this Wallet.',
|
|
8
|
+
sort: 'Sort',
|
|
9
|
+
status: 'Status',
|
|
10
|
+
distributionConditions: 'Issuance conditions',
|
|
11
|
+
selectPasses: 'Select passes',
|
|
12
|
+
backgroundImage: 'Background image',
|
|
13
|
+
advancedSettings: 'Advanced Settings',
|
|
14
|
+
sendConfig: 'Send Config',
|
|
15
|
+
displaySettings: 'Display settings',
|
|
16
|
+
viewPreview: 'View Preview',
|
|
17
|
+
coverImage: 'Cover Image',
|
|
18
|
+
icon: 'Icon',
|
|
19
|
+
upload: 'Upload',
|
|
20
|
+
// Status Options
|
|
21
|
+
enable: 'Enable',
|
|
22
|
+
disable: 'Disable',
|
|
23
|
+
// Barcode Types
|
|
24
|
+
barCode: 'Barcode',
|
|
25
|
+
qrCode: 'QR Code',
|
|
26
|
+
// Validity Period Options
|
|
27
|
+
day: 'day',
|
|
28
|
+
days: 'days',
|
|
29
|
+
month: 'month',
|
|
30
|
+
months: 'months',
|
|
31
|
+
year: 'year',
|
|
32
|
+
years: 'years',
|
|
33
|
+
forever: 'Forever',
|
|
34
|
+
custom: 'Custom',
|
|
35
|
+
// Wallet Pass Types
|
|
36
|
+
balance: 'Balance',
|
|
37
|
+
point: 'Points',
|
|
38
|
+
voucher: 'Voucher',
|
|
39
|
+
discount: 'Discount',
|
|
40
|
+
rechargeable: 'Rechargeable',
|
|
41
|
+
// Messages
|
|
42
|
+
pleaseInputWalletName: 'Please input wallet name!',
|
|
43
|
+
enterCoverImageURL: 'Enter cover image URL',
|
|
44
|
+
enterJSONConfig: 'Enter JSON config, e.g. {"type": "register"}',
|
|
45
|
+
selectValidityPeriod: 'Select validity period',
|
|
46
|
+
selectCustomDate: 'Select custom date',
|
|
47
|
+
registerToIssue: 'Register to issue'
|
|
48
|
+
},
|
|
49
|
+
'zh-CN': {
|
|
50
|
+
// 表单标签
|
|
51
|
+
walletName: '钱包名称',
|
|
52
|
+
validityPeriod: '有效期',
|
|
53
|
+
linkedPasses: '包含的卡券',
|
|
54
|
+
linkedPassesDesc: '选择此 Wallet 中可展示与使用的卡券。',
|
|
55
|
+
sort: '排序',
|
|
56
|
+
status: '状态',
|
|
57
|
+
distributionConditions: '发放条件',
|
|
58
|
+
selectPasses: '选择卡券',
|
|
59
|
+
backgroundImage: '背景图',
|
|
60
|
+
advancedSettings: '高级设置',
|
|
61
|
+
sendConfig: '发送配置',
|
|
62
|
+
displaySettings: '显示设置',
|
|
63
|
+
viewPreview: '查看预览',
|
|
64
|
+
coverImage: '封面图片',
|
|
65
|
+
icon: '图标',
|
|
66
|
+
upload: '上传',
|
|
67
|
+
// 状态选项
|
|
68
|
+
enable: '启用',
|
|
69
|
+
disable: '禁用',
|
|
70
|
+
// 条形码类型
|
|
71
|
+
barCode: '条形码',
|
|
72
|
+
qrCode: '二维码',
|
|
73
|
+
// 有效期选项
|
|
74
|
+
day: '天',
|
|
75
|
+
days: '天',
|
|
76
|
+
month: '个月',
|
|
77
|
+
months: '个月',
|
|
78
|
+
year: '年',
|
|
79
|
+
years: '年',
|
|
80
|
+
forever: '永久',
|
|
81
|
+
custom: '自定义',
|
|
82
|
+
// 钱包通行证类型
|
|
83
|
+
balance: '余额',
|
|
84
|
+
point: '积分',
|
|
85
|
+
voucher: '代金券',
|
|
86
|
+
discount: '折扣券',
|
|
87
|
+
rechargeable: '充值卡',
|
|
88
|
+
// 消息
|
|
89
|
+
pleaseInputWalletName: '请输入钱包名称!',
|
|
90
|
+
enterCoverImageURL: '输入封面图片URL',
|
|
91
|
+
enterJSONConfig: '输入JSON配置,例如 {"type": "register"}',
|
|
92
|
+
selectValidityPeriod: '选择有效期',
|
|
93
|
+
selectCustomDate: '选择自定义日期',
|
|
94
|
+
registerToIssue: '注册即发放'
|
|
95
|
+
},
|
|
96
|
+
'zh-HK': {
|
|
97
|
+
// 表單標籤
|
|
98
|
+
walletName: '錢包名稱',
|
|
99
|
+
validityPeriod: '有效期',
|
|
100
|
+
linkedPasses: '包含的卡券',
|
|
101
|
+
linkedPassesDesc: '選擇此 Wallet 中可展示與使用的卡券。',
|
|
102
|
+
sort: '排序',
|
|
103
|
+
status: '狀態',
|
|
104
|
+
distributionConditions: '發放條件',
|
|
105
|
+
selectPasses: '選擇卡券',
|
|
106
|
+
backgroundImage: '背景圖',
|
|
107
|
+
advancedSettings: '高級設置',
|
|
108
|
+
sendConfig: '發送配置',
|
|
109
|
+
displaySettings: '顯示設置',
|
|
110
|
+
viewPreview: '查看預覽',
|
|
111
|
+
coverImage: '封面圖片',
|
|
112
|
+
icon: '圖標',
|
|
113
|
+
upload: '上傳',
|
|
114
|
+
// 狀態選項
|
|
115
|
+
enable: '啟用',
|
|
116
|
+
disable: '禁用',
|
|
117
|
+
// 條形碼類型
|
|
118
|
+
barCode: '條形碼',
|
|
119
|
+
qrCode: '二維碼',
|
|
120
|
+
// 有效期選項
|
|
121
|
+
day: '天',
|
|
122
|
+
days: '天',
|
|
123
|
+
month: '個月',
|
|
124
|
+
months: '個月',
|
|
125
|
+
year: '年',
|
|
126
|
+
years: '年',
|
|
127
|
+
forever: '永久',
|
|
128
|
+
custom: '自定義',
|
|
129
|
+
// 錢包通行證類型
|
|
130
|
+
balance: '餘額',
|
|
131
|
+
point: '積分',
|
|
132
|
+
voucher: '代金券',
|
|
133
|
+
discount: '折扣券',
|
|
134
|
+
rechargeable: '充值卡',
|
|
135
|
+
// 消息
|
|
136
|
+
pleaseInputWalletName: '請輸入錢包名稱!',
|
|
137
|
+
enterCoverImageURL: '輸入封面圖片URL',
|
|
138
|
+
enterJSONConfig: '輸入JSON配置,例如 {"type": "register"}',
|
|
139
|
+
selectValidityPeriod: '選擇有效期',
|
|
140
|
+
selectCustomDate: '選擇自定義日期',
|
|
141
|
+
registerToIssue: '註冊即發放'
|
|
142
|
+
}
|
|
143
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FormInstance } from 'antd';
|
|
3
|
+
export interface MultiLanguageTitle {
|
|
4
|
+
original?: string;
|
|
5
|
+
'zh-CN'?: string;
|
|
6
|
+
'zh-HK'?: string;
|
|
7
|
+
en?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ValidForConfig {
|
|
10
|
+
unit: string;
|
|
11
|
+
unit_type: 'day' | 'month' | 'year';
|
|
12
|
+
type: 'normal' | 'custom' | 'forever';
|
|
13
|
+
custom_date?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare type WalletPassType = 'balance' | 'point' | 'voucher' | 'discount' | 'rechargeable';
|
|
16
|
+
export interface ShowcaseWalletPassItem {
|
|
17
|
+
type: WalletPassType;
|
|
18
|
+
display: 0 | 1;
|
|
19
|
+
name?: MultiLanguageTitle;
|
|
20
|
+
custom_title?: MultiLanguageTitle;
|
|
21
|
+
}
|
|
22
|
+
export interface SendConfig {
|
|
23
|
+
type: string;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}
|
|
26
|
+
export interface WalletMetadata {
|
|
27
|
+
showcaseWalletPass?: string[];
|
|
28
|
+
showcaseWalletPassNew?: ShowcaseWalletPassItem[];
|
|
29
|
+
welcomeText?: string;
|
|
30
|
+
customerName?: string;
|
|
31
|
+
coverImage?: string;
|
|
32
|
+
send_config?: SendConfig;
|
|
33
|
+
}
|
|
34
|
+
export interface WalletEditorValue {
|
|
35
|
+
name?: MultiLanguageTitle;
|
|
36
|
+
status: 'enable' | 'disable';
|
|
37
|
+
valid_for: ValidForConfig;
|
|
38
|
+
metadata: WalletMetadata;
|
|
39
|
+
}
|
|
40
|
+
export interface WalletEditorRef {
|
|
41
|
+
form: FormInstance;
|
|
42
|
+
setInitialValues: (values: WalletEditorValue) => void;
|
|
43
|
+
getValues: () => WalletEditorValue;
|
|
44
|
+
}
|
|
45
|
+
export interface WalletEditorProps {
|
|
46
|
+
value?: WalletEditorValue;
|
|
47
|
+
onChange?: (value: WalletEditorValue) => void;
|
|
48
|
+
onValuesChange?: (changedValue: any, values: WalletEditorValue) => void;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
className?: string;
|
|
51
|
+
style?: React.CSSProperties;
|
|
52
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface FooterButtonsProps {
|
|
4
|
+
onRechargeClick?: () => void;
|
|
5
|
+
platform?: 'pc' | 'h5';
|
|
6
|
+
appleWalletUrl?: string;
|
|
7
|
+
googleWalletUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 通用底部按钮组件
|
|
11
|
+
* 根据step不同显示不同的按钮组
|
|
12
|
+
*/
|
|
13
|
+
declare const FooterButtons: React.FC<FooterButtonsProps>;
|
|
14
|
+
export default FooterButtons;
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import React, { useState } from 'react';
|
|
12
|
+
import { Button } from 'antd';
|
|
13
|
+
import { PisellModal, PisellToast } from '@pisell/materials';
|
|
14
|
+
//@ts-ignore
|
|
15
|
+
import { isIos, locales } from '@pisell/utils';
|
|
16
|
+
import "./index.less";
|
|
17
|
+
/**
|
|
18
|
+
* 通用底部按钮组件
|
|
19
|
+
* 根据step不同显示不同的按钮组
|
|
20
|
+
*/
|
|
21
|
+
var FooterButtons = function FooterButtons(_ref) {
|
|
22
|
+
var onRechargeClick = _ref.onRechargeClick,
|
|
23
|
+
_ref$platform = _ref.platform,
|
|
24
|
+
platform = _ref$platform === void 0 ? 'h5' : _ref$platform,
|
|
25
|
+
appleWalletUrl = _ref.appleWalletUrl,
|
|
26
|
+
googleWalletUrl = _ref.googleWalletUrl;
|
|
27
|
+
// 如果是PC端,部分页面可能不需要底部按钮
|
|
28
|
+
if (platform === 'pc') {
|
|
29
|
+
return null; // PC端不显示底部固定按钮
|
|
30
|
+
}
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
addWalletLoading = _useState2[0],
|
|
34
|
+
setAddWalletLoading = _useState2[1];
|
|
35
|
+
var _useState3 = useState(false),
|
|
36
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
37
|
+
wechatModalOpen = _useState4[0],
|
|
38
|
+
setWechatModalOpen = _useState4[1];
|
|
39
|
+
var _useState5 = useState(''),
|
|
40
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
41
|
+
copyUrl = _useState6[0],
|
|
42
|
+
setCopyUrl = _useState6[1];
|
|
43
|
+
var addWalletPass = /*#__PURE__*/function () {
|
|
44
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url, type) {
|
|
45
|
+
var response, passData, blob, downloadUrl, a;
|
|
46
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
47
|
+
while (1) switch (_context.prev = _context.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
if (url) {
|
|
50
|
+
_context.next = 3;
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
PisellToast({
|
|
54
|
+
content: locales.getText('wallet-pass-gallery.urlEmpty') || '钱包链接为空',
|
|
55
|
+
duration: 2
|
|
56
|
+
});
|
|
57
|
+
return _context.abrupt("return", false);
|
|
58
|
+
case 3:
|
|
59
|
+
if (!isWechat()) {
|
|
60
|
+
_context.next = 7;
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
setWechatModalOpen(true);
|
|
64
|
+
setCopyUrl(url);
|
|
65
|
+
return _context.abrupt("return", false);
|
|
66
|
+
case 7:
|
|
67
|
+
setAddWalletLoading(true);
|
|
68
|
+
_context.prev = 8;
|
|
69
|
+
if (!(type === 'apple')) {
|
|
70
|
+
_context.next = 27;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
_context.next = 12;
|
|
74
|
+
return fetch(url);
|
|
75
|
+
case 12:
|
|
76
|
+
response = _context.sent;
|
|
77
|
+
if (response.ok) {
|
|
78
|
+
_context.next = 15;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
throw new Error("HTTP error! status: ".concat(response.status));
|
|
82
|
+
case 15:
|
|
83
|
+
_context.next = 17;
|
|
84
|
+
return response.arrayBuffer();
|
|
85
|
+
case 17:
|
|
86
|
+
passData = _context.sent;
|
|
87
|
+
blob = new Blob([passData], {
|
|
88
|
+
type: 'application/vnd.apple.pkpass'
|
|
89
|
+
});
|
|
90
|
+
downloadUrl = URL.createObjectURL(blob);
|
|
91
|
+
a = document.createElement('a');
|
|
92
|
+
a.href = downloadUrl;
|
|
93
|
+
a.download = 'pass.pkpass';
|
|
94
|
+
a.click();
|
|
95
|
+
URL.revokeObjectURL(downloadUrl); // 清理创建的URL
|
|
96
|
+
_context.next = 28;
|
|
97
|
+
break;
|
|
98
|
+
case 27:
|
|
99
|
+
window.open(url);
|
|
100
|
+
case 28:
|
|
101
|
+
_context.next = 34;
|
|
102
|
+
break;
|
|
103
|
+
case 30:
|
|
104
|
+
_context.prev = 30;
|
|
105
|
+
_context.t0 = _context["catch"](8);
|
|
106
|
+
console.error('Failed to add wallet:', _context.t0);
|
|
107
|
+
PisellToast({
|
|
108
|
+
content: locales.getText('wallet-pass-gallery.error.addFailed'),
|
|
109
|
+
duration: 3
|
|
110
|
+
});
|
|
111
|
+
case 34:
|
|
112
|
+
_context.prev = 34;
|
|
113
|
+
setAddWalletLoading(false);
|
|
114
|
+
return _context.finish(34);
|
|
115
|
+
case 37:
|
|
116
|
+
case "end":
|
|
117
|
+
return _context.stop();
|
|
118
|
+
}
|
|
119
|
+
}, _callee, null, [[8, 30, 34, 37]]);
|
|
120
|
+
}));
|
|
121
|
+
return function addWalletPass(_x, _x2) {
|
|
122
|
+
return _ref2.apply(this, arguments);
|
|
123
|
+
};
|
|
124
|
+
}();
|
|
125
|
+
var onAppleClick = /*#__PURE__*/function () {
|
|
126
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
127
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
128
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
129
|
+
case 0:
|
|
130
|
+
_context2.next = 2;
|
|
131
|
+
return addWalletPass(appleWalletUrl || '', 'apple');
|
|
132
|
+
case 2:
|
|
133
|
+
case "end":
|
|
134
|
+
return _context2.stop();
|
|
135
|
+
}
|
|
136
|
+
}, _callee2);
|
|
137
|
+
}));
|
|
138
|
+
return function onAppleClick() {
|
|
139
|
+
return _ref3.apply(this, arguments);
|
|
140
|
+
};
|
|
141
|
+
}();
|
|
142
|
+
var onGoogleClick = /*#__PURE__*/function () {
|
|
143
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
144
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
145
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
146
|
+
case 0:
|
|
147
|
+
_context3.next = 2;
|
|
148
|
+
return addWalletPass(googleWalletUrl || '', 'google');
|
|
149
|
+
case 2:
|
|
150
|
+
case "end":
|
|
151
|
+
return _context3.stop();
|
|
152
|
+
}
|
|
153
|
+
}, _callee3);
|
|
154
|
+
}));
|
|
155
|
+
return function onGoogleClick() {
|
|
156
|
+
return _ref4.apply(this, arguments);
|
|
157
|
+
};
|
|
158
|
+
}();
|
|
159
|
+
var isWechat = function isWechat() {
|
|
160
|
+
return /MicroMessenger/i.test(window.navigator.userAgent);
|
|
161
|
+
};
|
|
162
|
+
var httpCopyToClipboard = function httpCopyToClipboard(text) {
|
|
163
|
+
var textArea = document.createElement('textarea');
|
|
164
|
+
textArea.value = text;
|
|
165
|
+
textArea.style.position = 'fixed';
|
|
166
|
+
textArea.style.top = '-10000px';
|
|
167
|
+
textArea.style.left = '-10000px';
|
|
168
|
+
document.body.appendChild(textArea);
|
|
169
|
+
textArea.focus();
|
|
170
|
+
textArea.select();
|
|
171
|
+
document.execCommand('copy');
|
|
172
|
+
document.body.removeChild(textArea);
|
|
173
|
+
};
|
|
174
|
+
var copyToClipboard = function copyToClipboard(text) {
|
|
175
|
+
if (navigator.clipboard) {
|
|
176
|
+
return navigator.clipboard.writeText(text);
|
|
177
|
+
} else {
|
|
178
|
+
return httpCopyToClipboard(text);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
var onCopyClick = function onCopyClick() {
|
|
182
|
+
copyToClipboard(copyUrl);
|
|
183
|
+
PisellToast({
|
|
184
|
+
content: locales.getText('wallet-pass-gallery.copySuccess'),
|
|
185
|
+
duration: 2
|
|
186
|
+
});
|
|
187
|
+
setWechatModalOpen(false);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// 根据不同步骤渲染不同按钮
|
|
191
|
+
var renderButtons = function renderButtons() {
|
|
192
|
+
// 创建按钮数组
|
|
193
|
+
var buttons = [];
|
|
194
|
+
// 添加到钱包按钮
|
|
195
|
+
if (appleWalletUrl || googleWalletUrl) {
|
|
196
|
+
buttons.push( /*#__PURE__*/React.createElement(Button, {
|
|
197
|
+
loading: addWalletLoading,
|
|
198
|
+
key: "add-wallet",
|
|
199
|
+
onClick: isIos() ? onAppleClick : onGoogleClick,
|
|
200
|
+
size: "large",
|
|
201
|
+
className: "pisell-wallet-pass-gallery_footer-buttons-item pisell-wallet-pass-gallery_footer-buttons-item-secondary"
|
|
202
|
+
}, isIos() ? locales.getText('wallet-pass-gallery.button.addToAppleWallet') : locales.getText('wallet-pass-gallery.button.addToGoogleWallet')));
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// 充值按钮
|
|
206
|
+
if (onRechargeClick) {
|
|
207
|
+
buttons.push( /*#__PURE__*/React.createElement(Button, {
|
|
208
|
+
key: "recharge",
|
|
209
|
+
type: "primary",
|
|
210
|
+
onClick: onRechargeClick,
|
|
211
|
+
size: "large",
|
|
212
|
+
className: "pisell-wallet-pass-gallery_footer-buttons-item pisell-wallet-pass-gallery_footer-buttons-item-primary"
|
|
213
|
+
}, locales.getText('wallet-pass-gallery.recharge')));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// 根据按钮数量设置不同的类名
|
|
217
|
+
var buttonCount = buttons.length;
|
|
218
|
+
var className = "pisell-wallet-pass-gallery_footer-buttons pisell-wallet-pass-gallery_footer-buttons-count-".concat(buttonCount);
|
|
219
|
+
return buttons.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: className
|
|
221
|
+
}, buttons) : null;
|
|
222
|
+
};
|
|
223
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
224
|
+
className: "pisell-wallet-pass-gallery_footer"
|
|
225
|
+
}, renderButtons()), /*#__PURE__*/React.createElement(PisellModal, {
|
|
226
|
+
platform: platform,
|
|
227
|
+
mobileModalHeight: "auto",
|
|
228
|
+
headerDivider: false,
|
|
229
|
+
closable: true,
|
|
230
|
+
maskClosable: true,
|
|
231
|
+
onCancel: function onCancel() {
|
|
232
|
+
setWechatModalOpen(false);
|
|
233
|
+
},
|
|
234
|
+
open: wechatModalOpen,
|
|
235
|
+
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
236
|
+
onClick: onCopyClick,
|
|
237
|
+
block: true,
|
|
238
|
+
type: "primary",
|
|
239
|
+
size: "large"
|
|
240
|
+
}, locales.getText('wallet-pass-gallery.copyButton'))]
|
|
241
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
242
|
+
className: "pisell-wallet-pass-gallery_footer-copy-title"
|
|
243
|
+
}, locales.getText('wallet-pass-gallery.copyTitle')), /*#__PURE__*/React.createElement("div", {
|
|
244
|
+
className: "pisell-wallet-pass-gallery_footer-copy-text"
|
|
245
|
+
}, locales.getText('wallet-pass-gallery.copyText'))));
|
|
246
|
+
};
|
|
247
|
+
export default FooterButtons;
|