@pisell/private-materials 6.3.55 → 6.3.57

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 (302) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/appointmentBooking/components/Services/index.js +27 -24
  12. package/es/components/appointmentBooking/components/Voucher/index.js +14 -0
  13. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  14. package/es/components/booking/components/voucher/index.js +29 -9
  15. package/es/components/eftpos/form/index.d.ts +0 -1
  16. package/es/components/eftpos/hooks.d.ts +0 -1
  17. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  18. package/es/components/eftposPay/hooks.d.ts +1 -1
  19. package/es/components/eftposPay/store/index.d.ts +1 -1
  20. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  21. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  22. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  23. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  24. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -145
  25. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  26. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  27. package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
  28. package/es/components/pay/toC/index.js +65 -31
  29. package/es/components/pay/toC/model.d.ts +1 -0
  30. package/es/components/pay/toC/serve.d.ts +18 -0
  31. package/es/components/pay/toC/serve.js +29 -1
  32. package/es/components/pay/toC/utils.d.ts +2 -2
  33. package/es/components/pay/toC/utils.js +4 -0
  34. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  35. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  36. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  37. package/es/components/ticketBooking/components/timeBar/index.js +9 -12
  38. package/es/components/walletList/index.js +173 -39
  39. package/es/components/walletList/locales.js +12 -3
  40. package/es/components/walletList/serve.d.ts +19 -0
  41. package/es/components/walletList/serve.js +94 -5
  42. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  43. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  44. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  45. package/es/index.d.ts +2 -1
  46. package/es/index.js +3 -2
  47. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  48. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  49. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  50. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  51. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  52. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  53. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  54. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  55. package/es/plus/selectHolder/index.d.ts +7 -0
  56. package/es/plus/selectHolder/index.js +236 -0
  57. package/es/plus/selectHolder/index.less +117 -0
  58. package/es/plus/selectHolder/locales.d.ts +21 -0
  59. package/es/plus/selectHolder/locales.js +20 -0
  60. package/es/plus/selectHolder/types.js +1 -0
  61. package/es/plus/selectHolder/utils.js +16 -0
  62. package/es/plus/walletEditor/WalletEditor.js +60 -2
  63. package/es/plus/walletEditor/locales.js +12 -3
  64. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  65. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  66. package/es/plus/walletPassGallery/index.js +223 -41
  67. package/es/plus/walletPassGallery/locales.js +29 -5
  68. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  69. package/es/plus/walletPassGallery/serve.js +59 -2
  70. package/es/plus/walletPassGallery/utils.js +342 -0
  71. package/lib/components/appointmentBooking/components/Services/index.js +5 -2
  72. package/lib/components/appointmentBooking/components/Voucher/index.js +12 -0
  73. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  74. package/lib/components/booking/components/voucher/index.js +29 -6
  75. package/lib/components/eftpos/form/index.d.ts +0 -1
  76. package/lib/components/eftpos/hooks.d.ts +0 -1
  77. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  78. package/lib/components/eftposPay/hooks.d.ts +1 -1
  79. package/lib/components/eftposPay/store/index.d.ts +1 -1
  80. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  81. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  82. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  83. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  84. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
  85. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  86. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  87. package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
  88. package/lib/components/pay/toC/index.js +52 -19
  89. package/lib/components/pay/toC/model.d.ts +1 -0
  90. package/lib/components/pay/toC/serve.d.ts +18 -0
  91. package/lib/components/pay/toC/serve.js +6 -0
  92. package/lib/components/pay/toC/utils.d.ts +2 -2
  93. package/lib/components/pay/toC/utils.js +4 -0
  94. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  95. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  96. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  97. package/lib/components/ticketBooking/components/timeBar/index.js +2 -5
  98. package/lib/components/walletList/index.js +100 -4
  99. package/lib/components/walletList/locales.js +12 -3
  100. package/lib/components/walletList/serve.d.ts +19 -0
  101. package/lib/components/walletList/serve.js +26 -3
  102. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  103. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  104. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  105. package/lib/index.d.ts +2 -1
  106. package/lib/index.js +6 -3
  107. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  108. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  109. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  110. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  111. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  112. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  113. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  114. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  115. package/lib/plus/selectHolder/index.d.ts +7 -0
  116. package/lib/plus/selectHolder/index.js +202 -0
  117. package/lib/plus/selectHolder/index.less +117 -0
  118. package/lib/plus/selectHolder/locales.d.ts +21 -0
  119. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
  120. package/lib/plus/selectHolder/types.js +17 -0
  121. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  122. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  123. package/lib/plus/walletEditor/locales.js +12 -3
  124. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  125. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  126. package/lib/plus/walletPassGallery/index.js +154 -27
  127. package/lib/plus/walletPassGallery/locales.js +32 -5
  128. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  129. package/lib/plus/walletPassGallery/serve.js +17 -5
  130. package/lib/plus/walletPassGallery/utils.js +287 -0
  131. package/lowcode/event-select-holder/meta.ts +2 -2
  132. package/lowcode/select-holder/meta.ts +220 -0
  133. package/lowcode/select-holder/snippets.ts +41 -0
  134. package/package.json +2 -2
  135. package/es/components/booking/info/service/editService/constants.d.ts +0 -1
  136. package/es/components/pay/toC/locales.d.ts +0 -301
  137. package/es/components/pay/toC/status.d.ts +0 -13
  138. package/es/components/systemSettings/registry/locales.d.ts +0 -272
  139. package/es/components/systemSettings/registry/services.d.ts +0 -77
  140. package/es/components/systemSettings/registry/types.d.ts +0 -126
  141. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  142. package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
  143. package/es/components/wallet/Detail/index.d.ts +0 -42
  144. package/es/components/wallet/Detail/index.js +0 -1182
  145. package/es/components/wallet/Detail/index.less +0 -386
  146. package/es/components/wallet/Detail/locales.d.ts +0 -153
  147. package/es/components/wallet/Detail/locales.js +0 -170
  148. package/es/components/wallet/Detail/model.d.ts +0 -13
  149. package/es/components/wallet/Detail/model.js +0 -22
  150. package/es/components/wallet/Detail/serve.d.ts +0 -39
  151. package/es/components/wallet/Detail/serve.js +0 -64
  152. package/es/components/wallet/DetailContext.d.ts +0 -25
  153. package/es/components/wallet/DetailContext.js +0 -162
  154. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  155. package/es/components/wallet/DiscountCard/index.js +0 -218
  156. package/es/components/wallet/DiscountCard/index.less +0 -9
  157. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  158. package/es/components/wallet/DiscountCard/model.js +0 -22
  159. package/es/components/wallet/PointCard/index.d.ts +0 -3
  160. package/es/components/wallet/PointCard/index.js +0 -169
  161. package/es/components/wallet/PointCard/index.less +0 -9
  162. package/es/components/wallet/PointCard/model.d.ts +0 -13
  163. package/es/components/wallet/PointCard/model.js +0 -22
  164. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  165. package/es/components/wallet/RechargeableCard/index.js +0 -463
  166. package/es/components/wallet/RechargeableCard/index.less +0 -108
  167. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  168. package/es/components/wallet/RechargeableCard/model.js +0 -28
  169. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  170. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  171. package/es/components/wallet/Voucher/index.d.ts +0 -12
  172. package/es/components/wallet/Voucher/index.js +0 -131
  173. package/es/components/wallet/Voucher/index.less +0 -9
  174. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  175. package/es/components/wallet/Voucher/locales.js +0 -20
  176. package/es/components/wallet/Voucher/model.d.ts +0 -13
  177. package/es/components/wallet/Voucher/model.js +0 -22
  178. package/es/components/wallet/carouselArrow.png +0 -0
  179. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  180. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  181. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  182. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  183. package/es/components/wallet/components/UsageRules/index.js +0 -147
  184. package/es/components/wallet/components/UsageRules/index.less +0 -157
  185. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  186. package/es/components/wallet/components/WalletBar/index.js +0 -19
  187. package/es/components/wallet/components/WalletBar/index.less +0 -36
  188. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  189. package/es/components/wallet/components/WalletCard.js +0 -91
  190. package/es/components/wallet/components/index.d.ts +0 -3
  191. package/es/components/wallet/components/index.js +0 -4
  192. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
  193. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  194. package/es/components/wallet/index.d.ts +0 -10
  195. package/es/components/wallet/index.js +0 -807
  196. package/es/components/wallet/index.less +0 -151
  197. package/es/components/wallet/locales.d.ts +0 -132
  198. package/es/components/wallet/locales.js +0 -139
  199. package/es/components/wallet/model.d.ts +0 -37
  200. package/es/components/wallet/model.js +0 -86
  201. package/es/components/wallet/serve.d.ts +0 -150
  202. package/es/components/wallet/serve.js +0 -205
  203. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  204. package/es/components/wallet/utils/formatUtils.js +0 -73
  205. package/es/components/wallet/utils.d.ts +0 -48
  206. package/es/components/walletList/locales.d.ts +0 -18
  207. package/es/components/walletList/types/index.d.ts +0 -194
  208. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
  209. package/es/plus/walletEditor/locales.d.ts +0 -126
  210. package/es/plus/walletEditor/types.d.ts +0 -52
  211. package/es/plus/walletPassGallery/locales.d.ts +0 -270
  212. package/es/pro/Login2.0/hooks/index.d.ts +0 -2
  213. package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
  214. package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
  215. package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
  216. package/es/pro/Login2.0/locales.d.ts +0 -543
  217. package/es/pro/Login2.0/shared/Header.d.ts +0 -11
  218. package/es/pro/Login2.0/shared/registerFlow.d.ts +0 -116
  219. package/es/pro/Login2.0/shared/types.d.ts +0 -232
  220. package/es/pro/Login2.0/types.d.ts +0 -167
  221. package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
  222. package/lib/components/pay/toC/locales.d.ts +0 -301
  223. package/lib/components/pay/toC/status.d.ts +0 -13
  224. package/lib/components/systemSettings/registry/locales.d.ts +0 -272
  225. package/lib/components/systemSettings/registry/services.d.ts +0 -77
  226. package/lib/components/systemSettings/registry/types.d.ts +0 -126
  227. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  228. package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
  229. package/lib/components/wallet/Detail/index.d.ts +0 -42
  230. package/lib/components/wallet/Detail/index.js +0 -874
  231. package/lib/components/wallet/Detail/index.less +0 -386
  232. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  233. package/lib/components/wallet/Detail/locales.js +0 -194
  234. package/lib/components/wallet/Detail/model.d.ts +0 -13
  235. package/lib/components/wallet/Detail/model.js +0 -43
  236. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  237. package/lib/components/wallet/Detail/serve.js +0 -44
  238. package/lib/components/wallet/DetailContext.d.ts +0 -25
  239. package/lib/components/wallet/DetailContext.js +0 -118
  240. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  241. package/lib/components/wallet/DiscountCard/index.js +0 -209
  242. package/lib/components/wallet/DiscountCard/index.less +0 -9
  243. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  244. package/lib/components/wallet/DiscountCard/model.js +0 -43
  245. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  246. package/lib/components/wallet/PointCard/index.js +0 -190
  247. package/lib/components/wallet/PointCard/index.less +0 -9
  248. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  249. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  250. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  251. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  252. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  253. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  254. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  255. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  256. package/lib/components/wallet/Voucher/index.js +0 -146
  257. package/lib/components/wallet/Voucher/index.less +0 -9
  258. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  259. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  260. package/lib/components/wallet/Voucher/model.js +0 -43
  261. package/lib/components/wallet/carouselArrow.png +0 -0
  262. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  263. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  264. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  265. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  266. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  267. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  268. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  269. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  270. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  271. package/lib/components/wallet/components/WalletCard.js +0 -97
  272. package/lib/components/wallet/components/index.d.ts +0 -3
  273. package/lib/components/wallet/components/index.js +0 -45
  274. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
  275. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  276. package/lib/components/wallet/index.d.ts +0 -10
  277. package/lib/components/wallet/index.js +0 -580
  278. package/lib/components/wallet/index.less +0 -151
  279. package/lib/components/wallet/locales.d.ts +0 -132
  280. package/lib/components/wallet/locales.js +0 -163
  281. package/lib/components/wallet/model.d.ts +0 -37
  282. package/lib/components/wallet/model.js +0 -91
  283. package/lib/components/wallet/serve.d.ts +0 -150
  284. package/lib/components/wallet/serve.js +0 -85
  285. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  286. package/lib/components/wallet/utils/formatUtils.js +0 -73
  287. package/lib/components/wallet/utils.d.ts +0 -48
  288. package/lib/components/walletList/locales.d.ts +0 -18
  289. package/lib/components/walletList/types/index.d.ts +0 -194
  290. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
  291. package/lib/plus/walletEditor/locales.d.ts +0 -126
  292. package/lib/plus/walletEditor/types.d.ts +0 -52
  293. package/lib/plus/walletPassGallery/locales.d.ts +0 -270
  294. package/lib/pro/Login2.0/hooks/index.d.ts +0 -2
  295. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
  296. package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
  297. package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
  298. package/lib/pro/Login2.0/locales.d.ts +0 -543
  299. package/lib/pro/Login2.0/shared/Header.d.ts +0 -11
  300. package/lib/pro/Login2.0/shared/registerFlow.d.ts +0 -116
  301. package/lib/pro/Login2.0/shared/types.d.ts +0 -232
  302. package/lib/pro/Login2.0/types.d.ts +0 -167
@@ -1,209 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/wallet/DiscountCard/index.tsx
30
- var DiscountCard_exports = {};
31
- __export(DiscountCard_exports, {
32
- default: () => DiscountCard_default
33
- });
34
- module.exports = __toCommonJS(DiscountCard_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_materials = require("@pisell/materials");
37
- var import_model = require("./model");
38
- var import_DetailContext = require("../DetailContext");
39
- var import_WalletCard = __toESM(require("../components/WalletCard"));
40
- var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
41
- var import_utils = require("@pisell/utils");
42
- var import_locales = __toESM(require("../locales"));
43
- var import_index = require("./index.less");
44
- var { Title } = import_materials.Typography;
45
- var Amount = import_materials.PisellText.Amount;
46
- var RechargeableCard = (0, import_model.Provider)((props) => {
47
- var _a, _b, _c;
48
- const { globalState, setGlobalState } = props;
49
- const { currentId, product_discount_card = [], currentDetail } = globalState;
50
- const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
51
- const context = (0, import_useEngineContext.default)();
52
- const utils = context.appHelper.utils || {};
53
- const dvaStore = (_b = (_a = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a.call(utils)) == null ? void 0 : _b.getState();
54
- const platform = (0, import_react.useMemo)(() => (0, import_utils.isMobile)() ? "h5" : "pc", []);
55
- const { openDetail, renderDetail, closeDetail } = (0, import_DetailContext.useDetail)();
56
- const recordViewRef = (0, import_react.useRef)(null);
57
- (0, import_react.useEffect)(() => {
58
- if ((state == null ? void 0 : state.setup) !== "detail" && recordViewRef.current) {
59
- recordViewRef.current.closeDetailModal();
60
- }
61
- }, [state == null ? void 0 : state.setup]);
62
- (0, import_react.useEffect)(() => {
63
- if (globalState.setup && globalState.setup !== (state == null ? void 0 : state.setup)) {
64
- dispatch({
65
- type: "setState",
66
- payload: { setup: globalState.setup }
67
- });
68
- }
69
- }, [globalState.setup]);
70
- const handleBack = () => {
71
- if (recordViewRef.current) {
72
- recordViewRef.current.closeDetailModal();
73
- }
74
- closeDetail();
75
- dispatch({
76
- type: "setState",
77
- payload: { setup: "list" }
78
- });
79
- setGlobalState({
80
- setup: "list"
81
- });
82
- };
83
- const renderItem = (item) => {
84
- return /* @__PURE__ */ import_react.default.createElement(
85
- import_WalletCard.default,
86
- {
87
- item,
88
- currentId,
89
- isDiscountCard: true,
90
- onClick: () => {
91
- setGlobalState({
92
- currentId: item.id
93
- });
94
- }
95
- }
96
- );
97
- };
98
- (0, import_react.useEffect)(() => {
99
- if (currentId) {
100
- dispatch({
101
- type: "setState",
102
- payload: {
103
- currentDetail: product_discount_card.find(
104
- (item) => item.id === currentId
105
- )
106
- }
107
- });
108
- }
109
- }, [currentId]);
110
- (0, import_react.useEffect)(() => {
111
- const enabledCards = product_discount_card.filter(
112
- (item) => item.limit_status === "enable"
113
- );
114
- const total = enabledCards.reduce(
115
- (sum, item) => sum + Number(item.balance),
116
- 0
117
- );
118
- dispatch({
119
- type: "setState",
120
- payload: {
121
- total
122
- }
123
- });
124
- }, [product_discount_card]);
125
- const isEmpty = !product_discount_card.some(
126
- (item) => item.limit_status === "enable"
127
- );
128
- import_utils.locales.init(import_locales.default, ((_c = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _c.translateLocale) || "en");
129
- const formatData = () => {
130
- const fileterArr = product_discount_card.filter(() => {
131
- });
132
- let available = {
133
- title: import_utils.locales.getText("page.wallet.available"),
134
- dataSource: product_discount_card.filter(
135
- (item) => item.limit_status === "enable"
136
- )
137
- };
138
- const unavailable = {
139
- title: import_utils.locales.getText("page.wallet.unavailable"),
140
- dataSource: product_discount_card.filter(
141
- (item) => item.limit_status === "disable"
142
- )
143
- };
144
- return [available, unavailable];
145
- };
146
- const detail = () => {
147
- if (!(currentDetail == null ? void 0 : currentDetail.id)) return null;
148
- const detailWithBar = {
149
- ...currentDetail,
150
- isDiscoundCard: true,
151
- showWalletBar: platform === "h5",
152
- // 添加显示WalletBar的标志
153
- onBack: handleBack
154
- // 添加返回处理函数
155
- };
156
- return renderDetail(detailWithBar);
157
- };
158
- return isEmpty ? /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-discountCard-title" }, import_utils.locales.getText("page.wallet.discountCard")), /* @__PURE__ */ import_react.default.createElement(
159
- import_materials.RecordView,
160
- {
161
- ref: recordViewRef,
162
- leftSpan: 9,
163
- rightSpan: 15,
164
- gutter: 20,
165
- onRowClick: (currentDetail2) => {
166
- setGlobalState({
167
- currentId: currentDetail2.id || "",
168
- currentDetail: currentDetail2,
169
- setup: "detail"
170
- // 设置状态为detail
171
- });
172
- dispatch({
173
- type: "setState",
174
- payload: { setup: "detail" }
175
- });
176
- openDetail({
177
- ...currentDetail2,
178
- isDiscoundCard: true,
179
- showWalletBar: platform === "h5",
180
- // 添加显示WalletBar的标志
181
- onBack: handleBack
182
- // 添加返回处理函数
183
- });
184
- },
185
- pcDetailModalDisplay: platform === "h5" ? true : false,
186
- padDetailModalDisplay: true,
187
- mobilePadDetailModalDisplay: true,
188
- modalWrapStyle: {
189
- overflowY: "auto",
190
- top: 0,
191
- height: "100%",
192
- zIndex: 998,
193
- position: "fixed",
194
- left: 0,
195
- right: 0
196
- },
197
- split: false,
198
- detail: detail(),
199
- children: null,
200
- emptyButtons: [],
201
- doubleList: true,
202
- doubleListSource: formatData(),
203
- dataSource: product_discount_card,
204
- renderItem: (value) => renderItem(value),
205
- isShowClode: false
206
- }
207
- ));
208
- });
209
- var DiscountCard_default = RechargeableCard;
@@ -1,9 +0,0 @@
1
- .wallet-discountCard-title {
2
- color: var(--Gray-900, #101828);
3
- font-size: 20px;
4
- font-style: normal;
5
- font-weight: 600;
6
- line-height: 30px;
7
- margin-top: 20px;
8
- margin-bottom: 24px;
9
- }
@@ -1,14 +0,0 @@
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,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/components/wallet/DiscountCard/model.tsx
20
- var model_exports = {};
21
- __export(model_exports, {
22
- Context: () => Context,
23
- Provider: () => Provider
24
- });
25
- module.exports = __toCommonJS(model_exports);
26
- var import_utils = require("@pisell/utils");
27
- var defaultState = {
28
- total: 0
29
- };
30
- var { Provider, Context } = (0, import_utils.miniRedux)({
31
- namespace: "state",
32
- state: defaultState,
33
- reducers: {
34
- setState(state, payload) {
35
- return { ...state, ...payload };
36
- }
37
- }
38
- });
39
- // Annotate the CommonJS export names for ESM import in node:
40
- 0 && (module.exports = {
41
- Context,
42
- Provider
43
- });
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const RechargeableCard: any;
3
- export default RechargeableCard;
@@ -1,190 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/components/wallet/PointCard/index.tsx
30
- var PointCard_exports = {};
31
- __export(PointCard_exports, {
32
- default: () => PointCard_default
33
- });
34
- module.exports = __toCommonJS(PointCard_exports);
35
- var import_react = __toESM(require("react"));
36
- var import_materials = require("@pisell/materials");
37
- var import_model = require("./model");
38
- var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
39
- var import_utils = require("@pisell/utils");
40
- var import_locales = __toESM(require("../locales"));
41
- var import_index = require("./index.less");
42
- var import_DetailContext = require("../DetailContext");
43
- var import_WalletCard = __toESM(require("../components/WalletCard"));
44
- var { Title } = import_materials.Typography;
45
- var RechargeableCard = (0, import_model.Provider)((props) => {
46
- var _a, _b, _c;
47
- const { globalState, setGlobalState } = props;
48
- const { currentId, currentDetail, point_card } = globalState;
49
- const { state, dispatch } = (0, import_react.useContext)(import_model.Context);
50
- const context = (0, import_useEngineContext.default)();
51
- const utils = context.appHelper.utils || {};
52
- const dvaStore = (_b = (_a = utils == null ? void 0 : utils.getStore) == null ? void 0 : _a.call(utils)) == null ? void 0 : _b.getState();
53
- const recordViewRef = (0, import_react.useRef)(null);
54
- const { openDetail, renderDetail } = (0, import_DetailContext.useDetail)();
55
- (0, import_react.useEffect)(() => {
56
- document.body.id = "body";
57
- }, []);
58
- const platform = (0, import_utils.isMobile)() ? "h5" : "pc";
59
- const renderItem = (item) => {
60
- return /* @__PURE__ */ import_react.default.createElement(
61
- import_WalletCard.default,
62
- {
63
- item,
64
- balanceTitle: import_utils.locales.getText("page.wallet.pointCard"),
65
- currentId,
66
- onClick: () => {
67
- setGlobalState({
68
- type: "setState",
69
- payload: {
70
- currentId: item.id
71
- }
72
- });
73
- }
74
- }
75
- );
76
- };
77
- (0, import_react.useEffect)(() => {
78
- const enabledCards = point_card.filter(
79
- (item) => item.limit_status === "enable"
80
- );
81
- const total = enabledCards.reduce(
82
- (sum, item) => sum + Number(item.balance),
83
- 0
84
- );
85
- dispatch({
86
- type: "setState",
87
- payload: {
88
- total
89
- }
90
- });
91
- }, [point_card]);
92
- const detail = () => {
93
- if (!(currentDetail == null ? void 0 : currentDetail.id)) return null;
94
- const detailWithProps = {
95
- ...currentDetail,
96
- showWalletBar: platform === "h5",
97
- // 添加显示WalletBar的标志
98
- onBack: handleBack
99
- // 添加返回处理函数
100
- };
101
- return renderDetail(detailWithProps);
102
- };
103
- const handleBack = (0, import_react.useCallback)(() => {
104
- if (recordViewRef.current) {
105
- recordViewRef.current.closeDetailModal();
106
- }
107
- setGlobalState({
108
- setup: "list"
109
- });
110
- }, [recordViewRef, setGlobalState]);
111
- const isEmpty = !point_card.some(
112
- (item) => item.limit_status === "enable"
113
- );
114
- import_utils.locales.init(import_locales.default, ((_c = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _c.translateLocale) || "en");
115
- const formatData = () => {
116
- let available = {
117
- title: import_utils.locales.getText("page.wallet.available"),
118
- dataSource: point_card.filter(
119
- (item) => item.limit_status === "enable"
120
- )
121
- };
122
- const unavailable = {
123
- title: import_utils.locales.getText("page.wallet.unavailable"),
124
- dataSource: point_card.filter(
125
- (item) => item.limit_status === "disable"
126
- )
127
- };
128
- return [available, unavailable];
129
- };
130
- (0, import_react.useEffect)(() => {
131
- var _a2;
132
- if (globalState.setup !== "detail") {
133
- (_a2 = recordViewRef.current) == null ? void 0 : _a2.closeDetailModal();
134
- }
135
- }, [globalState.setup]);
136
- return isEmpty ? /* @__PURE__ */ import_react.default.createElement(import_materials.PisellEmpty, null) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, platform !== "pc" && /* @__PURE__ */ import_react.default.createElement(Title, { className: "wallet-pointCard-title" }, import_utils.locales.getText("page.wallet.pointCard")), /* @__PURE__ */ import_react.default.createElement(
137
- import_materials.CardMetricItem,
138
- {
139
- title: import_utils.locales.getText("page.wallet.points"),
140
- style: { margin: "8px 0 24px" },
141
- hint: false,
142
- tags: false,
143
- number: state.total,
144
- showCurrencySymbol: false
145
- }
146
- ), /* @__PURE__ */ import_react.default.createElement(
147
- import_materials.RecordView,
148
- {
149
- ref: recordViewRef,
150
- mobilePadDetailModalDisplay: true,
151
- leftSpan: 9,
152
- rightSpan: 15,
153
- gutter: 20,
154
- onRowClick: (currentDetail2) => {
155
- setGlobalState({
156
- currentId: currentDetail2.id || "",
157
- currentDetail: currentDetail2,
158
- setup: "detail"
159
- // 设置状态为detail
160
- });
161
- const detailWithProps = {
162
- ...currentDetail2,
163
- showWalletBar: platform === "h5",
164
- // 添加显示WalletBar的标志
165
- onBack: handleBack
166
- // 添加返回处理函数
167
- };
168
- openDetail(detailWithProps);
169
- },
170
- modalWrapStyle: {
171
- overflowY: "auto",
172
- top: 68,
173
- height: "calc(100% - 68px)",
174
- zIndex: 998
175
- },
176
- pcDetailModalDisplay: platform === "h5" ? true : false,
177
- padDetailModalDisplay: true,
178
- isShowClode: false,
179
- split: false,
180
- children: null,
181
- detail: detail(),
182
- emptyButtons: [],
183
- doubleList: true,
184
- doubleListSource: formatData(),
185
- dataSource: point_card,
186
- renderItem: (value) => renderItem(value)
187
- }
188
- ));
189
- });
190
- var PointCard_default = RechargeableCard;
@@ -1,9 +0,0 @@
1
- .wallet-pointCard-title {
2
- color: var(--Gray-900, #101828);
3
- font-size: 20px;
4
- font-style: normal;
5
- font-weight: 600;
6
- line-height: 30px;
7
- margin-top: 20px;
8
- margin-bottom: 24px;
9
- }
@@ -1,13 +0,0 @@
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,13 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface RechargeableCardProps {
4
- globalState: any;
5
- setGlobalState: (state: any) => void;
6
- handleAddWalletCard?: (addWallet: () => void) => void;
7
- }
8
- /**
9
- * 充值卡组件
10
- * 管理充值卡的展示和操作
11
- */
12
- declare const RechargeableCard: React.FC<RechargeableCardProps>;
13
- export default RechargeableCard;