@pisell/private-materials 3.4.66 → 3.4.68

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 (387) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Cart/index.js +20 -3
  12. package/es/components/Sales/Cart/utils.js +16 -0
  13. package/es/components/Sales/Summary/utils.js +5 -4
  14. package/es/components/appointmentBooking/components/Header/index.js +12 -12
  15. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +82 -0
  16. package/es/components/appointmentBooking/components/TimeSlicing/index.js +46 -5
  17. package/es/components/appointmentBooking/components/Voucher/index.js +5 -2
  18. package/es/components/appointmentBooking/hooks.js +6 -13
  19. package/es/components/appointmentBooking/locales.js +3 -0
  20. package/es/components/appointmentBooking/utils.d.ts +23 -0
  21. package/es/components/appointmentBooking/utils.js +159 -0
  22. package/es/components/booking/addons/model.d.ts +10 -1
  23. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  24. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  25. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  26. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  27. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  28. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  29. package/es/components/booking/components/footer/index.d.ts +1 -0
  30. package/es/components/booking/components/voucher/index.js +5 -2
  31. package/es/components/booking/forms/model.d.ts +10 -1
  32. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  33. package/es/components/booking/forms/table/index.d.ts +1 -0
  34. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  35. package/es/components/booking/info/index.d.ts +1 -0
  36. package/es/components/booking/info/notes/index.d.ts +1 -0
  37. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  38. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  39. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  40. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  41. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  42. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  43. package/es/components/booking/locales.js +3 -0
  44. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  45. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  46. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  47. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  48. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  49. package/es/components/booking/notes/model.d.ts +10 -1
  50. package/es/components/booking/payments/model.d.ts +10 -1
  51. package/es/components/eftposPay/amount.d.ts +2 -1
  52. package/es/components/eftposPay/payo/config.d.ts +1 -0
  53. package/es/components/eftposPay/tip.d.ts +1 -0
  54. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  55. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  56. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
  57. package/es/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
  58. package/es/components/eventBooking/components/Voucher/components/Voucher.js +99 -0
  59. package/es/components/eventBooking/components/Voucher/components/index.less +124 -0
  60. package/es/components/eventBooking/components/Voucher/components/locales.js +38 -0
  61. package/es/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
  62. package/es/components/eventBooking/components/Voucher/hooks.js +212 -0
  63. package/es/components/eventBooking/components/Voucher/index.d.ts +2 -0
  64. package/es/components/eventBooking/components/Voucher/index.js +266 -0
  65. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  67. package/es/components/login/index.d.ts +1 -0
  68. package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -3
  69. package/es/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
  70. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  71. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  72. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  73. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  74. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  75. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  76. package/es/components/schedules/calendar/index.d.ts +1 -0
  77. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  78. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  79. package/es/components/schedules/model.d.ts +9 -1
  80. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  81. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  82. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  83. package/es/components/schedules/products/list/index.d.ts +1 -0
  84. package/es/components/schedules/resources/list/index.d.ts +1 -0
  85. package/es/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  86. package/es/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  87. package/es/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  88. package/es/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  89. package/es/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  90. package/es/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  91. package/es/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  92. package/es/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  93. package/es/components/systemSettings/registry/components/docs/images/image.png +0 -0
  94. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  95. package/es/hooks/usePaymentLogger.d.ts +1 -0
  96. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  97. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  98. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  99. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  100. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  101. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  102. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  103. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  104. package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  105. package/lib/components/Sales/Cart/index.js +25 -7
  106. package/lib/components/Sales/Cart/utils.js +13 -1
  107. package/lib/components/Sales/Summary/utils.js +2 -4
  108. package/lib/components/appointmentBooking/components/Header/index.js +3 -8
  109. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +89 -0
  110. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +27 -7
  111. package/lib/components/appointmentBooking/components/Voucher/index.js +4 -1
  112. package/lib/components/appointmentBooking/hooks.js +6 -11
  113. package/lib/components/appointmentBooking/locales.js +3 -0
  114. package/lib/components/appointmentBooking/utils.d.ts +23 -0
  115. package/lib/components/appointmentBooking/utils.js +103 -0
  116. package/lib/components/booking/addons/model.d.ts +10 -1
  117. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  118. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  119. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  120. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  121. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  122. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  123. package/lib/components/booking/components/footer/index.d.ts +1 -0
  124. package/lib/components/booking/components/voucher/index.js +4 -1
  125. package/lib/components/booking/forms/model.d.ts +10 -1
  126. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  127. package/lib/components/booking/forms/table/index.d.ts +1 -0
  128. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  129. package/lib/components/booking/info/index.d.ts +1 -0
  130. package/lib/components/booking/info/notes/index.d.ts +1 -0
  131. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  132. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  133. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  134. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  135. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  136. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  137. package/lib/components/booking/locales.js +3 -0
  138. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  139. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  140. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  141. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  142. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  143. package/lib/components/booking/notes/model.d.ts +10 -1
  144. package/lib/components/booking/payments/model.d.ts +10 -1
  145. package/lib/components/eftposPay/amount.d.ts +2 -1
  146. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  147. package/lib/components/eftposPay/tip.d.ts +1 -0
  148. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  149. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  150. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
  151. package/lib/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
  152. package/lib/components/eventBooking/components/Voucher/components/Voucher.js +116 -0
  153. package/lib/components/eventBooking/components/Voucher/components/index.less +124 -0
  154. package/lib/components/eventBooking/components/Voucher/components/locales.js +59 -0
  155. package/lib/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
  156. package/lib/components/eventBooking/components/Voucher/hooks.js +176 -0
  157. package/lib/components/eventBooking/components/Voucher/index.d.ts +2 -0
  158. package/lib/components/eventBooking/components/Voucher/index.js +197 -0
  159. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  160. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  161. package/lib/components/login/index.d.ts +1 -0
  162. package/lib/components/pay/toC/PaymentMethods/BankDeposit/index.js +1 -1
  163. package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
  164. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  165. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  166. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  167. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  168. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  169. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  170. package/lib/components/schedules/calendar/index.d.ts +1 -0
  171. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  172. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  173. package/lib/components/schedules/model.d.ts +9 -1
  174. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  175. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  176. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  177. package/lib/components/schedules/products/list/index.d.ts +1 -0
  178. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  179. package/lib/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  180. package/lib/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  181. package/lib/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  182. package/lib/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  183. package/lib/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  184. package/lib/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  185. package/lib/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  186. package/lib/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  187. package/lib/components/systemSettings/registry/components/docs/images/image.png +0 -0
  188. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  189. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  190. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  191. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  192. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  193. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  194. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  195. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  196. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  197. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  198. package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
  199. package/package.json +4 -4
  200. package/es/components/Sales/Cart/utils.d.ts +0 -63
  201. package/es/components/Sales/Checkout/utils.d.ts +0 -41
  202. package/es/components/Sales/Summary/utils.d.ts +0 -51
  203. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -3
  204. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  205. package/es/components/appointmentBooking/hooks.d.ts +0 -107
  206. package/es/components/appointmentBooking/locales.d.ts +0 -363
  207. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +0 -6
  208. package/es/components/booking/components/footer/amount.d.ts +0 -25
  209. package/es/components/booking/components/tabPane/index.d.ts +0 -4
  210. package/es/components/booking/dashboard/serve.d.ts +0 -1
  211. package/es/components/booking/deposit/ClientItem/index.d.ts +0 -18
  212. package/es/components/booking/deposit/DepositItem/index.d.ts +0 -25
  213. package/es/components/booking/deposit/index.d.ts +0 -2
  214. package/es/components/booking/forms/forms.d.ts +0 -30
  215. package/es/components/booking/forms/serve.d.ts +0 -18
  216. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  217. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -6
  218. package/es/components/booking/info/client/index.d.ts +0 -4
  219. package/es/components/booking/info/client/serve.d.ts +0 -2
  220. package/es/components/booking/info/clientVariant/utils.d.ts +0 -1
  221. package/es/components/booking/info/date/index.d.ts +0 -4
  222. package/es/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
  223. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
  224. package/es/components/booking/info/model.d.ts +0 -5
  225. package/es/components/booking/info/pet/serve.d.ts +0 -1
  226. package/es/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
  227. package/es/components/booking/info/service/addTimeModal/utils.d.ts +0 -31
  228. package/es/components/booking/info/service/serve.d.ts +0 -20
  229. package/es/components/booking/info/service/serviceList/index.d.ts +0 -5
  230. package/es/components/booking/info/service/serviceManager/index.d.ts +0 -20
  231. package/es/components/booking/info/service2/Group/utils.d.ts +0 -14
  232. package/es/components/booking/info/service2/utils.d.ts +0 -248
  233. package/es/components/booking/info/utils.d.ts +0 -50
  234. package/es/components/booking/info2/serve.d.ts +0 -6
  235. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  236. package/es/components/booking/info2/service/addService/utils.d.ts +0 -98
  237. package/es/components/booking/info2/service/editService/utils.d.ts +0 -13
  238. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -5
  239. package/es/components/booking/info2/utilsByBooking.d.ts +0 -35
  240. package/es/components/booking/locales.d.ts +0 -834
  241. package/es/components/booking/model.d.ts +0 -111
  242. package/es/components/booking/notes/addNote/index.d.ts +0 -3
  243. package/es/components/booking/utils.d.ts +0 -175
  244. package/es/components/eftposPay/app.d.ts +0 -10
  245. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  246. package/es/components/eftposPay/component/fail/index.d.ts +0 -3
  247. package/es/components/eftposPay/const.d.ts +0 -184
  248. package/es/components/eftposPay/device.d.ts +0 -23
  249. package/es/components/eftposPay/hooks.d.ts +0 -35
  250. package/es/components/eftposPay/index.d.ts +0 -4
  251. package/es/components/eftposPay/locales.d.ts +0 -330
  252. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  253. package/es/components/eftposPay/pay.d.ts +0 -20
  254. package/es/components/eftposPay/store/index.d.ts +0 -355
  255. package/es/components/eftposPay/tyro/index.d.ts +0 -9
  256. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  257. package/es/components/pay/toC/PaymentList/utils.d.ts +0 -36
  258. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
  259. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
  260. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
  261. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
  262. package/es/components/pay/toC/PaymentMethods/StripePay/index.d.ts +0 -10
  263. package/es/components/pay/toC/model.d.ts +0 -32
  264. package/es/components/pay/toC/utils.d.ts +0 -57
  265. package/es/components/shoppingCart/locales.d.ts +0 -33
  266. package/es/components/shoppingCart/type.d.ts +0 -48
  267. package/es/components/subTotal/locales.d.ts +0 -42
  268. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  269. package/es/components/ticketBooking/locales.d.ts +0 -174
  270. package/es/components/ticketBooking/utils/index.d.ts +0 -25
  271. package/es/hooks/useEngineContext.d.ts +0 -10
  272. package/es/hooks/useWindowSize.d.ts +0 -5
  273. package/es/plus/productSelect/CategoryTabs/index.d.ts +0 -21
  274. package/es/plus/productSelect/ProductCard/index.d.ts +0 -47
  275. package/es/plus/productSelect/ProductList/gridComponents.d.ts +0 -44
  276. package/es/plus/selectHolder/locales.d.ts +0 -21
  277. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -5
  278. package/es/plus/skuOptionsSelection/index.d.ts +0 -5
  279. package/es/plus/skuOptionsSelection/types.d.ts +0 -429
  280. package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +0 -19
  281. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
  282. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
  283. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
  284. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
  285. package/es/pro/NumericStepper/index.d.ts +0 -43
  286. package/es/pro/Selector/Selector.d.ts +0 -14
  287. package/es/pro/Selector/components/Card/index.d.ts +0 -57
  288. package/es/pro/Selector/components/Indicator/index.d.ts +0 -19
  289. package/es/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
  290. package/es/pro/Selector/demo.d.ts +0 -2
  291. package/es/pro/Selector/hooks/usePresetProps.d.ts +0 -24
  292. package/es/pro/Selector/types.d.ts +0 -173
  293. package/es/pro/pisellNumberSelector/example.d.ts +0 -3
  294. package/lib/components/Sales/Cart/utils.d.ts +0 -63
  295. package/lib/components/Sales/Checkout/utils.d.ts +0 -41
  296. package/lib/components/Sales/Summary/utils.d.ts +0 -51
  297. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -3
  298. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  299. package/lib/components/appointmentBooking/hooks.d.ts +0 -107
  300. package/lib/components/appointmentBooking/locales.d.ts +0 -363
  301. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +0 -6
  302. package/lib/components/booking/components/footer/amount.d.ts +0 -25
  303. package/lib/components/booking/components/tabPane/index.d.ts +0 -4
  304. package/lib/components/booking/dashboard/serve.d.ts +0 -1
  305. package/lib/components/booking/deposit/ClientItem/index.d.ts +0 -18
  306. package/lib/components/booking/deposit/DepositItem/index.d.ts +0 -25
  307. package/lib/components/booking/deposit/index.d.ts +0 -2
  308. package/lib/components/booking/forms/forms.d.ts +0 -30
  309. package/lib/components/booking/forms/serve.d.ts +0 -18
  310. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
  311. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -6
  312. package/lib/components/booking/info/client/index.d.ts +0 -4
  313. package/lib/components/booking/info/client/serve.d.ts +0 -2
  314. package/lib/components/booking/info/clientVariant/utils.d.ts +0 -1
  315. package/lib/components/booking/info/date/index.d.ts +0 -4
  316. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
  317. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -9
  318. package/lib/components/booking/info/model.d.ts +0 -5
  319. package/lib/components/booking/info/pet/serve.d.ts +0 -1
  320. package/lib/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
  321. package/lib/components/booking/info/service/addTimeModal/utils.d.ts +0 -31
  322. package/lib/components/booking/info/service/serve.d.ts +0 -20
  323. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -5
  324. package/lib/components/booking/info/service/serviceManager/index.d.ts +0 -20
  325. package/lib/components/booking/info/service2/Group/utils.d.ts +0 -14
  326. package/lib/components/booking/info/service2/utils.d.ts +0 -248
  327. package/lib/components/booking/info/utils.d.ts +0 -50
  328. package/lib/components/booking/info2/serve.d.ts +0 -6
  329. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  330. package/lib/components/booking/info2/service/addService/utils.d.ts +0 -98
  331. package/lib/components/booking/info2/service/editService/utils.d.ts +0 -13
  332. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -5
  333. package/lib/components/booking/info2/utilsByBooking.d.ts +0 -35
  334. package/lib/components/booking/locales.d.ts +0 -834
  335. package/lib/components/booking/model.d.ts +0 -111
  336. package/lib/components/booking/notes/addNote/index.d.ts +0 -3
  337. package/lib/components/booking/utils.d.ts +0 -175
  338. package/lib/components/eftposPay/app.d.ts +0 -10
  339. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  340. package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
  341. package/lib/components/eftposPay/const.d.ts +0 -184
  342. package/lib/components/eftposPay/device.d.ts +0 -23
  343. package/lib/components/eftposPay/hooks.d.ts +0 -35
  344. package/lib/components/eftposPay/index.d.ts +0 -4
  345. package/lib/components/eftposPay/locales.d.ts +0 -330
  346. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  347. package/lib/components/eftposPay/pay.d.ts +0 -20
  348. package/lib/components/eftposPay/store/index.d.ts +0 -355
  349. package/lib/components/eftposPay/tyro/index.d.ts +0 -9
  350. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  351. package/lib/components/pay/toC/PaymentList/utils.d.ts +0 -36
  352. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
  353. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
  355. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
  356. package/lib/components/pay/toC/PaymentMethods/StripePay/index.d.ts +0 -10
  357. package/lib/components/pay/toC/model.d.ts +0 -32
  358. package/lib/components/pay/toC/utils.d.ts +0 -57
  359. package/lib/components/shoppingCart/locales.d.ts +0 -33
  360. package/lib/components/shoppingCart/type.d.ts +0 -48
  361. package/lib/components/subTotal/locales.d.ts +0 -42
  362. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  363. package/lib/components/ticketBooking/locales.d.ts +0 -174
  364. package/lib/components/ticketBooking/utils/index.d.ts +0 -25
  365. package/lib/hooks/useEngineContext.d.ts +0 -10
  366. package/lib/hooks/useWindowSize.d.ts +0 -5
  367. package/lib/plus/productSelect/CategoryTabs/index.d.ts +0 -21
  368. package/lib/plus/productSelect/ProductCard/index.d.ts +0 -47
  369. package/lib/plus/productSelect/ProductList/gridComponents.d.ts +0 -44
  370. package/lib/plus/selectHolder/locales.d.ts +0 -21
  371. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -5
  372. package/lib/plus/skuOptionsSelection/index.d.ts +0 -5
  373. package/lib/plus/skuOptionsSelection/types.d.ts +0 -429
  374. package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +0 -19
  375. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
  376. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
  377. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
  378. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
  379. package/lib/pro/NumericStepper/index.d.ts +0 -43
  380. package/lib/pro/Selector/Selector.d.ts +0 -14
  381. package/lib/pro/Selector/components/Card/index.d.ts +0 -57
  382. package/lib/pro/Selector/components/Indicator/index.d.ts +0 -19
  383. package/lib/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
  384. package/lib/pro/Selector/demo.d.ts +0 -2
  385. package/lib/pro/Selector/hooks/usePresetProps.d.ts +0 -24
  386. package/lib/pro/Selector/types.d.ts +0 -173
  387. package/lib/pro/pisellNumberSelector/example.d.ts +0 -3
@@ -0,0 +1,124 @@
1
+ .pisell-lowcode__event-booking-voucher-container {
2
+ margin-bottom: 8px;
3
+
4
+ .login-card {
5
+ border-radius: 8px;
6
+ border: 1px solid var(--Gray-300, #d0d5dd);
7
+ background: #fff;
8
+ display: flex;
9
+ padding: 12px;
10
+ justify-content: center;
11
+ align-items: center;
12
+ gap: 10px;
13
+ color: var(--Gray-500, #667085);
14
+ font-size: 14px;
15
+ font-style: normal;
16
+ font-weight: 600;
17
+ margin-top: 6px;
18
+
19
+ .text-wrapper {
20
+ max-width: 200px;
21
+ }
22
+
23
+ .login-btn {
24
+ cursor: pointer;
25
+ color: var(--theme-color, #8157d5);
26
+ }
27
+ }
28
+
29
+ .voucher-title {
30
+ display: flex;
31
+ align-items: center;
32
+ justify-content: space-between;
33
+ margin-bottom: 10px;
34
+
35
+ .voucher-title-left {
36
+ color: var(--base-black, #000);
37
+ font-size: 18px;
38
+ font-style: normal;
39
+ font-weight: 600;
40
+ line-height: 28px;
41
+ display: flex;
42
+ flex-direction: column;
43
+ }
44
+
45
+ .voucher-title-right {
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: center;
49
+ gap: 4px;
50
+ color: var(--theme-color, #7f56d9);
51
+ cursor: pointer;
52
+ font-size: 18px;
53
+ font-style: normal;
54
+ font-weight: 500;
55
+ }
56
+
57
+ .voucher-right-icon {
58
+ font-size: 20px;
59
+ width: 24px;
60
+ height: 24px;
61
+ color: var(--theme-color, #7f56d9);
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+
66
+ &.show {
67
+ transform: rotate(180deg);
68
+ }
69
+ }
70
+ }
71
+
72
+ .voucher-detail {
73
+ width: 100%;
74
+ transition: 0.2s;
75
+ max-height: 0;
76
+ overflow: hidden;
77
+ display: flex;
78
+ flex-direction: column;
79
+
80
+ &.show {
81
+ max-height: unset;
82
+ }
83
+ }
84
+
85
+ .voucher-code-input-wrapper {
86
+ margin-top: 6px;
87
+ display: flex;
88
+ width: 100%;
89
+ height: 42px;
90
+ padding: 8px;
91
+ justify-content: space-between;
92
+ align-items: center;
93
+ gap: 8px;
94
+ flex-shrink: 0;
95
+ border-radius: 8px;
96
+ border: 1px solid var(--Gray-300, #d0d5dd);
97
+ background: #fff;
98
+ }
99
+
100
+ .voucher-code-input {
101
+ display: flex;
102
+ align-items: center;
103
+ flex: 1;
104
+
105
+ > div {
106
+ color: var(--Gray-500, #667085);
107
+ text-align: center;
108
+ font-size: 16px;
109
+ font-style: normal;
110
+ font-weight: 600;
111
+ line-height: 20px;
112
+ margin-right: 8px;
113
+ }
114
+
115
+ .pisell-materials__input {
116
+ flex: 1;
117
+ }
118
+ }
119
+
120
+ input {
121
+ box-shadow: none !important;
122
+ }
123
+ }
124
+
@@ -0,0 +1,59 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/eventBooking/components/Voucher/components/locales.ts
20
+ var locales_exports = {};
21
+ __export(locales_exports, {
22
+ default: () => locales_default
23
+ });
24
+ module.exports = __toCommonJS(locales_exports);
25
+ var locales_default = {
26
+ en: {
27
+ "pisell2.voucher.title": "Promotion",
28
+ "pisell2.voucher.details": "Details",
29
+ "pisell2.voucher.login": "Login",
30
+ "pisell2.voucher.login-tip": "to view your vouchers",
31
+ "pisell2.voucher.code": "Code",
32
+ "pisell2.voucher.enter-code": "Enter voucher code",
33
+ "pisell2.voucher.apply": "Apply",
34
+ "pisell2.voucher.code-invalid": "Invalid voucher code",
35
+ "pisell2.voucher.code-invalid-cart": "Voucher not applicable to current cart"
36
+ },
37
+ "zh-CN": {
38
+ "pisell2.voucher.title": "促销",
39
+ "pisell2.voucher.details": "详情",
40
+ "pisell2.voucher.login": "登录",
41
+ "pisell2.voucher.login-tip": "查看您的优惠券",
42
+ "pisell2.voucher.code": "优惠码",
43
+ "pisell2.voucher.enter-code": "请输入优惠码",
44
+ "pisell2.voucher.apply": "应用",
45
+ "pisell2.voucher.code-invalid": "优惠码无效",
46
+ "pisell2.voucher.code-invalid-cart": "优惠券不适用于当前购物车"
47
+ },
48
+ "zh-HK": {
49
+ "pisell2.voucher.title": "促销",
50
+ "pisell2.voucher.details": "詳情",
51
+ "pisell2.voucher.login": "登錄",
52
+ "pisell2.voucher.login-tip": "查看您的優惠券",
53
+ "pisell2.voucher.code": "優惠碼",
54
+ "pisell2.voucher.enter-code": "請輸入優惠碼",
55
+ "pisell2.voucher.apply": "應用",
56
+ "pisell2.voucher.code-invalid": "優惠碼無效",
57
+ "pisell2.voucher.code-invalid-cart": "優惠券不適用於當前購物車"
58
+ }
59
+ };
@@ -0,0 +1,7 @@
1
+ export declare const useShopDiscount: () => any;
2
+ /**
3
+ * @title 登录后重新获取应用报价单后的价格
4
+ */
5
+ export declare const useVoucherLogin: () => {
6
+ getCartItemProductsWithQuotation: () => Promise<void>;
7
+ };
@@ -0,0 +1,176 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/eventBooking/components/Voucher/hooks.ts
30
+ var hooks_exports = {};
31
+ __export(hooks_exports, {
32
+ useShopDiscount: () => useShopDiscount,
33
+ useVoucherLogin: () => useVoucherLogin
34
+ });
35
+ module.exports = __toCommonJS(hooks_exports);
36
+ var import_Sales = require("../../../Sales");
37
+ var import_ahooks = require("ahooks");
38
+ var import_serve = require("../../../Sales/Event/serve");
39
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
+ var useShopDiscount = () => {
41
+ const pisellOS = (0, import_useEngineContext.usePisellOS)();
42
+ return pisellOS.getModule("shopDiscount:eventBooking");
43
+ };
44
+ var useVoucherLogin = () => {
45
+ var _a;
46
+ const context = (0, import_useEngineContext.default)();
47
+ const { getStore } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
48
+ const { setData } = (0, import_Sales.useSales)();
49
+ const { cartData } = (0, import_Sales.useCart)();
50
+ const _getProductPrice = (0, import_ahooks.useRequest)(import_serve.getProductPrice, {
51
+ manual: true,
52
+ onSuccess: (res) => {
53
+ const list = res.data || [];
54
+ const productById = list.reduce((pre, cur) => {
55
+ pre[cur.id] = cur;
56
+ return pre;
57
+ }, {});
58
+ console.log("start update price");
59
+ const newCartItems = cartData.cartItems.map((item) => {
60
+ var _a2;
61
+ const { product } = item._originData || {};
62
+ let newProduct = productById[product.product_id];
63
+ let _totalPrice = Number(newProduct.price);
64
+ if (!(item == null ? void 0 : item._productDetail)) {
65
+ item.price = _totalPrice;
66
+ item.total = _totalPrice;
67
+ return item;
68
+ }
69
+ const { bundle = [], options } = item._productDetail;
70
+ if (
71
+ // 1. 套餐商品
72
+ Array.isArray(product == null ? void 0 : product.product_bundle) && product.product_bundle.length > 0
73
+ ) {
74
+ const { bundle_group = [] } = newProduct;
75
+ for (let i = 0; i < product.product_bundle.length; i++) {
76
+ const pbItem = product.product_bundle[i];
77
+ const { bundle_group_id, bundle_id, option } = pbItem;
78
+ const _originBundleItemInfo = bundle.find(
79
+ (bi) => bi.id === bundle_id
80
+ );
81
+ const _targetBundleGroup = bundle_group.find(
82
+ (bg) => bg.id === bundle_group_id
83
+ );
84
+ if ((_a2 = _targetBundleGroup == null ? void 0 : _targetBundleGroup.bundle_item) == null ? void 0 : _a2.length) {
85
+ let _newBundleItemInfo = _targetBundleGroup.bundle_item.find(
86
+ (bi) => bi.id === bundle_id
87
+ );
88
+ if ((_originBundleItemInfo == null ? void 0 : _originBundleItemInfo._bundle_product_id) === (_newBundleItemInfo == null ? void 0 : _newBundleItemInfo.bundle_product_id)) {
89
+ const {
90
+ price_type,
91
+ num = 1,
92
+ option: _originBundleItemOptions
93
+ } = _originBundleItemInfo;
94
+ const _bundleItemPrice = Number(_newBundleItemInfo.price);
95
+ if (price_type === "markup") {
96
+ _totalPrice += _bundleItemPrice * num;
97
+ } else if (price_type === "markdown") {
98
+ _totalPrice -= _bundleItemPrice * num;
99
+ } else {
100
+ _totalPrice += _bundleItemPrice * num;
101
+ }
102
+ if (Array.isArray(option) && (option == null ? void 0 : option.length) > 0) {
103
+ for (let j = 0; j < option.length; j++) {
104
+ const { option_group_item_id } = option[j];
105
+ const _originOptionItem = _originBundleItemOptions.find(
106
+ (op) => op.product_option_item_id === option_group_item_id
107
+ );
108
+ if (_originOptionItem) {
109
+ const { price, num: _optionNum = 1 } = _originOptionItem;
110
+ _totalPrice += Number(price) * _optionNum;
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
+ } else {
118
+ if (product == null ? void 0 : product.product_variant_id) {
119
+ const { variant = [] } = newProduct;
120
+ const _variant = variant.find(
121
+ (v) => v.id === product.product_variant_id
122
+ );
123
+ if (_variant) {
124
+ _totalPrice = Number(_variant.price);
125
+ }
126
+ }
127
+ if (Array.isArray(product == null ? void 0 : product.product_option_item) && product.product_option_item.length > 0) {
128
+ for (let i = 0; i < product.product_option_item.length; i++) {
129
+ const { option_group_item_id } = product.product_option_item[i];
130
+ const _originOptionItem = options.find(
131
+ (op) => op.product_option_item_id === option_group_item_id
132
+ );
133
+ if (_originOptionItem) {
134
+ const { price, num = 1 } = _originOptionItem;
135
+ _totalPrice += Number(price) * num;
136
+ }
137
+ }
138
+ }
139
+ }
140
+ item.price = _totalPrice;
141
+ item.total = _totalPrice;
142
+ return item;
143
+ });
144
+ console.log("new cart data", newCartItems);
145
+ setData({
146
+ cartData: {
147
+ ...cartData,
148
+ cartItems: newCartItems
149
+ }
150
+ });
151
+ }
152
+ });
153
+ const getCartItemProductsWithQuotation = async () => {
154
+ var _a2, _b;
155
+ const ids = cartData.cartItems.map((item) => {
156
+ const { product = {} } = item._originData || {};
157
+ const { product_id } = product;
158
+ return product_id;
159
+ }).filter((id) => !!id);
160
+ const store = getStore();
161
+ const customer = (_b = (_a2 = store == null ? void 0 : store.getState()) == null ? void 0 : _a2.global) == null ? void 0 : _b.userInfo;
162
+ if (!(ids == null ? void 0 : ids.length)) return;
163
+ _getProductPrice.run({
164
+ ids,
165
+ customer_id: customer == null ? void 0 : customer.id
166
+ });
167
+ };
168
+ return {
169
+ getCartItemProductsWithQuotation
170
+ };
171
+ };
172
+ // Annotate the CommonJS export names for ESM import in node:
173
+ 0 && (module.exports = {
174
+ useShopDiscount,
175
+ useVoucherLogin
176
+ });
@@ -0,0 +1,2 @@
1
+ declare const VoucherCard: () => JSX.Element | null;
2
+ export default VoucherCard;
@@ -0,0 +1,197 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/eventBooking/components/Voucher/index.tsx
30
+ var Voucher_exports = {};
31
+ __export(Voucher_exports, {
32
+ default: () => Voucher_default
33
+ });
34
+ module.exports = __toCommonJS(Voucher_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
37
+ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
38
+ var import_materials = require("@pisell/materials");
39
+ var import_Sales = require("../../../Sales");
40
+ var import_Voucher = __toESM(require("./components/Voucher"));
41
+ var import_locales = __toESM(require("./components/locales"));
42
+ var import_hooks = require("./hooks");
43
+ var ShopDiscountHooks = {
44
+ onDiscountListChange: "shopDiscount:eventBooking:onDiscountListChange",
45
+ onLoadPrepareCalcResult: "shopDiscount:eventBooking:onLoadPrepareCalcResult"
46
+ };
47
+ var VoucherCard = () => {
48
+ var _a, _b, _c;
49
+ const context = (0, import_useEngineContext.default)();
50
+ const utils = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
51
+ const pisellos = (0, import_useEngineContext.usePisellOS)();
52
+ import_utils.locales.init(import_locales.default, ((_b = utils == null ? void 0 : utils.storage) == null ? void 0 : _b.get("umi_locale")) || "en");
53
+ const shopDiscount = (0, import_hooks.useShopDiscount)();
54
+ const { cartData, updateCartItem } = (0, import_Sales.useCart)();
55
+ const { isLogin, openLoginModal, getUserInfo } = (0, import_Sales.useCustomer)();
56
+ const [showDetail, setShowDetail] = (0, import_react.useState)(false);
57
+ const [code, setCode] = (0, import_react.useState)("");
58
+ const [discountList, setDisCountList] = (0, import_react.useState)([]);
59
+ const { getCartItemProductsWithQuotation } = (0, import_hooks.useVoucherLogin)();
60
+ const currentUser = getUserInfo() || {};
61
+ const cartUnique = (0, import_react.useMemo)(() => {
62
+ var _a2, _b2;
63
+ return (_b2 = (_a2 = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a2.map((item) => {
64
+ const { _id, holder, product } = (item == null ? void 0 : item._originData) || {};
65
+ const { discount_list, ...rest } = product || {};
66
+ return JSON.stringify({ _id, product: rest, holder });
67
+ })) == null ? void 0 : _b2.join("-");
68
+ }, [cartData.cartItems]);
69
+ (0, import_react.useEffect)(() => {
70
+ var _a2;
71
+ if (isLogin() && (currentUser == null ? void 0 : currentUser.id)) {
72
+ (_a2 = shopDiscount == null ? void 0 : shopDiscount.setCustomer) == null ? void 0 : _a2.call(shopDiscount, currentUser);
73
+ }
74
+ }, [currentUser == null ? void 0 : currentUser.id, isLogin, shopDiscount]);
75
+ (0, import_react.useEffect)(() => {
76
+ shopDiscount.setProductList((cartData == null ? void 0 : cartData.cartItems) || []);
77
+ }, [cartUnique, shopDiscount]);
78
+ const batchUpdateCart = (productList) => {
79
+ if (!(productList == null ? void 0 : productList.length)) return;
80
+ productList.forEach((product) => {
81
+ updateCartItem(product);
82
+ });
83
+ };
84
+ (0, import_react.useEffect)(() => {
85
+ const onDiscountListChange = (discount) => {
86
+ console.log("onDiscountListChange: ", discount);
87
+ setDisCountList(discount);
88
+ };
89
+ const onLoadPrepareCalcResult = (result) => {
90
+ var _a2;
91
+ console.log("onLoadPrepareCalcResult: ", result);
92
+ if (!((_a2 = result == null ? void 0 : result.productList) == null ? void 0 : _a2.length)) {
93
+ return;
94
+ }
95
+ batchUpdateCart(result == null ? void 0 : result.productList);
96
+ };
97
+ pisellos.effects.on(
98
+ ShopDiscountHooks.onLoadPrepareCalcResult,
99
+ onLoadPrepareCalcResult
100
+ );
101
+ pisellos.effects.on(
102
+ ShopDiscountHooks.onDiscountListChange,
103
+ onDiscountListChange
104
+ );
105
+ return () => {
106
+ pisellos.effects.off(
107
+ ShopDiscountHooks.onLoadPrepareCalcResult,
108
+ onLoadPrepareCalcResult
109
+ );
110
+ pisellos.effects.off(
111
+ ShopDiscountHooks.onDiscountListChange,
112
+ onDiscountListChange
113
+ );
114
+ };
115
+ }, []);
116
+ (0, import_react.useEffect)(() => {
117
+ var _a2;
118
+ (_a2 = shopDiscount == null ? void 0 : shopDiscount.setBookingSubject) == null ? void 0 : _a2.call(shopDiscount, { type: "form" });
119
+ const val = shopDiscount.calcDiscount((cartData == null ? void 0 : cartData.cartItems) || []);
120
+ if (val == null ? void 0 : val.productList) {
121
+ batchUpdateCart(val.productList);
122
+ }
123
+ }, [cartUnique]);
124
+ const availableData = (0, import_react.useMemo)(() => {
125
+ return discountList.filter((item) => !!item.isAvailable).map((discount) => {
126
+ return {
127
+ ...discount,
128
+ isDisabled: discount.isDisabled || discount.isDisabledForProductUsed,
129
+ savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
130
+ };
131
+ });
132
+ }, [discountList, shopDiscount]);
133
+ const onScanCode = async () => {
134
+ if (!shopDiscount) {
135
+ (0, import_materials.PisellToast)({
136
+ content: import_utils.locales.getText("pisell2.voucher.code-invalid")
137
+ });
138
+ return;
139
+ }
140
+ const val = await shopDiscount.scanCode(code, currentUser.id);
141
+ console.log("scanCodeValue: ", val);
142
+ if (val == null ? void 0 : val.isAvailable) {
143
+ batchUpdateCart(val.productList);
144
+ setCode("");
145
+ } else {
146
+ (0, import_materials.PisellToast)({
147
+ content: val.type === "server" ? import_utils.locales.getText("pisell2.voucher.code-invalid") : import_utils.locales.getText("pisell2.voucher.code-invalid-cart")
148
+ });
149
+ }
150
+ };
151
+ const mixedSort = (val) => {
152
+ return [...val].sort((a, b) => {
153
+ return Number(b == null ? void 0 : b.isSelected) - Number(a == null ? void 0 : a.isSelected);
154
+ });
155
+ };
156
+ const handleLoginClick = () => {
157
+ openLoginModal({
158
+ callback: async (status) => {
159
+ if (status === "success") {
160
+ await getCartItemProductsWithQuotation();
161
+ }
162
+ }
163
+ });
164
+ };
165
+ const handleDiscountChange = (val) => {
166
+ if (!shopDiscount) return;
167
+ const detail = shopDiscount.setDiscountSelected({
168
+ discountId: val.id,
169
+ isSelected: val.isSelected
170
+ });
171
+ console.log("Set discount selected:", detail);
172
+ if (detail == null ? void 0 : detail.productList) {
173
+ batchUpdateCart(detail.productList);
174
+ }
175
+ };
176
+ const handleToggleDetail = () => {
177
+ setShowDetail(!showDetail);
178
+ };
179
+ if (!((_c = cartData.cartItems) == null ? void 0 : _c.length)) return null;
180
+ return /* @__PURE__ */ import_react.default.createElement(
181
+ import_Voucher.default,
182
+ {
183
+ showDetail,
184
+ onToggleDetail: handleToggleDetail,
185
+ isLogin: isLogin(),
186
+ onLoginClick: handleLoginClick,
187
+ availableData,
188
+ onDiscountChange: handleDiscountChange,
189
+ mixedSort,
190
+ code,
191
+ onCodeChange: setCode,
192
+ onApplyCode: onScanCode,
193
+ codeDisabled: !code
194
+ }
195
+ );
196
+ };
197
+ var Voucher_default = VoucherCard;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Status: (props: any) => JSX.Element;
3
4
  export default Status;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Status: (props: any) => JSX.Element;
3
4
  export default Status;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface LoginProps {
3
4
  title: string;
@@ -83,7 +83,7 @@ var BankDeposit = (props, ref) => {
83
83
  value: ""
84
84
  });
85
85
  paymentLogger.sendLogs("BankDepositH5跳转成功");
86
- state.history.push(_href);
86
+ window.location.href = _href;
87
87
  } catch (err) {
88
88
  paymentLogger.addLog({
89
89
  key: "BankDeposit处理错误",
@@ -87,7 +87,7 @@ var StripePay = (props, ref) => {
87
87
  redirectUrl
88
88
  }
89
89
  });
90
- state.history.push(redirectUrl);
90
+ window.location.href = redirectUrl;
91
91
  paymentLogger.sendLogs("StripePay H5端跳转成功");
92
92
  } catch (err) {
93
93
  paymentLogger.addLog({
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DateSectionCom: ({ value, onChange, showTime, className, style, useSpace, format, itemStyle, }: any) => JSX.Element;
2
3
  export default DateSectionCom;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const GenderField: (props: any) => JSX.Element;
2
3
  export default GenderField;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const ProductItemPreview: ({ item, onClick, onRemove, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItemPreview;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface RuleSettingProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem } from "../type";
2
3
  declare type CalendarItemProps = {
3
4
  month: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Calendar: () => JSX.Element;
3
4
  export default Calendar;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type CurrentDayProps = {
3
4
  onClose: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ScheduleItem } from "../../type";
2
3
  import "./index.less";
3
4
  declare type ScheduleDetailListPropsType = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,4 +69,11 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: any, Context: any;
72
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
+ state: FormState;
74
+ } & {
75
+ dispatch: (params: {
76
+ type: string;
77
+ payload: any;
78
+ }) => void;
79
+ }>;