@pisell/private-materials 6.2.49 → 6.2.50

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 (168) 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 +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +27 -3
  12. package/es/components/appointmentBooking/components/Content/index.js +3 -3
  13. package/es/components/appointmentBooking/components/Services/index.js +36 -18
  14. package/es/components/appointmentBooking/components/Voucher/index.js +6 -5
  15. package/es/components/appointmentBooking/hooks.js +10 -2
  16. package/es/components/appointmentBooking/index.js +10 -0
  17. package/es/components/booking/addons/model.d.ts +1 -10
  18. package/es/components/booking/components/footer/index.js +12 -1
  19. package/es/components/booking/editBookingModal/index.js +8 -2
  20. package/es/components/booking/forms/model.d.ts +1 -10
  21. package/es/components/booking/info/model.d.ts +1 -10
  22. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  23. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/locales.d.ts +6 -0
  25. package/es/components/booking/locales.js +12 -0
  26. package/es/components/booking/model.d.ts +1 -9
  27. package/es/components/booking/notes/model.d.ts +1 -10
  28. package/es/components/booking/payments/model.d.ts +1 -10
  29. package/es/components/eftposPay/hooks.d.ts +1 -1
  30. package/es/components/eftposPay/linkly/hooks/normal.js +3 -3
  31. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +25 -4
  32. package/es/components/eftposPay/store/index.d.ts +2 -2
  33. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +34 -8
  34. package/es/components/index.d.ts +3 -1
  35. package/es/components/index.js +3 -1
  36. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
  37. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  38. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +112 -24
  39. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  40. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +78 -0
  41. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  42. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +9 -0
  43. package/es/components/pay/toC/model.d.ts +1 -9
  44. package/es/components/pay/toC/utils.js +1 -1
  45. package/es/components/pinModal/hooks.d.ts +7 -0
  46. package/es/components/pinModal/hooks.js +65 -0
  47. package/es/components/pinModal/index.d.ts +4 -0
  48. package/es/components/pinModal/index.js +98 -0
  49. package/es/components/pinModal/index.less +44 -0
  50. package/es/components/pinModal/locales.d.ts +27 -0
  51. package/es/components/pinModal/locales.js +26 -0
  52. package/es/components/pinModal/serve.d.ts +6 -0
  53. package/es/components/pinModal/serve.js +11 -0
  54. package/es/components/pinModal/types.d.ts +0 -0
  55. package/es/components/pinModal/types.js +0 -0
  56. package/es/components/pinVerifyModal/hooks.d.ts +7 -0
  57. package/es/components/pinVerifyModal/hooks.js +80 -0
  58. package/es/components/pinVerifyModal/index.d.ts +5 -0
  59. package/es/components/pinVerifyModal/index.js +218 -0
  60. package/es/components/pinVerifyModal/index.less +92 -0
  61. package/es/components/pinVerifyModal/locales.d.ts +24 -0
  62. package/es/components/pinVerifyModal/locales.js +23 -0
  63. package/es/components/pinVerifyModal/types.d.ts +33 -0
  64. package/es/components/pinVerifyModal/types.js +1 -0
  65. package/es/components/schedules/model.d.ts +1 -9
  66. package/es/components/ticketBooking/components/ticketBooking/index.js +58 -10
  67. package/es/components/ticketBooking/components/timeBar/index.js +2 -1
  68. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  69. package/es/components/wallet/Detail/index.js +251 -63
  70. package/es/components/wallet/Detail/locales.d.ts +51 -0
  71. package/es/components/wallet/Detail/locales.js +57 -3
  72. package/es/components/wallet/Detail/model.d.ts +1 -13
  73. package/es/components/wallet/Detail/serve.js +5 -1
  74. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  75. package/es/components/wallet/PointCard/model.d.ts +1 -13
  76. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  77. package/es/components/wallet/Voucher/model.d.ts +1 -13
  78. package/es/components/wallet/components/UsageRules/index.d.ts +23 -0
  79. package/es/components/wallet/components/UsageRules/index.js +147 -0
  80. package/es/components/wallet/components/UsageRules/index.less +157 -0
  81. package/es/components/wallet/components/WalletCard.js +8 -3
  82. package/es/components/wallet/components/index.d.ts +1 -0
  83. package/es/components/wallet/components/index.js +2 -1
  84. package/es/components/wallet/model.d.ts +1 -9
  85. package/es/components/walletList/index.js +20 -2
  86. package/es/index.d.ts +2 -0
  87. package/es/index.js +3 -1
  88. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +22 -2
  89. package/lib/components/appointmentBooking/components/Content/index.js +2 -2
  90. package/lib/components/appointmentBooking/components/Services/index.js +13 -3
  91. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
  92. package/lib/components/appointmentBooking/hooks.js +10 -2
  93. package/lib/components/appointmentBooking/index.js +6 -0
  94. package/lib/components/booking/addons/model.d.ts +1 -10
  95. package/lib/components/booking/components/footer/index.js +15 -2
  96. package/lib/components/booking/components/voucher/index.js +1 -3
  97. package/lib/components/booking/editBookingModal/index.js +6 -1
  98. package/lib/components/booking/forms/model.d.ts +1 -10
  99. package/lib/components/booking/info/model.d.ts +1 -10
  100. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  101. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  102. package/lib/components/booking/locales.d.ts +6 -0
  103. package/lib/components/booking/locales.js +6 -0
  104. package/lib/components/booking/model.d.ts +1 -9
  105. package/lib/components/booking/notes/model.d.ts +1 -10
  106. package/lib/components/booking/payments/model.d.ts +1 -10
  107. package/lib/components/eftposPay/hooks.d.ts +1 -1
  108. package/lib/components/eftposPay/linkly/hooks/normal.js +3 -3
  109. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +16 -4
  110. package/lib/components/eftposPay/store/index.d.ts +2 -2
  111. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +30 -8
  112. package/lib/components/index.d.ts +3 -1
  113. package/lib/components/index.js +6 -0
  114. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
  115. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +2 -0
  116. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +84 -36
  117. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +38 -2
  118. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.js +18 -0
  119. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +6 -0
  120. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +7 -2
  121. package/lib/components/pay/toC/model.d.ts +1 -9
  122. package/lib/components/pay/toC/utils.js +1 -1
  123. package/lib/components/pinModal/hooks.d.ts +7 -0
  124. package/lib/components/pinModal/hooks.js +85 -0
  125. package/lib/components/pinModal/index.d.ts +4 -0
  126. package/lib/components/pinModal/index.js +88 -0
  127. package/lib/components/pinModal/index.less +44 -0
  128. package/lib/components/pinModal/locales.d.ts +27 -0
  129. package/lib/components/pinModal/locales.js +50 -0
  130. package/lib/components/pinModal/serve.d.ts +6 -0
  131. package/lib/components/pinModal/serve.js +37 -0
  132. package/lib/components/pinModal/types.d.ts +0 -0
  133. package/lib/components/pinModal/types.js +0 -0
  134. package/lib/components/pinVerifyModal/hooks.d.ts +7 -0
  135. package/lib/components/pinVerifyModal/hooks.js +93 -0
  136. package/lib/components/pinVerifyModal/index.d.ts +5 -0
  137. package/lib/components/pinVerifyModal/index.js +230 -0
  138. package/lib/components/pinVerifyModal/index.less +92 -0
  139. package/lib/components/pinVerifyModal/locales.d.ts +24 -0
  140. package/lib/components/pinVerifyModal/locales.js +47 -0
  141. package/lib/components/pinVerifyModal/types.d.ts +33 -0
  142. package/lib/components/pinVerifyModal/types.js +17 -0
  143. package/lib/components/schedules/model.d.ts +1 -9
  144. package/lib/components/ticketBooking/components/ticketBooking/index.js +50 -6
  145. package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
  146. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  147. package/lib/components/wallet/Detail/index.js +140 -8
  148. package/lib/components/wallet/Detail/locales.d.ts +51 -0
  149. package/lib/components/wallet/Detail/locales.js +57 -3
  150. package/lib/components/wallet/Detail/model.d.ts +1 -13
  151. package/lib/components/wallet/Detail/serve.js +6 -1
  152. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  153. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  154. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  155. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  156. package/lib/components/wallet/components/UsageRules/index.d.ts +23 -0
  157. package/lib/components/wallet/components/UsageRules/index.js +113 -0
  158. package/lib/components/wallet/components/UsageRules/index.less +157 -0
  159. package/lib/components/wallet/components/WalletCard.js +3 -1
  160. package/lib/components/wallet/components/index.d.ts +1 -0
  161. package/lib/components/wallet/components/index.js +3 -0
  162. package/lib/components/wallet/model.d.ts +1 -9
  163. package/lib/components/walletList/index.js +19 -2
  164. package/lib/index.d.ts +2 -0
  165. package/lib/index.js +6 -0
  166. package/lowcode/pin-modal/meta.ts +37 -0
  167. package/lowcode/pin-verify-modal/meta.ts +80 -0
  168. package/package.json +4 -4
@@ -29,6 +29,23 @@ declare const _default: {
29
29
  'page.wallet.openedInBrowser': string;
30
30
  'page.wallet.openFailed': string;
31
31
  'page.wallet.loading': string;
32
+ 'page.wallet.usageRules': string;
33
+ 'page.wallet.usageRulesSubtitle': string;
34
+ 'page.wallet.timeUsageLimits': string;
35
+ 'page.wallet.totalQuantityControl': string;
36
+ 'page.wallet.dailyLimit': string;
37
+ 'page.wallet.weeklyLimit': string;
38
+ 'page.wallet.monthlyLimit': string;
39
+ 'page.wallet.personalLimit': string;
40
+ 'page.wallet.dailyLimitDesc': string;
41
+ 'page.wallet.weeklyLimitDesc': string;
42
+ 'page.wallet.monthlyLimitDesc': string;
43
+ 'page.wallet.monthlyLimitUnlimited': string;
44
+ 'page.wallet.personalLimitDesc': string;
45
+ 'page.wallet.dailyReset': string;
46
+ 'page.wallet.weeklyReset': string;
47
+ 'page.wallet.monthlyReset': string;
48
+ 'page.wallet.voucherExpireNote': string;
32
49
  };
33
50
  'zh-CN': {
34
51
  'page.wallet.copyTitle': string;
@@ -60,6 +77,23 @@ declare const _default: {
60
77
  'page.wallet.openedInBrowser': string;
61
78
  'page.wallet.openFailed': string;
62
79
  'page.wallet.loading': string;
80
+ 'page.wallet.usageRules': string;
81
+ 'page.wallet.usageRulesSubtitle': string;
82
+ 'page.wallet.timeUsageLimits': string;
83
+ 'page.wallet.totalQuantityControl': string;
84
+ 'page.wallet.dailyLimit': string;
85
+ 'page.wallet.weeklyLimit': string;
86
+ 'page.wallet.monthlyLimit': string;
87
+ 'page.wallet.personalLimit': string;
88
+ 'page.wallet.dailyLimitDesc': string;
89
+ 'page.wallet.weeklyLimitDesc': string;
90
+ 'page.wallet.monthlyLimitDesc': string;
91
+ 'page.wallet.monthlyLimitUnlimited': string;
92
+ 'page.wallet.personalLimitDesc': string;
93
+ 'page.wallet.dailyReset': string;
94
+ 'page.wallet.weeklyReset': string;
95
+ 'page.wallet.monthlyReset': string;
96
+ 'page.wallet.voucherExpireNote': string;
63
97
  };
64
98
  'zh-HK': {
65
99
  'page.wallet.copyTitle': string;
@@ -91,6 +125,23 @@ declare const _default: {
91
125
  'page.wallet.openedInBrowser': string;
92
126
  'page.wallet.openFailed': string;
93
127
  'page.wallet.loading': string;
128
+ 'page.wallet.usageRules': string;
129
+ 'page.wallet.usageRulesSubtitle': string;
130
+ 'page.wallet.timeUsageLimits': string;
131
+ 'page.wallet.totalQuantityControl': string;
132
+ 'page.wallet.dailyLimit': string;
133
+ 'page.wallet.weeklyLimit': string;
134
+ 'page.wallet.monthlyLimit': string;
135
+ 'page.wallet.personalLimit': string;
136
+ 'page.wallet.dailyLimitDesc': string;
137
+ 'page.wallet.weeklyLimitDesc': string;
138
+ 'page.wallet.monthlyLimitDesc': string;
139
+ 'page.wallet.monthlyLimitUnlimited': string;
140
+ 'page.wallet.personalLimitDesc': string;
141
+ 'page.wallet.dailyReset': string;
142
+ 'page.wallet.weeklyReset': string;
143
+ 'page.wallet.monthlyReset': string;
144
+ 'page.wallet.voucherExpireNote': string;
94
145
  };
95
146
  };
96
147
  export default _default;
@@ -31,7 +31,25 @@ export default {
31
31
  'page.wallet.useAppleInstead': 'You are using an iOS device, would you like to use Apple Wallet instead of Google Wallet?',
32
32
  'page.wallet.openedInBrowser': 'Opened in browser',
33
33
  'page.wallet.openFailed': 'Failed to open wallet link',
34
- 'page.wallet.loading': 'Loading wallet...'
34
+ 'page.wallet.loading': 'Loading wallet...',
35
+ // Usage Rules
36
+ 'page.wallet.usageRules': 'Terms & Conditions',
37
+ 'page.wallet.usageRulesSubtitle': 'Please read the following usage conditions carefully',
38
+ 'page.wallet.timeUsageLimits': 'Time Window Restrictions',
39
+ 'page.wallet.totalQuantityControl': 'Total Usage Control',
40
+ 'page.wallet.dailyLimit': 'Daily Limit:',
41
+ 'page.wallet.weeklyLimit': 'Weekly Limit:',
42
+ 'page.wallet.monthlyLimit': 'Monthly Limit:',
43
+ 'page.wallet.personalLimit': 'Personal Limit:',
44
+ 'page.wallet.dailyLimitDesc': 'Maximum {limit} uses from 12:00 AM to 11:59 PM each day',
45
+ 'page.wallet.weeklyLimitDesc': 'Maximum {limit} uses from Monday 12:00 AM to Sunday 11:59 PM',
46
+ 'page.wallet.monthlyLimitDesc': 'Maximum {limit} uses from 1st 12:00 AM to end of month 11:59 PM',
47
+ 'page.wallet.monthlyLimitUnlimited': 'Unlimited',
48
+ 'page.wallet.personalLimitDesc': 'You can use this voucher maximum {total} times ({remaining} remaining)',
49
+ 'page.wallet.dailyReset': 'Counter resets automatically at midnight',
50
+ 'page.wallet.weeklyReset': 'Counter resets every Monday at midnight',
51
+ 'page.wallet.monthlyReset': 'Counter resets on 1st of each month at midnight',
52
+ 'page.wallet.voucherExpireNote': 'Voucher will automatically expire when limit is reached'
35
53
  },
36
54
  'zh-CN': {
37
55
  // 简体中文翻译
@@ -65,7 +83,25 @@ export default {
65
83
  'page.wallet.useAppleInstead': '您正在使用iOS设备,是否使用Apple Wallet代替Google Wallet?',
66
84
  'page.wallet.openedInBrowser': '已在浏览器中打开',
67
85
  'page.wallet.openFailed': '打开钱包链接失败',
68
- 'page.wallet.loading': '正在加载钱包...'
86
+ 'page.wallet.loading': '正在加载钱包...',
87
+ // Usage Rules
88
+ 'page.wallet.usageRules': '使用规则',
89
+ 'page.wallet.usageRulesSubtitle': '请仔细阅读以下使用条件',
90
+ 'page.wallet.timeUsageLimits': '时间使用限制',
91
+ 'page.wallet.totalQuantityControl': '总量控制',
92
+ 'page.wallet.dailyLimit': '每日限制:',
93
+ 'page.wallet.weeklyLimit': '每周限制:',
94
+ 'page.wallet.monthlyLimit': '每月限制:',
95
+ 'page.wallet.personalLimit': '个人限额:',
96
+ 'page.wallet.dailyLimitDesc': '每天0点-24点最多使用{limit}次',
97
+ 'page.wallet.weeklyLimitDesc': '每周一0点-周日24点最多使用{limit}次',
98
+ 'page.wallet.monthlyLimitDesc': '每月1号0点-月末24点最多使用{limit}次',
99
+ 'page.wallet.monthlyLimitUnlimited': '无限制',
100
+ 'page.wallet.personalLimitDesc': '您最多可使用此券{total}次(剩余{remaining}次)',
101
+ 'page.wallet.dailyReset': '每天0点自动重置计数',
102
+ 'page.wallet.weeklyReset': '每周一0点自动重置计数',
103
+ 'page.wallet.monthlyReset': '每月1号0点自动重置计数',
104
+ 'page.wallet.voucherExpireNote': '用完后此券将自动失效'
69
105
  },
70
106
  'zh-HK': {
71
107
  // 繁体中文翻译
@@ -99,6 +135,24 @@ export default {
99
135
  'page.wallet.useAppleInstead': '您正在使用iOS設備,是否使用Apple Wallet代替Google Wallet?',
100
136
  'page.wallet.openedInBrowser': '已在瀏覽器中打開',
101
137
  'page.wallet.openFailed': '打開錢包連結失敗',
102
- 'page.wallet.loading': '正在加載錢包...'
138
+ 'page.wallet.loading': '正在加載錢包...',
139
+ // Usage Rules
140
+ 'page.wallet.usageRules': '使用規則',
141
+ 'page.wallet.usageRulesSubtitle': '請仔細閱讀以下使用條件',
142
+ 'page.wallet.timeUsageLimits': '時間使用限制',
143
+ 'page.wallet.totalQuantityControl': '總量控制',
144
+ 'page.wallet.dailyLimit': '每日限制:',
145
+ 'page.wallet.weeklyLimit': '每週限制:',
146
+ 'page.wallet.monthlyLimit': '每月限制:',
147
+ 'page.wallet.personalLimit': '個人限額:',
148
+ 'page.wallet.dailyLimitDesc': '每天0點-24點最多使用{limit}次',
149
+ 'page.wallet.weeklyLimitDesc': '每週一0點-週日24點最多使用{limit}次',
150
+ 'page.wallet.monthlyLimitDesc': '每月1號0點-月末24點最多使用{limit}次',
151
+ 'page.wallet.monthlyLimitUnlimited': '無限制',
152
+ 'page.wallet.personalLimitDesc': '您最多可使用此券{total}次(剩餘{remaining}次)',
153
+ 'page.wallet.dailyReset': '每天0點自動重置計數',
154
+ 'page.wallet.weeklyReset': '每週一0點自動重置計數',
155
+ 'page.wallet.monthlyReset': '每月1號0點自動重置計數',
156
+ 'page.wallet.voucherExpireNote': '用完後此券將自動失效'
103
157
  }
104
158
  };
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- addWalletCard: any;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- walletDetailState: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -43,7 +43,11 @@ export var getDetailApi = /*#__PURE__*/function () {
43
43
  while (1) switch (_context2.prev = _context2.next) {
44
44
  case 0:
45
45
  _context2.next = 2;
46
- return request.getRequest().get("/h5/machinecode/lowcode/detail/".concat(params.id), {});
46
+ return request.getRequest().get("/h5/machinecode/lowcode/detail/".concat(params.id), {
47
+ order_behavior_count: 1,
48
+ // 订单行为次数
49
+ order_behavior_count_customer: 1 // 客户订单行为次数
50
+ });
47
51
  case 2:
48
52
  _yield$request$getReq2 = _context2.sent;
49
53
  data = _yield$request$getReq2.data;
@@ -1,14 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- setup?: 'menu' | 'list' | 'detail' | string;
5
- }
6
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
- state: RechargeState;
8
- } & {
9
- dispatch: (params: {
10
- type: string;
11
- payload: any;
12
- }) => void;
13
- }>;
14
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,29 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- selectedGiftOptionId: string | null;
4
- cardList: Array<{
5
- id: string;
6
- name: string;
7
- price: number;
8
- }>;
9
- selectedItem: {
10
- id?: string;
11
- gift_price?: number;
12
- price?: number;
13
- name?: string;
14
- variant_id?: string;
15
- };
16
- productId?: string;
17
- detailId?: string;
18
- total: string | number;
19
- rechargeModalOpen: boolean;
20
- }
21
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
- state: RechargeState;
23
- } & {
24
- dispatch: (params: {
25
- type: string;
26
- payload: any;
27
- }) => void;
28
- }>;
29
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: 0;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface UsageRule {
4
+ type: 'daily' | 'weekly' | 'monthly';
5
+ limit: number;
6
+ description: string;
7
+ resetTime?: string;
8
+ }
9
+ interface UsageRulesProps {
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ rules?: UsageRule[];
13
+ personalLimit?: {
14
+ total: number;
15
+ remaining: number;
16
+ note?: string;
17
+ };
18
+ locales?: {
19
+ getText: (key: string) => string;
20
+ };
21
+ }
22
+ declare function UsageRules({ className, style, rules, personalLimit, locales }: UsageRulesProps): JSX.Element;
23
+ export default UsageRules;
@@ -0,0 +1,147 @@
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React from 'react';
8
+ import { Typography } from '@pisell/materials';
9
+ import "./index.less";
10
+ var Text = Typography.Text;
11
+ function UsageRules(_ref) {
12
+ var _ref$className = _ref.className,
13
+ className = _ref$className === void 0 ? '' : _ref$className,
14
+ style = _ref.style,
15
+ rules = _ref.rules,
16
+ _ref$personalLimit = _ref.personalLimit,
17
+ personalLimit = _ref$personalLimit === void 0 ? {
18
+ total: 5,
19
+ remaining: 3,
20
+ note: '用完后此券将自动失效'
21
+ } : _ref$personalLimit,
22
+ locales = _ref.locales;
23
+ // Helper function to interpolate text with variables
24
+ var interpolateText = function interpolateText(text, variables) {
25
+ return text.replace(/\{(\w+)\}/g, function (match, key) {
26
+ return variables[key] !== undefined ? variables[key] : match;
27
+ });
28
+ };
29
+
30
+ // Get localized text with fallback
31
+ var getText = function getText(key, fallback) {
32
+ return (locales === null || locales === void 0 ? void 0 : locales.getText(key)) || fallback || key;
33
+ };
34
+
35
+ // Generate rule description with limit value
36
+ var getRuleDescription = function getRuleDescription(type, limit) {
37
+ // Handle unlimited case (limit = 0 means unlimited)
38
+ if (limit === 0 && type === 'monthly') {
39
+ return getText('page.wallet.monthlyLimitUnlimited', '无限制');
40
+ }
41
+ var templateKey = "page.wallet.".concat(type, "LimitDesc");
42
+ var template = getText(templateKey, '');
43
+ return interpolateText(template, {
44
+ limit: limit
45
+ });
46
+ };
47
+
48
+ // Generate rule reset time text
49
+ var getRuleResetTime = function getRuleResetTime(type) {
50
+ var resetKey = "page.wallet.".concat(type, "Reset");
51
+ return getText(resetKey, '');
52
+ };
53
+
54
+ // Default rules with localized text
55
+ var defaultRules = [{
56
+ type: 'daily',
57
+ limit: 3,
58
+ description: getRuleDescription('daily', 3),
59
+ resetTime: getRuleResetTime('daily')
60
+ }, {
61
+ type: 'weekly',
62
+ limit: 15,
63
+ description: getRuleDescription('weekly', 15),
64
+ resetTime: getRuleResetTime('weekly')
65
+ }, {
66
+ type: 'monthly',
67
+ limit: 60,
68
+ description: getRuleDescription('monthly', 60),
69
+ resetTime: getRuleResetTime('monthly')
70
+ }];
71
+
72
+ // Process rules to add localized descriptions
73
+ var processedRules = rules ? rules.map(function (rule) {
74
+ return _objectSpread(_objectSpread({}, rule), {}, {
75
+ description: getRuleDescription(rule.type, rule.limit),
76
+ resetTime: getRuleResetTime(rule.type)
77
+ });
78
+ }) : defaultRules;
79
+ var finalRules = processedRules;
80
+ var getRuleLabel = function getRuleLabel(type) {
81
+ switch (type) {
82
+ case 'daily':
83
+ return getText('page.wallet.dailyLimit', '每日限制:');
84
+ case 'weekly':
85
+ return getText('page.wallet.weeklyLimit', '每周限制:');
86
+ case 'monthly':
87
+ return getText('page.wallet.monthlyLimit', '每月限制:');
88
+ default:
89
+ return getText('page.wallet.dailyLimit', '限制:');
90
+ }
91
+ };
92
+ return /*#__PURE__*/React.createElement("div", {
93
+ className: "usage-rules ".concat(className),
94
+ style: style
95
+ }, /*#__PURE__*/React.createElement(Text, {
96
+ className: "usage-rules-title"
97
+ }, getText('page.wallet.usageRules', '使用规则')), /*#__PURE__*/React.createElement(Text, {
98
+ className: "usage-rules-subtitle"
99
+ }, getText('page.wallet.usageRulesSubtitle', '请仔细阅读以下使用条件')), /*#__PURE__*/React.createElement("div", {
100
+ className: "usage-rules-section"
101
+ }, /*#__PURE__*/React.createElement(Text, {
102
+ className: "usage-rules-section-title"
103
+ }, getText('page.wallet.timeUsageLimits', '时间使用限制')), /*#__PURE__*/React.createElement("div", {
104
+ className: "usage-rules-list"
105
+ }, finalRules.length > 0 ? finalRules.map(function (rule, index) {
106
+ return /*#__PURE__*/React.createElement("div", {
107
+ key: index,
108
+ className: "usage-rules-item"
109
+ }, /*#__PURE__*/React.createElement("div", {
110
+ className: "usage-rules-item-content"
111
+ }, /*#__PURE__*/React.createElement("div", {
112
+ className: "usage-rules-item-main-line"
113
+ }, /*#__PURE__*/React.createElement(Text, {
114
+ className: "usage-rules-item-label"
115
+ }, getRuleLabel(rule.type)), /*#__PURE__*/React.createElement(Text, {
116
+ className: "usage-rules-item-description"
117
+ }, rule.description)), rule.resetTime && /*#__PURE__*/React.createElement(Text, {
118
+ className: "usage-rules-item-reset"
119
+ }, rule.resetTime)));
120
+ }) : /*#__PURE__*/React.createElement("div", {
121
+ className: "usage-rules-item"
122
+ }, /*#__PURE__*/React.createElement("div", {
123
+ className: "usage-rules-item-content"
124
+ }, /*#__PURE__*/React.createElement(Text, {
125
+ className: "usage-rules-item-description"
126
+ }, getText('page.wallet.monthlyLimitUnlimited', '无限制')))))), /*#__PURE__*/React.createElement("div", {
127
+ className: "usage-rules-section"
128
+ }, /*#__PURE__*/React.createElement(Text, {
129
+ className: "usage-rules-section-title"
130
+ }, getText('page.wallet.totalQuantityControl', '总量控制')), /*#__PURE__*/React.createElement("div", {
131
+ className: "usage-rules-item"
132
+ }, /*#__PURE__*/React.createElement("div", {
133
+ className: "usage-rules-item-content"
134
+ }, personalLimit.total > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Text, {
135
+ className: "usage-rules-item-label"
136
+ }, getText('page.wallet.personalLimit', '个人限额:')), /*#__PURE__*/React.createElement(Text, {
137
+ className: "usage-rules-item-description"
138
+ }, interpolateText(getText('page.wallet.personalLimitDesc', '您最多可使用此券{total}次(剩余{remaining}次)'), {
139
+ total: personalLimit.total,
140
+ remaining: personalLimit.remaining
141
+ })), /*#__PURE__*/React.createElement(Text, {
142
+ className: "usage-rules-item-note"
143
+ }, getText('page.wallet.voucherExpireNote', '用完后此券将自动失效'))) : /*#__PURE__*/React.createElement(Text, {
144
+ className: "usage-rules-item-description"
145
+ }, getText('page.wallet.monthlyLimitUnlimited', '无限制'))))));
146
+ }
147
+ export default UsageRules;
@@ -0,0 +1,157 @@
1
+ .usage-rules {
2
+ padding: 16px;
3
+ background: #ffffff;
4
+ border-radius: 8px;
5
+ border: 1px solid #f0f0f0;
6
+ margin-top: 16px;
7
+ margin-bottom: 20px;
8
+
9
+ // 确保所有Text组件都是块级元素
10
+ .ant-typography {
11
+ display: block !important;
12
+ width: 100% !important;
13
+ margin-bottom: 0 !important;
14
+ }
15
+
16
+ &-title {
17
+ font-size: 18px;
18
+ font-weight: 600;
19
+ color: #000000;
20
+ line-height: 24px;
21
+ margin-bottom: 8px;
22
+ display: block;
23
+ width: 100%;
24
+ }
25
+
26
+ &-subtitle {
27
+ font-size: 14px;
28
+ color: #6B7280;
29
+ line-height: 20px;
30
+ margin-bottom: 24px;
31
+ display: block;
32
+ width: 100%;
33
+ }
34
+
35
+ &-section {
36
+ margin-bottom: 24px;
37
+
38
+ &:last-child {
39
+ margin-bottom: 0;
40
+ }
41
+
42
+ &-title {
43
+ font-size: 16px;
44
+ font-weight: 500;
45
+ color: #6B7280;
46
+ line-height: 20px;
47
+ margin-bottom: 16px;
48
+ display: block;
49
+ width: 100%;
50
+ }
51
+ }
52
+
53
+ &-list {
54
+ display: flex;
55
+ flex-direction: column;
56
+ gap: 16px;
57
+ }
58
+
59
+ &-item {
60
+ position: relative;
61
+ display: flex;
62
+ align-items: flex-start;
63
+
64
+ &::before {
65
+ content: '•';
66
+ color: #697281;
67
+ font-size: 16px;
68
+ line-height: 20px;
69
+ font-weight: bold;
70
+ margin-right: 8px;
71
+ flex-shrink: 0;
72
+ margin-top: 0;
73
+ }
74
+
75
+ &-content {
76
+ flex: 1;
77
+ min-width: 0;
78
+ }
79
+
80
+ &-main-line {
81
+ margin-bottom: 4px;
82
+ }
83
+
84
+ &-label {
85
+ font-size: 14px;
86
+ font-weight: 600;
87
+ color: #000000;
88
+ line-height: 20px;
89
+ display: inline;
90
+ margin-right: 4px;
91
+ }
92
+
93
+ &-description {
94
+ font-size: 14px;
95
+ color: #000000;
96
+ line-height: 20px;
97
+ display: inline;
98
+ word-wrap: break-word;
99
+ }
100
+
101
+ &-reset {
102
+ font-size: 14px;
103
+ color: #000000;
104
+ line-height: 20px;
105
+ display: block;
106
+ width: 100%;
107
+ }
108
+
109
+ &-note {
110
+ font-size: 14px;
111
+ color: #000000;
112
+ line-height: 20px;
113
+ margin-top: 4px;
114
+ display: block;
115
+ width: 100%;
116
+ }
117
+ }
118
+
119
+ }
120
+
121
+ // 响应式设计
122
+ @media (max-width: 768px) {
123
+ .usage-rules {
124
+ padding: 12px;
125
+ margin-top: 12px;
126
+
127
+ &-title {
128
+ font-size: 16px;
129
+ }
130
+
131
+ &-subtitle {
132
+ font-size: 13px;
133
+ }
134
+
135
+ &-section {
136
+ margin-bottom: 20px;
137
+
138
+ &-title {
139
+ font-size: 15px;
140
+ }
141
+ }
142
+
143
+ &-item {
144
+ &::before {
145
+ font-size: 14px;
146
+ margin-right: 6px;
147
+ }
148
+
149
+ &-label,
150
+ &-description,
151
+ &-reset,
152
+ &-note {
153
+ font-size: 13px;
154
+ }
155
+ }
156
+ }
157
+ }
@@ -1,3 +1,7 @@
1
+ var _excluded = ["id", "tag", "product_title", "balance", "code", "encoded", "expire_date", "shop", "limit_status", "product_cover", "par_value", "unified_messages"];
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ 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; }
1
5
  import React, { useMemo } from 'react';
2
6
  import { PisellWalletPassCard } from '@pisell/materials';
3
7
  import { isMobile } from '@pisell/utils';
@@ -35,7 +39,8 @@ var WalletCard = function WalletCard(_ref) {
35
39
  _item$par_value = item.par_value,
36
40
  par_value = _item$par_value === void 0 ? '' : _item$par_value,
37
41
  _item$unified_message = item.unified_messages,
38
- unified_messages = _item$unified_message === void 0 ? {} : _item$unified_message;
42
+ unified_messages = _item$unified_message === void 0 ? {} : _item$unified_message,
43
+ rest = _objectWithoutProperties(item, _excluded);
39
44
 
40
45
  // 获取平台
41
46
  var platform = useMemo(function () {
@@ -52,7 +57,7 @@ var WalletCard = function WalletCard(_ref) {
52
57
  var isActive = id === currentId && platform === 'pc';
53
58
  // 是否禁用
54
59
  var isDisabled = limit_status !== 'enable';
55
- return /*#__PURE__*/React.createElement(PisellWalletPassCard, {
60
+ return /*#__PURE__*/React.createElement(PisellWalletPassCard, _extends({}, rest, {
56
61
  balanceTitle: balanceTitle,
57
62
  showDetail: false,
58
63
  showRedeem: false,
@@ -77,6 +82,6 @@ var WalletCard = function WalletCard(_ref) {
77
82
  code: encoded,
78
83
  validDate: expire_date,
79
84
  onClick: onClick
80
- });
85
+ }));
81
86
  };
82
87
  export default /*#__PURE__*/React.memo(WalletCard);
@@ -1,2 +1,3 @@
1
1
  export { default as WalletBar } from './WalletBar';
2
2
  export { default as FooterButtons } from './FooterButtons';
3
+ export { default as UsageRules } from './UsageRules';
@@ -1,3 +1,4 @@
1
1
  // 导出所有公共组件
2
2
  export { default as WalletBar } from "./WalletBar";
3
- export { default as FooterButtons } from "./FooterButtons";
3
+ export { default as FooterButtons } from "./FooterButtons";
4
+ export { default as UsageRules } from "./UsageRules";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
30
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
- global_wallet: WalletListProps;
32
- } & {
33
- dispatch: (params: {
34
- type: string;
35
- payload: any;
36
- }) => void;
37
- }>;
29
+ export declare const Provider: any, Context: any;