@pisell/private-materials 6.2.11 → 6.2.13

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 (260) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Cart/utils.js +17 -1
  11. package/es/components/Sales/Event/Detail.d.ts +1 -0
  12. package/es/components/Sales/Event/Detail.js +45 -11
  13. package/es/components/Sales/Event/serve.d.ts +10 -0
  14. package/es/components/Sales/Event/serve.js +25 -0
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  19. package/es/components/booking/components/customSelect/index.js +0 -1
  20. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  21. package/es/components/booking/forms/table/index.d.ts +0 -1
  22. package/es/components/booking/hooks/useClearCart.js +8 -11
  23. package/es/components/booking/info/client/index.js +2 -3
  24. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  25. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  26. package/es/components/booking/info/hooks/useInfoHolder.js +9 -16
  27. package/es/components/booking/info/service/Lists.js +26 -36
  28. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  29. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  30. package/es/components/booking/info/service/like/index.d.ts +0 -1
  31. package/es/components/booking/info/service2/utils.js +21 -20
  32. package/es/components/booking/info2/index.js +0 -1
  33. package/es/components/booking/info2/service/addService/utils.js +3 -6
  34. package/es/components/booking/info2/service/addTimeModal/index.js +0 -3
  35. package/es/components/booking/info2/service/editService/Resources/index.js +0 -5
  36. package/es/components/booking/info2/service/editService/index.js +165 -258
  37. package/es/components/booking/info2/service/index.js +15 -19
  38. package/es/components/booking/materiels/duration/index.js +2 -9
  39. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  40. package/es/components/booking/utils.d.ts +2 -2
  41. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  42. package/es/components/eftpos/form/index.d.ts +0 -1
  43. package/es/components/eftpos/group/index.d.ts +0 -1
  44. package/es/components/eftpos/hooks.d.ts +0 -1
  45. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  46. package/es/components/eftpos/icon/device.d.ts +0 -1
  47. package/es/components/eftpos/receipt/index.d.ts +0 -1
  48. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  49. package/es/components/eftposPay/amount.d.ts +1 -1
  50. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  51. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  52. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  53. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  54. package/es/components/eftposPay/device.d.ts +1 -1
  55. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  56. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  57. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  60. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  61. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  64. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  65. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -2
  66. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  67. package/es/components/eventBooking/index.js +14 -0
  68. package/es/components/eventBooking/index.less +1 -1
  69. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  70. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  71. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  72. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  73. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  74. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  75. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  76. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  77. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  78. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  79. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  80. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  81. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  82. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  83. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  84. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  85. package/es/components/schedules/products/index.d.ts +0 -1
  86. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  87. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  88. package/es/components/shoppingCart/components/Cart/Product.js +41 -48
  89. package/es/components/shoppingCart/components/Cart/index.js +18 -21
  90. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  91. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.js +157 -175
  93. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  94. package/es/components/ticketBooking/components/timeBar/index.js +71 -78
  95. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  96. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  97. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  98. package/lib/components/Sales/Cart/utils.js +10 -1
  99. package/lib/components/Sales/Event/Detail.d.ts +1 -0
  100. package/lib/components/Sales/Event/Detail.js +37 -12
  101. package/lib/components/Sales/Event/serve.d.ts +10 -0
  102. package/lib/components/Sales/Event/serve.js +7 -0
  103. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  104. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  105. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  106. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  107. package/lib/components/booking/components/customSelect/index.js +0 -1
  108. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  109. package/lib/components/booking/forms/table/index.d.ts +0 -1
  110. package/lib/components/booking/hooks/useClearCart.js +13 -16
  111. package/lib/components/booking/info/client/index.js +4 -5
  112. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  113. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  114. package/lib/components/booking/info/hooks/useInfoHolder.js +9 -10
  115. package/lib/components/booking/info/service/Lists.js +23 -35
  116. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  117. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  118. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  119. package/lib/components/booking/info/service2/utils.js +17 -17
  120. package/lib/components/booking/info2/service/addService/utils.js +2 -4
  121. package/lib/components/booking/info2/service/addTimeModal/index.js +0 -3
  122. package/lib/components/booking/info2/service/editService/Resources/index.js +0 -2
  123. package/lib/components/booking/info2/service/editService/index.js +70 -132
  124. package/lib/components/booking/info2/service/index.js +9 -13
  125. package/lib/components/booking/materiels/duration/index.js +2 -7
  126. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  127. package/lib/components/booking/utils.d.ts +2 -2
  128. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  129. package/lib/components/eftpos/form/index.d.ts +0 -1
  130. package/lib/components/eftpos/group/index.d.ts +0 -1
  131. package/lib/components/eftpos/hooks.d.ts +0 -1
  132. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  133. package/lib/components/eftpos/icon/device.d.ts +0 -1
  134. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  135. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  136. package/lib/components/eftposPay/amount.d.ts +1 -1
  137. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  138. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  139. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  140. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  141. package/lib/components/eftposPay/device.d.ts +1 -1
  142. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  143. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  144. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  145. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  146. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  147. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  148. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  149. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  150. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  151. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  152. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -2
  153. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  154. package/lib/components/eventBooking/index.js +11 -0
  155. package/lib/components/eventBooking/index.less +1 -1
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  157. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  158. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  159. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  160. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  161. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  162. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  163. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  164. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  165. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  166. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  167. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  168. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  169. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  170. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  171. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  172. package/lib/components/schedules/products/index.d.ts +0 -1
  173. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  174. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  175. package/lib/components/shoppingCart/components/Cart/Product.js +21 -31
  176. package/lib/components/shoppingCart/components/Cart/index.js +15 -18
  177. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  179. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +127 -143
  180. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  181. package/lib/components/ticketBooking/components/timeBar/index.js +88 -95
  182. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  183. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  184. package/package.json +3 -3
  185. package/es/components/Sales/Checkout/utils.d.ts +0 -40
  186. package/es/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  187. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  188. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  189. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  190. package/es/components/appointmentBooking/hooks.d.ts +0 -106
  191. package/es/components/appointmentBooking/index.d.ts +0 -3
  192. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  193. package/es/components/booking/components/voucher/index.d.ts +0 -3
  194. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  195. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
  196. package/es/components/booking/info/index.d.ts +0 -3
  197. package/es/components/booking/info/utils.d.ts +0 -50
  198. package/es/components/booking/info2/index.d.ts +0 -12
  199. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  200. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  201. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  202. package/es/components/booking/locales.d.ts +0 -828
  203. package/es/components/booking/model.d.ts +0 -108
  204. package/es/components/eftposPay/const.d.ts +0 -184
  205. package/es/components/eftposPay/hooks.d.ts +0 -35
  206. package/es/components/eftposPay/index.d.ts +0 -4
  207. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  208. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  209. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  210. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  211. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  212. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  213. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  214. package/es/components/eftposPay/pay.d.ts +0 -20
  215. package/es/components/eftposPay/store/index.d.ts +0 -355
  216. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  217. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -2
  218. package/es/components/productSelect/index.d.ts +0 -26
  219. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  220. package/es/components/ticketBooking/index.d.ts +0 -7
  221. package/es/components/walletList/index.d.ts +0 -28
  222. package/es/utils/index.d.ts +0 -23
  223. package/lib/components/Sales/Checkout/utils.d.ts +0 -40
  224. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +0 -56
  225. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  226. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  227. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -4
  228. package/lib/components/appointmentBooking/hooks.d.ts +0 -106
  229. package/lib/components/appointmentBooking/index.d.ts +0 -3
  230. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  231. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  232. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  233. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
  234. package/lib/components/booking/info/index.d.ts +0 -3
  235. package/lib/components/booking/info/utils.d.ts +0 -50
  236. package/lib/components/booking/info2/index.d.ts +0 -12
  237. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  238. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  239. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -3
  240. package/lib/components/booking/locales.d.ts +0 -828
  241. package/lib/components/booking/model.d.ts +0 -108
  242. package/lib/components/eftposPay/const.d.ts +0 -184
  243. package/lib/components/eftposPay/hooks.d.ts +0 -35
  244. package/lib/components/eftposPay/index.d.ts +0 -4
  245. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  246. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  247. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  248. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  249. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  250. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  251. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  252. package/lib/components/eftposPay/pay.d.ts +0 -20
  253. package/lib/components/eftposPay/store/index.d.ts +0 -355
  254. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  255. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -2
  256. package/lib/components/productSelect/index.d.ts +0 -26
  257. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  258. package/lib/components/ticketBooking/index.d.ts +0 -7
  259. package/lib/components/walletList/index.d.ts +0 -28
  260. package/lib/utils/index.d.ts +0 -23
@@ -55,7 +55,8 @@ var BookingDetailModal = (props) => {
55
55
  onCloseEventDetail,
56
56
  onSelectEventDetail,
57
57
  selectEventDetailProductDetail,
58
- checkBeforeSelectEventDetail
58
+ checkBeforeSelectEventDetail,
59
+ getProductDetailRequest
59
60
  } = (0, import_Sales.useEventDetail)();
60
61
  const { addToCart, checkBeforeAddToCart, checkBeforeAddToCartResquest } = (0, import_Sales.useCart)();
61
62
  const { initData } = (0, import_Sales.useInit)();
@@ -294,7 +295,7 @@ var BookingDetailModal = (props) => {
294
295
  onOk: handleOk,
295
296
  width: (0, import_utils.isMobile)() ? "100%" : 600,
296
297
  okButtonProps: {
297
- loading: checkBeforeAddToCartResquest == null ? void 0 : checkBeforeAddToCartResquest.loading
298
+ loading: (getProductDetailRequest == null ? void 0 : getProductDetailRequest.loading) || (checkBeforeAddToCartResquest == null ? void 0 : checkBeforeAddToCartResquest.loading)
298
299
  }
299
300
  },
300
301
  content()
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem } from '../../type';
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -66,6 +66,17 @@ var Content = () => {
66
66
  }
67
67
  getResourceList.run(params);
68
68
  }, []);
69
+ (0, import_react.useEffect)(() => {
70
+ const setRealVH = () => {
71
+ const vh = window.innerHeight * 0.01;
72
+ document.documentElement.style.setProperty("--vh", `${vh}px`);
73
+ };
74
+ setRealVH();
75
+ window.addEventListener("resize", setRealVH);
76
+ return () => {
77
+ window.removeEventListener("resize", setRealVH);
78
+ };
79
+ }, []);
69
80
  return /* @__PURE__ */ import_react.default.createElement(
70
81
  "div",
71
82
  {
@@ -15,7 +15,7 @@
15
15
 
16
16
  .event-booking-mobile-wrap {
17
17
  background: #ffffff;
18
- min-height: 100vh;
18
+ min-height: calc(var(--vh, 1vh) * 100);
19
19
  .pisell-section-headers-content {
20
20
  width: 100%;
21
21
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => JSX.Element;
3
2
  export default StripePayment;
@@ -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
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PageLoading: () => JSX.Element;
3
2
  export default PageLoading;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PaymentRequestForm: () => JSX.Element | null;
3
2
  export default PaymentRequestForm;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
4
3
  export default SetupForm;
@@ -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
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
3
2
  import './index.less';
4
3
  interface WalletUseListProps {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
3
2
  export default PhoneField;
@@ -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 type CurrentDayProps = {
4
3
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { ScheduleItem } from '../../../type';
4
3
  declare type Item = any;
@@ -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 Products: () => JSX.Element;
4
3
  export default Products;
@@ -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 { ProductProps } from '../../type';
3
2
  declare const Product: (props: ProductProps) => JSX.Element;
4
3
  export default Product;
@@ -37,7 +37,6 @@ var import_materials = require("@pisell/materials");
37
37
  var import_useClearCart = __toESM(require("../../hooks/useClearCart"));
38
38
  var import_useContext = require("../../hooks/useContext");
39
39
  var import_useAddService = __toESM(require("../../hooks/useAddService"));
40
- var import_ahooks = require("ahooks");
41
40
  var Product = (props) => {
42
41
  const { id, lists, isAdd = true } = props;
43
42
  const { state, onAction, onChange } = (0, import_useContext.useContext)();
@@ -55,10 +54,10 @@ var Product = (props) => {
55
54
  isShowEditProduct
56
55
  } = state;
57
56
  const clearCart = (0, import_useClearCart.default)(id);
58
- const handleChange = (0, import_ahooks.useMemoizedFn)((item, type, other) => {
57
+ const handleChange = (item, type, other) => {
59
58
  if (disabledEdit && !(other == null ? void 0 : other.disabled)) return;
60
59
  onChange(item, type, other);
61
- });
60
+ };
62
61
  const productParams = (0, import_react.useMemo)(() => {
63
62
  return {
64
63
  isShowNote,
@@ -82,33 +81,24 @@ var Product = (props) => {
82
81
  isShowChangeHolder,
83
82
  isShowEditProduct
84
83
  ]);
85
- (0, import_ahooks.useTrackedEffect)(
86
- (changes) => {
87
- console.log("Index of changed dependencies: ", changes);
88
- },
89
- [clearCart, lists, productParams, hideAddBtn, isAdd, platform]
90
- );
91
- return (0, import_react.useMemo)(() => {
92
- console.log("render cart");
93
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
94
- return /* @__PURE__ */ import_react.default.createElement(
95
- import_materials.ProductCard,
96
- {
97
- key: item._id,
98
- dataSource: item,
99
- onAction: (e) => onAction == null ? void 0 : onAction(e),
100
- onDelete: (e) => handleChange(e, "delete", item),
101
- onNote: (e) => handleChange(e, "note", { note: e.note }),
102
- onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
103
- onEditProduct: (e) => handleChange == null ? void 0 : handleChange(e, "edit_product"),
104
- onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
105
- onChangeResource: (e) => handleChange(item, "change_resource", e),
106
- onChangeHolder: (e) => handleChange(item, "change_holder", e),
107
- onAddHolder: (e) => handleChange(item, "add_holder", e),
108
- ...productParams
109
- }
110
- );
111
- }), !hideAddBtn && platform !== "h5" && isAdd ? (0, import_useAddService.default)(id, "more") : null);
112
- }, [clearCart, lists, productParams, hideAddBtn, isAdd, platform]);
84
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
85
+ return /* @__PURE__ */ import_react.default.createElement(
86
+ import_materials.ProductCard,
87
+ {
88
+ key: item._id,
89
+ dataSource: item,
90
+ onAction: (e) => onAction == null ? void 0 : onAction(e),
91
+ onDelete: (e) => handleChange(e, "delete", item),
92
+ onNote: (e) => handleChange(e, "note", { note: e.note }),
93
+ onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
94
+ onEditProduct: (e) => handleChange == null ? void 0 : handleChange(e, "edit_product"),
95
+ onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
96
+ onChangeResource: (e) => handleChange(item, "change_resource", e),
97
+ onChangeHolder: (e) => handleChange(item, "change_holder", e),
98
+ onAddHolder: (e) => handleChange(item, "add_holder", e),
99
+ ...productParams
100
+ }
101
+ );
102
+ }), !hideAddBtn && platform !== "h5" && isAdd ? (0, import_useAddService.default)(id, "more") : null);
113
103
  };
114
104
  var Product_default = Product;
@@ -66,23 +66,20 @@ var Cart = () => {
66
66
  };
67
67
  });
68
68
  }, [carts, platform]);
69
- return (0, import_react.useMemo)(() => {
70
- console.log("render cart 22222");
71
- return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__shopping-cart") }, isProductList ? /* @__PURE__ */ import_react.default.createElement(import_Product.default, { id: void 0, lists: state == null ? void 0 : state.products }) : /* @__PURE__ */ import_react.default.createElement(
72
- import_materials.Collapse,
73
- {
74
- items: cartsMap,
75
- showHeader: true,
76
- panelBackground: "#ffffff",
77
- collapsible: platform !== "shop" ? "disabled" : "-",
78
- accordion: platform === "shop",
79
- onChange: (key) => {
80
- updateState({ activeKey: key });
81
- onActiveKey(key);
82
- },
83
- ...collapseParams
84
- }
85
- ));
86
- }, [isProductList, cartsMap, platform, collapseParams, state == null ? void 0 : state.products]);
69
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-lowcode__shopping-cart") }, isProductList ? /* @__PURE__ */ import_react.default.createElement(import_Product.default, { id: void 0, lists: state == null ? void 0 : state.products }) : /* @__PURE__ */ import_react.default.createElement(
70
+ import_materials.Collapse,
71
+ {
72
+ items: cartsMap,
73
+ showHeader: true,
74
+ panelBackground: "#ffffff",
75
+ collapsible: platform !== "shop" ? "disabled" : "-",
76
+ accordion: platform === "shop",
77
+ onChange: (key) => {
78
+ updateState({ activeKey: key });
79
+ onActiveKey(key);
80
+ },
81
+ ...collapseParams
82
+ }
83
+ ));
87
84
  };
88
85
  var Cart_default = Cart;
@@ -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;
@@ -48,7 +48,7 @@ var import_utils6 = require("../../utils");
48
48
  var import_notAvailable = __toESM(require("../notAvailable"));
49
49
  var import_dayjs = __toESM(require("dayjs"));
50
50
  var AddSerivce = (props) => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
52
52
  const { onEdit, state, dispatch, renderMode = "current" } = props;
53
53
  const [loading, setLoading] = (0, import_react.useState)(true);
54
54
  const context = (0, import_useEngineContext.default)();
@@ -221,151 +221,10 @@ var AddSerivce = (props) => {
221
221
  const isEject = (0, import_utils2.getIsEject)(item, type);
222
222
  const isOnlySession = (0, import_utils2.getIsOnlySession)(item);
223
223
  let lock = false;
224
- let cacheValues = null;
225
224
  if (isEject) {
226
225
  setCurrentProduct(item);
227
226
  } else {
228
227
  setCurrentProduct(null);
229
- cacheValues = {
230
- bundle: [],
231
- key: item.id,
232
- option: [],
233
- product_id: item.id,
234
- product_variant_id: 0,
235
- quantity: 1,
236
- rowKey: item.id,
237
- session: null,
238
- unique: "08974625397"
239
- };
240
- }
241
- const callback = async (e, extension_type, detail) => {
242
- var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
243
- setCurrentProduct(null);
244
- if (lock) {
245
- return;
246
- }
247
- lock = true;
248
- setTimeout(() => {
249
- lock = false;
250
- }, 2e3);
251
- if (!isBooking4) {
252
- const data = await createBookingData({
253
- product: { ...detail || item, _params: e }
254
- });
255
- createBooking({ booking: data });
256
- return;
257
- }
258
- const _detail = detail || item;
259
- const other = JSON.parse(JSON.stringify(e));
260
- other.session = e.session;
261
- let cacheItem = {
262
- ..._detail,
263
- product_id: item.id,
264
- _id: (0, import_utils.getUniqueId)(),
265
- _key: e.key,
266
- _extend: {
267
- start_date: state.date.value,
268
- quantity: (e == null ? void 0 : e.quantity) || 1,
269
- price: _detail.price,
270
- product_name: item.title,
271
- other
272
- },
273
- new: 1
274
- };
275
- let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
276
- cacheItem._extend.total = _total;
277
- cacheItem._extend.origin_total = _total;
278
- const _isEdit = !!state.service.cacheItem;
279
- if (_isEdit) {
280
- cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
281
- cacheItem.new = 0;
282
- }
283
- if (renderMode === "current") {
284
- cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
285
- }
286
- cacheItem = (0, import_utils3.getProductExtend)({
287
- cacheItem,
288
- state,
289
- isDisabledTime: true
290
- });
291
- if (state.renderType === "eventBooking") {
292
- cacheItem.autoClose = false;
293
- }
294
- if (cacheItem.autoClose) {
295
- cacheItem.autoClose = false;
296
- cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
297
- let { list: _list, quantity } = (0, import_utils6.addService)(
298
- [...state.service.value],
299
- cacheItem,
300
- state
301
- );
302
- (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
303
- Toast,
304
- /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
305
- quantity || 1
306
- )))
307
- );
308
- (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
309
- try {
310
- if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
311
- const val = _list == null ? void 0 : _list.map((s) => {
312
- return {
313
- product_id: s == null ? void 0 : s.product_id,
314
- detailId: s == null ? void 0 : s.id,
315
- detailProductId: s == null ? void 0 : s.product_id,
316
- product_name: s == null ? void 0 : s.title,
317
- price: s == null ? void 0 : s.price,
318
- _id: s == null ? void 0 : s._id,
319
- _key: s == null ? void 0 : s._key,
320
- _serviceKey: s == null ? void 0 : s._serviceKey
321
- };
322
- });
323
- const sendData = {
324
- product_id: item == null ? void 0 : item.id,
325
- detailId: _detail == null ? void 0 : _detail.id,
326
- detailProductId: _detail == null ? void 0 : _detail.product_id,
327
- product_name: item == null ? void 0 : item.title,
328
- price: _detail == null ? void 0 : _detail.price,
329
- serviceVal: val
330
- };
331
- (0, import_utils.sendWarningLog)({
332
- title: "addService",
333
- content: [
334
- { key: "添加数据", value: JSON.stringify(sendData) },
335
- {
336
- key: "日期",
337
- value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
338
- }
339
- ]
340
- });
341
- }
342
- } catch (error) {
343
- }
344
- dispatch({
345
- type: "setService",
346
- payload: {
347
- addModal: false,
348
- value: _list,
349
- edit: true,
350
- changeService: false
351
- }
352
- });
353
- } else {
354
- dispatch({
355
- type: "setService",
356
- payload: {
357
- editModal: true,
358
- cacheItem,
359
- addModal: !cacheItem.autoClose,
360
- changeService: false
361
- }
362
- });
363
- onEdit == null ? void 0 : onEdit(cacheItem);
364
- }
365
- };
366
- if (cacheValues) {
367
- callback(cacheValues, "", item);
368
- return;
369
228
  }
370
229
  state.action({
371
230
  type: "pisell1.handleOpenProductModal",
@@ -387,7 +246,131 @@ var AddSerivce = (props) => {
387
246
  onCancel: () => {
388
247
  setCurrentProduct(null);
389
248
  },
390
- callback
249
+ callback: async (e, extension_type, detail) => {
250
+ var _a3, _b2, _c2, _d2, _e2, _f2, _g2;
251
+ setCurrentProduct(null);
252
+ if (lock) {
253
+ return;
254
+ }
255
+ lock = true;
256
+ setTimeout(() => {
257
+ lock = false;
258
+ }, 2e3);
259
+ if (!isBooking4) {
260
+ const data = await createBookingData({
261
+ product: { ...detail || item, _params: e }
262
+ });
263
+ createBooking({ booking: data });
264
+ return;
265
+ }
266
+ const _detail = detail || item;
267
+ const other = JSON.parse(JSON.stringify(e));
268
+ other.session = e.session;
269
+ let cacheItem = {
270
+ ..._detail,
271
+ product_id: item.id,
272
+ _id: (0, import_utils.getUniqueId)(),
273
+ _key: e.key,
274
+ _extend: {
275
+ start_date: state.date.value,
276
+ quantity: (e == null ? void 0 : e.quantity) || 1,
277
+ price: _detail.price,
278
+ product_name: item.title,
279
+ other
280
+ },
281
+ new: 1
282
+ };
283
+ let _total = (0, import_utils2.getProductTotalPrice)(cacheItem);
284
+ cacheItem._extend.total = _total;
285
+ cacheItem._extend.origin_total = _total;
286
+ const _isEdit = !!state.service.cacheItem;
287
+ if (_isEdit) {
288
+ cacheItem._id = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._id;
289
+ cacheItem.new = 0;
290
+ }
291
+ if (renderMode === "current") {
292
+ cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
293
+ }
294
+ cacheItem = (0, import_utils3.getProductExtend)({
295
+ cacheItem,
296
+ state,
297
+ isDisabledTime: true
298
+ });
299
+ if (state.renderType === "eventBooking") {
300
+ cacheItem.autoClose = false;
301
+ }
302
+ if (cacheItem.autoClose) {
303
+ cacheItem.autoClose = false;
304
+ cacheItem._serviceKey = (0, import_utils6.genServiceKey)(cacheItem);
305
+ let { list: _list, quantity } = (0, import_utils6.addService)(
306
+ [...state.service.value],
307
+ cacheItem,
308
+ state
309
+ );
310
+ (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
311
+ Toast,
312
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
313
+ quantity || 1
314
+ )))
315
+ );
316
+ (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
317
+ try {
318
+ if (((_g2 = (_f2 = (_e2 = (_d2 = (_c2 = context.appHelper.utils.store) == null ? void 0 : _c2.getState) == null ? void 0 : _d2.call(_c2)) == null ? void 0 : _e2.global) == null ? void 0 : _f2.globalConfig) == null ? void 0 : _g2.id) === 2155) {
319
+ const val = _list == null ? void 0 : _list.map((s) => {
320
+ return {
321
+ product_id: s == null ? void 0 : s.product_id,
322
+ detailId: s == null ? void 0 : s.id,
323
+ detailProductId: s == null ? void 0 : s.product_id,
324
+ product_name: s == null ? void 0 : s.title,
325
+ price: s == null ? void 0 : s.price,
326
+ _id: s == null ? void 0 : s._id,
327
+ _key: s == null ? void 0 : s._key,
328
+ _serviceKey: s == null ? void 0 : s._serviceKey
329
+ };
330
+ });
331
+ const sendData = {
332
+ product_id: item == null ? void 0 : item.id,
333
+ detailId: _detail == null ? void 0 : _detail.id,
334
+ detailProductId: _detail == null ? void 0 : _detail.product_id,
335
+ product_name: item == null ? void 0 : item.title,
336
+ price: _detail == null ? void 0 : _detail.price,
337
+ serviceVal: val
338
+ };
339
+ (0, import_utils.sendWarningLog)({
340
+ title: "addService",
341
+ content: [
342
+ { key: "添加数据", value: JSON.stringify(sendData) },
343
+ {
344
+ key: "日期",
345
+ value: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
346
+ }
347
+ ]
348
+ });
349
+ }
350
+ } catch (error) {
351
+ }
352
+ dispatch({
353
+ type: "setService",
354
+ payload: {
355
+ addModal: false,
356
+ value: _list,
357
+ edit: true,
358
+ changeService: false
359
+ }
360
+ });
361
+ } else {
362
+ dispatch({
363
+ type: "setService",
364
+ payload: {
365
+ editModal: true,
366
+ cacheItem,
367
+ addModal: !cacheItem.autoClose,
368
+ changeService: false
369
+ }
370
+ });
371
+ onEdit == null ? void 0 : onEdit(cacheItem);
372
+ }
373
+ }
391
374
  });
392
375
  }
393
376
  );
@@ -445,6 +428,7 @@ var AddSerivce = (props) => {
445
428
  }
446
429
  return null;
447
430
  }, [
431
+ (_n = (_m = state.service) == null ? void 0 : _m.cacheItem) == null ? void 0 : _n.autoClose,
448
432
  state.service.addModal,
449
433
  import_utils.locales,
450
434
  renderList,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;