@pisell/private-materials 6.3.55 → 6.3.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +10 -10
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/components/appointmentBooking/components/Services/index.js +27 -24
  12. package/es/components/appointmentBooking/components/Voucher/index.js +14 -0
  13. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  14. package/es/components/booking/components/voucher/index.js +29 -9
  15. package/es/components/eftpos/form/index.d.ts +0 -1
  16. package/es/components/eftpos/hooks.d.ts +0 -1
  17. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  18. package/es/components/eftposPay/hooks.d.ts +1 -1
  19. package/es/components/eftposPay/store/index.d.ts +1 -1
  20. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  21. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  22. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  23. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  24. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +165 -145
  25. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  26. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  27. package/es/components/pay/toC/WalletPassBlock/index.js +3 -1
  28. package/es/components/pay/toC/index.js +65 -31
  29. package/es/components/pay/toC/model.d.ts +1 -0
  30. package/es/components/pay/toC/serve.d.ts +18 -0
  31. package/es/components/pay/toC/serve.js +29 -1
  32. package/es/components/pay/toC/utils.d.ts +2 -2
  33. package/es/components/pay/toC/utils.js +4 -0
  34. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  35. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  36. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  37. package/es/components/ticketBooking/components/timeBar/index.js +9 -12
  38. package/es/components/walletList/index.js +173 -39
  39. package/es/components/walletList/locales.js +12 -3
  40. package/es/components/walletList/serve.d.ts +19 -0
  41. package/es/components/walletList/serve.js +94 -5
  42. package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
  43. package/es/components/walletList/tempHolderSelector/index.js +196 -0
  44. package/es/components/walletList/tempHolderSelector/index.less +63 -0
  45. package/es/index.d.ts +2 -1
  46. package/es/index.js +3 -2
  47. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  48. package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
  49. package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
  50. package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  51. package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
  52. package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
  53. package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  54. package/es/plus/selectHolder/components/HolderList/index.js +43 -0
  55. package/es/plus/selectHolder/index.d.ts +7 -0
  56. package/es/plus/selectHolder/index.js +236 -0
  57. package/es/plus/selectHolder/index.less +117 -0
  58. package/es/plus/selectHolder/locales.d.ts +21 -0
  59. package/es/plus/selectHolder/locales.js +20 -0
  60. package/es/plus/selectHolder/types.js +1 -0
  61. package/es/plus/selectHolder/utils.js +16 -0
  62. package/es/plus/walletEditor/WalletEditor.js +60 -2
  63. package/es/plus/walletEditor/locales.js +12 -3
  64. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  65. package/es/plus/walletPassGallery/components/passList/index.js +17 -5
  66. package/es/plus/walletPassGallery/index.js +223 -41
  67. package/es/plus/walletPassGallery/locales.js +29 -5
  68. package/es/plus/walletPassGallery/serve.d.ts +15 -1
  69. package/es/plus/walletPassGallery/serve.js +59 -2
  70. package/es/plus/walletPassGallery/utils.js +342 -0
  71. package/lib/components/appointmentBooking/components/Services/index.js +5 -2
  72. package/lib/components/appointmentBooking/components/Voucher/index.js +12 -0
  73. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  74. package/lib/components/booking/components/voucher/index.js +29 -6
  75. package/lib/components/eftpos/form/index.d.ts +0 -1
  76. package/lib/components/eftpos/hooks.d.ts +0 -1
  77. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  78. package/lib/components/eftposPay/hooks.d.ts +1 -1
  79. package/lib/components/eftposPay/store/index.d.ts +1 -1
  80. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  81. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  82. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  83. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  84. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +90 -103
  85. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
  86. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  87. package/lib/components/pay/toC/WalletPassBlock/index.js +3 -1
  88. package/lib/components/pay/toC/index.js +52 -19
  89. package/lib/components/pay/toC/model.d.ts +1 -0
  90. package/lib/components/pay/toC/serve.d.ts +18 -0
  91. package/lib/components/pay/toC/serve.js +6 -0
  92. package/lib/components/pay/toC/utils.d.ts +2 -2
  93. package/lib/components/pay/toC/utils.js +4 -0
  94. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  95. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  96. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  97. package/lib/components/ticketBooking/components/timeBar/index.js +2 -5
  98. package/lib/components/walletList/index.js +100 -4
  99. package/lib/components/walletList/locales.js +12 -3
  100. package/lib/components/walletList/serve.d.ts +19 -0
  101. package/lib/components/walletList/serve.js +26 -3
  102. package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
  103. package/lib/components/walletList/tempHolderSelector/index.js +166 -0
  104. package/lib/components/walletList/tempHolderSelector/index.less +63 -0
  105. package/lib/index.d.ts +2 -1
  106. package/lib/index.js +6 -3
  107. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
  108. package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
  109. package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
  110. package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
  111. package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
  112. package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
  113. package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
  114. package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
  115. package/lib/plus/selectHolder/index.d.ts +7 -0
  116. package/lib/plus/selectHolder/index.js +202 -0
  117. package/lib/plus/selectHolder/index.less +117 -0
  118. package/lib/plus/selectHolder/locales.d.ts +21 -0
  119. package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +15 -15
  120. package/lib/plus/selectHolder/types.js +17 -0
  121. package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
  122. package/lib/plus/walletEditor/WalletEditor.js +53 -0
  123. package/lib/plus/walletEditor/locales.js +12 -3
  124. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  125. package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
  126. package/lib/plus/walletPassGallery/index.js +154 -27
  127. package/lib/plus/walletPassGallery/locales.js +32 -5
  128. package/lib/plus/walletPassGallery/serve.d.ts +15 -1
  129. package/lib/plus/walletPassGallery/serve.js +17 -5
  130. package/lib/plus/walletPassGallery/utils.js +287 -0
  131. package/lowcode/event-select-holder/meta.ts +2 -2
  132. package/lowcode/select-holder/meta.ts +220 -0
  133. package/lowcode/select-holder/snippets.ts +41 -0
  134. package/package.json +2 -2
  135. package/es/components/booking/info/service/editService/constants.d.ts +0 -1
  136. package/es/components/pay/toC/locales.d.ts +0 -301
  137. package/es/components/pay/toC/status.d.ts +0 -13
  138. package/es/components/systemSettings/registry/locales.d.ts +0 -272
  139. package/es/components/systemSettings/registry/services.d.ts +0 -77
  140. package/es/components/systemSettings/registry/types.d.ts +0 -126
  141. package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  142. package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
  143. package/es/components/wallet/Detail/index.d.ts +0 -42
  144. package/es/components/wallet/Detail/index.js +0 -1182
  145. package/es/components/wallet/Detail/index.less +0 -386
  146. package/es/components/wallet/Detail/locales.d.ts +0 -153
  147. package/es/components/wallet/Detail/locales.js +0 -170
  148. package/es/components/wallet/Detail/model.d.ts +0 -13
  149. package/es/components/wallet/Detail/model.js +0 -22
  150. package/es/components/wallet/Detail/serve.d.ts +0 -39
  151. package/es/components/wallet/Detail/serve.js +0 -64
  152. package/es/components/wallet/DetailContext.d.ts +0 -25
  153. package/es/components/wallet/DetailContext.js +0 -162
  154. package/es/components/wallet/DiscountCard/index.d.ts +0 -3
  155. package/es/components/wallet/DiscountCard/index.js +0 -218
  156. package/es/components/wallet/DiscountCard/index.less +0 -9
  157. package/es/components/wallet/DiscountCard/model.d.ts +0 -14
  158. package/es/components/wallet/DiscountCard/model.js +0 -22
  159. package/es/components/wallet/PointCard/index.d.ts +0 -3
  160. package/es/components/wallet/PointCard/index.js +0 -169
  161. package/es/components/wallet/PointCard/index.less +0 -9
  162. package/es/components/wallet/PointCard/model.d.ts +0 -13
  163. package/es/components/wallet/PointCard/model.js +0 -22
  164. package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
  165. package/es/components/wallet/RechargeableCard/index.js +0 -463
  166. package/es/components/wallet/RechargeableCard/index.less +0 -108
  167. package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
  168. package/es/components/wallet/RechargeableCard/model.js +0 -28
  169. package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
  170. package/es/components/wallet/RechargeableCard/serve.js +0 -32
  171. package/es/components/wallet/Voucher/index.d.ts +0 -12
  172. package/es/components/wallet/Voucher/index.js +0 -131
  173. package/es/components/wallet/Voucher/index.less +0 -9
  174. package/es/components/wallet/Voucher/locales.d.ts +0 -21
  175. package/es/components/wallet/Voucher/locales.js +0 -20
  176. package/es/components/wallet/Voucher/model.d.ts +0 -13
  177. package/es/components/wallet/Voucher/model.js +0 -22
  178. package/es/components/wallet/carouselArrow.png +0 -0
  179. package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
  180. package/es/components/wallet/components/FooterButtons/index.js +0 -81
  181. package/es/components/wallet/components/FooterButtons/index.less +0 -91
  182. package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
  183. package/es/components/wallet/components/UsageRules/index.js +0 -147
  184. package/es/components/wallet/components/UsageRules/index.less +0 -157
  185. package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
  186. package/es/components/wallet/components/WalletBar/index.js +0 -19
  187. package/es/components/wallet/components/WalletBar/index.less +0 -36
  188. package/es/components/wallet/components/WalletCard.d.ts +0 -11
  189. package/es/components/wallet/components/WalletCard.js +0 -91
  190. package/es/components/wallet/components/index.d.ts +0 -3
  191. package/es/components/wallet/components/index.js +0 -4
  192. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -33
  193. package/es/components/wallet/hooks/useWalletCard.js +0 -147
  194. package/es/components/wallet/index.d.ts +0 -10
  195. package/es/components/wallet/index.js +0 -807
  196. package/es/components/wallet/index.less +0 -151
  197. package/es/components/wallet/locales.d.ts +0 -132
  198. package/es/components/wallet/locales.js +0 -139
  199. package/es/components/wallet/model.d.ts +0 -37
  200. package/es/components/wallet/model.js +0 -86
  201. package/es/components/wallet/serve.d.ts +0 -150
  202. package/es/components/wallet/serve.js +0 -205
  203. package/es/components/wallet/utils/formatUtils.d.ts +0 -36
  204. package/es/components/wallet/utils/formatUtils.js +0 -73
  205. package/es/components/wallet/utils.d.ts +0 -48
  206. package/es/components/walletList/locales.d.ts +0 -18
  207. package/es/components/walletList/types/index.d.ts +0 -194
  208. package/es/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
  209. package/es/plus/walletEditor/locales.d.ts +0 -126
  210. package/es/plus/walletEditor/types.d.ts +0 -52
  211. package/es/plus/walletPassGallery/locales.d.ts +0 -270
  212. package/es/pro/Login2.0/hooks/index.d.ts +0 -2
  213. package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
  214. package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
  215. package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
  216. package/es/pro/Login2.0/locales.d.ts +0 -543
  217. package/es/pro/Login2.0/shared/Header.d.ts +0 -11
  218. package/es/pro/Login2.0/shared/registerFlow.d.ts +0 -116
  219. package/es/pro/Login2.0/shared/types.d.ts +0 -232
  220. package/es/pro/Login2.0/types.d.ts +0 -167
  221. package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
  222. package/lib/components/pay/toC/locales.d.ts +0 -301
  223. package/lib/components/pay/toC/status.d.ts +0 -13
  224. package/lib/components/systemSettings/registry/locales.d.ts +0 -272
  225. package/lib/components/systemSettings/registry/services.d.ts +0 -77
  226. package/lib/components/systemSettings/registry/types.d.ts +0 -126
  227. package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
  228. package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
  229. package/lib/components/wallet/Detail/index.d.ts +0 -42
  230. package/lib/components/wallet/Detail/index.js +0 -874
  231. package/lib/components/wallet/Detail/index.less +0 -386
  232. package/lib/components/wallet/Detail/locales.d.ts +0 -153
  233. package/lib/components/wallet/Detail/locales.js +0 -194
  234. package/lib/components/wallet/Detail/model.d.ts +0 -13
  235. package/lib/components/wallet/Detail/model.js +0 -43
  236. package/lib/components/wallet/Detail/serve.d.ts +0 -39
  237. package/lib/components/wallet/Detail/serve.js +0 -44
  238. package/lib/components/wallet/DetailContext.d.ts +0 -25
  239. package/lib/components/wallet/DetailContext.js +0 -118
  240. package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
  241. package/lib/components/wallet/DiscountCard/index.js +0 -209
  242. package/lib/components/wallet/DiscountCard/index.less +0 -9
  243. package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
  244. package/lib/components/wallet/DiscountCard/model.js +0 -43
  245. package/lib/components/wallet/PointCard/index.d.ts +0 -3
  246. package/lib/components/wallet/PointCard/index.js +0 -190
  247. package/lib/components/wallet/PointCard/index.less +0 -9
  248. package/lib/components/wallet/PointCard/model.d.ts +0 -13
  249. package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
  250. package/lib/components/wallet/RechargeableCard/index.js +0 -380
  251. package/lib/components/wallet/RechargeableCard/index.less +0 -108
  252. package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
  253. package/lib/components/wallet/RechargeableCard/model.js +0 -49
  254. package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
  255. package/lib/components/wallet/Voucher/index.d.ts +0 -12
  256. package/lib/components/wallet/Voucher/index.js +0 -146
  257. package/lib/components/wallet/Voucher/index.less +0 -9
  258. package/lib/components/wallet/Voucher/locales.d.ts +0 -21
  259. package/lib/components/wallet/Voucher/model.d.ts +0 -13
  260. package/lib/components/wallet/Voucher/model.js +0 -43
  261. package/lib/components/wallet/carouselArrow.png +0 -0
  262. package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
  263. package/lib/components/wallet/components/FooterButtons/index.js +0 -109
  264. package/lib/components/wallet/components/FooterButtons/index.less +0 -91
  265. package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
  266. package/lib/components/wallet/components/UsageRules/index.js +0 -113
  267. package/lib/components/wallet/components/UsageRules/index.less +0 -157
  268. package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
  269. package/lib/components/wallet/components/WalletBar/index.less +0 -36
  270. package/lib/components/wallet/components/WalletCard.d.ts +0 -11
  271. package/lib/components/wallet/components/WalletCard.js +0 -97
  272. package/lib/components/wallet/components/index.d.ts +0 -3
  273. package/lib/components/wallet/components/index.js +0 -45
  274. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -33
  275. package/lib/components/wallet/hooks/useWalletCard.js +0 -111
  276. package/lib/components/wallet/index.d.ts +0 -10
  277. package/lib/components/wallet/index.js +0 -580
  278. package/lib/components/wallet/index.less +0 -151
  279. package/lib/components/wallet/locales.d.ts +0 -132
  280. package/lib/components/wallet/locales.js +0 -163
  281. package/lib/components/wallet/model.d.ts +0 -37
  282. package/lib/components/wallet/model.js +0 -91
  283. package/lib/components/wallet/serve.d.ts +0 -150
  284. package/lib/components/wallet/serve.js +0 -85
  285. package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
  286. package/lib/components/wallet/utils/formatUtils.js +0 -73
  287. package/lib/components/wallet/utils.d.ts +0 -48
  288. package/lib/components/walletList/locales.d.ts +0 -18
  289. package/lib/components/walletList/types/index.d.ts +0 -194
  290. package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +0 -11
  291. package/lib/plus/walletEditor/locales.d.ts +0 -126
  292. package/lib/plus/walletEditor/types.d.ts +0 -52
  293. package/lib/plus/walletPassGallery/locales.d.ts +0 -270
  294. package/lib/pro/Login2.0/hooks/index.d.ts +0 -2
  295. package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +0 -24
  296. package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +0 -39
  297. package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +0 -9
  298. package/lib/pro/Login2.0/locales.d.ts +0 -543
  299. package/lib/pro/Login2.0/shared/Header.d.ts +0 -11
  300. package/lib/pro/Login2.0/shared/registerFlow.d.ts +0 -116
  301. package/lib/pro/Login2.0/shared/types.d.ts +0 -232
  302. package/lib/pro/Login2.0/types.d.ts +0 -167
@@ -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[];
@@ -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
  /**
3
2
  * @title: 递归循环表单数据
4
3
  * @Author: hongbing.wang
@@ -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
  import { StatusType } from '../../const';
3
2
  declare const _default: (props: {
4
3
  status: StatusType;
@@ -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,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
  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;
@@ -15,11 +15,16 @@ export interface WalletPassProps {
15
15
  walletPass: {
16
16
  cards: WalletPassDataType[];
17
17
  amount: number;
18
+ recommended?: WalletPassDataType[];
19
+ transformList?: WalletPassDataType[];
20
+ noApplicableVoucher?: WalletPassDataType[];
18
21
  };
19
22
  walletSetting: {
20
23
  name: string;
21
24
  popup_status: 0 | 1;
22
25
  };
26
+ orderDetail: any;
27
+ total_amount: number;
23
28
  }
24
29
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
25
30
  export default _default;