@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
@@ -260,7 +260,7 @@ export var CartProvider = function CartProvider(_ref) {
260
260
  var createCartItemData = function createCartItemData() {
261
261
  var _cartData = getCurrentData().cartData;
262
262
  if (_cartData.currentCartItem) {
263
- var _eventDetail$bookingO, _eventItem$eventDetai, _startDateInfo$times, _eventItem$eventDetai2, _endDateInfo$times, _eventItem$eventDetai3;
263
+ var _eventDetail$bookingO, _eventItem$eventDetai, _startDateInfo$times, _eventItem$eventDetai2, _endDateInfo$times, _eventItem$eventDetai3, _eventDetail$productD, _eventDetail$productD2, _eventDetail$productD3, _eventDetail$productD4;
264
264
  var _ref2 = _cartData.currentCartItem || {},
265
265
  _id = _ref2._id,
266
266
  _ref2$eventItem = _ref2.eventItem,
@@ -278,15 +278,26 @@ export var CartProvider = function CartProvider(_ref) {
278
278
  var endTime = endDateInfo === null || endDateInfo === void 0 || (_endDateInfo$times = endDateInfo.times) === null || _endDateInfo$times === void 0 || (_endDateInfo$times = _endDateInfo$times.slice(-1)) === null || _endDateInfo$times === void 0 || (_endDateInfo$times = _endDateInfo$times[0]) === null || _endDateInfo$times === void 0 ? void 0 : _endDateInfo$times.end_at;
279
279
  var num = 1;
280
280
  var _handleProductInfo = handleProductInfo(eventDetail, num),
281
+ price = _handleProductInfo.price,
281
282
  totalPrice = _handleProductInfo.totalPrice,
282
283
  originTotal = _handleProductInfo.originTotal,
283
284
  is_charge_tax = _handleProductInfo.is_charge_tax;
285
+ var transformProduct = function transformProduct(_temp) {
286
+ var _temp$variant;
287
+ if (!(_temp !== null && _temp !== void 0 && (_temp$variant = _temp.variant) !== null && _temp$variant !== void 0 && _temp$variant.length)) {
288
+ return _objectSpread(_objectSpread({}, _temp || {}), {}, {
289
+ variant: []
290
+ });
291
+ }
292
+ return _temp;
293
+ };
284
294
  var newCartItem = {
285
295
  _id: _id,
286
296
  id: _eventItem.id,
287
297
  name: _eventItem.title,
288
- price: totalPrice,
298
+ price: price,
289
299
  // eventBooking中售价和总价保持一致,因为数量为1
300
+ origin_price: price,
290
301
  total: totalPrice,
291
302
  // 排除原始价格为0的场景
292
303
  origin_total: isNaN(originTotal) || originTotal === 0 ? undefined : originTotal,
@@ -307,6 +318,10 @@ export var CartProvider = function CartProvider(_ref) {
307
318
  end_time: endTime ? dayjs(endTime || '').format('HH:mm') : '',
308
319
  custom_day_count: (_eventItem === null || _eventItem === void 0 || (_eventItem$eventDetai3 = _eventItem.eventDetail) === null || _eventItem$eventDetai3 === void 0 || (_eventItem$eventDetai3 = _eventItem$eventDetai3.selectDate) === null || _eventItem$eventDetai3 === void 0 || (_eventItem$eventDetai3 = _eventItem$eventDetai3.dates) === null || _eventItem$eventDetai3 === void 0 ? void 0 : _eventItem$eventDetai3.length) || 0,
309
320
  is_charge_tax: is_charge_tax,
321
+ selectedBundle: eventDetail === null || eventDetail === void 0 || (_eventDetail$productD = eventDetail.productDetail) === null || _eventDetail$productD === void 0 ? void 0 : _eventDetail$productD.bundle,
322
+ selectedOptions: eventDetail === null || eventDetail === void 0 || (_eventDetail$productD2 = eventDetail.productDetail) === null || _eventDetail$productD2 === void 0 ? void 0 : _eventDetail$productD2.options,
323
+ isNormalProduct: true,
324
+ // 是否是普通商品,eventBooking中接入的都是普通商品
310
325
  _originData: _objectSpread(_objectSpread({}, _cartData.currentCartItem._originData), {}, {
311
326
  product: {
312
327
  num: 1,
@@ -327,7 +342,9 @@ export var CartProvider = function CartProvider(_ref) {
327
342
  },
328
343
  event_unique_identifier: _id // 传递给接口用于商品可用性检测的比对
329
344
  }),
330
- _productDetail: eventDetail.productDetail
345
+ _productDetail: eventDetail.productDetail,
346
+ _productOrigin: transformProduct((eventDetail === null || eventDetail === void 0 || (_eventDetail$productD3 = eventDetail.productDetail) === null || _eventDetail$productD3 === void 0 ? void 0 : _eventDetail$productD3.origin) || bookingOptionData),
347
+ _productInit: transformProduct((eventDetail === null || eventDetail === void 0 || (_eventDetail$productD4 = eventDetail.productDetail) === null || _eventDetail$productD4 === void 0 ? void 0 : _eventDetail$productD4.origin) || bookingOptionData)
331
348
  };
332
349
 
333
350
  // 处理定金
@@ -9,6 +9,7 @@ export var handleProductInfo = function handleProductInfo(eventDetail, num) {
9
9
  var productDetail = eventDetail.productDetail,
10
10
  bookingOptionItem = eventDetail.bookingOptionItem;
11
11
  var normalProduct = bookingOptionItem === null || bookingOptionItem === void 0 ? void 0 : bookingOptionItem._originData;
12
+ var price = Number((normalProduct === null || normalProduct === void 0 ? void 0 : normalProduct.price) || 0);
12
13
  var totalPrice = Number((normalProduct === null || normalProduct === void 0 ? void 0 : normalProduct.price) || '');
13
14
  var originTotal = Number((normalProduct === null || normalProduct === void 0 ? void 0 : normalProduct.original_price) || '');
14
15
  var is_charge_tax = normalProduct === null || normalProduct === void 0 ? void 0 : normalProduct.is_charge_tax;
@@ -34,16 +35,31 @@ export var handleProductInfo = function handleProductInfo(eventDetail, num) {
34
35
  options: options,
35
36
  num: num
36
37
  };
38
+ price = getPrice(params);
37
39
  totalPrice = getTotalPrice(params);
38
40
  originTotal = getOriginTotalPrice(params);
39
41
  }
40
42
  return {
43
+ price: price,
41
44
  totalPrice: totalPrice,
42
45
  originTotal: originTotal,
43
46
  is_charge_tax: is_charge_tax
44
47
  };
45
48
  };
46
49
 
50
+ /**
51
+ * 获取商品价格
52
+ */
53
+ export var getPrice = function getPrice(params) {
54
+ var product = params.product,
55
+ variant = params.variant;
56
+ var price = Number(product.price);
57
+ if (variant) {
58
+ price = Number(variant === null || variant === void 0 ? void 0 : variant.price);
59
+ }
60
+ return price;
61
+ };
62
+
47
63
  /**
48
64
  * 获取商品总价
49
65
  * @description 当前总价计算基于商品数量为1
@@ -9,9 +9,10 @@ export var calculateSubtotal = function calculateSubtotal(items) {
9
9
  return '0.00';
10
10
  }
11
11
  var subtotal = items.reduce(function (sum, item) {
12
- var price = new Decimal(item.price || 0);
13
- var quantity = new Decimal(item.quantity || 1);
14
- return sum.plus(price.times(quantity));
12
+ // const price = new Decimal(item.price || 0);
13
+ // const quantity = new Decimal(item.quantity || 1);
14
+ // return sum.plus(price.times(quantity));
15
+ return sum.plus(item.total || 0);
15
16
  }, new Decimal(0));
16
17
  return subtotal.toFixed(2);
17
18
  };
@@ -33,7 +34,7 @@ export var calculateTaxFee = function calculateTaxFee(shopInfo, items) {
33
34
  tax_rate = _ref.tax_rate;
34
35
  console.log('shopInfo>>>', is_price_include_tax, tax_rate);
35
36
  var totalTaxFee = items.reduce(function (sum, item) {
36
- var price = new Decimal(item.price || 0);
37
+ var price = new Decimal(item.total || 0);
37
38
  var taxRate = new Decimal(tax_rate || 0).div(100);
38
39
  var productTaxRate = price.times(taxRate).times((item === null || item === void 0 ? void 0 : item.is_charge_tax) || 0).div(taxRate.times(is_price_include_tax || 0).plus(1));
39
40
  return sum.plus(productTaxRate);
@@ -71,7 +71,7 @@ var Header = function Header() {
71
71
  var handleBack = /*#__PURE__*/function () {
72
72
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
73
73
  var _currentStep$step4;
74
- var key, types, form_key, booking_form, prevStepData, currentStepData, _key;
74
+ var key, types, form_key, booking_form, prevStepData, currentStepData, _key, isServiceStep, isResourceStep;
75
75
  return _regeneratorRuntime().wrap(function _callee$(_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
@@ -130,9 +130,9 @@ var Header = function Header() {
130
130
  isSkip: false
131
131
  });
132
132
  }
133
-
134
- // 如果前一步是选择服务步骤,则移除表单和资源开头的步骤, 防止每个商品配置的资源不一样,导致步骤会有上次的数据
135
- if ((prevStepData === null || prevStepData === void 0 ? void 0 : prevStepData.key) === 'select-service') {
133
+ isServiceStep = (prevStepData === null || prevStepData === void 0 ? void 0 : prevStepData.key) === 'select-service';
134
+ isResourceStep = (prevStepData === null || prevStepData === void 0 ? void 0 : prevStepData.key) === 'select-resource'; // 如果前一步是选择服务步骤,则移除表单和资源开头的步骤, 防止每个商品配置的资源不一样,导致步骤会有上次的数据
135
+ if (isServiceStep || isResourceStep) {
136
136
  stepList.forEach(function (item) {
137
137
  if (item.key.startsWith('select-resource_') || item.key.startsWith('fill-form_')) {
138
138
  removeStep(item.key);
@@ -141,13 +141,13 @@ var Header = function Header() {
141
141
  }
142
142
 
143
143
  // 如果前一步是选择资源,则清空表单步骤,不然表单步骤会累加
144
- if ((prevStepData === null || prevStepData === void 0 ? void 0 : prevStepData.key) === 'select-resource') {
145
- stepList.forEach(function (item) {
146
- if (item.key.startsWith('fill-form_')) {
147
- removeStep(item.key);
148
- }
149
- });
150
- }
144
+ // if (prevStepData?.key === 'select-resource') {
145
+ // stepList.forEach((item: any) => {
146
+ // if (item.key.startsWith('fill-form_')) {
147
+ // removeStep(item.key);
148
+ // }
149
+ // });
150
+ // }
151
151
 
152
152
  // 再次将步骤更新为false, 增加这个判断为了跳过那一步没有设置holder,但是直接后退了
153
153
  // if (
@@ -160,7 +160,7 @@ var Header = function Header() {
160
160
  // isSkip: false,
161
161
  // });
162
162
  // }
163
- case 13:
163
+ case 14:
164
164
  case "end":
165
165
  return _context.stop();
166
166
  }
@@ -0,0 +1,82 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useMemo } from 'react';
8
+ import { useAppointmentBooking } from "../../../hooks";
9
+ import { useAppointmentBookingContext } from "../../../context";
10
+ import useComponents from "../../../../../hooks/useComponents";
11
+ import { processResourceList, getResourceTitle } from "../../../utils";
12
+ import { contextUtils } from "../../../hooks";
13
+ import { clearDataByStepKey } from "../../../utils";
14
+ var SelectDate = function SelectDate(props) {
15
+ var onDateChange = props.onDateChange,
16
+ times = props.times,
17
+ currentDate = props.currentDate;
18
+ var appointmentBooking = useAppointmentBooking();
19
+ var _useAppointmentBookin = useAppointmentBookingContext(),
20
+ currentSelectedResources = _useAppointmentBookin.currentSelectedResources,
21
+ setTimes = _useAppointmentBookin.setTimes;
22
+ var utils = contextUtils();
23
+ var _useComponents = useComponents({
24
+ components: ['SelectDateOS']
25
+ }),
26
+ _useComponents2 = _slicedToArray(_useComponents, 1),
27
+ SelectDateOS = _useComponents2[0];
28
+
29
+ /**
30
+ * @description: 获取资源代码
31
+ * @param {*}
32
+ * @return {*}
33
+ */
34
+ var resourceCode = useMemo(function () {
35
+ var _ref = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.otherParams) || {},
36
+ resourceSort = _ref.resourceSort;
37
+ var resources = appointmentBooking.getResourcesList();
38
+ var _processResourceList = processResourceList(resources, resourceSort),
39
+ resourceCodes = _processResourceList.resourceCodes;
40
+ return (resourceCodes === null || resourceCodes === void 0 ? void 0 : resourceCodes[0]) || '';
41
+ }, []);
42
+
43
+ /**
44
+ * @description: 获取资源名称
45
+ * @param {*} useMemo
46
+ * @return {*}
47
+ */
48
+ var currentResourceName = useMemo(function () {
49
+ var _currentSelectedResou;
50
+ var currentResource = currentSelectedResources === null || currentSelectedResources === void 0 || (_currentSelectedResou = currentSelectedResources[0]) === null || _currentSelectedResou === void 0 ? void 0 : _currentSelectedResou.currentSelectedResource;
51
+ var resourceItem = (currentResource === null || currentResource === void 0 ? void 0 : currentResource.resourceItem) || {};
52
+ var name = getResourceTitle(appointmentBooking, resourceItem === null || resourceItem === void 0 ? void 0 : resourceItem.code, utils, resourceItem);
53
+ return name;
54
+ }, [currentSelectedResources]);
55
+
56
+ /**
57
+ * @description: 跳转到服务步骤
58
+ * @param {any} step
59
+ * @return {*}
60
+ */
61
+ var onStepChange = function onStepChange() {
62
+ // 清空数据
63
+ clearDataByStepKey('select-service', appointmentBooking, setTimes);
64
+
65
+ // 跳转到服务步骤
66
+ var stepLists = appointmentBooking.getStepList();
67
+ var serviceIndex = stepLists.findIndex(function (item) {
68
+ return (item === null || item === void 0 ? void 0 : item.key) === 'select-service';
69
+ });
70
+ appointmentBooking.gotoStep(serviceIndex);
71
+ };
72
+ return SelectDateOS ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SelectDateOS, {
73
+ isTimeSlicing: true,
74
+ currentDate: currentDate,
75
+ resourceCode: resourceCode,
76
+ resourceName: currentResourceName,
77
+ onDateChange: onDateChange,
78
+ onStepChange: onStepChange,
79
+ times: times
80
+ })) : null;
81
+ };
82
+ export default SelectDate;
@@ -9,12 +9,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
9
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
11
  import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'react';
12
- import { Iconfont, PisellEmpty } from '@pisell/materials';
12
+ import { Iconfont } from '@pisell/materials';
13
13
  import { locales } from '@pisell/utils';
14
14
  import { useAppointmentBookingContext } from "../../context";
15
15
  import { scrollToFirstErrorCard } from "../Resource/utils";
16
16
  import { useAppointmentBookingResource, useAppointmentBookingStep } from "../../hooks";
17
17
  import { Toast } from "../../utils";
18
+ import SelectDate from "./components/SelectDateOS";
18
19
  import "./index.less";
19
20
  var TimeSlicing = /*#__PURE__*/forwardRef(function (props, ref) {
20
21
  var _useState = useState(''),
@@ -32,6 +33,10 @@ var TimeSlicing = /*#__PURE__*/forwardRef(function (props, ref) {
32
33
  getResourceList = _useAppointmentBookin.getResourceList;
33
34
  var _useAppointmentBookin2 = useAppointmentBookingStep(),
34
35
  nextStep = _useAppointmentBookin2.nextStep;
36
+ var _useState3 = useState(undefined),
37
+ _useState4 = _slicedToArray(_useState3, 2),
38
+ currentDate = _useState4[0],
39
+ setCurrentDate = _useState4[1];
35
40
  useImperativeHandle(ref, function () {
36
41
  return {
37
42
  next: function next() {
@@ -102,7 +107,45 @@ var TimeSlicing = /*#__PURE__*/forwardRef(function (props, ref) {
102
107
  return _ref3.apply(this, arguments);
103
108
  };
104
109
  }();
105
- return (times === null || times === void 0 ? void 0 : times.length) > 0 ? /*#__PURE__*/React.createElement("div", {
110
+ useEffect(function () {
111
+ var getCurrentDate = /*#__PURE__*/function () {
112
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
113
+ var _res$;
114
+ var res, date;
115
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
116
+ while (1) switch (_context3.prev = _context3.next) {
117
+ case 0:
118
+ _context3.next = 2;
119
+ return appointmentBooking.getDateRange();
120
+ case 2:
121
+ res = _context3.sent;
122
+ date = res === null || res === void 0 || (_res$ = res[0]) === null || _res$ === void 0 ? void 0 : _res$.date;
123
+ setCurrentDate(date);
124
+ case 5:
125
+ case "end":
126
+ return _context3.stop();
127
+ }
128
+ }, _callee3);
129
+ }));
130
+ return function getCurrentDate() {
131
+ return _ref4.apply(this, arguments);
132
+ };
133
+ }();
134
+ getCurrentDate();
135
+ }, []);
136
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SelectDate, {
137
+ onDateChange: function onDateChange(currentData) {
138
+ if ((times === null || times === void 0 ? void 0 : times.length) > 0) {
139
+ // 如果已经选择了日期,再触发选择,则清空上次选择的时间
140
+ appointmentBooking.deleteCartItemInfo('time');
141
+ }
142
+ setCurrentDate(currentData === null || currentData === void 0 ? void 0 : currentData.date);
143
+ appointmentBooking.setDateRange([currentData]);
144
+ getResourceTimeSlot();
145
+ },
146
+ times: times,
147
+ currentDate: currentDate
148
+ }), (times === null || times === void 0 ? void 0 : times.length) > 0 ? /*#__PURE__*/React.createElement("div", {
106
149
  className: 'appointment-time-slicing-wrap'
107
150
  }, times.map(function (item, index) {
108
151
  return /*#__PURE__*/React.createElement("div", {
@@ -115,8 +158,6 @@ var TimeSlicing = /*#__PURE__*/forwardRef(function (props, ref) {
115
158
  type: "pisell2-chevron-right",
116
159
  className: "icon"
117
160
  }));
118
- })) : /*#__PURE__*/React.createElement(PisellEmpty, {
119
- description: locales.getText('pisell2.appointment.unselect.time')
120
- });
161
+ })) : null);
121
162
  });
122
163
  export default TimeSlicing;
@@ -163,7 +163,7 @@ var VoucherCard = function VoucherCard(props) {
163
163
  // // apply code
164
164
  var onScanCode = /*#__PURE__*/function () {
165
165
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
166
- var customerId, val;
166
+ var customerId, val, content;
167
167
  return _regeneratorRuntime().wrap(function _callee$(_context) {
168
168
  while (1) switch (_context.prev = _context.next) {
169
169
  case 0:
@@ -176,8 +176,11 @@ var VoucherCard = function VoucherCard(props) {
176
176
  batchUpdateCart(val.productList);
177
177
  setCode('');
178
178
  } else {
179
+ content = {
180
+ time_limit: locales.getText('pisell2.text.goodpass.code-invalid-expired')
181
+ };
179
182
  PisellToast({
180
- content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
183
+ content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : content[val === null || val === void 0 ? void 0 : val.unavailableReason] || locales.getText('pisell2.text.goodpass.code-invalid-cart')
181
184
  });
182
185
  }
183
186
  case 5:
@@ -17,7 +17,7 @@ import { useState, useEffect, useMemo } from 'react';
17
17
  import { locales } from '@pisell/utils';
18
18
  import { usePisellOS } from "../../hooks/useEngineContext";
19
19
  import useEngineContext from "../../hooks/useEngineContext";
20
- import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
20
+ import { processResourceList, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
21
21
  import { useAppointmentBookingContext } from "./context";
22
22
  import { scrollToFirstErrorCard } from "./components/Resource/utils";
23
23
  export var useAppointmentBooking = function useAppointmentBooking() {
@@ -809,20 +809,13 @@ export var useAppointmentBookingResource = function useAppointmentBookingResourc
809
809
 
810
810
  // 设置资源列表
811
811
  var getResourceList = function getResourceList() {
812
- var _resources2;
813
812
  var resources = appointmentBooking.getResourcesList();
814
- resources = resources.map(function (item) {
815
- return _objectSpread(_objectSpread({}, item), {}, {
816
- resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
817
- });
818
- });
819
- var _resources = ((_resources2 = resources) === null || _resources2 === void 0 || (_resources2 = _resources2[0]) === null || _resources2 === void 0 ? void 0 : _resources2.resources) || [];
820
- var resourceCodes = _resources.map(function (item) {
821
- return item.code;
822
- });
823
- setResources(resources || []);
813
+ var _processResourceList = processResourceList(resources, resourceSort),
814
+ processedResources = _processResourceList.resources,
815
+ resourceCodes = _processResourceList.resourceCodes;
816
+ setResources(processedResources || []);
824
817
  return {
825
- resources: resources,
818
+ resources: processedResources,
826
819
  resourceCodes: resourceCodes
827
820
  };
828
821
  };
@@ -133,6 +133,7 @@ export default {
133
133
  'pisell2.text.goodpass.enter-code': 'Enter Code',
134
134
  'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
135
135
  'pisell2.text.goodpass.code-invalid-cart': 'No eligible items in the cart',
136
+ 'pisell2.text.goodpass.code-invalid-expired': 'Current coupon is not valid in use',
136
137
  'pisell2.text.goodpass.login': 'Login',
137
138
  'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit',
138
139
  'pisell2.text.contact-info.title': 'Contact info'
@@ -271,6 +272,7 @@ export default {
271
272
  'pisell2.text.goodpass.enter-code': '请输入券码',
272
273
  'pisell2.text.goodpass.code-invalid': '当前券码不可用',
273
274
  'pisell2.text.goodpass.code-invalid-cart': '当前购物车中无可用商品',
275
+ 'pisell2.text.goodpass.code-invalid-expired': '当前优惠券不在使用期限内',
274
276
  'pisell2.text.goodpass.login': '登录',
275
277
  'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分',
276
278
  'pisell2.text.contact-info.title': '联系信息'
@@ -409,6 +411,7 @@ export default {
409
411
  'pisell2.text.goodpass.enter-code': '請輸入券碼',
410
412
  'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
411
413
  'pisell2.text.goodpass.code-invalid-cart': '當前購物車中無可用商品',
414
+ 'pisell2.text.goodpass.code-invalid-expired': '當前優惠券不在使用期限內',
412
415
  'pisell2.text.goodpass.login': '登錄',
413
416
  'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分',
414
417
  'pisell2.text.contact-info.title': '聯繫信息'
@@ -39,6 +39,19 @@ export declare const formatCarts: (data: any[], resources: any[], utils: any, ac
39
39
  * @Date: 2025-04-14 11:16
40
40
  */
41
41
  export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
42
+ /**
43
+ * @title: 处理资源列表并提取资源代码
44
+ * @description: 对资源列表进行排序,并提取 resourceCodes
45
+ * @param {any[]} resources - 原始资源列表
46
+ * @param {any[]} resourceSort - 资源排序配置
47
+ * @return {*} 返回处理后的资源列表和资源代码数组
48
+ * @Author: WangHan
49
+ * @Date: 2025-11-21 15:33
50
+ */
51
+ export declare const processResourceList: (resources: any[], resourceSort: any[]) => {
52
+ resources: any[];
53
+ resourceCodes: any;
54
+ };
42
55
  export declare const getMeAccount: (val: any[]) => any;
43
56
  export declare const getCustomer: (utils: any) => any;
44
57
  export declare const formatCustomer: (val: any) => {
@@ -201,3 +214,13 @@ export declare const currentRenderLists: (resources: any[], code: any) => any;
201
214
  * @Date: 2025-05-25 23:17
202
215
  */
203
216
  export declare const updateCartResources: (item: any, value?: any, currentSelectedResources?: any) => any;
217
+ /**
218
+ * @title: 根据步骤key清空数据
219
+ * @param {string} key - 当前步骤的key
220
+ * @param {any} appointmentBooking - 预约预订实例
221
+ * @param {(times: any[]) => void} setTimes - 设置时间列表的回调函数
222
+ * @return {string[]} 返回需要清空的数据类型数组
223
+ * @Author: WangHan
224
+ * @Date: 2025-11-21 15:40
225
+ */
226
+ export declare const clearDataByStepKey: (key: string, appointmentBooking: any, setTimes?: ((times: any[]) => void) | undefined) => string[] | undefined;
@@ -174,6 +174,32 @@ export var sortResources = function sortResources(resources, resourceSort) {
174
174
  console.log(error, 'wh2222');
175
175
  }
176
176
  };
177
+
178
+ /**
179
+ * @title: 处理资源列表并提取资源代码
180
+ * @description: 对资源列表进行排序,并提取 resourceCodes
181
+ * @param {any[]} resources - 原始资源列表
182
+ * @param {any[]} resourceSort - 资源排序配置
183
+ * @return {*} 返回处理后的资源列表和资源代码数组
184
+ * @Author: WangHan
185
+ * @Date: 2025-11-21 15:33
186
+ */
187
+ export var processResourceList = function processResourceList(resources, resourceSort) {
188
+ var _processedResources$;
189
+ var processedResources = resources.map(function (item) {
190
+ return _objectSpread(_objectSpread({}, item), {}, {
191
+ resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
192
+ });
193
+ });
194
+ var _resources = (processedResources === null || processedResources === void 0 || (_processedResources$ = processedResources[0]) === null || _processedResources$ === void 0 ? void 0 : _processedResources$.resources) || [];
195
+ var resourceCodes = _resources.map(function (item) {
196
+ return item.code;
197
+ });
198
+ return {
199
+ resources: processedResources,
200
+ resourceCodes: resourceCodes
201
+ };
202
+ };
177
203
  export var getMeAccount = function getMeAccount(val) {
178
204
  return val === null || val === void 0 ? void 0 : val.find(function (d) {
179
205
  return !(d !== null && d !== void 0 && d.isGuest);
@@ -765,4 +791,137 @@ export var updateCartResources = function updateCartResources(item, value, curre
765
791
  });
766
792
  }
767
793
  return newResource || [];
794
+ };
795
+
796
+ // 步骤配置:定义每个步骤需要清空的数据类型(从后往前,越往前步骤清的越多)
797
+ var STEP_CLEAR_CONFIG = {
798
+ 'select-time': ['time'],
799
+ 'fill-form': ['time', 'form'],
800
+ 'select-resource': ['time', 'form', 'resource'],
801
+ 'select-date': ['time', 'form', 'resource', 'date'],
802
+ 'select-service': ['time', 'form', 'resource', 'date']
803
+ };
804
+
805
+ // 数据类型枚举
806
+
807
+ /**
808
+ * 根据key匹配步骤(支持精确匹配和startsWith匹配)
809
+ * @param key - 步骤key
810
+ * @returns 匹配到的步骤key,未匹配到返回null
811
+ */
812
+ var getMatchedStepKey = function getMatchedStepKey(key) {
813
+ // 精确匹配
814
+ if (STEP_CLEAR_CONFIG[key]) {
815
+ return key;
816
+ }
817
+ // startsWith匹配(支持 select-resource_@xxx 和 fill-form_@xxx 等)
818
+ var matchedKey = Object.keys(STEP_CLEAR_CONFIG).find(function (stepKey) {
819
+ return key.startsWith(stepKey);
820
+ });
821
+ return matchedKey || null;
822
+ };
823
+
824
+ /**
825
+ * 创建清空操作的映射
826
+ */
827
+ var createClearActions = function createClearActions(appointmentBooking, setTimes) {
828
+ return {
829
+ time: function time() {
830
+ appointmentBooking.deleteCartItemInfo('time');
831
+ setTimes === null || setTimes === void 0 || setTimes([]);
832
+ },
833
+ resource: function resource() {
834
+ appointmentBooking.deleteCartItemInfo('resource');
835
+ },
836
+ form: function form() {
837
+ appointmentBooking.deleteCartItemInfo('relationForms');
838
+ appointmentBooking.removeStep('fill-form');
839
+ },
840
+ date: function date() {
841
+ var _appointmentBooking$o2;
842
+ var _ref4 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o2 = appointmentBooking.otherParams) === null || _appointmentBooking$o2 === void 0 ? void 0 : _appointmentBooking$o2.productModuleParams) || {},
843
+ bookingProcess = _ref4.bookingProcess;
844
+
845
+ // 如果不是先选择日期步骤,则清空日期
846
+ if (bookingProcess !== 'date_first') {
847
+ appointmentBooking.clearDateRange();
848
+ }
849
+ }
850
+ };
851
+ };
852
+
853
+ /**
854
+ * 处理选择服务步骤的特殊逻辑:清空所有相关的资源和表单步骤
855
+ */
856
+ var clearServiceRelatedSteps = function clearServiceRelatedSteps(appointmentBooking) {
857
+ var stepList = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.getStepList()) || [];
858
+ var stepKeysToRemove = ['select-resource_', 'fill-form_'];
859
+ stepList.forEach(function (item) {
860
+ // 如果某个步骤是跳过的,则取消跳过
861
+ if (item !== null && item !== void 0 && item.isSkip) {
862
+ appointmentBooking.updateStep(item.key, {
863
+ key: item.key,
864
+ isSkip: false
865
+ });
866
+ }
867
+ var shouldRemove = stepKeysToRemove.some(function (prefix) {
868
+ var _item$key;
869
+ return (_item$key = item.key) === null || _item$key === void 0 ? void 0 : _item$key.startsWith(prefix);
870
+ });
871
+ if (shouldRemove) {
872
+ appointmentBooking.removeStep(item.key);
873
+ }
874
+ });
875
+ };
876
+
877
+ /**
878
+ * 执行清空操作
879
+ */
880
+ var executeClearActions = function executeClearActions(dataTypes, clearActions) {
881
+ // 去重后执行
882
+ var uniqueTypes = Array.from(new Set(dataTypes));
883
+ uniqueTypes.forEach(function (type) {
884
+ var action = clearActions[type];
885
+ if (action) {
886
+ action();
887
+ }
888
+ });
889
+ };
890
+
891
+ /**
892
+ * @title: 根据步骤key清空数据
893
+ * @param {string} key - 当前步骤的key
894
+ * @param {any} appointmentBooking - 预约预订实例
895
+ * @param {(times: any[]) => void} setTimes - 设置时间列表的回调函数
896
+ * @return {string[]} 返回需要清空的数据类型数组
897
+ * @Author: WangHan
898
+ * @Date: 2025-11-21 15:40
899
+ */
900
+ export var clearDataByStepKey = function clearDataByStepKey(key, appointmentBooking, setTimes) {
901
+ // 参数校验
902
+ if (!key || !appointmentBooking) {
903
+ return;
904
+ }
905
+
906
+ // 选择服务步骤的特殊处理
907
+ if (key === 'select-service') {
908
+ clearServiceRelatedSteps(appointmentBooking);
909
+ }
910
+
911
+ // 匹配步骤key
912
+ var stepKey = getMatchedStepKey(key);
913
+ if (!stepKey) {
914
+ return;
915
+ }
916
+
917
+ // 获取需要清空的数据类型
918
+ var clearDataTypes = STEP_CLEAR_CONFIG[stepKey] || [];
919
+ if (clearDataTypes.length === 0) {
920
+ return clearDataTypes;
921
+ }
922
+
923
+ // 创建清空操作并执行
924
+ var clearActions = createClearActions(appointmentBooking, setTimes);
925
+ executeClearActions(clearDataTypes, clearActions);
926
+ return clearDataTypes;
768
927
  };
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -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 SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
3
4
  export default SelectProductItem;