@pisell/private-materials 6.3.54 → 6.3.56

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 (292) 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/formItemChildrenWrap/index.d.ts +0 -1
  15. package/es/components/booking/components/voucher/index.js +29 -9
  16. package/es/components/booking/forms/table/index.d.ts +0 -1
  17. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  18. package/es/components/booking/info/service/like/index.d.ts +0 -1
  19. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  20. package/es/components/eftpos/form/index.d.ts +0 -1
  21. package/es/components/eftpos/group/index.d.ts +0 -1
  22. package/es/components/eftpos/hooks.d.ts +0 -1
  23. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  24. package/es/components/eftpos/icon/device.d.ts +0 -1
  25. package/es/components/eftpos/receipt/index.d.ts +0 -1
  26. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  27. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  28. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  29. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  30. package/es/components/eftposPay/hooks.d.ts +1 -1
  31. package/es/components/eftposPay/store/index.d.ts +1 -1
  32. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  33. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  34. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  36. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  37. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  38. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  39. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  40. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  41. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  42. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  43. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  44. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  45. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  46. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  47. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  48. package/es/components/walletList/index.js +173 -39
  49. package/es/components/walletList/locales.d.ts +9 -0
  50. package/es/components/walletList/locales.js +12 -3
  51. package/es/components/walletList/serve.d.ts +19 -0
  52. package/es/components/walletList/serve.js +94 -5
  53. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  54. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  55. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  56. package/es/index.d.ts +2 -1
  57. package/es/index.js +3 -2
  58. package/es/plus/clientName/index.d.ts +0 -1
  59. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  60. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  61. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  62. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  63. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  64. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  65. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  66. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  67. package/es/plus/selectHolder/index.d.ts +7 -0
  68. package/es/plus/selectHolder/index.js +236 -0
  69. package/es/plus/selectHolder/index.less +117 -0
  70. package/es/plus/selectHolder/locales.d.ts +21 -0
  71. package/es/plus/selectHolder/locales.js +20 -0
  72. package/es/plus/selectHolder/types.d.ts +104 -0
  73. package/es/plus/selectHolder/types.js +1 -0
  74. package/es/plus/selectHolder/utils.d.ts +9 -0
  75. package/es/plus/selectHolder/utils.js +16 -0
  76. package/es/plus/walletEditor/WalletEditor.js +60 -2
  77. package/es/plus/walletEditor/locales.d.ts +9 -0
  78. package/es/plus/walletEditor/locales.js +12 -3
  79. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  80. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  81. package/es/plus/walletPassGallery/index.js +223 -41
  82. package/es/plus/walletPassGallery/locales.d.ts +15 -0
  83. package/es/plus/walletPassGallery/locales.js +29 -5
  84. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  85. package/es/plus/walletPassGallery/serve.js +59 -2
  86. package/es/plus/walletPassGallery/utils.d.ts +48 -0
  87. package/es/plus/walletPassGallery/utils.js +342 -0
  88. package/es/pro/Login2.0/index.less +6 -6
  89. package/es/pro/pisellPaymentList/example.d.ts +0 -1
  90. package/lib/components/appointmentBooking/components/Services/index.js +5 -2
  91. package/lib/components/appointmentBooking/components/Voucher/index.js +12 -0
  92. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  93. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  94. package/lib/components/booking/components/voucher/index.js +29 -6
  95. package/lib/components/booking/forms/table/index.d.ts +0 -1
  96. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  97. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  98. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  99. package/lib/components/eftpos/form/index.d.ts +0 -1
  100. package/lib/components/eftpos/group/index.d.ts +0 -1
  101. package/lib/components/eftpos/hooks.d.ts +0 -1
  102. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  103. package/lib/components/eftpos/icon/device.d.ts +0 -1
  104. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  105. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  106. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  107. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  108. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  109. package/lib/components/eftposPay/hooks.d.ts +1 -1
  110. package/lib/components/eftposPay/store/index.d.ts +1 -1
  111. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  112. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  113. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  114. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  115. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  116. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  117. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  118. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  119. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  120. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  121. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  122. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  123. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  124. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  125. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  126. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  127. package/lib/components/walletList/index.js +100 -4
  128. package/lib/components/walletList/locales.d.ts +9 -0
  129. package/lib/components/walletList/locales.js +12 -3
  130. package/lib/components/walletList/serve.d.ts +19 -0
  131. package/lib/components/walletList/serve.js +26 -3
  132. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  133. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  134. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  135. package/lib/index.d.ts +2 -1
  136. package/lib/index.js +6 -3
  137. package/lib/plus/clientName/index.d.ts +0 -1
  138. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  139. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  140. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  141. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  142. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  143. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  144. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  145. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  146. package/lib/plus/selectHolder/index.d.ts +7 -0
  147. package/lib/plus/selectHolder/index.js +202 -0
  148. package/lib/plus/selectHolder/index.less +117 -0
  149. package/lib/plus/selectHolder/locales.d.ts +21 -0
  150. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
  151. package/lib/plus/selectHolder/types.d.ts +104 -0
  152. package/lib/plus/selectHolder/types.js +17 -0
  153. package/lib/plus/selectHolder/utils.d.ts +9 -0
  154. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  155. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  156. package/lib/plus/walletEditor/locales.d.ts +9 -0
  157. package/lib/plus/walletEditor/locales.js +12 -3
  158. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  159. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  160. package/lib/plus/walletPassGallery/index.js +154 -27
  161. package/lib/plus/walletPassGallery/locales.d.ts +15 -0
  162. package/lib/plus/walletPassGallery/locales.js +32 -5
  163. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  164. package/lib/plus/walletPassGallery/serve.js +17 -5
  165. package/lib/plus/walletPassGallery/utils.d.ts +48 -0
  166. package/lib/plus/walletPassGallery/utils.js +287 -0
  167. package/lib/pro/Login2.0/index.less +6 -6
  168. package/lib/pro/pisellPaymentList/example.d.ts +0 -1
  169. package/lowcode/event-select-holder/meta.ts +2 -2
  170. package/lowcode/select-holder/meta.ts +220 -0
  171. package/lowcode/select-holder/snippets.ts +41 -0
  172. package/package.json +4 -4
  173. package/es/components/wallet/Detail/index.d.ts +0 -42
  174. package/es/components/wallet/Detail/index.js +0 -1182
  175. package/es/components/wallet/Detail/index.less +0 -386
  176. package/es/components/wallet/Detail/locales.d.ts +0 -153
  177. package/es/components/wallet/Detail/locales.js +0 -170
  178. package/es/components/wallet/Detail/model.d.ts +0 -13
  179. package/es/components/wallet/Detail/model.js +0 -22
  180. package/es/components/wallet/Detail/serve.d.ts +0 -39
  181. package/es/components/wallet/Detail/serve.js +0 -64
  182. package/es/components/wallet/DetailContext.d.ts +0 -25
  183. package/es/components/wallet/DetailContext.js +0 -162
  184. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  185. package/es/components/wallet/DiscountCard/index.js +0 -218
  186. package/es/components/wallet/DiscountCard/index.less +0 -9
  187. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  188. package/es/components/wallet/DiscountCard/model.js +0 -22
  189. package/es/components/wallet/PointCard/index.d.ts +0 -3
  190. package/es/components/wallet/PointCard/index.js +0 -169
  191. package/es/components/wallet/PointCard/index.less +0 -9
  192. package/es/components/wallet/PointCard/model.d.ts +0 -13
  193. package/es/components/wallet/PointCard/model.js +0 -22
  194. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  195. package/es/components/wallet/RechargeableCard/index.js +0 -463
  196. package/es/components/wallet/RechargeableCard/index.less +0 -108
  197. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  198. package/es/components/wallet/RechargeableCard/model.js +0 -28
  199. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  200. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  201. package/es/components/wallet/Voucher/index.d.ts +0 -12
  202. package/es/components/wallet/Voucher/index.js +0 -131
  203. package/es/components/wallet/Voucher/index.less +0 -9
  204. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  205. package/es/components/wallet/Voucher/locales.js +0 -20
  206. package/es/components/wallet/Voucher/model.d.ts +0 -13
  207. package/es/components/wallet/Voucher/model.js +0 -22
  208. package/es/components/wallet/carouselArrow.png +0 -0
  209. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  210. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  211. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  212. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  213. package/es/components/wallet/components/UsageRules/index.js +0 -147
  214. package/es/components/wallet/components/UsageRules/index.less +0 -157
  215. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  216. package/es/components/wallet/components/WalletBar/index.js +0 -19
  217. package/es/components/wallet/components/WalletBar/index.less +0 -36
  218. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  219. package/es/components/wallet/components/WalletCard.js +0 -91
  220. package/es/components/wallet/components/index.d.ts +0 -3
  221. package/es/components/wallet/components/index.js +0 -4
  222. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
  223. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  224. package/es/components/wallet/index.d.ts +0 -10
  225. package/es/components/wallet/index.js +0 -807
  226. package/es/components/wallet/index.less +0 -151
  227. package/es/components/wallet/locales.d.ts +0 -132
  228. package/es/components/wallet/locales.js +0 -139
  229. package/es/components/wallet/model.d.ts +0 -37
  230. package/es/components/wallet/model.js +0 -86
  231. package/es/components/wallet/serve.d.ts +0 -150
  232. package/es/components/wallet/serve.js +0 -205
  233. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  234. package/es/components/wallet/utils/formatUtils.js +0 -73
  235. package/lib/components/wallet/Detail/index.d.ts +0 -42
  236. package/lib/components/wallet/Detail/index.js +0 -874
  237. package/lib/components/wallet/Detail/index.less +0 -386
  238. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  239. package/lib/components/wallet/Detail/locales.js +0 -194
  240. package/lib/components/wallet/Detail/model.d.ts +0 -13
  241. package/lib/components/wallet/Detail/model.js +0 -43
  242. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  243. package/lib/components/wallet/Detail/serve.js +0 -44
  244. package/lib/components/wallet/DetailContext.d.ts +0 -25
  245. package/lib/components/wallet/DetailContext.js +0 -118
  246. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  247. package/lib/components/wallet/DiscountCard/index.js +0 -209
  248. package/lib/components/wallet/DiscountCard/index.less +0 -9
  249. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  250. package/lib/components/wallet/DiscountCard/model.js +0 -43
  251. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  252. package/lib/components/wallet/PointCard/index.js +0 -190
  253. package/lib/components/wallet/PointCard/index.less +0 -9
  254. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  255. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  256. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  257. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  258. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  259. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  260. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  261. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  262. package/lib/components/wallet/Voucher/index.js +0 -146
  263. package/lib/components/wallet/Voucher/index.less +0 -9
  264. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  265. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  266. package/lib/components/wallet/Voucher/model.js +0 -43
  267. package/lib/components/wallet/carouselArrow.png +0 -0
  268. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  269. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  270. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  271. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  272. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  273. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  274. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  275. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  276. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  277. package/lib/components/wallet/components/WalletCard.js +0 -97
  278. package/lib/components/wallet/components/index.d.ts +0 -3
  279. package/lib/components/wallet/components/index.js +0 -45
  280. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
  281. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  282. package/lib/components/wallet/index.d.ts +0 -10
  283. package/lib/components/wallet/index.js +0 -580
  284. package/lib/components/wallet/index.less +0 -151
  285. package/lib/components/wallet/locales.d.ts +0 -132
  286. package/lib/components/wallet/locales.js +0 -163
  287. package/lib/components/wallet/model.d.ts +0 -37
  288. package/lib/components/wallet/model.js +0 -91
  289. package/lib/components/wallet/serve.d.ts +0 -150
  290. package/lib/components/wallet/serve.js +0 -85
  291. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  292. package/lib/components/wallet/utils/formatUtils.js +0 -73
@@ -35,7 +35,7 @@ import { locales } from '@pisell/utils';
35
35
  * @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
36
36
  * @throws 请求失败时抛出错误
37
37
  */
38
- export var getWalletList = /*#__PURE__*/function () {
38
+ export var getWalletPassList = /*#__PURE__*/function () {
39
39
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
40
40
  var _yield$request$getReq, data;
41
41
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -65,7 +65,7 @@ export var getWalletList = /*#__PURE__*/function () {
65
65
  }
66
66
  }, _callee, null, [[0, 8]]);
67
67
  }));
68
- return function getWalletList(_x) {
68
+ return function getWalletPassList(_x) {
69
69
  return _ref.apply(this, arguments);
70
70
  };
71
71
  }();
@@ -290,4 +290,61 @@ export var getWalletDetail = /*#__PURE__*/function () {
290
290
  return function getWalletDetail(_x8) {
291
291
  return _ref8.apply(this, arguments);
292
292
  };
293
+ }();
294
+
295
+ /**
296
+ * 更新卡券持有人
297
+ * @param id 卡券ID
298
+ * @param params 更新参数
299
+ * @returns 更新结果
300
+ */
301
+ export var updateWalletPassHolder = /*#__PURE__*/function () {
302
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(id, params) {
303
+ var _yield$request$getReq8, data;
304
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
305
+ while (1) switch (_context9.prev = _context9.next) {
306
+ case 0:
307
+ _context9.next = 2;
308
+ return request.getRequest().post("/h5/machinecode/".concat(id, "/bind-holder"), params);
309
+ case 2:
310
+ _yield$request$getReq8 = _context9.sent;
311
+ data = _yield$request$getReq8.data;
312
+ return _context9.abrupt("return", data);
313
+ case 5:
314
+ case "end":
315
+ return _context9.stop();
316
+ }
317
+ }, _callee9);
318
+ }));
319
+ return function updateWalletPassHolder(_x9, _x10) {
320
+ return _ref9.apply(this, arguments);
321
+ };
322
+ }();
323
+
324
+ /**
325
+ * 获取卡券详情
326
+ * @param id 卡券ID
327
+ * @returns 卡券详情
328
+ */
329
+ export var getWalletPassDetail = /*#__PURE__*/function () {
330
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(id, params) {
331
+ var _yield$request$getReq9, data;
332
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
333
+ while (1) switch (_context10.prev = _context10.next) {
334
+ case 0:
335
+ _context10.next = 2;
336
+ return request.getRequest().get("/h5/machinecode/lowcode/detail/".concat(id), params);
337
+ case 2:
338
+ _yield$request$getReq9 = _context10.sent;
339
+ data = _yield$request$getReq9.data;
340
+ return _context10.abrupt("return", data);
341
+ case 5:
342
+ case "end":
343
+ return _context10.stop();
344
+ }
345
+ }, _callee10);
346
+ }));
347
+ return function getWalletPassDetail(_x11, _x12) {
348
+ return _ref10.apply(this, arguments);
349
+ };
293
350
  }();
@@ -0,0 +1,48 @@
1
+ interface ScheduleTextResult {
2
+ validityTexts: string[];
3
+ excluded_date: string[];
4
+ included_date: string[];
5
+ }
6
+ declare type Locale = 'en' | 'zh-CN' | 'zh-HK';
7
+ interface ScheduleItem {
8
+ id: number;
9
+ name: string | {
10
+ [key: string]: string;
11
+ };
12
+ type: 'standard' | 'time-slots' | 'designation';
13
+ start_time: string | null;
14
+ end_time: string | null;
15
+ repeat_type: 'none' | 'daily' | 'weekly';
16
+ repeat_rule: {
17
+ end: {
18
+ type: 'never' | 'date' | 'occurrence';
19
+ end_date: string | null;
20
+ occurrence: number | null;
21
+ };
22
+ frequency: number;
23
+ excluded_date: Array<{
24
+ start: string;
25
+ end: string;
26
+ }>;
27
+ included_date: any[];
28
+ frequency_date: number[];
29
+ } | null;
30
+ designation: Array<{
31
+ start_date: string;
32
+ start_time: string;
33
+ end_date: string;
34
+ end_time: string;
35
+ }> | null;
36
+ is_all: number;
37
+ time_slot: Array<{
38
+ start_time: string;
39
+ end_time: string;
40
+ }>;
41
+ }
42
+ /**
43
+ * 根据scheduleList格式化文案展示
44
+ * @param scheduleList 日程列表
45
+ * @returns 格式化后的文案结果数组,每个日程对应一个结果
46
+ */
47
+ export declare function formatScheduleText(scheduleList: ScheduleItem[], locale?: Locale): ScheduleTextResult[];
48
+ export {};
@@ -0,0 +1,342 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ // 日程文案格式化接口
8
+
9
+ // 日程项接口定义
10
+
11
+ // 格式化日期时间函数
12
+ function formatDateTime(dateTime) {
13
+ var isAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
14
+ var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'zh-CN';
15
+ var date = new Date(dateTime);
16
+ var year = date.getFullYear();
17
+ var month = String(date.getMonth() + 1).padStart(2, '0');
18
+ var day = String(date.getDate()).padStart(2, '0');
19
+ var hours = date.getHours();
20
+ var minutes = String(date.getMinutes()).padStart(2, '0');
21
+ if (isAll) {
22
+ // 全天情况下的日期格式
23
+ if (locale === 'en') {
24
+ return "".concat(day, "/").concat(month, "/").concat(year);
25
+ } else {
26
+ return "".concat(year, "-").concat(month, "-").concat(day);
27
+ }
28
+ }
29
+
30
+ // 非全天情况下的日期时间格式
31
+ if (locale === 'en') {
32
+ // DD/MM/YYYY h:mm A 格式
33
+ var period = hours >= 12 ? 'PM' : 'AM';
34
+ var displayHours = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
35
+ return "".concat(day, "/").concat(month, "/").concat(year, " ").concat(displayHours, ":").concat(minutes, " ").concat(period);
36
+ } else {
37
+ // YYYY-MM-DD HH:mm 格式
38
+ var _displayHours = String(hours).padStart(2, '0');
39
+ return "".concat(year, "-").concat(month, "-").concat(day, " ").concat(_displayHours, ":").concat(minutes);
40
+ }
41
+ }
42
+
43
+ // 多语言文案配置
44
+ var textConfig = {
45
+ 'zh-HK': {
46
+ weekdays: ['日', '一', '二', '三', '四', '五', '六'],
47
+ separator: '、',
48
+ timeSeparator: '–',
49
+ rangeSeparator: ' 至 ',
50
+ periodSeparator: ';',
51
+ timeSlotSeparator: ',',
52
+ every: '每',
53
+ day: '天',
54
+ week: '周',
55
+ month: '月',
56
+ year: '年',
57
+ available: '可用',
58
+ unlimited: '无限期',
59
+ weekPrefix: '周'
60
+ },
61
+ 'zh-CN': {
62
+ weekdays: ['日', '一', '二', '三', '四', '五', '六'],
63
+ separator: '、',
64
+ timeSeparator: '–',
65
+ rangeSeparator: ' 至 ',
66
+ periodSeparator: ';',
67
+ timeSlotSeparator: ',',
68
+ every: '每',
69
+ day: '天',
70
+ week: '周',
71
+ month: '月',
72
+ year: '年',
73
+ available: '可用',
74
+ unlimited: '无限期',
75
+ weekPrefix: '周'
76
+ },
77
+ 'en': {
78
+ weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
79
+ separator: ', ',
80
+ timeSeparator: '–',
81
+ rangeSeparator: ' - ',
82
+ periodSeparator: '; ',
83
+ timeSlotSeparator: ', ',
84
+ every: 'every ',
85
+ day: 'day',
86
+ week: 'week',
87
+ month: 'month',
88
+ year: 'year',
89
+ available: 'available',
90
+ unlimited: 'unlimited',
91
+ weekPrefix: ''
92
+ }
93
+ };
94
+
95
+ // 获取星期几的表示
96
+ function getWeekdayText(dayNumbers, locale) {
97
+ var config = textConfig[locale];
98
+ return dayNumbers.map(function (day) {
99
+ return config.weekdays[day];
100
+ }).join(config.separator);
101
+ }
102
+
103
+ // 获取重复频率文案
104
+ function getRepeatFrequencyText(repeatType, frequency, locale) {
105
+ var config = textConfig[locale];
106
+ var typeMap = {
107
+ 'daily': config.day,
108
+ 'weekly': config.week,
109
+ 'monthly': config.month,
110
+ 'yearly': config.year
111
+ };
112
+ if (locale === 'en') {
113
+ if (frequency === 1) {
114
+ return "".concat(config.every).concat(typeMap[repeatType]);
115
+ }
116
+ return "".concat(config.every).concat(frequency, " ").concat(typeMap[repeatType], "s");
117
+ } else {
118
+ if (frequency === 1) {
119
+ return "".concat(config.every).concat(typeMap[repeatType]);
120
+ }
121
+ return "".concat(config.every).concat(frequency).concat(typeMap[repeatType]);
122
+ }
123
+ }
124
+
125
+ /**
126
+ * 根据scheduleList格式化文案展示
127
+ * @param scheduleList 日程列表
128
+ * @returns 格式化后的文案结果数组,每个日程对应一个结果
129
+ */
130
+ export function formatScheduleText(scheduleList) {
131
+ var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en';
132
+ var results = [];
133
+ var config = textConfig[locale];
134
+ scheduleList.forEach(function (schedule) {
135
+ var _schedule$repeat_rule, _schedule$repeat_rule2;
136
+ var validityTexts = [];
137
+ var excluded_date = [];
138
+ var included_date = [];
139
+
140
+ // 处理排除日期
141
+ if ((_schedule$repeat_rule = schedule.repeat_rule) !== null && _schedule$repeat_rule !== void 0 && _schedule$repeat_rule.excluded_date) {
142
+ schedule.repeat_rule.excluded_date.forEach(function (excludeItem) {
143
+ var startDate = formatDateTime(excludeItem.start, true, locale);
144
+ var endDate = formatDateTime(excludeItem.end, true, locale);
145
+ if (excludeItem.start === excludeItem.end) {
146
+ // 开始和结束日期相同,只显示开始日期
147
+ excluded_date.push(startDate);
148
+ } else {
149
+ // 开始和结束日期不同,显示范围格式
150
+ excluded_date.push("".concat(startDate).concat(config.rangeSeparator).concat(endDate));
151
+ }
152
+ });
153
+ }
154
+
155
+ // 处理包含日期
156
+ if ((_schedule$repeat_rule2 = schedule.repeat_rule) !== null && _schedule$repeat_rule2 !== void 0 && _schedule$repeat_rule2.included_date) {
157
+ schedule.repeat_rule.included_date.forEach(function (includeItem) {
158
+ var startDate = formatDateTime(includeItem.start, true, locale);
159
+ var endDate = formatDateTime(includeItem.end, true, locale);
160
+ if (includeItem.start === includeItem.end) {
161
+ // 开始和结束日期相同,只显示开始日期
162
+ included_date.push(startDate);
163
+ } else {
164
+ // 开始和结束日期不同,显示范围格式
165
+ included_date.push("".concat(startDate).concat(config.rangeSeparator).concat(endDate));
166
+ }
167
+ });
168
+ }
169
+ var isAllDay = schedule.is_all === 1;
170
+ var validityText = '';
171
+
172
+ // 1. 非循环日程处理
173
+ if (schedule.repeat_type === 'none') {
174
+ // 1.1 单个标准日程(单日单段)
175
+ if (schedule.type === 'standard') {
176
+ var startDateTime = formatDateTime(schedule.start_time, isAllDay, locale);
177
+ var endDateTime = formatDateTime(schedule.end_time, isAllDay, locale);
178
+ validityText = "".concat(startDateTime).concat(config.rangeSeparator).concat(endDateTime);
179
+ }
180
+ // 1.2 多时间段日程(单日多段)
181
+ else if (schedule.type === 'time-slots' && schedule.time_slot.length > 0) {
182
+ var baseDate = formatDateTime(schedule.start_time, true, locale);
183
+ if (isAllDay) {
184
+ // 全天情况下,不显示时分
185
+ validityText = "".concat(baseDate);
186
+ } else {
187
+ // 非全天情况下,按新格式显示时间段
188
+ var timeSlots = schedule.time_slot.map(function (slot) {
189
+ return "".concat(slot.start_time).concat(config.timeSeparator).concat(slot.end_time);
190
+ });
191
+ validityText = "".concat(baseDate, " ").concat(timeSlots.join(config.timeSlotSeparator));
192
+ }
193
+ } else if (schedule.type === 'designation' && schedule.designation) {
194
+ var designationTexts = schedule.designation.map(function (item) {
195
+ if (isAllDay || item.start_time === '00:00' && item.end_time === '23:59') {
196
+ // 全天情况:只显示日期
197
+ var startDate = formatDateTime(item.start_date, true, locale);
198
+ var endDate = formatDateTime(item.end_date, true, locale);
199
+ return "".concat(startDate).concat(config.rangeSeparator).concat(endDate);
200
+ } else {
201
+ // 非全天情况:按新格式显示日期时间
202
+ var _startDate = formatDateTime(item.start_date, true, locale);
203
+ return "".concat(_startDate, " ").concat(item.start_time).concat(config.timeSeparator).concat(item.end_time);
204
+ }
205
+ });
206
+ validityTexts.push.apply(validityTexts, _toConsumableArray(designationTexts));
207
+ }
208
+ }
209
+
210
+ // 2. 循环日程处理
211
+ else if (schedule.repeat_rule) {
212
+ var _schedule$repeat_rule3 = schedule.repeat_rule,
213
+ frequency = _schedule$repeat_rule3.frequency,
214
+ frequency_date = _schedule$repeat_rule3.frequency_date;
215
+
216
+ // 根据 is_all 决定是否显示时分
217
+ var startText = isAllDay ? formatDateTime(schedule.start_time, true, locale) : formatDateTime(schedule.start_time, false, locale);
218
+
219
+ // 结束日期处理
220
+ var endDateText = '';
221
+ if (schedule.repeat_rule.end.type === 'never') {
222
+ endDateText = config.unlimited;
223
+ } else if (schedule.repeat_rule.end.end_date) {
224
+ endDateText = formatDateTime(schedule.repeat_rule.end.end_date, true, locale);
225
+ }
226
+
227
+ // 2.1 标准类型循环日程
228
+ if (schedule.type === 'standard') {
229
+ // 按天循环
230
+ if (schedule.repeat_type === 'daily') {
231
+ if (isAllDay) {
232
+ var frequencyText = getRepeatFrequencyText('daily', frequency, locale);
233
+ if (locale === 'en') {
234
+ validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, ", ").concat(config.available, " ").concat(frequencyText);
235
+ } else {
236
+ validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(frequencyText).concat(config.available);
237
+ }
238
+ } else {
239
+ var startTime = formatDateTime(schedule.start_time, false, locale);
240
+ var endTime = formatDateTime(schedule.end_time, false, locale);
241
+ var timeRange = locale === 'en' ? "".concat(startTime.split(' ')[1], " ").concat(startTime.split(' ')[2]).concat(config.timeSeparator).concat(endTime.split(' ')[1], " ").concat(endTime.split(' ')[2]) : "".concat(startTime.split(' ')[1]).concat(config.timeSeparator).concat(endTime.split(' ')[1]);
242
+ var _frequencyText = getRepeatFrequencyText('daily', frequency, locale);
243
+ var dateRange = locale === 'en' ? "".concat(startTime.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText) : "".concat(startText.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText);
244
+ if (locale === 'en') {
245
+ validityText = "".concat(dateRange, ", ").concat(config.available, " ").concat(_frequencyText, " ").concat(timeRange);
246
+ } else {
247
+ validityText = "".concat(dateRange, "\uFF0C").concat(_frequencyText, " ").concat(timeRange, " ").concat(config.available);
248
+ }
249
+ }
250
+ }
251
+
252
+ // 按周循环
253
+ else if (schedule.repeat_type === 'weekly') {
254
+ var weekdaysText = getWeekdayText(frequency_date, locale);
255
+ if (isAllDay) {
256
+ if (locale === 'en') {
257
+ var _frequencyText2 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
258
+ validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, ", ").concat(_frequencyText2, " on ").concat(weekdaysText, " ");
259
+ } else {
260
+ var _frequencyText3 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
261
+ validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText3).concat(config.weekPrefix).concat(weekdaysText).concat(config.available);
262
+ }
263
+ } else {
264
+ var _startTime = formatDateTime(schedule.start_time, false, locale);
265
+ var _endTime = formatDateTime(schedule.end_time, false, locale);
266
+ var _timeRange = locale === 'en' ? "".concat(_startTime.split(' ')[1], " ").concat(_startTime.split(' ')[2]).concat(config.timeSeparator).concat(_endTime.split(' ')[1], " ").concat(_endTime.split(' ')[2]) : "".concat(_startTime.split(' ')[1]).concat(config.timeSeparator).concat(_endTime.split(' ')[1]);
267
+ var _dateRange = locale === 'en' ? "".concat(_startTime.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText) : "".concat(startText.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText);
268
+ if (locale === 'en') {
269
+ var _frequencyText4 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
270
+ validityText = "".concat(_dateRange, ", ").concat(_frequencyText4, " on ").concat(weekdaysText, " ").concat(_timeRange);
271
+ } else {
272
+ var _frequencyText5 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
273
+ validityText = "".concat(_dateRange, "\uFF0C").concat(_frequencyText5).concat(config.weekPrefix).concat(weekdaysText, " ").concat(_timeRange);
274
+ }
275
+ }
276
+ }
277
+ }
278
+
279
+ // 2.2 多时间段类型循环日程
280
+ else if (schedule.type === 'time-slots' && schedule.time_slot.length > 0) {
281
+ var _baseDate = formatDateTime(schedule.start_time, true, locale);
282
+
283
+ // 格式化时间段
284
+ var _timeSlots = schedule.time_slot.map(function (slot) {
285
+ return "".concat(slot.start_time).concat(config.timeSeparator).concat(slot.end_time);
286
+ });
287
+ var timeSlotsText = _timeSlots.join(config.timeSlotSeparator);
288
+
289
+ // 按天循环
290
+ if (schedule.repeat_type === 'daily') {
291
+ var _frequencyText6 = getRepeatFrequencyText('daily', frequency, locale);
292
+ if (locale === 'en') {
293
+ validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, ", ").concat(config.available, " ").concat(_frequencyText6, " ").concat(timeSlotsText);
294
+ } else {
295
+ validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText6, " ").concat(timeSlotsText, " ").concat(config.available);
296
+ }
297
+ }
298
+
299
+ // 按周循环
300
+ else if (schedule.repeat_type === 'weekly') {
301
+ var _weekdaysText = getWeekdayText(frequency_date, locale);
302
+ if (locale === 'en') {
303
+ var _frequencyText7 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
304
+ validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, ", ").concat(_frequencyText7, " on ").concat(_weekdaysText, " ").concat(timeSlotsText);
305
+ } else {
306
+ var _frequencyText8 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
307
+ validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText8).concat(config.weekPrefix).concat(_weekdaysText, " ").concat(timeSlotsText, " ").concat(config.available);
308
+ }
309
+ }
310
+ }
311
+ }
312
+
313
+ // 4. 指定日期日程(多天多段)
314
+ else if (schedule.type === 'designation' && schedule.designation) {
315
+ var _designationTexts = schedule.designation.map(function (item) {
316
+ if (isAllDay || item.start_time === '00:00' && item.end_time === '23:59') {
317
+ // 全天情况:只显示日期
318
+ var startDate = formatDateTime(item.start_date, true, locale);
319
+ var endDate = formatDateTime(item.end_date, true, locale);
320
+ return "".concat(startDate).concat(config.rangeSeparator).concat(endDate);
321
+ } else {
322
+ // 非全天情况:按新格式显示日期时间
323
+ var _startDate2 = formatDateTime(item.start_date, true, locale);
324
+ return "".concat(_startDate2, " ").concat(item.start_time).concat(config.timeSeparator).concat(item.end_time);
325
+ }
326
+ });
327
+ // 多天多段情况,每个时间段作为独立元素添加到validityTexts中
328
+ validityTexts.push.apply(validityTexts, _toConsumableArray(_designationTexts));
329
+ }
330
+ if (validityText) {
331
+ validityTexts.push(validityText);
332
+ }
333
+
334
+ // 为每个日程创建一个结果
335
+ results.push({
336
+ validityTexts: validityTexts,
337
+ excluded_date: excluded_date,
338
+ included_date: included_date
339
+ });
340
+ });
341
+ return results;
342
+ }
@@ -326,21 +326,21 @@
326
326
  .login2-submit-button {
327
327
  height: 44px;
328
328
  border-radius: 8px;
329
- border: 1px solid var(---custom-button-bg-color, var(--theme-color, #7f56d9));
330
- background: var(---custom-button-bg-color, var(--theme-color, #7f56d9));
329
+ border: 1px solid var(--custom-button-bg-color, var(--theme-color, #7f56d9));
330
+ background: var(--custom-button-bg-color, var(--theme-color, #7f56d9));
331
331
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
332
332
  font-size: 16px;
333
333
  font-weight: 600;
334
334
  color: var(--custom-button-text-color, #ffffff);
335
335
 
336
336
  &:hover:not(:disabled) {
337
- background: #6941c6;
338
- border-color: #6941c6;
337
+ background: var(--custom-button-bg-color, #6941c6);
338
+ border-color: var(--custom-button-bg-color, #6941c6);
339
339
  }
340
340
 
341
341
  &:focus {
342
- background: var(--theme-color, #7f56d9);
343
- border-color: var(--theme-color, #7f56d9);
342
+ background: var(--custom-button-bg-color, var(--theme-color, #7f56d9));
343
+ border-color: var(--custom-button-bg-color, var(--theme-color, #7f56d9));
344
344
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05),
345
345
  0px 0px 0px 4px rgba(127, 86, 217, 0.1);
346
346
  }
@@ -4,7 +4,6 @@
4
4
  * 这个文件演示了如何使用 PisellPaymentList 和 PisellPaymentListItem 组件
5
5
  * 包括如何通过 Context 访问父组件配置
6
6
  */
7
- /// <reference types="react" />
8
7
  export declare const BasicExample: () => JSX.Element;
9
8
  export declare const ChildrenExample: () => JSX.Element;
10
9
  export declare const CustomItemExample: () => JSX.Element;
@@ -87,7 +87,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
87
87
  setting: { can_input: true, item_max_length: isShowProductDetailStepper, is_detail_open: clickType === "cover" }
88
88
  },
89
89
  callback: async (data) => {
90
- var _a, _b;
90
+ var _a, _b, _c, _d, _e;
91
+ if (data == null ? void 0 : data.origin) {
92
+ data.origin.isFormSubject = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.bookingSetting) == null ? void 0 : _b.bookingSubject) == null ? void 0 : _c.type) === "form";
93
+ }
91
94
  if (data.isCancel) {
92
95
  appointmentBooking.closeProductDetail();
93
96
  return;
@@ -125,7 +128,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
125
128
  endDate
126
129
  });
127
130
  } else {
128
- const resources = ((_b = (_a = data == null ? void 0 : data.origin) == null ? void 0 : _a.product_resource) == null ? void 0 : _b.resources) || [];
131
+ const resources = ((_e = (_d = data == null ? void 0 : data.origin) == null ? void 0 : _d.product_resource) == null ? void 0 : _e.resources) || [];
129
132
  const activeStatus = resources.find((item2) => item2.status === 1);
130
133
  if (!activeStatus && !appointmentBooking.isTargetNormalProduct(data == null ? void 0 : data.origin)) {
131
134
  return (0, import_utils2.Toast)(
@@ -111,6 +111,18 @@ var VoucherCard = (props) => {
111
111
  const val = shopDiscount.calcDiscount(products2);
112
112
  batchUpdateCart(val.productList);
113
113
  };
114
+ const stringifiedHolders = (0, import_react.useMemo)(() => {
115
+ let _ret;
116
+ try {
117
+ _ret = JSON.stringify(products.map((item) => (item == null ? void 0 : item.holder_id) || ""));
118
+ } catch (error) {
119
+ _ret = "";
120
+ }
121
+ return _ret;
122
+ }, [products]);
123
+ (0, import_react.useEffect)(() => {
124
+ onCartChange();
125
+ }, [stringifiedHolders]);
114
126
  (0, import_react.useEffect)(() => {
115
127
  const val = shopDiscount.getDiscountList();
116
128
  setDisCountList(val);
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -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,
@@ -98,7 +99,8 @@ var VoucherCard = (props) => {
98
99
  discount_list: value.discount_list,
99
100
  origin_total: (_b2 = value == null ? void 0 : value._extend) == null ? void 0 : _b2.origin_total,
100
101
  quantity: value._extend.quantity,
101
- startDate: value._extend.startDate
102
+ startDate: value._extend.startDate,
103
+ holder_id: (_c2 = value == null ? void 0 : value._extend) == null ? void 0 : _c2.holder_id
102
104
  };
103
105
  });
104
106
  return val;
@@ -125,6 +127,21 @@ var VoucherCard = (props) => {
125
127
  });
126
128
  return val;
127
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]);
128
145
  const disabled = (0, import_react.useMemo)(() => {
129
146
  var _a2;
130
147
  if (["paid", "partially_paid"].includes(
@@ -137,7 +154,7 @@ var VoucherCard = (props) => {
137
154
  const { run } = (0, import_ahooks.useDebounceFn)(
138
155
  () => {
139
156
  var _a2, _b2;
140
- 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)) {
157
+ 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)) {
141
158
  return;
142
159
  }
143
160
  if (isBooking4Shop) {
@@ -148,13 +165,19 @@ var VoucherCard = (props) => {
148
165
  console.log("input: ", state.service.value);
149
166
  console.log("output: ", val);
150
167
  productListToValue(val.productList);
168
+ holderChangedRef.current = false;
151
169
  }
152
170
  },
153
171
  { wait: 500 }
154
172
  );
155
173
  (0, import_react.useEffect)(() => {
156
174
  run();
157
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
175
+ }, [
176
+ JSON.stringify(serviceMemo),
177
+ JSON.stringify(addonsMemo),
178
+ JSON.stringify(holdersMemo),
179
+ isBooking4Shop
180
+ ]);
158
181
  const fn = (0, import_ahooks.useMemoizedFn)((result) => {
159
182
  var _a2;
160
183
  if (!(result == null ? void 0 : result.productList) || ((_a2 = result == null ? void 0 : result.productList) == null ? void 0 : _a2.some((item) => !item))) {
@@ -291,7 +314,7 @@ var VoucherCard = (props) => {
291
314
  import_materials.PisellGoodPassCard,
292
315
  {
293
316
  style: { width: "100%" },
294
- dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
317
+ dataSource: ((_e = (_d = state.service) == null ? void 0 : _d.value) == null ? void 0 : _e.length) ? availableData : [],
295
318
  mixedSort,
296
319
  onChange: (val) => {
297
320
  const shopDiscount2 = pisellos.getModule("shopDiscount");
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;