@pisell/private-materials 3.3.107 → 3.4.2

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 (283) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/Sales/Cart/index.js +9 -8
  13. package/es/components/Sales/Cart/utils.d.ts +0 -40
  14. package/es/components/Sales/Cart/utils.js +0 -167
  15. package/es/components/Sales/Checkout/index.d.ts +0 -4
  16. package/es/components/Sales/Checkout/index.js +8 -52
  17. package/es/components/Sales/Checkout/serve.d.ts +0 -13
  18. package/es/components/Sales/Checkout/serve.js +2 -16
  19. package/es/components/Sales/Checkout/utils.d.ts +6 -1
  20. package/es/components/Sales/Checkout/utils.js +8 -9
  21. package/es/components/Sales/Customer/index.d.ts +1 -0
  22. package/es/components/Sales/Customer/index.js +1 -0
  23. package/es/components/Sales/Summary/index.d.ts +0 -10
  24. package/es/components/Sales/Summary/index.js +2 -17
  25. package/es/components/Sales/Summary/serve.d.ts +0 -1
  26. package/es/components/Sales/Summary/serve.js +0 -6
  27. package/es/components/Sales/Summary/utils.d.ts +0 -15
  28. package/es/components/Sales/Summary/utils.js +1 -43
  29. package/es/components/appointmentBooking/components/Cart/Item/index.js +0 -1
  30. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  31. package/es/components/appointmentBooking/components/Content/index.js +1 -15
  32. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  33. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  34. package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
  35. package/es/components/appointmentBooking/components/Form/index.js +1 -1
  36. package/es/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  37. package/es/components/appointmentBooking/components/Form/utils.js +17 -15
  38. package/es/components/appointmentBooking/components/Header/index.js +2 -1
  39. package/es/components/appointmentBooking/components/Resource/index.js +0 -1
  40. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  41. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
  42. package/es/components/appointmentBooking/deposit/index.js +2 -4
  43. package/es/components/appointmentBooking/index.js +0 -14
  44. package/es/components/appointmentBooking/index.less +1 -1
  45. package/es/components/booking/addons/model.d.ts +1 -10
  46. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  47. package/es/components/booking/components/browserSelect/index.js +1 -1
  48. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  49. package/es/components/booking/components/voucher/index.js +2 -2
  50. package/es/components/booking/forms/model.d.ts +1 -10
  51. package/es/components/booking/forms/model.js +5 -5
  52. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  53. package/es/components/booking/info/model.d.ts +1 -10
  54. package/es/components/booking/info/service/like/index.d.ts +0 -1
  55. package/es/components/booking/info/service/like/index.js +1 -1
  56. package/es/components/booking/info/service/serviceManager/index.js +4 -4
  57. package/es/components/booking/info2/index.js +6 -4
  58. package/es/components/booking/info2/utils.d.ts +4 -0
  59. package/es/components/booking/materiels/startTime/index.js +1 -1
  60. package/es/components/booking/model.d.ts +1 -9
  61. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  62. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  63. package/es/components/booking/notes/model.d.ts +1 -10
  64. package/es/components/booking/notes/model.js +5 -5
  65. package/es/components/booking/payments/model.d.ts +1 -10
  66. package/es/components/booking/payments/model.js +5 -5
  67. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  68. package/es/components/eftpos/form/index.d.ts +0 -1
  69. package/es/components/eftpos/group/index.d.ts +0 -1
  70. package/es/components/eftpos/hooks.d.ts +0 -1
  71. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  72. package/es/components/eftpos/icon/device.d.ts +0 -1
  73. package/es/components/eftpos/receipt/index.d.ts +0 -1
  74. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  75. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  76. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  77. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  78. package/es/components/eftposPay/const.d.ts +1 -4
  79. package/es/components/eftposPay/const.js +1 -3
  80. package/es/components/eftposPay/hooks.d.ts +1 -1
  81. package/es/components/eftposPay/hooks.js +1 -3
  82. package/es/components/eftposPay/index.js +1 -1
  83. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  84. package/es/components/eftposPay/manufacturer.js +0 -4
  85. package/es/components/eftposPay/pay.d.ts +1 -1
  86. package/es/components/eftposPay/pay.js +2 -6
  87. package/es/components/eftposPay/store/index.d.ts +1 -1
  88. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  89. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +28 -31
  90. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
  91. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  92. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  93. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  94. package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
  95. package/es/components/eventBooking/locales.d.ts +0 -24
  96. package/es/components/eventBooking/locales.js +3 -27
  97. package/es/components/listComponent/index.js +5 -5
  98. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  99. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  100. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  101. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  102. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  103. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  104. package/es/components/pay/toC/PaymentMethods/index.js +74 -26
  105. package/es/components/pay/toC/index.js +46 -14
  106. package/es/components/pay/toC/model.d.ts +1 -9
  107. package/es/components/productExtension/card/index.js +3 -3
  108. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  109. package/es/components/productExtension/fields/Forms/index.js +12 -12
  110. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  111. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  112. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  113. package/es/components/productExtension/server.js +2 -2
  114. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  115. package/es/components/schedules/calendar/index.js +4 -4
  116. package/es/components/schedules/calendar/serve.js +2 -2
  117. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  118. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  119. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  120. package/es/components/schedules/components/ResourceList/index.js +1 -1
  121. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  122. package/es/components/schedules/components/Search/index.js +5 -5
  123. package/es/components/schedules/model.d.ts +1 -9
  124. package/es/components/schedules/model.js +5 -5
  125. package/es/components/schedules/openHours/index.js +1 -1
  126. package/es/components/schedules/openHours/serve.js +2 -2
  127. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  128. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  129. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  130. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  131. package/es/components/schedules/products/serve.js +2 -2
  132. package/es/components/schedules/products/utils.js +5 -5
  133. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  134. package/es/components/schedules/resources/detail/index.js +10 -10
  135. package/es/components/schedules/resources/list/index.js +2 -2
  136. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  137. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  138. package/es/components/schedules/resources/serve.js +2 -2
  139. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  140. package/es/components/schedules/utils.d.ts +1 -1
  141. package/es/components/schedules/utils.js +4 -4
  142. package/es/components/selectModal/index.js +2 -2
  143. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  144. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  145. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
  146. package/es/components/wallet/Detail/model.d.ts +1 -13
  147. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  148. package/es/components/wallet/PointCard/model.d.ts +1 -13
  149. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  150. package/es/components/wallet/Voucher/model.d.ts +1 -13
  151. package/es/components/wallet/model.d.ts +1 -9
  152. package/es/hooks/useComponents.js +1 -1
  153. package/es/utils/index.d.ts +1 -1
  154. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  155. package/lib/components/Sales/Cart/index.js +8 -5
  156. package/lib/components/Sales/Cart/utils.d.ts +0 -40
  157. package/lib/components/Sales/Cart/utils.js +0 -117
  158. package/lib/components/Sales/Checkout/index.d.ts +0 -4
  159. package/lib/components/Sales/Checkout/index.js +7 -39
  160. package/lib/components/Sales/Checkout/serve.d.ts +0 -13
  161. package/lib/components/Sales/Checkout/serve.js +2 -7
  162. package/lib/components/Sales/Checkout/utils.d.ts +6 -1
  163. package/lib/components/Sales/Checkout/utils.js +5 -5
  164. package/lib/components/Sales/Customer/index.d.ts +1 -0
  165. package/lib/components/Sales/Customer/index.js +1 -0
  166. package/lib/components/Sales/Summary/index.d.ts +0 -10
  167. package/lib/components/Sales/Summary/index.js +1 -7
  168. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  169. package/lib/components/Sales/Summary/serve.js +0 -32
  170. package/lib/components/Sales/Summary/utils.d.ts +0 -15
  171. package/lib/components/Sales/Summary/utils.js +1 -30
  172. package/lib/components/appointmentBooking/components/Cart/Item/index.js +0 -1
  173. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  174. package/lib/components/appointmentBooking/components/Content/index.js +1 -6
  175. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  176. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  177. package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
  178. package/lib/components/appointmentBooking/components/Form/index.js +6 -1
  179. package/lib/components/appointmentBooking/components/Form/utils.d.ts +1 -1
  180. package/lib/components/appointmentBooking/components/Form/utils.js +9 -12
  181. package/lib/components/appointmentBooking/components/Header/index.js +1 -0
  182. package/lib/components/appointmentBooking/components/Resource/index.js +0 -1
  183. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  184. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
  185. package/lib/components/appointmentBooking/deposit/index.js +2 -4
  186. package/lib/components/appointmentBooking/index.js +0 -11
  187. package/lib/components/appointmentBooking/index.less +1 -1
  188. package/lib/components/booking/addons/model.d.ts +1 -10
  189. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  190. package/lib/components/booking/components/voucher/index.js +2 -2
  191. package/lib/components/booking/forms/model.d.ts +1 -10
  192. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  193. package/lib/components/booking/info/model.d.ts +1 -10
  194. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  195. package/lib/components/booking/info/service/serviceManager/index.js +3 -3
  196. package/lib/components/booking/info2/index.js +21 -11
  197. package/lib/components/booking/info2/utils.d.ts +4 -0
  198. package/lib/components/booking/model.d.ts +1 -9
  199. package/lib/components/booking/notes/model.d.ts +1 -10
  200. package/lib/components/booking/payments/model.d.ts +1 -10
  201. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  202. package/lib/components/eftpos/form/index.d.ts +0 -1
  203. package/lib/components/eftpos/group/index.d.ts +0 -1
  204. package/lib/components/eftpos/hooks.d.ts +0 -1
  205. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  206. package/lib/components/eftpos/icon/device.d.ts +0 -1
  207. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  208. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  209. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  210. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  211. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  212. package/lib/components/eftposPay/const.d.ts +1 -4
  213. package/lib/components/eftposPay/const.js +0 -2
  214. package/lib/components/eftposPay/hooks.d.ts +1 -1
  215. package/lib/components/eftposPay/hooks.js +4 -11
  216. package/lib/components/eftposPay/index.js +1 -1
  217. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  218. package/lib/components/eftposPay/manufacturer.js +0 -6
  219. package/lib/components/eftposPay/pay.d.ts +1 -1
  220. package/lib/components/eftposPay/pay.js +2 -13
  221. package/lib/components/eftposPay/store/index.d.ts +1 -1
  222. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  223. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -21
  224. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
  225. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  226. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  227. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  228. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  229. package/lib/components/eventBooking/locales.d.ts +0 -24
  230. package/lib/components/eventBooking/locales.js +3 -27
  231. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  232. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  233. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  234. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  235. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  236. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  237. package/lib/components/pay/toC/PaymentMethods/index.js +39 -12
  238. package/lib/components/pay/toC/index.js +29 -9
  239. package/lib/components/pay/toC/model.d.ts +1 -9
  240. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  241. package/lib/components/schedules/model.d.ts +1 -9
  242. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  243. package/lib/components/schedules/utils.d.ts +1 -1
  244. package/lib/components/schedules/utils.js +1 -1
  245. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  246. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  247. package/lib/components/ticketBooking/components/ticketBooking/index.js +25 -25
  248. package/lib/components/wallet/Detail/model.d.ts +1 -13
  249. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  250. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  251. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  252. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  253. package/lib/components/wallet/model.d.ts +1 -9
  254. package/lib/utils/index.d.ts +1 -1
  255. package/package.json +4 -4
  256. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  257. package/es/components/eftposPay/linkly/const.js +0 -82
  258. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  259. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  260. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  261. package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
  262. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  263. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  264. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  265. package/es/components/eftposPay/linkly/index.js +0 -197
  266. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  267. package/es/components/eftposPay/linkly/service.js +0 -81
  268. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  269. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
  270. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  271. package/lib/components/eftposPay/linkly/const.js +0 -102
  272. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  273. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  274. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  275. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
  276. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  277. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  278. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  279. package/lib/components/eftposPay/linkly/index.js +0 -208
  280. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  281. package/lib/components/eftposPay/linkly/service.js +0 -55
  282. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  283. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
@@ -54,53 +54,11 @@ export var calculatePriceDetails = function calculatePriceDetails(shopInfo, item
54
54
 
55
55
  // 计算总价
56
56
  var total = shopInfo !== null && shopInfo !== void 0 && shopInfo.is_price_include_tax ? subtotal : subtotal.plus(totalTaxFee);
57
-
58
- // 计算定金
59
- var deposit = calculateDeposit(items);
60
57
  return {
61
58
  subtotal: subtotal.toFixed(2),
62
59
  total: total.toFixed(2),
63
60
  taxTitle: shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.tax_title,
64
61
  totalTaxFee: totalTaxFee.toFixed(2),
65
- isPriceIncludeTax: shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.is_price_include_tax,
66
- deposit: deposit
62
+ isPriceIncludeTax: shopInfo === null || shopInfo === void 0 ? void 0 : shopInfo.is_price_include_tax
67
63
  };
68
- };
69
-
70
- /**
71
- * @title: 计算定金
72
- * @param items - 购物车商品数组
73
- * @returns 定金字符串,保留2位小数
74
- */
75
- export var calculateDeposit = function calculateDeposit(items) {
76
- if (!(items !== null && items !== void 0 && items.length)) {
77
- return undefined;
78
- }
79
- var protocols = [];
80
- var hasDeposit = false;
81
- var total = items.reduce(function (sum, item) {
82
- if (item !== null && item !== void 0 && item.deposit) {
83
- var _item$deposit, _item$deposit2;
84
- hasDeposit = true;
85
- var cartItemTotalPrice = new Decimal((item === null || item === void 0 || (_item$deposit = item.deposit) === null || _item$deposit === void 0 ? void 0 : _item$deposit.total) || 0);
86
- // 将协议数据去重合并
87
- item === null || item === void 0 || (_item$deposit2 = item.deposit) === null || _item$deposit2 === void 0 || (_item$deposit2 = _item$deposit2.protocols) === null || _item$deposit2 === void 0 || _item$deposit2.forEach(function (protocol) {
88
- if (protocols.findIndex(function (p) {
89
- return p.id === protocol.id;
90
- }) === -1) {
91
- protocols.push(protocol);
92
- }
93
- });
94
- return sum.plus(cartItemTotalPrice);
95
- }
96
- return sum;
97
- }, new Decimal(0));
98
- if (hasDeposit) {
99
- return {
100
- total: total.toFixed(2),
101
- protocols: protocols,
102
- hasDeposit: hasDeposit
103
- };
104
- }
105
- return undefined;
106
64
  };
@@ -110,7 +110,6 @@ var CartItem = function CartItem(_ref) {
110
110
  setResourceOtherParams(_objectSpread(_objectSpread({}, resourceOtherParams), {}, {
111
111
  errorList: null
112
112
  }));
113
- val.like_status = 'like';
114
113
 
115
114
  // 更新资源
116
115
  appointmentBooking.updateCart({
@@ -1,5 +1,5 @@
1
1
  .appointment-cart-item-wrap {
2
- height: calc(var(--vh, 1vh) * 100 - 100px);
2
+ height: calc(100vh - 100px);
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
 
@@ -39,7 +39,7 @@
39
39
  flex-direction: column;
40
40
  align-items: start;
41
41
 
42
- > div {
42
+ >div {
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: space-between;
@@ -105,4 +105,4 @@
105
105
  flex: none;
106
106
  z-index: 10;
107
107
  }
108
- }
108
+ }
@@ -213,19 +213,6 @@ var Layout = function Layout() {
213
213
  if (isDateSelectedFirst && key === 'select-date') return false;
214
214
  return key !== 'confirm-information';
215
215
  }, [isDateSelectedFirst, currentStep === null || currentStep === void 0 || (_currentStep$step8 = currentStep.step) === null || _currentStep$step8 === void 0 ? void 0 : _currentStep$step8.key]);
216
-
217
- /**
218
- * @title: 获取协议方法需要在组件中定义才能传递给子组件,子组件无法获取到context中的方法
219
- * @description:
220
- * @param {string} id
221
- * @return {*}
222
- * @Author: WangHan
223
- * @Date: 2025-07-07 10:06
224
- */
225
- var depositProtocolRequest = function depositProtocolRequest(id) {
226
- var _appointmentBooking$g;
227
- return appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$g = appointmentBooking.getProtocol) === null || _appointmentBooking$g === void 0 ? void 0 : _appointmentBooking$g.call(appointmentBooking, id);
228
- };
229
216
  return /*#__PURE__*/React.createElement(React.Fragment, null, !isRetailTemplate ? /*#__PURE__*/React.createElement(Header, null) : null, /*#__PURE__*/React.createElement("div", {
230
217
  className: "parallel-content-wrap ".concat(isMobile() ? 'parallel-content-mobile-wrap' : '', " ").concat(isRetailTemplate ? 'parallel-content-retail-wrap' : '')
231
218
  }, /*#__PURE__*/React.createElement("div", {
@@ -250,8 +237,7 @@ var Layout = function Layout() {
250
237
  onChange: function onChange() {
251
238
  return setLoading(false);
252
239
  },
253
- isHideCheckout: false,
254
- depositProtocolRequest: depositProtocolRequest
240
+ isHideCheckout: false
255
241
  }) : null);
256
242
  };
257
243
  export default Layout;
@@ -107,7 +107,7 @@
107
107
  margin-top: 0;
108
108
 
109
109
  .appointment-cart-item-wrap {
110
- height: calc(var(--vh, 1vh) * 100 - 16px) !important;
110
+ height: calc(100vh - 16px) !important;
111
111
  }
112
112
  }
113
113
  }
@@ -1,9 +1,3 @@
1
1
  import './index.less';
2
- export declare const DepositContent: (props: {
3
- isAgreeDepositPolicy: boolean;
4
- setIsAgreeDepositPolicy: (value: boolean) => void;
5
- deposit: any;
6
- depositProtocolRequest?: any;
7
- }) => JSX.Element;
8
2
  declare const Deposit: () => JSX.Element;
9
3
  export default Deposit;
@@ -4,11 +4,12 @@ import AppointmentDeposit from "../../deposit";
4
4
  import { useAppointmentBookingContext } from "../../context";
5
5
  import { locales } from '@pisell/utils';
6
6
  import "./index.less";
7
- export var DepositContent = function DepositContent(props) {
8
- var isAgreeDepositPolicy = props.isAgreeDepositPolicy,
9
- setIsAgreeDepositPolicy = props.setIsAgreeDepositPolicy,
10
- deposit = props.deposit,
11
- depositProtocolRequest = props.depositProtocolRequest;
7
+ var Deposit = function Deposit() {
8
+ var _useAppointmentBookin = useAppointmentBookingContext(),
9
+ setIsAgreeDepositPolicy = _useAppointmentBookin.setIsAgreeDepositPolicy,
10
+ isAgreeDepositPolicy = _useAppointmentBookin.isAgreeDepositPolicy,
11
+ summary = _useAppointmentBookin.summary;
12
+ var deposit = summary.deposit;
12
13
  return /*#__PURE__*/React.createElement("div", {
13
14
  className: "appointment-deposit-wrap"
14
15
  }, /*#__PURE__*/React.createElement("div", {
@@ -23,28 +24,7 @@ export var DepositContent = function DepositContent(props) {
23
24
  isAgreePolicy: isAgreeDepositPolicy,
24
25
  onChange: function onChange(value) {
25
26
  return setIsAgreeDepositPolicy(value);
26
- },
27
- depositProtocolRequest: depositProtocolRequest
27
+ }
28
28
  }));
29
29
  };
30
- var Deposit = function Deposit() {
31
- var _ref = useAppointmentBookingContext(),
32
- setIsAgreeDepositPolicy = _ref.setIsAgreeDepositPolicy,
33
- isAgreeDepositPolicy = _ref.isAgreeDepositPolicy,
34
- summary = _ref.summary,
35
- appointmentBooking = _ref.appointmentBooking;
36
- var deposit = summary.deposit;
37
-
38
- // 获取协议方法需要在组件中定义才能传递给子组件,子组件无法获取到context中的方法
39
- var depositProtocolRequest = function depositProtocolRequest(id) {
40
- var _appointmentBooking$g;
41
- return appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$g = appointmentBooking.getProtocol) === null || _appointmentBooking$g === void 0 ? void 0 : _appointmentBooking$g.call(appointmentBooking, id);
42
- };
43
- return /*#__PURE__*/React.createElement(DepositContent, {
44
- isAgreeDepositPolicy: !!isAgreeDepositPolicy,
45
- setIsAgreeDepositPolicy: setIsAgreeDepositPolicy,
46
- deposit: deposit,
47
- depositProtocolRequest: depositProtocolRequest
48
- });
49
- };
50
30
  export default Deposit;
@@ -104,7 +104,7 @@ var Form = /*#__PURE__*/forwardRef(function (props, ref) {
104
104
  // 更新表单购物车
105
105
  appointmentBooking.updateCart({
106
106
  _id: appointmentBoard === null || appointmentBoard === void 0 ? void 0 : appointmentBoard.cart_id,
107
- relationForms: updateRelationForms(carts, appointmentBoard, values)
107
+ relationForms: updateRelationForms(carts, appointmentBoard, values, currentStepParams === null || currentStepParams === void 0 ? void 0 : currentStepParams.key)
108
108
  });
109
109
  };
110
110
 
@@ -5,4 +5,4 @@
5
5
  * @Author: WangHan
6
6
  * @Date: 2025-05-26 16:58
7
7
  */
8
- export declare const updateRelationForms: (carts: any[], currentCart: any, values: any) => any;
8
+ export declare const updateRelationForms: (carts: any[], currentCart: any, values: any, currentStepKey?: string) => any;
@@ -5,32 +5,34 @@
5
5
  * @Author: WangHan
6
6
  * @Date: 2025-05-26 16:58
7
7
  */
8
- export var updateRelationForms = function updateRelationForms(carts, currentCart, values) {
8
+ export var updateRelationForms = function updateRelationForms(carts, currentCart, values, currentStepKey) {
9
9
  var _cartItem$_origin;
10
10
  if (!(currentCart !== null && currentCart !== void 0 && currentCart.cart_id)) return [];
11
+ // 不同情况如下:
12
+ // 1. 一个商品,一个资源,一个表单
13
+ // 2. 一个商品,多个资源,多个表单
14
+ // 3. 多个商品,一个资源,一个表单
15
+ // 4. 多个商品,多个资源,多个表单
16
+
11
17
  var cartItem = carts === null || carts === void 0 ? void 0 : carts.find(function (item) {
12
18
  return (item === null || item === void 0 ? void 0 : item._id) === (currentCart === null || currentCart === void 0 ? void 0 : currentCart.cart_id);
13
19
  });
14
20
  var oldLists = (cartItem === null || cartItem === void 0 || (_cartItem$_origin = cartItem._origin) === null || _cartItem$_origin === void 0 ? void 0 : _cartItem$_origin.relation_forms) || [];
15
21
  var newData = {
16
22
  form_id: Number(values === null || values === void 0 ? void 0 : values.form_id),
17
- form_record_id: values === null || values === void 0 ? void 0 : values.form_record_id
23
+ form_record_ids: [values === null || values === void 0 ? void 0 : values.form_record_id],
24
+ cartId: currentCart === null || currentCart === void 0 ? void 0 : currentCart.cart_id,
25
+ currentStepKey: currentStepKey
18
26
  };
19
- var exist = oldLists.find(function (item) {
20
- return item.form_id === (newData === null || newData === void 0 ? void 0 : newData.form_id);
21
- });
22
27
 
23
- // 如果在目前的数组中找到form_id相同的,则更新form_record_ids参数,否则新增一条数据
24
- if (exist) {
25
- var _exist$form_record_id;
26
- if (!(exist !== null && exist !== void 0 && (_exist$form_record_id = exist.form_record_ids) !== null && _exist$form_record_id !== void 0 && _exist$form_record_id.includes(newData.form_record_id))) {
27
- exist.form_record_ids.push(newData.form_record_id);
28
- }
28
+ // 查找是否有相同 cartId 和 form_id 的项
29
+ var existIndex = oldLists.findIndex(function (item) {
30
+ return item.cartId === newData.cartId && item.form_id === newData.form_id && item.currentStepKey === newData.currentStepKey;
31
+ });
32
+ if (existIndex > -1) {
33
+ oldLists[existIndex].form_record_ids = newData.form_record_ids;
29
34
  } else {
30
- oldLists.push({
31
- form_id: newData.form_id,
32
- form_record_ids: [newData.form_record_id]
33
- });
35
+ oldLists = oldLists.concat(newData);
34
36
  }
35
37
  return oldLists;
36
38
  };
@@ -106,7 +106,8 @@ var Header = function Header() {
106
106
  // 5. 清空表单数据
107
107
  if (key.startsWith('fill-form')) {
108
108
  form_key = 'booking_form';
109
- booking_form = getOtherData(form_key);
109
+ booking_form = getOtherData(form_key); // 移除表单步骤
110
+ removeStep(key);
110
111
  setOtherData(form_key, _objectSpread(_objectSpread({}, booking_form), {}, _defineProperty({}, key, {})));
111
112
  }
112
113
 
@@ -210,7 +210,6 @@ var Resource = /*#__PURE__*/forwardRef(function (props, ref) {
210
210
  var index = carts.findIndex(function (n) {
211
211
  return !(appointmentBooking !== null && appointmentBooking !== void 0 && appointmentBooking.isTargetCartIdNormalProduct(n._id));
212
212
  });
213
- e.like_status = 'like';
214
213
  return appointmentBooking.updateCart({
215
214
  _id: carts === null || carts === void 0 || (_carts$index = carts[index]) === null || _carts$index === void 0 ? void 0 : _carts$index._id,
216
215
  resources: updateCartResources(carts === null || carts === void 0 ? void 0 : carts[index], e)
@@ -85,7 +85,9 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
85
85
  return checkProductType(item === null || item === void 0 ? void 0 : item.id);
86
86
  case 4:
87
87
  type = _context2.sent;
88
- appointmentBooking.openProductDetail(item.id);
88
+ if (type === 'session') {
89
+ appointmentBooking.openProductDetail(item.id);
90
+ }
89
91
  case 6:
90
92
  utils === null || utils === void 0 || utils.action({
91
93
  type: 'pisell1.productDetail',
@@ -103,13 +105,6 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
103
105
  return _regeneratorRuntime().wrap(function _callee$(_context) {
104
106
  while (1) switch (_context.prev = _context.next) {
105
107
  case 0:
106
- if (!data.isCancel) {
107
- _context.next = 3;
108
- break;
109
- }
110
- appointmentBooking.closeProductDetail();
111
- return _context.abrupt("return");
112
- case 3:
113
108
  product = _objectSpread(_objectSpread({}, data), {}, {
114
109
  options: (data === null || data === void 0 ? void 0 : data.option) || []
115
110
  });
@@ -117,21 +112,31 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
117
112
 
118
113
  // 零售模版,直接加入购物车
119
114
  if (!isRetailTemplate) {
120
- _context.next = 10;
115
+ _context.next = 7;
121
116
  break;
122
117
  }
123
118
  if (!(data !== null && data !== void 0 && data.isCancel)) {
124
- _context.next = 8;
119
+ _context.next = 5;
125
120
  break;
126
121
  }
127
122
  return _context.abrupt("return");
128
- case 8:
123
+ case 5:
129
124
  appointmentBooking.storeProduct(product);
130
125
  return _context.abrupt("return");
126
+ case 7:
127
+ if (!(data !== null && data !== void 0 && data.isCancel)) {
128
+ _context.next = 10;
129
+ break;
130
+ }
131
+ if (type === 'session') {
132
+ appointmentBooking.closeProductDetail();
133
+ appointmentBooking.getAvailableDate();
134
+ }
135
+ return _context.abrupt("return");
131
136
  case 10:
132
137
  session = data === null || data === void 0 ? void 0 : data.session;
133
138
  if (!session) {
134
- _context.next = 19;
139
+ _context.next = 20;
135
140
  break;
136
141
  }
137
142
  startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
@@ -143,36 +148,35 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
143
148
  endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
144
149
  }
145
150
  });
146
- _context.next = 17;
151
+ appointmentBooking.closeProductDetail();
152
+ _context.next = 18;
147
153
  return appointmentBooking.getAvailableDate({
148
154
  startDate: startDate,
149
155
  endDate: endDate
150
156
  });
151
- case 17:
152
- _context.next = 27;
157
+ case 18:
158
+ _context.next = 28;
153
159
  break;
154
- case 19:
160
+ case 20:
155
161
  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) || [];
156
162
  activeStatus = resources.find(function (item) {
157
163
  return item.status === 1;
158
164
  });
159
165
  if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
160
- _context.next = 23;
166
+ _context.next = 24;
161
167
  break;
162
168
  }
163
169
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
164
- case 23:
170
+ case 24:
165
171
  appointmentBooking.storeProduct(product);
166
172
  // duration 类型的商品,要获取一下资源,在先选日期的 duration 步骤里目前只能通过这个动作拉取
167
173
  if (!(type === 'duration')) {
168
- _context.next = 27;
174
+ _context.next = 28;
169
175
  break;
170
176
  }
171
- _context.next = 27;
177
+ _context.next = 28;
172
178
  return appointmentBooking.getAvailableDate();
173
- case 27:
174
- appointmentBooking.closeProductDetail();
175
-
179
+ case 28:
176
180
  // 先选择日期流程
177
181
  if (isDateSelectedFirst) {
178
182
  index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
@@ -12,6 +12,7 @@ import React, { useState, useEffect } from 'react';
12
12
  import { Spin } from 'antd';
13
13
  import { PisellModal, PisellEmpty, Button, Checkbox } from '@pisell/materials';
14
14
  import { locales, isMobile } from '@pisell/utils';
15
+ import { useAppointmentBookingContext } from "../../../context";
15
16
  import "./index.less";
16
17
  var DepositModal = function DepositModal(props) {
17
18
  var open = props.open,
@@ -20,8 +21,9 @@ var DepositModal = function DepositModal(props) {
20
21
  onChange = props.onChange,
21
22
  onConfirm = props.onConfirm,
22
23
  _props$isHideCheckout = props.isHideCheckout,
23
- isHideCheckout = _props$isHideCheckout === void 0 ? true : _props$isHideCheckout,
24
- depositProtocolRequest = props.depositProtocolRequest;
24
+ isHideCheckout = _props$isHideCheckout === void 0 ? true : _props$isHideCheckout;
25
+ var _useAppointmentBookin = useAppointmentBookingContext(),
26
+ appointmentBooking = _useAppointmentBookin.appointmentBooking;
25
27
  var _useState = useState(null),
26
28
  _useState2 = _slicedToArray(_useState, 2),
27
29
  policy = _useState2[0],
@@ -48,42 +50,35 @@ var DepositModal = function DepositModal(props) {
48
50
  */
49
51
  var getPolicy = /*#__PURE__*/function () {
50
52
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(id) {
51
- var _yield$depositProtoco, data;
53
+ var _yield$appointmentBoo, data;
52
54
  return _regeneratorRuntime().wrap(function _callee$(_context) {
53
55
  while (1) switch (_context.prev = _context.next) {
54
56
  case 0:
55
- if (depositProtocolRequest) {
56
- _context.next = 3;
57
- break;
58
- }
59
- console.error('depositProtocolRequest is not defined');
60
- return _context.abrupt("return");
61
- case 3:
62
57
  setLoading(true);
63
- _context.prev = 4;
64
- _context.next = 7;
65
- return depositProtocolRequest === null || depositProtocolRequest === void 0 ? void 0 : depositProtocolRequest(id);
66
- case 7:
67
- _yield$depositProtoco = _context.sent;
68
- data = _yield$depositProtoco.data;
58
+ _context.prev = 1;
59
+ _context.next = 4;
60
+ return appointmentBooking.getProtocol(id);
61
+ case 4:
62
+ _yield$appointmentBoo = _context.sent;
63
+ data = _yield$appointmentBoo.data;
69
64
  setPolicy(data);
70
65
  onChange && onChange(data);
71
- _context.next = 17;
66
+ _context.next = 14;
72
67
  break;
73
- case 13:
74
- _context.prev = 13;
75
- _context.t0 = _context["catch"](4);
68
+ case 10:
69
+ _context.prev = 10;
70
+ _context.t0 = _context["catch"](1);
76
71
  console.log(_context.t0);
77
72
  onChange && onChange(_context.t0);
78
- case 17:
79
- _context.prev = 17;
73
+ case 14:
74
+ _context.prev = 14;
80
75
  setLoading(false);
81
- return _context.finish(17);
82
- case 20:
76
+ return _context.finish(14);
77
+ case 17:
83
78
  case "end":
84
79
  return _context.stop();
85
80
  }
86
- }, _callee, null, [[4, 13, 17, 20]]);
81
+ }, _callee, null, [[1, 10, 14, 17]]);
87
82
  }));
88
83
  return function getPolicy(_x) {
89
84
  return _ref.apply(this, arguments);
@@ -21,8 +21,7 @@ var Deposit = function Deposit(props) {
21
21
  isAgreePolicy = _props$isAgreePolicy === void 0 ? true : _props$isAgreePolicy,
22
22
  _props$isShowTitle = props.isShowTitle,
23
23
  isShowTitle = _props$isShowTitle === void 0 ? true : _props$isShowTitle,
24
- onChange = props.onChange,
25
- depositProtocolRequest = props.depositProtocolRequest;
24
+ onChange = props.onChange;
26
25
  var context = useEngineContext();
27
26
  // 打开协议弹窗
28
27
  var _useState = useState(false),
@@ -96,8 +95,7 @@ var Deposit = function Deposit(props) {
96
95
  onCancel: function onCancel() {
97
96
  return setVisible(false);
98
97
  },
99
- item: policyItem,
100
- depositProtocolRequest: depositProtocolRequest
98
+ item: policyItem
101
99
  }));
102
100
  };
103
101
  export default Deposit;
@@ -27,20 +27,6 @@ var AppointmentBooking = function AppointmentBooking() {
27
27
  }
28
28
  });
29
29
  }, []);
30
- useEffect(function () {
31
- var setRealVH = function setRealVH() {
32
- // window.innerHeight 会返回视口真实的高度(不包括工具栏)
33
- var vh = window.innerHeight * 0.01;
34
- document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
35
- };
36
-
37
- // 页面加载和窗口大小变化时都重新计算
38
- setRealVH();
39
- window.addEventListener('resize', setRealVH);
40
- return function () {
41
- window.removeEventListener('resize', setRealVH);
42
- };
43
- }, []);
44
30
  return /*#__PURE__*/React.createElement("div", {
45
31
  className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
46
32
  }, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  background: #ffffff;
6
- height: calc(var(--vh, 1vh) * 100);
6
+ height: 100vh;
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-section-headers {
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
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
4
  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; }
5
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
8
8
  import classNames from "classnames";
@@ -13,6 +13,10 @@ import "./index.less";
13
13
 
14
14
  // tabs 子组件定义
15
15
 
16
+ // 定义主键类型
17
+
18
+ // Tabs 可传递的参数
19
+
16
20
  var Tabs = function Tabs(_ref, ref) {
17
21
  var renderTab = _ref.renderTab,
18
22
  rowKey = _ref.rowKey,
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
29
29
  onChange: function onChange(e) {
30
30
  var _resetProps$onChange;
31
31
  e.persist();
32
- (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
32
+ (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
33
33
  }
34
34
  }), _options);
35
35
  };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -26,8 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
26
26
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
27
27
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
28
28
  import "./index.less";
29
- import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
30
29
  import { getServiceAddons } from "./utils";
30
+ import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
31
31
  var ShopDiscountHooks = {
32
32
  onInited: 'shopDiscount:onInited',
33
33
  onDestroy: 'shopDiscount:onDestroy',
@@ -275,8 +275,8 @@ var VoucherCard = function VoucherCard(props) {
275
275
  style: {
276
276
  width: '100%'
277
277
  },
278
- dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
279
278
  mixedSort: mixedSort,
279
+ dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
280
280
  onChange: function onChange(val) {
281
281
  var shopDiscount = pisellos.getModule('shopDiscount');
282
282
  var detail = shopDiscount.setDiscountSelected({
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,9 +1,9 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { miniRedux } from "@pisell/utils";
8
8
  var defaultState = {};
9
9
  var _miniRedux = miniRedux({
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;