@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
@@ -112,17 +112,20 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
112
112
  },
113
113
  callback: function () {
114
114
  var _callback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(data) {
115
- var product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
115
+ var _appointmentBooking$o, product, res, session, startDate, endDate, _res, _data$origin, resources, activeStatus, _res2, index, stepList, hasResourceStep, description;
116
116
  return _regeneratorRuntime().wrap(function _callee$(_context) {
117
117
  while (1) switch (_context.prev = _context.next) {
118
118
  case 0:
119
+ if (data !== null && data !== void 0 && data.origin) {
120
+ data.origin.isFormSubject = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSetting) === null || _appointmentBooking$o === void 0 || (_appointmentBooking$o = _appointmentBooking$o.bookingSubject) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.type) === 'form';
121
+ }
119
122
  if (!data.isCancel) {
120
- _context.next = 3;
123
+ _context.next = 4;
121
124
  break;
122
125
  }
123
126
  appointmentBooking.closeProductDetail();
124
127
  return _context.abrupt("return");
125
- case 3:
128
+ case 4:
126
129
  product = _objectSpread(_objectSpread({}, data), {}, {
127
130
  options: (data === null || data === void 0 ? void 0 : data.option) || []
128
131
  });
@@ -130,27 +133,27 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
130
133
 
131
134
  // 零售模版,直接加入购物车
132
135
  if (!isRetailTemplate) {
133
- _context.next = 12;
136
+ _context.next = 13;
134
137
  break;
135
138
  }
136
139
  if (!(data !== null && data !== void 0 && data.isCancel)) {
137
- _context.next = 8;
140
+ _context.next = 9;
138
141
  break;
139
142
  }
140
143
  return _context.abrupt("return");
141
- case 8:
144
+ case 9:
142
145
  res = appointmentBooking.storeProduct(product);
143
146
  if (!(!res.success && res.errorCode === 'not_enough_stock')) {
144
- _context.next = 11;
147
+ _context.next = 12;
145
148
  break;
146
149
  }
147
150
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
148
- case 11:
149
- return _context.abrupt("return");
150
151
  case 12:
152
+ return _context.abrupt("return");
153
+ case 13:
151
154
  session = data === null || data === void 0 ? void 0 : data.session;
152
155
  if (!session) {
153
- _context.next = 24;
156
+ _context.next = 25;
154
157
  break;
155
158
  }
156
159
  startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
@@ -163,45 +166,45 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
163
166
  }
164
167
  });
165
168
  if (!(!_res.success && _res.errorCode === 'not_enough_stock')) {
166
- _context.next = 19;
169
+ _context.next = 20;
167
170
  break;
168
171
  }
169
172
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
170
- case 19:
173
+ case 20:
171
174
  appointmentBooking.closeProductDetail();
172
- _context.next = 22;
175
+ _context.next = 23;
173
176
  return appointmentBooking.getAvailableDate({
174
177
  startDate: startDate,
175
178
  endDate: endDate
176
179
  });
177
- case 22:
178
- _context.next = 34;
180
+ case 23:
181
+ _context.next = 35;
179
182
  break;
180
- case 24:
183
+ case 25:
181
184
  resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
182
185
  activeStatus = resources.find(function (item) {
183
186
  return item.status === 1;
184
187
  });
185
188
  if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
186
- _context.next = 28;
189
+ _context.next = 29;
187
190
  break;
188
191
  }
189
192
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
190
- case 28:
193
+ case 29:
191
194
  _res2 = appointmentBooking.storeProduct(product);
192
195
  if (!(!_res2.success && _res2.errorCode === 'not_enough_stock')) {
193
- _context.next = 31;
196
+ _context.next = 32;
194
197
  break;
195
198
  }
196
199
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.unuse.stock')));
197
- case 31:
200
+ case 32:
198
201
  if (!(type === 'duration')) {
199
- _context.next = 34;
202
+ _context.next = 35;
200
203
  break;
201
204
  }
202
- _context.next = 34;
205
+ _context.next = 35;
203
206
  return appointmentBooking.getAvailableDate();
204
- case 34:
207
+ case 35:
205
208
  appointmentBooking.closeProductDetail();
206
209
 
207
210
  // 先选择日期流程
@@ -230,7 +233,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
230
233
  removeStep('select-time');
231
234
  }
232
235
  }
233
- case 36:
236
+ case 37:
234
237
  case "end":
235
238
  return _context.stop();
236
239
  }
@@ -115,6 +115,20 @@ var VoucherCard = function VoucherCard(props) {
115
115
  var val = shopDiscount.calcDiscount(products);
116
116
  batchUpdateCart(val.productList);
117
117
  };
118
+ var stringifiedHolders = useMemo(function () {
119
+ var _ret;
120
+ try {
121
+ _ret = JSON.stringify(products.map(function (item) {
122
+ return (item === null || item === void 0 ? void 0 : item.holder_id) || '';
123
+ }));
124
+ } catch (error) {
125
+ _ret = '';
126
+ }
127
+ return _ret;
128
+ }, [products]);
129
+ useEffect(function () {
130
+ onCartChange();
131
+ }, [stringifiedHolders]);
118
132
 
119
133
  // // 监听customer变化
120
134
  useEffect(function () {
@@ -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;
@@ -40,7 +40,7 @@ var ShopDiscountHooks = {
40
40
  };
41
41
  var services = {};
42
42
  var VoucherCard = function VoucherCard(props) {
43
- var _context$appHelper, _state$client$value, _state$service2;
43
+ var _context$appHelper, _state$client$value, _state$pet2, _state$service2;
44
44
  var context = useEngineContext();
45
45
  var state = props.state,
46
46
  dispatch = props.dispatch,
@@ -63,6 +63,7 @@ var VoucherCard = function VoucherCard(props) {
63
63
  var addonsValueRef = useRef(state.addons.value);
64
64
  var isBooking4Shop = useIsBooking4Shop(state);
65
65
  var shopDiscount = pisellos.getModule('shopDiscount');
66
+ var holderChangedRef = useRef(false);
66
67
  services = state.service;
67
68
 
68
69
  // 设置client
@@ -83,7 +84,7 @@ var VoucherCard = function VoucherCard(props) {
83
84
  var serviceMemo = useMemo(function () {
84
85
  var _ref;
85
86
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
86
- var _value$_extend, _value$_extend2;
87
+ var _value$_extend, _value$_extend2, _value$_extend3;
87
88
  return {
88
89
  booking_id: value.booking_id,
89
90
  id: value.id,
@@ -92,7 +93,8 @@ var VoucherCard = function VoucherCard(props) {
92
93
  discount_list: value.discount_list,
93
94
  origin_total: value === null || value === void 0 || (_value$_extend2 = value._extend) === null || _value$_extend2 === void 0 ? void 0 : _value$_extend2.origin_total,
94
95
  quantity: value._extend.quantity,
95
- startDate: value._extend.startDate
96
+ startDate: value._extend.startDate,
97
+ holder_id: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.holder_id
96
98
  };
97
99
  });
98
100
  return val;
@@ -105,20 +107,37 @@ var VoucherCard = function VoucherCard(props) {
105
107
  var addonsMemo = useMemo(function () {
106
108
  var _ref2;
107
109
  var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
108
- var _value$_extend3, _value$_extend4;
110
+ var _value$_extend4, _value$_extend5;
109
111
  return {
110
112
  booking_id: value.booking_id,
111
113
  id: value.id,
112
114
  _id: value._id,
113
115
  price: value.price,
114
- total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
116
+ total: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.total,
115
117
  discount_list: value.discount_list,
116
118
  _key: value._key,
117
- num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
119
+ num: value === null || value === void 0 || (_value$_extend5 = value._extend) === null || _value$_extend5 === void 0 ? void 0 : _value$_extend5.quantity
118
120
  };
119
121
  });
120
122
  return val;
121
123
  }, [state.addons.value]);
124
+ var holdersMemo = useMemo(function () {
125
+ if (isBooking4Shop) {
126
+ var _state$pet;
127
+ var list = [];
128
+ if ((_state$pet = state.pet) !== null && _state$pet !== void 0 && _state$pet.value) {
129
+ var entries = Object.entries(state.pet.value);
130
+ // 多余 1 个表单类型时,无法计算
131
+ // 同一表单多个 holder 时,os内只取第一个
132
+ if (entries.length === 1) {
133
+ list = entries[0][1];
134
+ }
135
+ }
136
+ shopDiscount.setHolders(list);
137
+ holderChangedRef.current = true;
138
+ return list || [];
139
+ }
140
+ }, [(_state$pet2 = state.pet) === null || _state$pet2 === void 0 ? void 0 : _state$pet2.value, isBooking4Shop]);
122
141
  var disabled = useMemo(function () {
123
142
  var _state$bookingDetail;
124
143
  if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
@@ -130,8 +149,7 @@ var VoucherCard = function VoucherCard(props) {
130
149
  }, [state, addonsMemo, serviceMemo]);
131
150
  var _useDebounceFn = useDebounceFn(function () {
132
151
  var _state$service;
133
- // console.log('state.service.value1', state.service.value);
134
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
152
+ if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value && !holderChangedRef.current || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
135
153
  return;
136
154
  }
137
155
  if (isBooking4Shop) {
@@ -139,6 +157,8 @@ var VoucherCard = function VoucherCard(props) {
139
157
  console.log('input: ', state.service.value);
140
158
  console.log('output: ', val);
141
159
  productListToValue(val.productList);
160
+ // 重置 holder 变化标识,防止重复计算
161
+ holderChangedRef.current = false;
142
162
  }
143
163
  }, {
144
164
  wait: 500
@@ -148,7 +168,7 @@ var VoucherCard = function VoucherCard(props) {
148
168
  // 更新productList
149
169
  useEffect(function () {
150
170
  run();
151
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
171
+ }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), JSON.stringify(holdersMemo), isBooking4Shop]);
152
172
  var fn = useMemoizedFn(function (result) {
153
173
  var _result$productList;
154
174
  if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 递归循环表单数据
4
3
  * @Author: hongbing.wang
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { RadioGroupProps } from 'antd';
3
2
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
4
3
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Eftpos } from './const';
3
2
  /**
4
3
  * @title: tyro 设备连接
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: ({ color }: {
3
2
  color?: string | undefined;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 自定义组件设置
4
3
  * @description: 自定义组件设置
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: () => JSX.Element;
3
2
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './titlebar.less';
3
2
  declare enum EPopupTitleBarVariantType {
4
3
  BackTitleClose = "back-title-cancel",
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { StatusType } from '../../const';
3
2
  declare const _default: (props: {
4
3
  status: StatusType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: (props: {
3
2
  status: string;
4
3
  pedding?: string;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
300
+ eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  /**
3
2
  * @title: 获取 Tyro 资源
4
3
  * @description:
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: () => JSX.Element;
3
2
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => JSX.Element;
4
3
  export default Status;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const DayItem: (props: any) => JSX.Element;
4
3
  export default DayItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { CalendarItemProps } from '../../../../../type';
4
3
  declare const Item: (props: CalendarItemProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => JSX.Element;
4
3
  export default Status;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.module.less';
3
2
  declare const StripePayment: () => JSX.Element;
4
3
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const Actor: ({ name }: {
3
2
  name: string;
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem } from "../type";
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetail: ({ form, currentProduct, }: {
4
3
  form: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ProductDetailByDate: () => JSX.Element;
4
3
  export default ProductDetailByDate;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const RelationProduct: ({ value, onChange, }: {
4
3
  value?: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Empty: (props: any) => JSX.Element;
4
3
  export default Empty;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Content: () => JSX.Element;
4
3
  export default Content;