@pisell/private-materials 3.4.61 → 3.4.62

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 (282) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  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/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/appointmentBooking/components/Voucher/index.js +16 -1
  13. package/es/components/booking/addons/model.d.ts +1 -10
  14. package/es/components/booking/components/footer/utils.js +36 -37
  15. package/es/components/booking/components/voucher/index.js +39 -14
  16. package/es/components/booking/forms/model.d.ts +1 -10
  17. package/es/components/booking/info/model.d.ts +1 -10
  18. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  19. package/es/components/booking/info/service2/utils.js +2 -1
  20. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/model.d.ts +1 -9
  22. package/es/components/booking/notes/model.d.ts +1 -10
  23. package/es/components/booking/payments/model.d.ts +1 -10
  24. package/es/components/eftposPay/amount.d.ts +1 -1
  25. package/es/components/eftposPay/device.d.ts +1 -1
  26. package/es/components/eftposPay/store/index.d.ts +1 -1
  27. package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
  28. package/es/components/pay/toC/PaymentList/index.js +54 -5
  29. package/es/components/pay/toC/PaymentList/index.less +58 -1
  30. package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
  31. package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
  32. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  33. package/es/components/pay/toC/PaymentList/serve.js +8 -0
  34. package/es/components/pay/toC/PaymentList/utils.d.ts +26 -0
  35. package/es/components/pay/toC/PaymentList/utils.js +187 -6
  36. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +127 -36
  37. package/es/components/pay/toC/index.js +2 -1
  38. package/es/components/pay/toC/locales.d.ts +6 -0
  39. package/es/components/pay/toC/locales.js +9 -3
  40. package/es/components/pay/toC/model.d.ts +1 -9
  41. package/es/components/schedules/model.d.ts +1 -9
  42. package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
  43. package/es/components/walletList/index.js +180 -41
  44. package/es/components/walletList/locales.d.ts +9 -0
  45. package/es/components/walletList/locales.js +12 -3
  46. package/es/components/walletList/serve.d.ts +19 -0
  47. package/es/components/walletList/serve.js +94 -5
  48. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  49. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  50. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  51. package/es/index.d.ts +2 -1
  52. package/es/index.js +2 -1
  53. package/es/plus/productSelect/index.js +5 -1
  54. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  55. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  56. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  57. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  58. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  59. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  60. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  61. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  62. package/es/plus/selectHolder/index.d.ts +7 -0
  63. package/es/plus/selectHolder/index.js +236 -0
  64. package/es/plus/selectHolder/index.less +117 -0
  65. package/es/plus/selectHolder/locales.d.ts +21 -0
  66. package/es/plus/selectHolder/locales.js +20 -0
  67. package/es/plus/selectHolder/types.d.ts +104 -0
  68. package/es/plus/selectHolder/types.js +1 -0
  69. package/es/plus/selectHolder/utils.d.ts +9 -0
  70. package/es/plus/selectHolder/utils.js +16 -0
  71. package/es/plus/walletEditor/WalletEditor.js +60 -2
  72. package/es/plus/walletEditor/locales.d.ts +9 -0
  73. package/es/plus/walletEditor/locales.js +12 -3
  74. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  75. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  76. package/es/plus/walletPassGallery/index.js +223 -41
  77. package/es/plus/walletPassGallery/index.less +1 -1
  78. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  79. package/es/plus/walletPassGallery/locales.js +29 -5
  80. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  81. package/es/plus/walletPassGallery/serve.js +59 -2
  82. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  83. package/es/plus/walletPassGallery/utils.js +342 -0
  84. package/es/pro/Selector/Selector.d.ts +1 -1
  85. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  86. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -1
  87. package/lib/components/booking/addons/model.d.ts +1 -10
  88. package/lib/components/booking/components/footer/utils.js +6 -8
  89. package/lib/components/booking/components/voucher/index.js +37 -7
  90. package/lib/components/booking/forms/model.d.ts +1 -10
  91. package/lib/components/booking/info/model.d.ts +1 -10
  92. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  93. package/lib/components/booking/info/service2/utils.js +2 -1
  94. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  95. package/lib/components/booking/model.d.ts +1 -9
  96. package/lib/components/booking/notes/model.d.ts +1 -10
  97. package/lib/components/booking/payments/model.d.ts +1 -10
  98. package/lib/components/eftposPay/amount.d.ts +1 -1
  99. package/lib/components/eftposPay/device.d.ts +1 -1
  100. package/lib/components/eftposPay/store/index.d.ts +1 -1
  101. package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
  102. package/lib/components/pay/toC/PaymentList/index.js +36 -5
  103. package/lib/components/pay/toC/PaymentList/index.less +58 -1
  104. package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
  105. package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
  106. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  107. package/lib/components/pay/toC/PaymentList/serve.js +6 -1
  108. package/lib/components/pay/toC/PaymentList/utils.d.ts +26 -0
  109. package/lib/components/pay/toC/PaymentList/utils.js +155 -7
  110. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +85 -1
  111. package/lib/components/pay/toC/index.js +2 -1
  112. package/lib/components/pay/toC/locales.d.ts +6 -0
  113. package/lib/components/pay/toC/locales.js +9 -3
  114. package/lib/components/pay/toC/model.d.ts +1 -9
  115. package/lib/components/schedules/model.d.ts +1 -9
  116. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +2 -1
  117. package/lib/components/walletList/index.js +105 -5
  118. package/lib/components/walletList/locales.d.ts +9 -0
  119. package/lib/components/walletList/locales.js +12 -3
  120. package/lib/components/walletList/serve.d.ts +19 -0
  121. package/lib/components/walletList/serve.js +26 -3
  122. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  123. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  124. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  125. package/lib/index.d.ts +2 -1
  126. package/lib/index.js +6 -3
  127. package/lib/plus/productSelect/index.js +4 -1
  128. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  129. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  130. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  131. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  132. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  133. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  134. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  135. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  136. package/lib/plus/selectHolder/index.d.ts +7 -0
  137. package/lib/plus/selectHolder/index.js +202 -0
  138. package/lib/plus/selectHolder/index.less +117 -0
  139. package/lib/plus/selectHolder/locales.d.ts +21 -0
  140. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
  141. package/lib/plus/selectHolder/types.d.ts +104 -0
  142. package/lib/plus/selectHolder/types.js +17 -0
  143. package/lib/plus/selectHolder/utils.d.ts +9 -0
  144. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  145. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  146. package/lib/plus/walletEditor/locales.d.ts +9 -0
  147. package/lib/plus/walletEditor/locales.js +12 -3
  148. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  149. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  150. package/lib/plus/walletPassGallery/index.js +154 -27
  151. package/lib/plus/walletPassGallery/index.less +1 -1
  152. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  153. package/lib/plus/walletPassGallery/locales.js +32 -5
  154. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  155. package/lib/plus/walletPassGallery/serve.js +17 -5
  156. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  157. package/lib/plus/walletPassGallery/utils.js +287 -0
  158. package/lib/pro/Selector/Selector.d.ts +1 -1
  159. package/lowcode/event-select-holder/meta.ts +2 -2
  160. package/lowcode/select-holder/meta.ts +220 -0
  161. package/lowcode/select-holder/snippets.ts +41 -0
  162. package/package.json +4 -4
  163. package/es/components/wallet/Detail/index.d.ts +0 -42
  164. package/es/components/wallet/Detail/index.js +0 -1182
  165. package/es/components/wallet/Detail/index.less +0 -386
  166. package/es/components/wallet/Detail/locales.d.ts +0 -153
  167. package/es/components/wallet/Detail/locales.js +0 -170
  168. package/es/components/wallet/Detail/model.d.ts +0 -13
  169. package/es/components/wallet/Detail/model.js +0 -22
  170. package/es/components/wallet/Detail/serve.d.ts +0 -39
  171. package/es/components/wallet/Detail/serve.js +0 -64
  172. package/es/components/wallet/DetailContext.d.ts +0 -25
  173. package/es/components/wallet/DetailContext.js +0 -162
  174. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  175. package/es/components/wallet/DiscountCard/index.js +0 -218
  176. package/es/components/wallet/DiscountCard/index.less +0 -9
  177. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  178. package/es/components/wallet/DiscountCard/model.js +0 -22
  179. package/es/components/wallet/PointCard/index.d.ts +0 -3
  180. package/es/components/wallet/PointCard/index.js +0 -169
  181. package/es/components/wallet/PointCard/index.less +0 -9
  182. package/es/components/wallet/PointCard/model.d.ts +0 -13
  183. package/es/components/wallet/PointCard/model.js +0 -22
  184. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  185. package/es/components/wallet/RechargeableCard/index.js +0 -463
  186. package/es/components/wallet/RechargeableCard/index.less +0 -108
  187. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  188. package/es/components/wallet/RechargeableCard/model.js +0 -28
  189. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  190. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  191. package/es/components/wallet/Voucher/index.d.ts +0 -12
  192. package/es/components/wallet/Voucher/index.js +0 -131
  193. package/es/components/wallet/Voucher/index.less +0 -9
  194. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  195. package/es/components/wallet/Voucher/locales.js +0 -20
  196. package/es/components/wallet/Voucher/model.d.ts +0 -13
  197. package/es/components/wallet/Voucher/model.js +0 -22
  198. package/es/components/wallet/carouselArrow.png +0 -0
  199. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  200. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  201. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  202. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  203. package/es/components/wallet/components/UsageRules/index.js +0 -147
  204. package/es/components/wallet/components/UsageRules/index.less +0 -157
  205. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  206. package/es/components/wallet/components/WalletBar/index.js +0 -19
  207. package/es/components/wallet/components/WalletBar/index.less +0 -36
  208. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  209. package/es/components/wallet/components/WalletCard.js +0 -91
  210. package/es/components/wallet/components/index.d.ts +0 -3
  211. package/es/components/wallet/components/index.js +0 -4
  212. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
  213. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  214. package/es/components/wallet/index.d.ts +0 -10
  215. package/es/components/wallet/index.js +0 -807
  216. package/es/components/wallet/index.less +0 -151
  217. package/es/components/wallet/locales.d.ts +0 -132
  218. package/es/components/wallet/locales.js +0 -139
  219. package/es/components/wallet/model.d.ts +0 -37
  220. package/es/components/wallet/model.js +0 -86
  221. package/es/components/wallet/serve.d.ts +0 -150
  222. package/es/components/wallet/serve.js +0 -205
  223. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  224. package/es/components/wallet/utils/formatUtils.js +0 -73
  225. package/lib/components/wallet/Detail/index.d.ts +0 -42
  226. package/lib/components/wallet/Detail/index.js +0 -874
  227. package/lib/components/wallet/Detail/index.less +0 -386
  228. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  229. package/lib/components/wallet/Detail/locales.js +0 -194
  230. package/lib/components/wallet/Detail/model.d.ts +0 -13
  231. package/lib/components/wallet/Detail/model.js +0 -43
  232. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  233. package/lib/components/wallet/Detail/serve.js +0 -44
  234. package/lib/components/wallet/DetailContext.d.ts +0 -25
  235. package/lib/components/wallet/DetailContext.js +0 -118
  236. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  237. package/lib/components/wallet/DiscountCard/index.js +0 -209
  238. package/lib/components/wallet/DiscountCard/index.less +0 -9
  239. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  240. package/lib/components/wallet/DiscountCard/model.js +0 -43
  241. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  242. package/lib/components/wallet/PointCard/index.js +0 -190
  243. package/lib/components/wallet/PointCard/index.less +0 -9
  244. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  245. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  246. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  247. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  248. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  249. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  250. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  251. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  252. package/lib/components/wallet/Voucher/index.js +0 -146
  253. package/lib/components/wallet/Voucher/index.less +0 -9
  254. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  255. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  256. package/lib/components/wallet/Voucher/model.js +0 -43
  257. package/lib/components/wallet/carouselArrow.png +0 -0
  258. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  259. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  260. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  261. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  262. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  263. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  264. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  265. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  266. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  267. package/lib/components/wallet/components/WalletCard.js +0 -97
  268. package/lib/components/wallet/components/index.d.ts +0 -3
  269. package/lib/components/wallet/components/index.js +0 -45
  270. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
  271. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  272. package/lib/components/wallet/index.d.ts +0 -10
  273. package/lib/components/wallet/index.js +0 -580
  274. package/lib/components/wallet/index.less +0 -151
  275. package/lib/components/wallet/locales.d.ts +0 -132
  276. package/lib/components/wallet/locales.js +0 -163
  277. package/lib/components/wallet/model.d.ts +0 -37
  278. package/lib/components/wallet/model.js +0 -91
  279. package/lib/components/wallet/serve.d.ts +0 -150
  280. package/lib/components/wallet/serve.js +0 -85
  281. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  282. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -55,7 +55,7 @@ var ShopDiscountHooks = {
55
55
  };
56
56
  var services = {};
57
57
  var VoucherCard = (props) => {
58
- var _a, _b, _c, _d;
58
+ var _a, _b, _c, _d, _e;
59
59
  const context = (0, import_useEngineContext.default)();
60
60
  const { state, dispatch, source } = props;
61
61
  const [showDetail, setShowDetail] = (0, import_react.useState)(false);
@@ -66,6 +66,7 @@ var VoucherCard = (props) => {
66
66
  const addonsValueRef = (0, import_react.useRef)(state.addons.value);
67
67
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
68
68
  const shopDiscount = pisellos.getModule("shopDiscount");
69
+ const holderChangedRef = (0, import_react.useRef)(false);
69
70
  services = state.service;
70
71
  (0, import_ahooks.useDebounceEffect)(
71
72
  () => {
@@ -89,7 +90,7 @@ var VoucherCard = (props) => {
89
90
  const serviceMemo = (0, import_react.useMemo)(() => {
90
91
  var _a2;
91
92
  const val = (_a2 = state.service.value || []) == null ? void 0 : _a2.map((value) => {
92
- var _a3, _b2;
93
+ var _a3, _b2, _c2;
93
94
  return {
94
95
  booking_id: value.booking_id,
95
96
  id: value.id,
@@ -97,9 +98,9 @@ var VoucherCard = (props) => {
97
98
  total: (_a3 = value == null ? void 0 : value._extend) == null ? void 0 : _a3.total,
98
99
  discount_list: value.discount_list,
99
100
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
101
+ holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id,
100
102
  quantity: value._extend.quantity,
101
- startDate: value._extend.startDate,
102
- quantity: value._extend.quantity
103
+ startDate: value._extend.startDate
103
104
  };
104
105
  });
105
106
  return val;
@@ -126,6 +127,29 @@ var VoucherCard = (props) => {
126
127
  });
127
128
  return val;
128
129
  }, [state.addons.value]);
130
+ const holdersMemo = (0, import_react.useMemo)(() => {
131
+ var _a2;
132
+ if (isBooking4Shop) {
133
+ let list = [];
134
+ if ((_a2 = state.pet) == null ? void 0 : _a2.value) {
135
+ let entries = Object.entries(state.pet.value);
136
+ if (entries.length === 1) {
137
+ list = entries[0][1];
138
+ }
139
+ }
140
+ shopDiscount.setHolders(list);
141
+ holderChangedRef.current = true;
142
+ return list || [];
143
+ }
144
+ }, [(_c = state.pet) == null ? void 0 : _c.value, isBooking4Shop]);
145
+ (0, import_react.useEffect)(() => {
146
+ var _a2, _b2, _c2, _d2;
147
+ console.log("update booking subject", state.bookingConfig);
148
+ (_d2 = shopDiscount == null ? void 0 : shopDiscount.setBookingSubject) == null ? void 0 : _d2.call(
149
+ shopDiscount,
150
+ (_c2 = (_b2 = (_a2 = state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.basic) == null ? void 0 : _c2.appointment_subject
151
+ );
152
+ }, [state.bookingConfig]);
129
153
  const disabled = (0, import_react.useMemo)(() => {
130
154
  var _a2;
131
155
  if (["paid", "partially_paid"].includes(
@@ -138,7 +162,7 @@ var VoucherCard = (props) => {
138
162
  const { run } = (0, import_ahooks.useDebounceFn)(
139
163
  () => {
140
164
  var _a2, _b2;
141
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
165
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_b2 = (_a2 = state.service) == null ? void 0 : _a2.value) == null ? void 0 : _b2.length)) {
142
166
  return;
143
167
  }
144
168
  if (isBooking4Shop) {
@@ -149,13 +173,19 @@ var VoucherCard = (props) => {
149
173
  console.log("input: ", state.service.value);
150
174
  console.log("output: ", val);
151
175
  productListToValue(val.productList);
176
+ holderChangedRef.current = false;
152
177
  }
153
178
  },
154
179
  { wait: 500 }
155
180
  );
156
181
  (0, import_react.useEffect)(() => {
157
182
  run();
158
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
183
+ }, [
184
+ JSON.stringify(serviceMemo),
185
+ JSON.stringify(addonsMemo),
186
+ JSON.stringify(holdersMemo),
187
+ isBooking4Shop
188
+ ]);
159
189
  const fn = (0, import_ahooks.useMemoizedFn)((result) => {
160
190
  var _a2;
161
191
  if (!(result == null ? void 0 : result.productList) || ((_a2 = result == null ? void 0 : result.productList) == null ? void 0 : _a2.some((item) => !item))) {
@@ -293,7 +323,7 @@ var VoucherCard = (props) => {
293
323
  {
294
324
  style: { width: "100%" },
295
325
  mixedSort,
296
- dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
326
+ dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
297
327
  onChange: (val) => {
298
328
  const shopDiscount2 = pisellos.getModule("shopDiscount");
299
329
  const detail = shopDiscount2.setDiscountSelected({
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -178,7 +178,7 @@ var handleChangeHolder = (products, currentItem, other) => {
178
178
  ...item,
179
179
  _extend: {
180
180
  ...item._extend,
181
- holder_id: (0, import_utils2.isArr)(other) ? other.map((item2) => item2.id) : item._extend.quantity > 1 ? [other.id] : other.id
181
+ holder_id: (0, import_utils2.isArr)(other) ? other.map((item2) => item2.id) : item._extend.quantity > 1 ? [other.id] : other == null ? void 0 : other.id
182
182
  }
183
183
  };
184
184
  }
@@ -513,6 +513,7 @@ var getGeneralParams = (item, state, isParallelResource) => {
513
513
  holders: formatHolders(holders),
514
514
  isShowChangeHolder: !isNormalProduct,
515
515
  isShowAction: (0, import_utils4.isShowAddTime)(state, item),
516
+ allowClearHolder: true,
516
517
  actionText: import_utils2.locales.getText("page.booking.text.add-time"),
517
518
  isMultipleResource: true,
518
519
  multiResources,
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -109,11 +108,4 @@ export declare const walkInData: {
109
108
  id: number;
110
109
  nickname: string;
111
110
  };
112
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
113
- state: FormState;
114
- } & {
115
- dispatch: (params: {
116
- type: string;
117
- payload: any;
118
- }) => void;
119
- }>;
111
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -295,7 +295,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
300
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
301
  action?: "pay" | "amount" | "deviceList" | undefined;
@@ -12,7 +12,7 @@ export interface PaymentListProps {
12
12
  renderTitle?: () => React.ReactNode;
13
13
  }
14
14
  export interface PaymentListRef {
15
- init: (props: any) => {};
15
+ init: (props: any, amount?: number) => {};
16
16
  calculateSurcharge: (amount: number) => any;
17
17
  }
18
18
  declare const _default: React.ForwardRefExoticComponent<PaymentListProps & React.RefAttributes<unknown>>;
@@ -90,11 +90,11 @@ var PaymentList = (props, ref) => {
90
90
  var _a2, _b2;
91
91
  return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2);
92
92
  }, []);
93
- const init = (list) => {
93
+ const init = (list, amount) => {
94
94
  var _a2, _b2;
95
95
  setLoading(true);
96
96
  const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
97
- const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp);
97
+ const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp, amount);
98
98
  if (paymentList2.length > 0) {
99
99
  let first = paymentList2[0];
100
100
  setPaymentList(paymentList2);
@@ -147,6 +147,24 @@ var PaymentList = (props, ref) => {
147
147
  }
148
148
  ));
149
149
  };
150
+ const renderCreditCardToast = (_item) => {
151
+ var _a2;
152
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-wrap surcharge-modal-wrap-credit-card" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-lists" }, (_a2 = _item == null ? void 0 : _item.surcharge_config_result) == null ? void 0 : _a2.map((d) => {
153
+ var _a3, _b2;
154
+ return /* @__PURE__ */ import_react.default.createElement("div", { key: d.name, className: "surcharge-modal-list-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-header" }, (_a3 = d == null ? void 0 : d.icons) == null ? void 0 : _a3.map((icon) => {
155
+ return /* @__PURE__ */ import_react.default.createElement(
156
+ import_materials.Image,
157
+ {
158
+ src: icon,
159
+ className: "header-icon",
160
+ isPreview: false
161
+ }
162
+ );
163
+ }), /* @__PURE__ */ import_react.default.createElement("span", null, d.name)), /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-content" }, (_b2 = d == null ? void 0 : d.lists) == null ? void 0 : _b2.map((item) => {
164
+ return /* @__PURE__ */ import_react.default.createElement("div", { key: item.name, className: "content-item" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils2.locales.getText(item.area_text)), /* @__PURE__ */ import_react.default.createElement("span", { className: "item-fee" }, item.surcharge_fee), /* @__PURE__ */ import_react.default.createElement("span", null, item.surcharge_text));
165
+ })));
166
+ })));
167
+ };
150
168
  const content = (0, import_react.useMemo)(() => {
151
169
  if (loading) {
152
170
  return null;
@@ -172,8 +190,9 @@ var PaymentList = (props, ref) => {
172
190
  onChange: paymentTypeChange,
173
191
  optionClassName: "payment-item",
174
192
  renderOption: (d, active) => {
175
- var _a2, _b2;
193
+ var _a2, _b2, _c2;
176
194
  const showIcon = d.surcharge && d.service !== "pisell.other.cashmanual" && d.service !== "pisell.custom_payment" || ((_a2 = d == null ? void 0 : d.params) == null ? void 0 : _a2.description) && (d.service === "pisell.other.cashmanual" || d.service === "pisell.custom_payment");
195
+ const showCreditCardToast = (d == null ? void 0 : d.service) === "mw.credit_card" && ((_b2 = d == null ? void 0 : d.surcharge_config_result) == null ? void 0 : _b2.length) > 0;
177
196
  return /* @__PURE__ */ import_react.default.createElement(
178
197
  import_materials.PisellRow,
179
198
  {
@@ -199,12 +218,24 @@ var PaymentList = (props, ref) => {
199
218
  d.title,
200
219
  " "
201
220
  ),
202
- /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((_b2 = d == null ? void 0 : d.params) == null ? void 0 : _b2.description) || d.surcharge) && d.service !== "pisell.offline_payment" ? /* @__PURE__ */ import_react.default.createElement(
221
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((_c2 = d == null ? void 0 : d.params) == null ? void 0 : _c2.description) || d.surcharge) && d.service !== "pisell.offline_payment" ? /* @__PURE__ */ import_react.default.createElement(
203
222
  import_materials.PisellTooltip,
204
223
  {
205
- title: renderToast(d),
224
+ title: showCreditCardToast ? renderCreditCardToast(d) : renderToast(d),
206
225
  onClick: (e) => {
207
226
  e.stopPropagation();
227
+ },
228
+ overlayClassName: showCreditCardToast ? "surcharge-tooltip-overlay-wrap" : "",
229
+ getPopupContainer: (triggerNode) => {
230
+ var _a3;
231
+ if (showCreditCardToast) {
232
+ const modalContainer = (_a3 = triggerNode == null ? void 0 : triggerNode.closest) == null ? void 0 : _a3.call(
233
+ triggerNode,
234
+ ".toc-pay-modal-content .pisell-lowcode-modal"
235
+ );
236
+ return modalContainer || document.body;
237
+ }
238
+ return document.body;
208
239
  }
209
240
  },
210
241
  /* @__PURE__ */ import_react.default.createElement(
@@ -109,4 +109,61 @@
109
109
  font-style: normal;
110
110
  font-weight: 500;
111
111
  }
112
- }
112
+ }
113
+
114
+ .surcharge-tooltip-overlay-wrap{
115
+ max-width: 92% !important;
116
+ width: 92%;
117
+ left: 4% !important;
118
+ .pisell-lowcode-tooltip-inner{
119
+ background: #F2F4F7 !important;
120
+ }
121
+ }
122
+
123
+ .surcharge-modal-wrap-credit-card {
124
+ .surcharge-modal-lists {
125
+ display: flex;
126
+ flex-direction: column;
127
+ gap: 16px;
128
+ .surcharge-modal-list-item {
129
+ display: flex;
130
+ flex-direction: column;
131
+ gap: 8px;
132
+ .surcharge-modal-list-item-header {
133
+ display: flex;
134
+ align-items: center;
135
+ gap: 12px;
136
+ color: #101828;
137
+ font-size: 14px;
138
+ font-weight: 600;
139
+ line-height: 20px;
140
+ .header-icon{
141
+ width: 58px;
142
+ }
143
+ }
144
+ .surcharge-modal-list-item-content {
145
+ display: flex;
146
+ gap: 12px;
147
+ .content-item {
148
+ display: flex;
149
+ flex-direction: column;
150
+ flex: 1;
151
+ padding: 8px 12px;
152
+ border-radius: 8px;
153
+ box-shadow: 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
154
+ background: white;
155
+ color: #475467;
156
+ font-size: 12px;
157
+ font-weight: 400;
158
+ line-height: 18px;
159
+ .item-fee {
160
+ color: black;
161
+ font-size: 24px;
162
+ font-weight: 700;
163
+ line-height: 32px;
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
20
20
  * @Author: zhiwei.Wang
21
21
  * @Date: 2024-08-16 10:57
22
22
  */
23
- export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
23
+ export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean, amount?: number) => {
24
24
  message: string;
25
25
  status: string;
26
26
  paymentList: any[];
@@ -27,6 +27,7 @@ var import_utils = require("../../../../utils");
27
27
  var import_status = require("./status");
28
28
  var import_utils2 = require("@pisell/utils");
29
29
  var import_status2 = require("./status");
30
+ var import_utils3 = require("./utils");
30
31
  var getPaymentList = async (values) => {
31
32
  let { data = [] } = await import_utils.request.getRequest().get("/h5/pay/order/payments", values);
32
33
  return filterPaymentList(data);
@@ -43,7 +44,7 @@ var sortArr = [
43
44
  "pisell.other.cashmanual",
44
45
  "pisell.custom_payment"
45
46
  ];
46
- var filterPaymentList = (list, platform = "h5", isApp) => {
47
+ var filterPaymentList = (list, platform = "h5", isApp, amount) => {
47
48
  let paymentList = [...list];
48
49
  let _paymentKeys = [...import_status.paymentKeys];
49
50
  const walletPass = paymentList.find((d) => d.service === "pisell.wallet_pass");
@@ -82,6 +83,10 @@ var filterPaymentList = (list, platform = "h5", isApp) => {
82
83
  if ((0, import_status2.isCustomPayment)(d.service)) {
83
84
  service = service + "|" + d.params.custom_payment_id;
84
85
  }
86
+ if (service === "mw.credit_card") {
87
+ d.surcharge = (0, import_utils3.formatCreditCardSurchargeText)(d == null ? void 0 : d.surcharge_config, d == null ? void 0 : d.surcharge_text);
88
+ d.surcharge_config_result = (0, import_utils3.formatCreditCardSurchargeList)(d, amount ?? 0);
89
+ }
85
90
  return {
86
91
  ...d,
87
92
  service,
@@ -1,3 +1,29 @@
1
+ /**
2
+ * @description: visa/master手续费是否一致
3
+ * @param {any} creditCardConfig
4
+ * @return {*}
5
+ */
6
+ export declare const isCreditCardSurchargeSame: (creditCardConfig: any[]) => boolean;
7
+ /**
8
+ * @description: 格式化visa/master手续费
9
+ * @param {any} item 支付列表项
10
+ * @param {number} amount 订单金额
11
+ * @param {boolean} isSame 手续费是否一致
12
+ * @return {*}
13
+ */
14
+ export declare const formatCreditCardSurcharge: (item: any, amount: number, isSame: boolean) => any;
15
+ /**
16
+ * @description: 格式化visa/master手续费列表
17
+ * @param {any} item
18
+ * @param {number} amount
19
+ * @return {*}
20
+ */
21
+ export declare const formatCreditCardSurchargeList: (item: any, amount: number) => any;
22
+ /**
23
+ * @description: 格式化visa/master手续费文案,只显示百分比区间
24
+ * @return {*}
25
+ */
26
+ export declare const formatCreditCardSurchargeText: (surcharge_config: any[], surcharge_text: string) => string;
1
27
  /**
2
28
  * @title: 计算支付列表的手续费
3
29
  * @description: