@pisell/private-materials 6.2.24 → 6.2.25

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 (531) 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 +9 -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 +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/Sales/Cart/index.js +1 -0
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  16. package/es/components/booking/addons/index.js +4 -1
  17. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  19. package/es/components/booking/components/actionButtons/index.d.ts +29 -0
  20. package/es/components/booking/components/actionButtons/index.js +395 -0
  21. package/es/components/booking/components/actionButtons/index.less +148 -0
  22. package/es/components/booking/components/browserSelect/index.js +1 -1
  23. package/es/components/booking/components/clearCartModal/index.d.ts +10 -0
  24. package/es/components/booking/components/clearCartModal/index.js +50 -0
  25. package/es/components/booking/components/clearCartModal/index.less +109 -0
  26. package/es/components/booking/components/customiseItemModal/index.d.ts +28 -0
  27. package/es/components/booking/components/customiseItemModal/index.js +294 -0
  28. package/es/components/booking/components/customiseItemModal/index.less +606 -0
  29. package/es/components/booking/components/footer/amount.d.ts +1 -0
  30. package/es/components/booking/components/footer/amount.js +15 -3
  31. package/es/components/booking/components/footer/index.js +106 -39
  32. package/es/components/booking/components/footer/utils.js +52 -24
  33. package/es/components/booking/components/tabPane/index.js +86 -5
  34. package/es/components/booking/components/tabPane/index.less +75 -1
  35. package/es/components/booking/components/voucher/index.js +19 -8
  36. package/es/components/booking/components/voucher/index.less +1 -1
  37. package/es/components/booking/dashboard/index.d.ts +1 -1
  38. package/es/components/booking/dashboard/index.js +10 -3
  39. package/es/components/booking/forms/model.js +5 -5
  40. package/es/components/booking/hooks/useQuotation.js +17 -7
  41. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  42. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  43. package/es/components/booking/info/hooks/useInfoHolder.js +12 -3
  44. package/es/components/booking/info/index.less +18 -2
  45. package/es/components/booking/info/main.js +14 -15
  46. package/es/components/booking/info/service/Lists.js +5 -2
  47. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  48. package/es/components/booking/info/service/like/index.js +1 -1
  49. package/es/components/booking/info/service/serviceItem/index.js +2 -2
  50. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  51. package/es/components/booking/info/service2/utils.d.ts +5 -1
  52. package/es/components/booking/info/service2/utils.js +12 -2
  53. package/es/components/booking/info2/cartClientCard/index.d.ts +6 -0
  54. package/es/components/booking/info2/cartClientCard/index.js +343 -0
  55. package/es/components/booking/info2/cartClientCard/index.less +6 -0
  56. package/es/components/booking/info2/cartClientCard/locales.d.ts +21 -0
  57. package/es/components/booking/info2/cartClientCard/locales.js +26 -0
  58. package/es/components/booking/info2/cartClientCard/types.d.ts +13 -0
  59. package/es/components/booking/info2/cartClientCard/types.js +1 -0
  60. package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
  61. package/es/components/booking/info2/cartClientCard/utils.js +7 -0
  62. package/es/components/booking/info2/index.js +40 -18
  63. package/es/components/booking/info2/service/addTimeModal/index.js +2 -1
  64. package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
  65. package/es/components/booking/info2/service/editNormalService/index.js +67 -0
  66. package/es/components/booking/info2/service/editService/index.js +3 -2
  67. package/es/components/booking/info2/service/index.js +11 -5
  68. package/es/components/booking/info2/service/serviceItem/index.js +2 -2
  69. package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
  70. package/es/components/booking/info2/utilsByBooking.js +26 -3
  71. package/es/components/booking/locales.d.ts +75 -0
  72. package/es/components/booking/locales.js +99 -3
  73. package/es/components/booking/materiels/startTime/index.js +1 -1
  74. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  75. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  76. package/es/components/booking/notes/addNote/index.d.ts +1 -1
  77. package/es/components/booking/notes/addNote/index.js +52 -32
  78. package/es/components/booking/notes/addNote/index.less +53 -0
  79. package/es/components/booking/notes/model.js +5 -5
  80. package/es/components/booking/payments/model.js +5 -5
  81. package/es/components/eftposPay/amount.d.ts +1 -1
  82. package/es/components/eftposPay/device.d.ts +1 -1
  83. package/es/components/eftposPay/hooks.d.ts +2 -2
  84. package/es/components/eftposPay/store/index.d.ts +3 -3
  85. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  86. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  87. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  88. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  89. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  90. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  91. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  92. package/es/components/listComponent/index.js +5 -5
  93. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  94. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  95. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  96. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  97. package/es/components/productExtension/card/index.js +3 -3
  98. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  99. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  100. package/es/components/productExtension/fields/Forms/index.js +12 -12
  101. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  102. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  103. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  104. package/es/components/productExtension/server.js +2 -2
  105. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  106. package/es/components/schedules/calendar/index.js +4 -4
  107. package/es/components/schedules/calendar/serve.js +2 -2
  108. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  109. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  110. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  111. package/es/components/schedules/components/ResourceList/index.js +1 -1
  112. package/es/components/schedules/components/Search/index.js +5 -5
  113. package/es/components/schedules/model.js +5 -5
  114. package/es/components/schedules/openHours/index.js +1 -1
  115. package/es/components/schedules/openHours/serve.js +2 -2
  116. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  117. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  118. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  119. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  120. package/es/components/schedules/products/serve.js +2 -2
  121. package/es/components/schedules/products/utils.js +5 -5
  122. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  123. package/es/components/schedules/resources/detail/index.js +10 -10
  124. package/es/components/schedules/resources/list/index.js +2 -2
  125. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  126. package/es/components/schedules/resources/serve.js +2 -2
  127. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  128. package/es/components/schedules/utils.js +4 -4
  129. package/es/components/selectModal/index.js +2 -2
  130. package/es/components/shoppingCart/components/Cart/Product.js +20 -3
  131. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  132. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  133. package/es/components/shoppingCart/type.d.ts +1 -0
  134. package/es/components/subTotal/index.less +1 -1
  135. package/es/components/ticketBooking/components/addServiceVariant/addService.js +155 -217
  136. package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
  137. package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
  138. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
  139. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
  140. package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  141. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
  142. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
  143. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  144. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
  145. package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
  146. package/es/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
  147. package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
  148. package/es/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
  149. package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
  150. package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  151. package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
  152. package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
  153. package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  154. package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  155. package/es/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
  156. package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
  157. package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
  158. package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
  159. package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
  160. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  161. package/es/components/ticketBooking/components/timeBar/index.js +10 -3
  162. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
  163. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
  164. package/es/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
  165. package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
  166. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  167. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
  168. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
  169. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
  170. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  171. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
  172. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  173. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
  174. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
  175. package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
  176. package/es/components/ticketBooking/index.js +21 -3
  177. package/es/components/ticketBooking/locales.d.ts +6 -3
  178. package/es/components/ticketBooking/locales.js +6 -3
  179. package/es/components/ticketBooking/serve.js +11 -11
  180. package/es/components/ticketBooking/utils/index.d.ts +39 -2
  181. package/es/components/ticketBooking/utils/index.js +104 -11
  182. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  183. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  184. package/es/hooks/useComponents.js +1 -1
  185. package/es/hooks/useToast.d.ts +2 -0
  186. package/es/hooks/useToast.js +9 -0
  187. package/es/hooks/useTranslationOriginal.d.ts +1 -0
  188. package/es/hooks/useTranslationOriginal.js +10 -0
  189. package/es/index.d.ts +4 -0
  190. package/es/index.js +5 -1
  191. package/es/plus/clientCard/index.d.ts +7 -0
  192. package/es/plus/clientCard/index.js +452 -0
  193. package/es/plus/clientCard/index.less +539 -0
  194. package/es/plus/clientCard/line/index.d.ts +9 -0
  195. package/es/plus/clientCard/line/index.js +157 -0
  196. package/es/plus/clientCard/line/index.less +142 -0
  197. package/es/plus/clientCard/locales.d.ts +18 -0
  198. package/es/plus/clientCard/locales.js +17 -0
  199. package/es/plus/clientCard/types.d.ts +126 -0
  200. package/es/plus/clientCard/types.js +1 -0
  201. package/es/plus/clientCard/utils.d.ts +8 -0
  202. package/es/plus/clientCard/utils.js +59 -0
  203. package/es/plus/clientName/index.d.ts +5 -0
  204. package/es/plus/clientName/index.js +18 -0
  205. package/es/plus/clientName/index.less +10 -0
  206. package/es/plus/clientName/type.d.ts +13 -0
  207. package/es/plus/clientName/type.js +1 -0
  208. package/es/plus/clientName/utils.d.ts +2 -0
  209. package/es/plus/clientName/utils.js +18 -0
  210. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
  211. package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
  212. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
  213. package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
  214. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
  215. package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
  216. package/es/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  217. package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
  218. package/es/plus/clinetSearch/Add/index.d.ts +18 -0
  219. package/es/plus/clinetSearch/Add/index.js +212 -0
  220. package/es/plus/clinetSearch/Add/index.less +30 -0
  221. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  222. package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
  223. package/es/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  224. package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
  225. package/es/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  226. package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
  227. package/es/plus/clinetSearch/index.d.ts +18 -0
  228. package/es/plus/clinetSearch/index.js +214 -0
  229. package/es/plus/clinetSearch/index.less +91 -0
  230. package/es/plus/clinetSearch/locales.d.ts +102 -0
  231. package/es/plus/clinetSearch/locales.js +101 -0
  232. package/es/plus/clinetSearch/serve.d.ts +1 -0
  233. package/es/plus/clinetSearch/serve.js +31 -0
  234. package/es/plus/clinetSearch/types.d.ts +49 -0
  235. package/es/plus/clinetSearch/types.js +1 -0
  236. package/es/plus/noteModal/AddTempModal.d.ts +7 -0
  237. package/es/plus/noteModal/AddTempModal.js +64 -0
  238. package/es/plus/noteModal/index.d.ts +4 -0
  239. package/es/plus/noteModal/index.js +199 -0
  240. package/es/plus/noteModal/index.less +168 -0
  241. package/es/plus/noteModal/locales.d.ts +33 -0
  242. package/es/plus/noteModal/locales.js +32 -0
  243. package/es/plus/noteModal/types.d.ts +17 -0
  244. package/es/plus/noteModal/types.js +1 -0
  245. package/es/pro/comprehensiveSearch/camera.svg +4 -0
  246. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  247. package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
  248. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  249. package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
  250. package/es/pro/comprehensiveSearch/index.d.ts +9 -0
  251. package/es/pro/comprehensiveSearch/index.js +342 -0
  252. package/es/pro/comprehensiveSearch/index.less +323 -0
  253. package/es/pro/comprehensiveSearch/locales.d.ts +18 -0
  254. package/es/pro/comprehensiveSearch/locales.js +17 -0
  255. package/es/pro/comprehensiveSearch/types.d.ts +31 -0
  256. package/es/pro/comprehensiveSearch/types.js +1 -0
  257. package/es/pro/numberKeyboard/index.d.ts +28 -0
  258. package/es/pro/numberKeyboard/index.js +155 -0
  259. package/es/pro/numberKeyboard/index.less +25 -0
  260. package/es/pro/numberKeyboard/locales.d.ts +12 -0
  261. package/es/pro/numberKeyboard/locales.js +11 -0
  262. package/es/pro/pisellNumberSelector/example.d.ts +3 -0
  263. package/es/pro/pisellNumberSelector/example.js +68 -0
  264. package/es/pro/pisellNumberSelector/index.d.ts +26 -0
  265. package/es/pro/pisellNumberSelector/index.js +231 -0
  266. package/es/pro/pisellNumberSelector/index.less +193 -0
  267. package/es/pro/pisellPhoneKeyboard/index.d.ts +12 -0
  268. package/es/pro/pisellPhoneKeyboard/index.js +211 -0
  269. package/es/pro/pisellPhoneKeyboard/index.less +157 -0
  270. package/es/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  271. package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
  272. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
  273. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  274. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  275. package/es/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
  276. package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
  277. package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
  278. package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
  279. package/es/pro/pisellPriceRadio/index.d.ts +26 -0
  280. package/es/pro/pisellPriceRadio/index.js +113 -0
  281. package/es/pro/pisellPriceRadio/index.less +158 -0
  282. package/es/pro/skuDetailModal/index.d.ts +5 -0
  283. package/es/pro/skuDetailModal/index.js +352 -0
  284. package/es/pro/skuDetailModal/index.less +236 -0
  285. package/es/pro/skuDetailModal/locales.d.ts +48 -0
  286. package/es/pro/skuDetailModal/locales.js +47 -0
  287. package/es/pro/skuDetailModal/types.d.ts +347 -0
  288. package/es/pro/skuDetailModal/types.js +1 -0
  289. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  290. package/lib/components/Sales/Cart/index.js +1 -0
  291. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  292. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  293. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -1
  294. package/lib/components/booking/addons/index.js +4 -1
  295. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  296. package/lib/components/booking/components/actionButtons/index.d.ts +29 -0
  297. package/lib/components/booking/components/actionButtons/index.js +325 -0
  298. package/lib/components/booking/components/actionButtons/index.less +148 -0
  299. package/lib/components/booking/components/clearCartModal/index.d.ts +10 -0
  300. package/lib/components/booking/components/clearCartModal/index.js +80 -0
  301. package/lib/components/booking/components/clearCartModal/index.less +109 -0
  302. package/lib/components/booking/components/customiseItemModal/index.d.ts +28 -0
  303. package/lib/components/booking/components/customiseItemModal/index.js +279 -0
  304. package/lib/components/booking/components/customiseItemModal/index.less +606 -0
  305. package/lib/components/booking/components/footer/amount.d.ts +1 -0
  306. package/lib/components/booking/components/footer/amount.js +5 -3
  307. package/lib/components/booking/components/footer/index.js +93 -23
  308. package/lib/components/booking/components/footer/utils.js +38 -13
  309. package/lib/components/booking/components/tabPane/index.js +78 -4
  310. package/lib/components/booking/components/tabPane/index.less +75 -1
  311. package/lib/components/booking/components/voucher/index.js +18 -7
  312. package/lib/components/booking/components/voucher/index.less +1 -1
  313. package/lib/components/booking/dashboard/index.d.ts +1 -1
  314. package/lib/components/booking/dashboard/index.js +7 -2
  315. package/lib/components/booking/hooks/useQuotation.js +3 -1
  316. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  317. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  318. package/lib/components/booking/info/hooks/useInfoHolder.js +11 -3
  319. package/lib/components/booking/info/index.less +18 -2
  320. package/lib/components/booking/info/main.js +12 -5
  321. package/lib/components/booking/info/service/Lists.js +6 -2
  322. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  323. package/lib/components/booking/info/service/serviceItem/index.js +2 -2
  324. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  325. package/lib/components/booking/info/service2/utils.d.ts +5 -1
  326. package/lib/components/booking/info/service2/utils.js +14 -2
  327. package/lib/components/booking/info2/cartClientCard/index.d.ts +6 -0
  328. package/lib/components/booking/info2/cartClientCard/index.js +298 -0
  329. package/lib/components/booking/info2/cartClientCard/index.less +6 -0
  330. package/lib/components/booking/info2/cartClientCard/locales.d.ts +21 -0
  331. package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
  332. package/lib/components/booking/info2/cartClientCard/types.d.ts +13 -0
  333. package/lib/components/booking/info2/cartClientCard/types.js +17 -0
  334. package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
  335. package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
  336. package/lib/components/booking/info2/index.js +30 -9
  337. package/lib/components/booking/info2/service/addTimeModal/index.js +1 -0
  338. package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
  339. package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
  340. package/lib/components/booking/info2/service/editService/index.js +2 -1
  341. package/lib/components/booking/info2/service/index.js +5 -5
  342. package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
  343. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
  344. package/lib/components/booking/info2/utilsByBooking.js +23 -4
  345. package/lib/components/booking/locales.d.ts +75 -0
  346. package/lib/components/booking/locales.js +93 -3
  347. package/lib/components/booking/notes/addNote/index.d.ts +1 -1
  348. package/lib/components/booking/notes/addNote/index.js +41 -23
  349. package/lib/components/booking/notes/addNote/index.less +53 -0
  350. package/lib/components/eftposPay/amount.d.ts +1 -1
  351. package/lib/components/eftposPay/device.d.ts +1 -1
  352. package/lib/components/eftposPay/hooks.d.ts +2 -2
  353. package/lib/components/eftposPay/store/index.d.ts +3 -3
  354. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  355. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  356. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  357. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  358. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  359. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  360. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  361. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  362. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  363. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  364. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  365. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  366. package/lib/components/schedules/utils.js +1 -1
  367. package/lib/components/shoppingCart/components/Cart/Product.js +20 -3
  368. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  369. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  370. package/lib/components/shoppingCart/type.d.ts +1 -0
  371. package/lib/components/subTotal/index.less +1 -1
  372. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +41 -131
  373. package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +8 -0
  374. package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
  375. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.d.ts +7 -0
  376. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
  377. package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
  378. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.d.ts +12 -0
  379. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
  380. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
  381. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
  382. package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
  383. package/lib/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
  384. package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
  385. package/lib/components/ticketBooking/components/bookingDataPanel/index.d.ts +9 -0
  386. package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
  387. package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
  388. package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.d.ts +14 -0
  389. package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
  390. package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
  391. package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
  392. package/lib/components/ticketBooking/components/floatButtons/index.d.ts +11 -0
  393. package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
  394. package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
  395. package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
  396. package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
  397. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  398. package/lib/components/ticketBooking/components/timeBar/index.js +12 -2
  399. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +1 -0
  400. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
  401. package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +3 -0
  402. package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
  403. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  404. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
  405. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +12 -0
  406. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
  407. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
  408. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
  409. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
  410. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
  411. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.d.ts +2 -0
  412. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
  413. package/lib/components/ticketBooking/index.js +31 -4
  414. package/lib/components/ticketBooking/locales.d.ts +6 -3
  415. package/lib/components/ticketBooking/locales.js +6 -3
  416. package/lib/components/ticketBooking/serve.js +11 -11
  417. package/lib/components/ticketBooking/utils/index.d.ts +39 -2
  418. package/lib/components/ticketBooking/utils/index.js +71 -10
  419. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  420. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  421. package/lib/hooks/useToast.d.ts +2 -0
  422. package/lib/hooks/useToast.js +42 -0
  423. package/lib/hooks/useTranslationOriginal.d.ts +1 -0
  424. package/lib/hooks/useTranslationOriginal.js +42 -0
  425. package/lib/index.d.ts +4 -0
  426. package/lib/index.js +12 -0
  427. package/lib/plus/clientCard/index.d.ts +7 -0
  428. package/lib/plus/clientCard/index.js +442 -0
  429. package/lib/plus/clientCard/index.less +539 -0
  430. package/lib/plus/clientCard/line/index.d.ts +9 -0
  431. package/lib/plus/clientCard/line/index.js +153 -0
  432. package/lib/plus/clientCard/line/index.less +142 -0
  433. package/lib/plus/clientCard/locales.d.ts +18 -0
  434. package/lib/plus/clientCard/locales.js +41 -0
  435. package/lib/plus/clientCard/types.d.ts +126 -0
  436. package/lib/plus/clientCard/types.js +17 -0
  437. package/lib/plus/clientCard/utils.d.ts +8 -0
  438. package/lib/plus/clientCard/utils.js +75 -0
  439. package/lib/plus/clientName/index.d.ts +5 -0
  440. package/lib/plus/clientName/index.js +53 -0
  441. package/lib/plus/clientName/index.less +10 -0
  442. package/lib/plus/clientName/type.d.ts +13 -0
  443. package/lib/plus/clientName/type.js +17 -0
  444. package/lib/plus/clientName/utils.d.ts +2 -0
  445. package/lib/plus/clientName/utils.js +43 -0
  446. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +2 -0
  447. package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
  448. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +2 -0
  449. package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
  450. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +2 -0
  451. package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
  452. package/lib/plus/clinetSearch/Add/PhoneField/serve.d.ts +2 -0
  453. package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
  454. package/lib/plus/clinetSearch/Add/index.d.ts +18 -0
  455. package/lib/plus/clinetSearch/Add/index.js +243 -0
  456. package/lib/plus/clinetSearch/Add/index.less +30 -0
  457. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.d.ts +5 -0
  458. package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
  459. package/lib/plus/clinetSearch/InfiniteScroll/index.d.ts +2 -0
  460. package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
  461. package/lib/plus/clinetSearch/InfiniteScroll/types.d.ts +46 -0
  462. package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
  463. package/lib/plus/clinetSearch/index.d.ts +18 -0
  464. package/lib/plus/clinetSearch/index.js +205 -0
  465. package/lib/plus/clinetSearch/index.less +91 -0
  466. package/lib/plus/clinetSearch/locales.d.ts +102 -0
  467. package/lib/plus/clinetSearch/locales.js +125 -0
  468. package/lib/plus/clinetSearch/serve.d.ts +1 -0
  469. package/lib/plus/clinetSearch/serve.js +33 -0
  470. package/lib/plus/clinetSearch/types.d.ts +49 -0
  471. package/lib/plus/clinetSearch/types.js +17 -0
  472. package/lib/plus/noteModal/AddTempModal.d.ts +7 -0
  473. package/lib/plus/noteModal/AddTempModal.js +95 -0
  474. package/lib/plus/noteModal/index.d.ts +4 -0
  475. package/lib/plus/noteModal/index.js +199 -0
  476. package/lib/plus/noteModal/index.less +168 -0
  477. package/lib/plus/noteModal/locales.d.ts +33 -0
  478. package/lib/plus/noteModal/locales.js +56 -0
  479. package/lib/plus/noteModal/types.d.ts +17 -0
  480. package/lib/plus/noteModal/types.js +17 -0
  481. package/lib/pro/comprehensiveSearch/camera.svg +4 -0
  482. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
  483. package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
  484. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
  485. package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
  486. package/lib/pro/comprehensiveSearch/index.d.ts +9 -0
  487. package/lib/pro/comprehensiveSearch/index.js +259 -0
  488. package/lib/pro/comprehensiveSearch/index.less +323 -0
  489. package/lib/pro/comprehensiveSearch/locales.d.ts +18 -0
  490. package/lib/pro/comprehensiveSearch/locales.js +41 -0
  491. package/lib/pro/comprehensiveSearch/types.d.ts +31 -0
  492. package/lib/pro/comprehensiveSearch/types.js +17 -0
  493. package/lib/pro/numberKeyboard/index.d.ts +28 -0
  494. package/lib/pro/numberKeyboard/index.js +182 -0
  495. package/lib/pro/numberKeyboard/index.less +25 -0
  496. package/lib/pro/numberKeyboard/locales.d.ts +12 -0
  497. package/lib/pro/numberKeyboard/locales.js +35 -0
  498. package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
  499. package/lib/pro/pisellNumberSelector/example.js +93 -0
  500. package/lib/pro/pisellNumberSelector/index.d.ts +26 -0
  501. package/lib/pro/pisellNumberSelector/index.js +260 -0
  502. package/lib/pro/pisellNumberSelector/index.less +193 -0
  503. package/lib/pro/pisellPhoneKeyboard/index.d.ts +12 -0
  504. package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
  505. package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
  506. package/lib/pro/pisellPhoneKeyboard/locales.d.ts +12 -0
  507. package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
  508. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.d.ts +5 -0
  509. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
  510. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
  511. package/lib/pro/pisellPriceKeyboardModal/index.d.ts +2 -0
  512. package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
  513. package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
  514. package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
  515. package/lib/pro/pisellPriceRadio/index.d.ts +26 -0
  516. package/lib/pro/pisellPriceRadio/index.js +130 -0
  517. package/lib/pro/pisellPriceRadio/index.less +158 -0
  518. package/lib/pro/skuDetailModal/index.d.ts +5 -0
  519. package/lib/pro/skuDetailModal/index.js +311 -0
  520. package/lib/pro/skuDetailModal/index.less +236 -0
  521. package/lib/pro/skuDetailModal/locales.d.ts +48 -0
  522. package/lib/pro/skuDetailModal/locales.js +71 -0
  523. package/lib/pro/skuDetailModal/types.d.ts +347 -0
  524. package/lib/pro/skuDetailModal/types.js +17 -0
  525. package/lowcode/client-card/fragments/cardStyle.ts +63 -0
  526. package/lowcode/client-card/fragments/nameStyle.ts +34 -0
  527. package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
  528. package/lowcode/client-card/fragments/tagConfig.ts +88 -0
  529. package/lowcode/client-card/meta.ts +337 -0
  530. package/lowcode/comprehensive-search/meta.ts +261 -0
  531. package/package.json +26 -26
@@ -0,0 +1,244 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
6
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
+ 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."); }
12
+ 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); }
13
+ 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; }
14
+ 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; } }
15
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
+ import { useState, useEffect } from 'react';
17
+ import { useBookingTicket } from "./bookingTicket";
18
+ import { usePisellOS } from "../../../../hooks/useEngineContext";
19
+ import { useMemoizedFn } from "ahooks";
20
+ export var useCustomer = function useCustomer(props) {
21
+ var bookingTicket = useBookingTicket();
22
+ var pisellos = usePisellOS();
23
+
24
+ // 客户列表
25
+ var _useState = useState([]),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ customers = _useState2[0],
28
+ setCustomers = _useState2[1];
29
+ // 选中的客户
30
+ var _useState3 = useState(null),
31
+ _useState4 = _slicedToArray(_useState3, 2),
32
+ selectedCustomer = _useState4[0],
33
+ setSelectedCustomer = _useState4[1];
34
+ var _useState5 = useState(false),
35
+ _useState6 = _slicedToArray(_useState5, 2),
36
+ loading = _useState6[0],
37
+ setLoading = _useState6[1];
38
+ var _useState7 = useState(null),
39
+ _useState8 = _slicedToArray(_useState7, 2),
40
+ error = _useState8[0],
41
+ setError = _useState8[1];
42
+ // 分页信息
43
+ var _useState9 = useState({
44
+ page: 1,
45
+ pageSize: 20,
46
+ total: 0
47
+ }),
48
+ _useState10 = _slicedToArray(_useState9, 2),
49
+ pagination = _useState10[0],
50
+ setPagination = _useState10[1];
51
+ var _useState11 = useState(false),
52
+ _useState12 = _slicedToArray(_useState11, 2),
53
+ hasMore = _useState12[0],
54
+ setHasMore = _useState12[1];
55
+ var _useState13 = useState(false),
56
+ _useState14 = _slicedToArray(_useState13, 2),
57
+ loadingMore = _useState14[0],
58
+ setLoadingMore = _useState14[1];
59
+
60
+ // 监听事件
61
+ useEffect(function () {
62
+ if (!pisellos) {
63
+ return;
64
+ }
65
+ pisellos.effects.on('customer:onUpdate', function (state) {
66
+ setCustomers(state.customerList);
67
+ setHasMore(state.hasMore);
68
+ setPagination(function (prev) {
69
+ return _objectSpread(_objectSpread({}, prev), {}, {
70
+ total: state.total,
71
+ page: state.currentPage,
72
+ pageSize: state.pageSize
73
+ });
74
+ });
75
+ });
76
+ pisellos.effects.on('customer:onSelected', function (customer) {
77
+ var _props$changeCustomer;
78
+ setSelectedCustomer(customer);
79
+ (_props$changeCustomer = props.changeCustomerToGlobalState) === null || _props$changeCustomer === void 0 || _props$changeCustomer.call(props, customer);
80
+ });
81
+ pisellos.effects.on('customer:onPaginationChange', function (paginationInfo) {
82
+ setPagination(paginationInfo);
83
+ });
84
+ return function () {
85
+ pisellos.effects.off('customer:onUpdate');
86
+ pisellos.effects.off('customer:onSelected');
87
+ pisellos.effects.off('customer:onPaginationChange');
88
+ };
89
+ }, [bookingTicket]);
90
+
91
+ // 加载客户列表
92
+ var loadCustomers = useMemoizedFn( /*#__PURE__*/function () {
93
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
94
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
95
+ while (1) switch (_context.prev = _context.next) {
96
+ case 0:
97
+ _context.prev = 0;
98
+ setLoading(true);
99
+ _context.next = 4;
100
+ return bookingTicket.getCustomerList(params);
101
+ case 4:
102
+ _context.next = 9;
103
+ break;
104
+ case 6:
105
+ _context.prev = 6;
106
+ _context.t0 = _context["catch"](0);
107
+ setError(_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message);
108
+ case 9:
109
+ setLoading(false);
110
+ case 10:
111
+ case "end":
112
+ return _context.stop();
113
+ }
114
+ }, _callee, null, [[0, 6]]);
115
+ }));
116
+ return function (_x) {
117
+ return _ref.apply(this, arguments);
118
+ };
119
+ }());
120
+
121
+ // 初始化滚动加载
122
+ var initLoad = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
123
+ var keyword,
124
+ _args2 = arguments;
125
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
126
+ while (1) switch (_context2.prev = _context2.next) {
127
+ case 0:
128
+ keyword = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : '';
129
+ _context2.prev = 1;
130
+ _context2.next = 4;
131
+ return bookingTicket.resetAndLoadCustomers({
132
+ search: keyword || undefined
133
+ });
134
+ case 4:
135
+ _context2.next = 9;
136
+ break;
137
+ case 6:
138
+ _context2.prev = 6;
139
+ _context2.t0 = _context2["catch"](1);
140
+ console.error('初始化加载失败:', _context2.t0);
141
+ case 9:
142
+ case "end":
143
+ return _context2.stop();
144
+ }
145
+ }, _callee2, null, [[1, 6]]);
146
+ })));
147
+
148
+ // 加载更多
149
+ var loadMore = useMemoizedFn( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
150
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
151
+ while (1) switch (_context3.prev = _context3.next) {
152
+ case 0:
153
+ if (!(!hasMore || loadingMore)) {
154
+ _context3.next = 2;
155
+ break;
156
+ }
157
+ return _context3.abrupt("return");
158
+ case 2:
159
+ setLoadingMore(true);
160
+ _context3.prev = 3;
161
+ _context3.next = 6;
162
+ return bookingTicket.loadMoreCustomers();
163
+ case 6:
164
+ _context3.next = 11;
165
+ break;
166
+ case 8:
167
+ _context3.prev = 8;
168
+ _context3.t0 = _context3["catch"](3);
169
+ console.error('加载更多失败:', _context3.t0);
170
+ case 11:
171
+ setLoadingMore(false);
172
+ case 12:
173
+ case "end":
174
+ return _context3.stop();
175
+ }
176
+ }, _callee3, null, [[3, 8]]);
177
+ })));
178
+
179
+ // 切换分页
180
+ var changePage = useMemoizedFn( /*#__PURE__*/function () {
181
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(page, pageSize) {
182
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
183
+ while (1) switch (_context4.prev = _context4.next) {
184
+ case 0:
185
+ _context4.prev = 0;
186
+ setLoading(true);
187
+ _context4.next = 4;
188
+ return bookingTicket.changeCustomerPage(page, pageSize);
189
+ case 4:
190
+ _context4.next = 9;
191
+ break;
192
+ case 6:
193
+ _context4.prev = 6;
194
+ _context4.t0 = _context4["catch"](0);
195
+ setError(_context4.t0.message);
196
+ case 9:
197
+ setLoading(false);
198
+ case 10:
199
+ case "end":
200
+ return _context4.stop();
201
+ }
202
+ }, _callee4, null, [[0, 6]]);
203
+ }));
204
+ return function (_x2, _x3) {
205
+ return _ref4.apply(this, arguments);
206
+ };
207
+ }());
208
+
209
+ // 选择客户
210
+ var selectCustomer = useMemoizedFn(function (customer) {
211
+ bookingTicket.setActiveCustomer(customer);
212
+ });
213
+
214
+ // 新增客户到第一个
215
+ var addCustomerToFirst = useMemoizedFn(function (customer) {
216
+ bookingTicket.addCustomerToFirst(customer);
217
+ });
218
+ return {
219
+ // 客户列表
220
+ customers: customers,
221
+ // 选中的客户
222
+ selectedCustomer: selectedCustomer,
223
+ // 加载状态
224
+ loading: loading,
225
+ // 错误信息
226
+ error: error,
227
+ // 分页信息
228
+ pagination: pagination,
229
+ // 加载客户列表
230
+ loadCustomers: loadCustomers,
231
+ // 切换分页
232
+ changePage: changePage,
233
+ // 选择客户
234
+ selectCustomer: selectCustomer,
235
+ // 新增客户到第一个
236
+ addCustomerToFirst: addCustomerToFirst,
237
+ // 初始化滚动加载
238
+ initLoad: initLoad,
239
+ // 更多数据
240
+ hasMore: hasMore,
241
+ // 加载更多
242
+ loadMore: loadMore
243
+ };
244
+ };
@@ -0,0 +1,12 @@
1
+ interface IGetProductsParams {
2
+ schedule_date?: string;
3
+ customer_id?: number;
4
+ menu_list_ids?: number[];
5
+ schedule_datetime?: string;
6
+ }
7
+ export declare const useProducts: () => {
8
+ getProducts: (params?: IGetProductsParams) => Promise<void>;
9
+ products: any[];
10
+ loading: boolean;
11
+ };
12
+ export {};
@@ -0,0 +1,52 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
6
+ 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."); }
7
+ 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); }
8
+ 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; }
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
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
+ import { useMemoizedFn } from 'ahooks';
12
+ import { useBookingTicket } from "./bookingTicket";
13
+ import { useState } from 'react';
14
+ export var useProducts = function useProducts() {
15
+ var bookingTicket = useBookingTicket();
16
+ var _useState = useState([]),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ products = _useState2[0],
19
+ setProducts = _useState2[1];
20
+ var _useState3 = useState(true),
21
+ _useState4 = _slicedToArray(_useState3, 2),
22
+ loading = _useState4[0],
23
+ setLoading = _useState4[1];
24
+ var getProducts = useMemoizedFn( /*#__PURE__*/function () {
25
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
26
+ var products;
27
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
28
+ while (1) switch (_context.prev = _context.next) {
29
+ case 0:
30
+ setLoading(true);
31
+ _context.next = 3;
32
+ return bookingTicket.loadProducts(params);
33
+ case 3:
34
+ products = _context.sent;
35
+ setProducts(products);
36
+ setLoading(false);
37
+ case 6:
38
+ case "end":
39
+ return _context.stop();
40
+ }
41
+ }, _callee);
42
+ }));
43
+ return function (_x) {
44
+ return _ref.apply(this, arguments);
45
+ };
46
+ }());
47
+ return {
48
+ getProducts: getProducts,
49
+ products: products,
50
+ loading: loading
51
+ };
52
+ };
@@ -0,0 +1,5 @@
1
+ declare const useScanCustomer: () => {
2
+ openScan: (callback: (data: any) => void) => void;
3
+ closeScan: () => void;
4
+ };
5
+ export default useScanCustomer;
@@ -0,0 +1,30 @@
1
+ import { useRef } from 'react';
2
+ import { locales } from "@pisell/utils";
3
+ import { useBookingTicket } from "./bookingTicket";
4
+ import { formatScanCustomer } from "../../utils";
5
+ import useToast from "../../../../hooks/useToast";
6
+ var useScanCustomer = function useScanCustomer() {
7
+ var bookingTicket = useBookingTicket();
8
+ var scanRef = useRef(null);
9
+ var Toast = useToast();
10
+ var handleScanCustomer = function handleScanCustomer(callback) {
11
+ console.log('handleScanCustomer>>>>>>>', callback);
12
+ scanRef.current = bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.scanCustomerListener(function (data) {
13
+ console.log('scanCustomerListener>>>>>>>', data);
14
+ if (data.status === 'failed') {
15
+ Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
16
+ return;
17
+ }
18
+ var customer = formatScanCustomer(data);
19
+ callback(customer);
20
+ });
21
+ };
22
+ return {
23
+ openScan: handleScanCustomer,
24
+ closeScan: function closeScan() {
25
+ var _scanRef$current, _scanRef$current$remo;
26
+ (_scanRef$current = scanRef.current) === null || _scanRef$current === void 0 || (_scanRef$current$remo = _scanRef$current.remove) === null || _scanRef$current$remo === void 0 || _scanRef$current$remo.call(_scanRef$current);
27
+ }
28
+ };
29
+ };
30
+ export default useScanCustomer;
@@ -0,0 +1,5 @@
1
+ declare const useScanGlobal: () => {
2
+ openScan: (callback: (data: any) => void) => void;
3
+ closeScan: () => void;
4
+ };
5
+ export default useScanGlobal;
@@ -0,0 +1,29 @@
1
+ import { useRef } from 'react';
2
+ import { useBookingTicket } from "./bookingTicket";
3
+ import { formatScanGlobal } from "../../utils";
4
+ import useToast from "../../../../hooks/useToast";
5
+ import { locales } from '@pisell/utils';
6
+ var useScanGlobal = function useScanGlobal() {
7
+ var bookingTicket = useBookingTicket();
8
+ var scanRef = useRef(null);
9
+ var Toast = useToast();
10
+ var handleScanGlobal = function handleScanGlobal(callback) {
11
+ scanRef.current = bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.scanGlobalListener(function (data) {
12
+ console.log('scanGlobalListener>>>>>>>', data);
13
+ if (data.status === 'failed') {
14
+ Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
15
+ return;
16
+ }
17
+ var result = formatScanGlobal(data);
18
+ callback(result);
19
+ });
20
+ };
21
+ return {
22
+ openScan: handleScanGlobal,
23
+ closeScan: function closeScan() {
24
+ var _scanRef$current, _scanRef$current$remo;
25
+ (_scanRef$current = scanRef.current) === null || _scanRef$current === void 0 || (_scanRef$current$remo = _scanRef$current.remove) === null || _scanRef$current$remo === void 0 || _scanRef$current$remo.call(_scanRef$current);
26
+ }
27
+ };
28
+ };
29
+ export default useScanGlobal;
@@ -0,0 +1,2 @@
1
+ declare const useScanGlobalHandle: () => (data: any) => void;
2
+ export default useScanGlobalHandle;
@@ -0,0 +1,49 @@
1
+ import { locales } from "@pisell/utils";
2
+ import { getHandleSetClient } from "../../../booking/info2/cartClientCard/utils";
3
+ import { getHandleSetService } from "../../components/addServiceVariant/utils";
4
+ import useToast from "../../../../hooks/useToast";
5
+ var useScanGlobalHandle = function useScanGlobalHandle() {
6
+ var Toast = useToast();
7
+ var walletHandle = function walletHandle(data) {
8
+ var handleSetClient = getHandleSetClient();
9
+ if (!data.data) {
10
+ Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
11
+ return;
12
+ }
13
+ if (handleSetClient && data.data) {
14
+ handleSetClient(data.data);
15
+ }
16
+ };
17
+ var walletPassHandle = function walletPassHandle(data) {
18
+ var handleSetClient = getHandleSetClient();
19
+ if (!data.data) {
20
+ Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
21
+ return;
22
+ }
23
+ if (handleSetClient && data.data) {
24
+ handleSetClient(data.data);
25
+ }
26
+ };
27
+ var productHandle = function productHandle(data) {
28
+ var _data$data, _data$data2;
29
+ var handleSetService = getHandleSetService();
30
+ if (!((_data$data = data.data) !== null && _data$data !== void 0 && _data$data.list)) {
31
+ Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
32
+ return;
33
+ }
34
+ if (handleSetService && data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.list) {
35
+ handleSetService(data.data.list, data.scanCode);
36
+ }
37
+ };
38
+ var handleScan = function handleScan(data) {
39
+ if (data.searchType === 'wallet') {
40
+ walletHandle(data);
41
+ } else if (data.searchType === 'walletPass') {
42
+ walletPassHandle(data);
43
+ } else if (data.searchType === 'product' || data.searchType === 'local_product') {
44
+ productHandle(data);
45
+ }
46
+ };
47
+ return handleScan;
48
+ };
49
+ export default useScanGlobalHandle;
@@ -130,15 +130,22 @@ var initialState = {
130
130
  bookingConfigParams: {
131
131
  item_type: 'appointment_booking'
132
132
  },
133
- productExtensionType: ['appointment_ticket', 'session_ticket', "product_appointment", "service_product", "session_product", "normal", 'product_appointment']
133
+ productExtensionType: ['appointment_ticket', 'session_ticket', 'product_appointment', 'service_product', 'session_product', 'normal', 'product_appointment'],
134
+ // 是否是平行资源预约的booking
135
+ isParallelResourcesBooking: null
134
136
  };
135
137
  export default (function (props) {
136
- var _context$appHelper$ut;
138
+ var _context$appHelper, _context$appHelper$ut2;
137
139
  var productExtensionType = props.productExtensionType,
138
140
  bookingConfigParams = props.bookingConfigParams;
139
141
  var storeRef = useRef(null);
140
142
  var context = useEngineContext();
141
- locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
143
+ var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
144
+ pisellos = _context$appHelper$ut.pisellos,
145
+ pisellosAllModule = _context$appHelper$ut.pisellosAllModule;
146
+ var _ref = pisellosAllModule || {},
147
+ BookingTicket = _ref.BookingTicket;
148
+ locales.init(localeTexts, ((_context$appHelper$ut2 = context.appHelper.utils) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.storage) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.get('umi_locale')) || 'en');
142
149
  useLayoutEffect(function () {
143
150
  request.setRequest(context.appHelper.utils.request);
144
151
  }, []);
@@ -149,6 +156,17 @@ export default (function (props) {
149
156
  }));
150
157
  storeRef.current = store;
151
158
  }, []);
159
+ useMemo(function () {
160
+ if (BookingTicket) {
161
+ pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket('bookingTicket'), {
162
+ initialState: {},
163
+ otherParams: {
164
+ cacheId: 'test-cache',
165
+ platform: 'shop'
166
+ }
167
+ });
168
+ }
169
+ }, []);
152
170
  return /*#__PURE__*/React.createElement("div", {
153
171
  className: "pisell-ticket-booking-wrapper"
154
172
  }, /*#__PURE__*/React.createElement(MenuBar, null), /*#__PURE__*/React.createElement(Provider, {
@@ -54,7 +54,8 @@ declare const _default: {
54
54
  'pisell2.product.card.day': (val: number) => string;
55
55
  'pisell2.product.card.day.event': (val: number) => string;
56
56
  'pisell2.product.card.minute': (val: number) => string;
57
- "pisell2.ticket-booking.reload": string;
57
+ 'pisell2.ticket-booking.reload': string;
58
+ 'pisell2.text.scan-global-failed': string;
58
59
  };
59
60
  'zh-CN': {
60
61
  'pisell2.ticket-booking.info': string;
@@ -111,7 +112,8 @@ declare const _default: {
111
112
  'pisell2.product.card.day': (val: number) => string;
112
113
  'pisell2.product.card.day.event': (val: number) => string;
113
114
  'pisell2.product.card.minute': (val: number) => string;
114
- "pisell2.ticket-booking.reload": string;
115
+ 'pisell2.ticket-booking.reload': string;
116
+ 'pisell2.text.scan-global-failed': string;
115
117
  };
116
118
  'zh-HK': {
117
119
  'pisell2.ticket-booking.info': string;
@@ -168,7 +170,8 @@ declare const _default: {
168
170
  'pisell2.product.card.day': (val: number) => string;
169
171
  'pisell2.product.card.day.event': (val: number) => string;
170
172
  'pisell2.product.card.minute': (val: number) => string;
171
- "pisell2.ticket-booking.reload": string;
173
+ 'pisell2.ticket-booking.reload': string;
174
+ 'pisell2.text.scan-global-failed': string;
172
175
  };
173
176
  };
174
177
  export default _default;
@@ -66,7 +66,8 @@ export default {
66
66
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
67
67
  return "".concat(val > 1 ? ' minutes' : ' minute');
68
68
  },
69
- "pisell2.ticket-booking.reload": 'Reload'
69
+ 'pisell2.ticket-booking.reload': 'Reload',
70
+ 'pisell2.text.scan-global-failed': 'No matching results'
70
71
  },
71
72
  'zh-CN': {
72
73
  'pisell2.ticket-booking.info': '信息',
@@ -135,7 +136,8 @@ export default {
135
136
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
136
137
  return '分钟';
137
138
  },
138
- "pisell2.ticket-booking.reload": '重新加载'
139
+ 'pisell2.ticket-booking.reload': '重新加载',
140
+ 'pisell2.text.scan-global-failed': '无搜索结果'
139
141
  },
140
142
  'zh-HK': {
141
143
  'pisell2.ticket-booking.info': '資訊',
@@ -204,6 +206,7 @@ export default {
204
206
  'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
205
207
  return '分鐘';
206
208
  },
207
- "pisell2.ticket-booking.reload": '重新載入'
209
+ 'pisell2.ticket-booking.reload': '重新載入',
210
+ 'pisell2.text.scan-global-failed': '無搜索結果'
208
211
  }
209
212
  };