@pisell/private-materials 3.2.38 → 3.3.0

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 (372) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/Sales/Summary/utils.d.ts +1 -1
  8. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  9. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +245 -114
  10. package/es/components/appointmentBooking/components/Cart/Item/Total.js +5 -4
  11. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  12. package/es/components/appointmentBooking/components/Cart/Item/index.js +98 -17
  13. package/es/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  14. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  15. package/es/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  16. package/es/components/appointmentBooking/components/Cart/utils.js +408 -0
  17. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  18. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -0
  19. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  20. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Content/index.js +76 -9
  22. package/es/components/appointmentBooking/components/Content/index.less +21 -0
  23. package/es/components/appointmentBooking/components/Date/index.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Date/index.js +131 -38
  25. package/es/components/appointmentBooking/components/Date/index.less +1 -1
  26. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  27. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  28. package/es/components/appointmentBooking/components/Deposit/index.less +17 -0
  29. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  30. package/es/components/appointmentBooking/components/Footer/index.js +8 -2
  31. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  32. package/es/components/appointmentBooking/components/Form/index.js +200 -0
  33. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  34. package/es/components/appointmentBooking/components/Guest/index.js +1 -1
  35. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  36. package/es/components/appointmentBooking/components/Header/index.js +53 -19
  37. package/es/components/appointmentBooking/components/Resource/index.js +67 -12
  38. package/es/components/appointmentBooking/components/Services/index.js +213 -75
  39. package/es/components/appointmentBooking/components/Services/index.less +0 -14
  40. package/es/components/appointmentBooking/components/TimeSlicing/index.js +10 -5
  41. package/es/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  42. package/es/components/appointmentBooking/components/Voucher/index.js +19 -6
  43. package/es/components/appointmentBooking/components/Voucher/index.less +93 -2
  44. package/es/components/appointmentBooking/context.d.ts +4 -4
  45. package/es/components/appointmentBooking/context.js +42 -33
  46. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  47. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  48. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  49. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  50. package/es/components/appointmentBooking/deposit/index.js +101 -0
  51. package/es/components/appointmentBooking/deposit/index.less +57 -0
  52. package/es/components/appointmentBooking/hooks.d.ts +29 -1
  53. package/es/components/appointmentBooking/hooks.js +382 -114
  54. package/es/components/appointmentBooking/index.d.ts +0 -1
  55. package/es/components/appointmentBooking/index.js +9 -4
  56. package/es/components/appointmentBooking/locales.d.ts +51 -3
  57. package/es/components/appointmentBooking/locales.js +58 -4
  58. package/es/components/appointmentBooking/utils.d.ts +66 -1
  59. package/es/components/appointmentBooking/utils.js +226 -33
  60. package/es/components/booking/addons/index.js +10 -6
  61. package/es/components/booking/components/footer/index.d.ts +0 -1
  62. package/es/components/booking/components/footer/index.js +90 -72
  63. package/es/components/booking/components/footer/utils.d.ts +11 -0
  64. package/es/components/booking/components/footer/utils.js +72 -44
  65. package/es/components/booking/components/voucher/index.js +22 -6
  66. package/es/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  67. package/es/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  68. package/es/components/booking/info/hooks/useAddHolder.js +70 -0
  69. package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  70. package/es/components/booking/info/hooks/useHolderConfig.js +40 -0
  71. package/es/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  72. package/es/components/booking/info/hooks/useInfoHolder.js +99 -0
  73. package/es/components/booking/info/index.js +9 -2
  74. package/es/components/booking/info/main.js +1 -1
  75. package/es/components/booking/info/pet/index.js +18 -17
  76. package/es/components/booking/info/service/Lists.d.ts +2 -0
  77. package/es/components/booking/info/service/Lists.js +119 -0
  78. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  79. package/es/components/booking/info/service/addService/index.js +7 -5
  80. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  81. package/es/components/booking/info/service/editService/index.js +7 -5
  82. package/es/components/booking/info/service/index.js +2 -2
  83. package/es/components/booking/info/service/serviceList/index.js +1 -0
  84. package/es/components/booking/info/service/serviceManager/index.js +12 -7
  85. package/es/components/booking/info/service2/Group/utils.js +2 -1
  86. package/es/components/booking/info/service2/hooks/useSelectPet.js +13 -5
  87. package/es/components/booking/info/service2/utils.d.ts +5 -4
  88. package/es/components/booking/info/service2/utils.js +356 -88
  89. package/es/components/booking/info/utils.d.ts +2 -0
  90. package/es/components/booking/info/utils.js +45 -1
  91. package/es/components/booking/info2/index.js +9 -6
  92. package/es/components/booking/info2/serve.d.ts +2 -2
  93. package/es/components/booking/info2/serve.js +8 -15
  94. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  95. package/es/components/booking/info2/service/addService/index.js +13 -8
  96. package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
  97. package/es/components/booking/info2/service/addService/utils.js +49 -14
  98. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  99. package/es/components/booking/info2/service/addTimeModal/index.js +1 -1
  100. package/es/components/booking/info2/service/editService/Resources/index.js +6 -5
  101. package/es/components/booking/info2/service/editService/index.js +4 -3
  102. package/es/components/booking/info2/service/index.js +18 -37
  103. package/es/components/booking/info2/utils.d.ts +4 -0
  104. package/es/components/booking/info2/utils.js +43 -0
  105. package/es/components/booking/info2/utilsByBooking.js +17 -4
  106. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  107. package/es/components/booking/materiels/holder/index.js +2 -2
  108. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  109. package/es/components/booking/notes/addNote/index.js +1 -1
  110. package/es/components/booking/notes/addNote/index.less +3 -0
  111. package/es/components/booking/utils.d.ts +1 -0
  112. package/es/components/booking/utils.js +20 -8
  113. package/es/components/eftposPay/amount.d.ts +1 -1
  114. package/es/components/eftposPay/device.d.ts +1 -1
  115. package/es/components/eftposPay/hooks.d.ts +1 -1
  116. package/es/components/eftposPay/store/index.d.ts +1 -1
  117. package/es/components/index.d.ts +2 -1
  118. package/es/components/index.js +2 -1
  119. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  120. package/es/components/productSelect/components/TabProduct/index.js +176 -0
  121. package/es/components/productSelect/components/gridLayout/index.d.ts +9 -0
  122. package/es/components/productSelect/components/gridLayout/index.js +28 -0
  123. package/es/components/productSelect/components/gridLayout/index.less +6 -0
  124. package/es/components/productSelect/components/productGroup/index.d.ts +34 -0
  125. package/es/components/productSelect/components/productGroup/index.js +145 -0
  126. package/es/components/productSelect/components/productGroup/index.less +208 -0
  127. package/es/components/productSelect/hooks/useToken.d.ts +18 -0
  128. package/es/components/productSelect/hooks/useToken.js +35 -0
  129. package/es/components/productSelect/index.d.ts +23 -0
  130. package/es/components/productSelect/index.js +93 -0
  131. package/es/components/productSelect/index.less +69 -0
  132. package/es/components/productSelect/locales.d.ts +18 -0
  133. package/es/components/productSelect/locales.js +17 -0
  134. package/es/components/productSelect/mock.d.ts +134 -0
  135. package/es/components/productSelect/mock.js +202 -0
  136. package/es/components/productSelect/theme/token.d.ts +17 -0
  137. package/es/components/productSelect/theme/token.js +19 -0
  138. package/es/components/shoppingCart/Provider.d.ts +1 -1
  139. package/es/components/shoppingCart/Provider.js +3 -1
  140. package/es/components/shoppingCart/components/Cart/Product.js +15 -3
  141. package/es/components/shoppingCart/components/Cart/index.less +15 -15
  142. package/es/components/shoppingCart/components/Render/index.less +15 -0
  143. package/es/components/shoppingCart/hooks/useAddService.js +7 -1
  144. package/es/components/shoppingCart/index.d.ts +1 -2
  145. package/es/components/shoppingCart/index.js +3 -1
  146. package/es/components/shoppingCart/status.js +4 -1
  147. package/es/components/shoppingCart/type.d.ts +5 -0
  148. package/es/components/subTotal/index.d.ts +22 -0
  149. package/es/components/subTotal/index.js +234 -0
  150. package/es/components/subTotal/index.less +70 -0
  151. package/es/components/subTotal/locales.d.ts +42 -0
  152. package/es/components/subTotal/locales.js +41 -0
  153. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  154. package/es/components/ticketBooking/components/addServiceVariant/addService.js +410 -0
  155. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  156. package/es/components/ticketBooking/components/addServiceVariant/index.js +28 -0
  157. package/es/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  158. package/es/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  159. package/es/components/ticketBooking/components/menuBar/index.js +54 -0
  160. package/es/components/ticketBooking/components/menuBar/index.less +84 -0
  161. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  162. package/es/components/ticketBooking/components/ticketBooking/index.js +815 -0
  163. package/es/components/ticketBooking/components/ticketBooking/index.less +18 -0
  164. package/es/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  165. package/es/components/ticketBooking/components/timeBar/index.js +113 -0
  166. package/es/components/ticketBooking/components/timeBar/index.less +22 -0
  167. package/es/components/ticketBooking/data.d.ts +58 -0
  168. package/es/components/ticketBooking/data.js +58 -58
  169. package/es/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  170. package/es/components/ticketBooking/hooks/useNetworkStatus.js +52 -0
  171. package/es/components/ticketBooking/index.d.ts +3 -3
  172. package/es/components/ticketBooking/index.js +139 -5
  173. package/es/components/ticketBooking/index.less +4 -0
  174. package/es/components/ticketBooking/locales.d.ts +144 -0
  175. package/es/components/ticketBooking/locales.js +143 -0
  176. package/es/components/ticketBooking/miniRedux.d.ts +22 -0
  177. package/es/components/ticketBooking/miniRedux.js +105 -0
  178. package/es/components/ticketBooking/serve.d.ts +282 -0
  179. package/es/components/ticketBooking/serve.js +957 -0
  180. package/es/components/ticketBooking/utils/index.d.ts +14 -0
  181. package/es/components/ticketBooking/utils/index.js +102 -0
  182. package/es/components/wallet/components/WalletCard.js +1 -1
  183. package/es/index.d.ts +3 -0
  184. package/es/index.js +4 -1
  185. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  186. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.d.ts +6 -1
  187. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +132 -73
  188. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  189. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
  190. package/lib/components/appointmentBooking/components/Cart/Item/index.js +59 -14
  191. package/lib/components/appointmentBooking/components/Cart/Item/index.less +21 -12
  192. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  193. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +77 -0
  194. package/lib/components/appointmentBooking/components/Cart/utils.js +273 -0
  195. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  196. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +46 -0
  197. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +35 -0
  198. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  199. package/lib/components/appointmentBooking/components/Content/index.js +59 -5
  200. package/lib/components/appointmentBooking/components/Content/index.less +21 -0
  201. package/lib/components/appointmentBooking/components/Date/index.d.ts +0 -1
  202. package/lib/components/appointmentBooking/components/Date/index.js +47 -19
  203. package/lib/components/appointmentBooking/components/Date/index.less +1 -1
  204. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  205. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  206. package/lib/components/appointmentBooking/components/Deposit/index.less +17 -0
  207. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -1
  208. package/lib/components/appointmentBooking/components/Footer/index.js +8 -2
  209. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  210. package/lib/components/appointmentBooking/components/Form/index.js +157 -0
  211. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  212. package/lib/components/appointmentBooking/components/Guest/index.js +1 -1
  213. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Header/index.js +31 -13
  215. package/lib/components/appointmentBooking/components/Resource/index.js +36 -14
  216. package/lib/components/appointmentBooking/components/Services/index.js +86 -63
  217. package/lib/components/appointmentBooking/components/Services/index.less +0 -14
  218. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +13 -5
  219. package/lib/components/appointmentBooking/components/TimeSlicing/index.less +7 -2
  220. package/lib/components/appointmentBooking/components/Voucher/index.js +21 -6
  221. package/lib/components/appointmentBooking/components/Voucher/index.less +93 -2
  222. package/lib/components/appointmentBooking/context.d.ts +4 -4
  223. package/lib/components/appointmentBooking/context.js +15 -10
  224. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  225. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  226. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  227. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  228. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  229. package/lib/components/appointmentBooking/deposit/index.less +57 -0
  230. package/lib/components/appointmentBooking/hooks.d.ts +29 -1
  231. package/lib/components/appointmentBooking/hooks.js +148 -22
  232. package/lib/components/appointmentBooking/index.d.ts +0 -1
  233. package/lib/components/appointmentBooking/index.js +6 -4
  234. package/lib/components/appointmentBooking/locales.d.ts +51 -3
  235. package/lib/components/appointmentBooking/locales.js +52 -4
  236. package/lib/components/appointmentBooking/utils.d.ts +66 -1
  237. package/lib/components/appointmentBooking/utils.js +158 -33
  238. package/lib/components/booking/addons/index.js +9 -5
  239. package/lib/components/booking/components/footer/index.d.ts +0 -1
  240. package/lib/components/booking/components/footer/index.js +94 -32
  241. package/lib/components/booking/components/footer/utils.d.ts +11 -0
  242. package/lib/components/booking/components/footer/utils.js +38 -14
  243. package/lib/components/booking/components/voucher/index.js +18 -2
  244. package/lib/components/booking/hooks/useCreateBookingPageHeader.js +3 -0
  245. package/lib/components/booking/info/hooks/useAddHolder.d.ts +2 -0
  246. package/lib/components/booking/info/hooks/useAddHolder.js +73 -0
  247. package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
  248. package/lib/components/booking/info/hooks/useHolderConfig.js +59 -0
  249. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +9 -0
  250. package/lib/components/booking/info/hooks/useInfoHolder.js +106 -0
  251. package/lib/components/booking/info/index.js +5 -1
  252. package/lib/components/booking/info/main.js +1 -1
  253. package/lib/components/booking/info/pet/index.js +3 -2
  254. package/lib/components/booking/info/service/Lists.d.ts +2 -0
  255. package/lib/components/booking/info/service/Lists.js +106 -0
  256. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  257. package/lib/components/booking/info/service/addService/index.js +6 -4
  258. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  259. package/lib/components/booking/info/service/editService/index.js +5 -3
  260. package/lib/components/booking/info/service/index.js +1 -1
  261. package/lib/components/booking/info/service/serviceList/index.js +1 -0
  262. package/lib/components/booking/info/service/serviceManager/index.js +6 -1
  263. package/lib/components/booking/info/service2/Group/utils.js +2 -1
  264. package/lib/components/booking/info/service2/hooks/useSelectPet.js +13 -6
  265. package/lib/components/booking/info/service2/utils.d.ts +5 -4
  266. package/lib/components/booking/info/service2/utils.js +304 -30
  267. package/lib/components/booking/info/utils.d.ts +2 -0
  268. package/lib/components/booking/info/utils.js +40 -1
  269. package/lib/components/booking/info2/index.js +6 -1
  270. package/lib/components/booking/info2/serve.d.ts +2 -2
  271. package/lib/components/booking/info2/serve.js +3 -10
  272. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  273. package/lib/components/booking/info2/service/addService/index.js +11 -6
  274. package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
  275. package/lib/components/booking/info2/service/addService/utils.js +50 -17
  276. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  277. package/lib/components/booking/info2/service/addTimeModal/index.js +2 -2
  278. package/lib/components/booking/info2/service/editService/Resources/index.js +5 -3
  279. package/lib/components/booking/info2/service/editService/index.js +3 -1
  280. package/lib/components/booking/info2/service/index.js +18 -28
  281. package/lib/components/booking/info2/utils.d.ts +4 -0
  282. package/lib/components/booking/info2/utils.js +65 -0
  283. package/lib/components/booking/info2/utilsByBooking.js +12 -3
  284. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  285. package/lib/components/booking/materiels/holder/index.js +2 -2
  286. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  287. package/lib/components/booking/notes/addNote/index.js +1 -1
  288. package/lib/components/booking/notes/addNote/index.less +3 -0
  289. package/lib/components/booking/utils.d.ts +1 -0
  290. package/lib/components/booking/utils.js +25 -10
  291. package/lib/components/eftposPay/amount.d.ts +1 -1
  292. package/lib/components/eftposPay/device.d.ts +1 -1
  293. package/lib/components/eftposPay/hooks.d.ts +1 -1
  294. package/lib/components/eftposPay/store/index.d.ts +1 -1
  295. package/lib/components/index.d.ts +2 -1
  296. package/lib/components/index.js +3 -0
  297. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  298. package/lib/components/productSelect/components/TabProduct/index.js +172 -0
  299. package/lib/components/productSelect/components/gridLayout/index.d.ts +9 -0
  300. package/lib/components/productSelect/components/gridLayout/index.js +58 -0
  301. package/lib/components/productSelect/components/gridLayout/index.less +6 -0
  302. package/lib/components/productSelect/components/productGroup/index.d.ts +34 -0
  303. package/lib/components/productSelect/components/productGroup/index.js +122 -0
  304. package/lib/components/productSelect/components/productGroup/index.less +208 -0
  305. package/lib/components/productSelect/hooks/useToken.d.ts +18 -0
  306. package/lib/components/productSelect/hooks/useToken.js +51 -0
  307. package/lib/components/productSelect/index.d.ts +23 -0
  308. package/lib/components/productSelect/index.js +119 -0
  309. package/lib/components/productSelect/index.less +69 -0
  310. package/lib/components/productSelect/locales.d.ts +18 -0
  311. package/lib/components/productSelect/locales.js +41 -0
  312. package/lib/components/productSelect/mock.d.ts +134 -0
  313. package/lib/components/productSelect/mock.js +276 -0
  314. package/lib/components/productSelect/theme/token.d.ts +17 -0
  315. package/lib/components/productSelect/theme/token.js +47 -0
  316. package/lib/components/shoppingCart/Provider.d.ts +1 -1
  317. package/lib/components/shoppingCart/Provider.js +3 -1
  318. package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
  319. package/lib/components/shoppingCart/components/Cart/index.less +15 -15
  320. package/lib/components/shoppingCart/components/Render/index.less +15 -0
  321. package/lib/components/shoppingCart/hooks/useAddService.js +1 -2
  322. package/lib/components/shoppingCart/index.d.ts +1 -2
  323. package/lib/components/shoppingCart/index.js +2 -0
  324. package/lib/components/shoppingCart/status.js +4 -1
  325. package/lib/components/shoppingCart/type.d.ts +5 -0
  326. package/lib/components/subTotal/index.d.ts +22 -0
  327. package/lib/components/subTotal/index.js +175 -0
  328. package/lib/components/subTotal/index.less +70 -0
  329. package/lib/components/subTotal/locales.d.ts +42 -0
  330. package/lib/components/subTotal/locales.js +65 -0
  331. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  332. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +318 -0
  333. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +6 -0
  334. package/lib/components/ticketBooking/components/addServiceVariant/index.js +56 -0
  335. package/lib/components/ticketBooking/components/addServiceVariant/index.less +0 -0
  336. package/lib/components/ticketBooking/components/menuBar/index.d.ts +3 -0
  337. package/lib/components/ticketBooking/components/menuBar/index.js +87 -0
  338. package/lib/components/ticketBooking/components/menuBar/index.less +84 -0
  339. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +3 -0
  340. package/lib/components/ticketBooking/components/ticketBooking/index.js +769 -0
  341. package/lib/components/ticketBooking/components/ticketBooking/index.less +18 -0
  342. package/lib/components/ticketBooking/components/timeBar/index.d.ts +11 -0
  343. package/lib/components/ticketBooking/components/timeBar/index.js +148 -0
  344. package/lib/components/ticketBooking/components/timeBar/index.less +22 -0
  345. package/lib/components/ticketBooking/data.d.ts +58 -0
  346. package/lib/components/ticketBooking/hooks/useNetworkStatus.d.ts +11 -0
  347. package/lib/components/ticketBooking/hooks/useNetworkStatus.js +80 -0
  348. package/lib/components/ticketBooking/index.d.ts +3 -3
  349. package/lib/components/ticketBooking/index.js +159 -3
  350. package/lib/components/ticketBooking/index.less +4 -0
  351. package/lib/components/ticketBooking/locales.d.ts +144 -0
  352. package/lib/components/ticketBooking/locales.js +167 -0
  353. package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
  354. package/lib/components/ticketBooking/miniRedux.js +96 -0
  355. package/lib/components/ticketBooking/serve.d.ts +282 -0
  356. package/lib/components/ticketBooking/serve.js +214 -0
  357. package/lib/components/ticketBooking/utils/index.d.ts +14 -0
  358. package/lib/components/ticketBooking/utils/index.js +131 -0
  359. package/lib/components/wallet/components/WalletCard.js +1 -1
  360. package/lib/index.d.ts +3 -0
  361. package/lib/index.js +9 -0
  362. package/lowcode/appointment-deposit/meta.ts +58 -0
  363. package/lowcode/product-select/meta.ts +217 -0
  364. package/lowcode/sub-total/meta.ts +134 -0
  365. package/lowcode/ticket-booking/meta.ts +29 -0
  366. package/package.json +2 -2
  367. package/es/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  368. package/es/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -115
  369. package/es/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
  370. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.d.ts +0 -47
  371. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.js +0 -109
  372. package/lib/components/booking/components/voucher/pisellGoodPassCard/index.less +0 -52
@@ -0,0 +1,109 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/appointmentBooking/deposit/index.tsx
30
+ var deposit_exports = {};
31
+ __export(deposit_exports, {
32
+ default: () => deposit_default
33
+ });
34
+ module.exports = __toCommonJS(deposit_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_materials = require("@pisell/materials");
38
+ var import_utils = require("@pisell/utils");
39
+ var import_utils2 = require("../utils");
40
+ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
41
+ var import_PolicyModal = __toESM(require("./components/PolicyModal"));
42
+ var import_index = require("./index.less");
43
+ var Deposit = (props) => {
44
+ var _a, _b;
45
+ const {
46
+ protocols,
47
+ total,
48
+ title,
49
+ isAgreePolicy = true,
50
+ isShowTitle = true,
51
+ onChange
52
+ } = props;
53
+ const context = (0, import_useEngineContext.default)();
54
+ const [visible, setVisible] = (0, import_react.useState)(false);
55
+ const [policyItem, setPolicyItem] = (0, import_react.useState)();
56
+ const isEn = (0, import_react.useMemo)(() => {
57
+ var _a2, _b2;
58
+ const _locale = ((_b2 = (_a2 = context == null ? void 0 : context.engine) == null ? void 0 : _a2.props) == null ? void 0 : _b2.locale) || "en";
59
+ return _locale === "en";
60
+ }, [(_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale]);
61
+ const _policyText = (0, import_react.useCallback)(
62
+ (item, index) => {
63
+ if (!item || !(protocols == null ? void 0 : protocols.length)) return "";
64
+ return (0, import_utils2.getPunctuationMark)(index, protocols.length, isEn);
65
+ },
66
+ [protocols]
67
+ );
68
+ const handleAgreed = () => {
69
+ onChange && onChange(!isAgreePolicy);
70
+ };
71
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-bottom" }, isShowTitle ? /* @__PURE__ */ import_react.default.createElement("span", { className: "title" }, title) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "tip" }, isEn ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
72
+ import_materials.PisellText.Amount,
73
+ {
74
+ value: total,
75
+ showCurrencySymbol: true,
76
+ className: "amount"
77
+ }
78
+ ), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit.amount.tip1"))) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit.amount.tip1")), /* @__PURE__ */ import_react.default.createElement(
79
+ import_materials.PisellText.Amount,
80
+ {
81
+ value: total,
82
+ showCurrencySymbol: true,
83
+ className: "amount"
84
+ }
85
+ ), /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit.amount.tip2")))), /* @__PURE__ */ import_react.default.createElement("div", { className: "checkbox-wrap", onClick: () => handleAgreed() }, /* @__PURE__ */ import_react.default.createElement(import_antd.Checkbox, { checked: isAgreePolicy }), /* @__PURE__ */ import_react.default.createElement("div", { className: "policy-box" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit.agreed")), /* @__PURE__ */ import_react.default.createElement("div", { className: "policy-wrap" }, protocols == null ? void 0 : protocols.map((item, index) => {
86
+ return /* @__PURE__ */ import_react.default.createElement(
87
+ "span",
88
+ {
89
+ key: item == null ? void 0 : item.id,
90
+ onClick: (e) => {
91
+ e.stopPropagation();
92
+ e.preventDefault();
93
+ setPolicyItem(item);
94
+ setVisible(true);
95
+ }
96
+ },
97
+ item == null ? void 0 : item.title,
98
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "symbol" }, _policyText(item, index))
99
+ );
100
+ }))))), /* @__PURE__ */ import_react.default.createElement(
101
+ import_PolicyModal.default,
102
+ {
103
+ open: visible,
104
+ onCancel: () => setVisible(false),
105
+ item: policyItem
106
+ }
107
+ ));
108
+ };
109
+ var deposit_default = Deposit;
@@ -0,0 +1,57 @@
1
+ .appointment-deposit-bottom {
2
+ display: flex;
3
+ flex-direction: column;
4
+ justify-content: center;
5
+ align-items: flex-start;
6
+ gap: 8px;
7
+ align-self: stretch;
8
+
9
+ .title {
10
+ color: var(--Text-Text_1, #1b1b1b);
11
+ font-size: 16px;
12
+ font-style: normal;
13
+ font-weight: 700;
14
+ line-height: 24px;
15
+ }
16
+
17
+ .tip {
18
+ color: var(--Base-Black, #000);
19
+ font-size: 14px;
20
+ font-style: normal;
21
+ font-weight: 400;
22
+ line-height: 20px;
23
+
24
+ .amount {
25
+ font-weight: 600;
26
+ margin-right: 2px;
27
+ }
28
+ }
29
+
30
+ .checkbox-wrap {
31
+ display: flex;
32
+ align-items: center;
33
+ cursor: pointer;
34
+ width: 100%;
35
+
36
+ .policy-box {
37
+ padding-left: 6px;
38
+ cursor: pointer;
39
+ font-size: 14px;
40
+ font-style: normal;
41
+ font-weight: 400;
42
+ line-height: 20px;
43
+ color: var(--Base-Black, #000);
44
+ flex: 1;
45
+ }
46
+
47
+ .policy-wrap {
48
+ color: var(--theme-color, #7f56d9);
49
+ display: inline;
50
+ word-break: break-word;
51
+
52
+ .symbol {
53
+ color: var(--Base-Black, #000);
54
+ }
55
+ }
56
+ }
57
+ }
@@ -1,5 +1,6 @@
1
1
  export declare const useAppointmentBooking: () => any;
2
2
  export declare const useShopDiscount: () => any;
3
+ export declare const contextUtils: () => any;
3
4
  /**
4
5
  * @title: 监听步骤发生变化
5
6
  * @description:
@@ -9,6 +10,9 @@ export declare const useShopDiscount: () => any;
9
10
  */
10
11
  export declare const useAppointmentBookingStep: () => {
11
12
  getStepIndex: (type: string, skipNumber?: number) => any;
13
+ stepList: any;
14
+ removeStep: (key: string) => any;
15
+ addStep: (props: any, stepKey?: string) => any;
12
16
  };
13
17
  /**
14
18
  * @title: 获取商品数据
@@ -17,7 +21,10 @@ export declare const useAppointmentBookingStep: () => {
17
21
  * @Author: WangHan
18
22
  * @Date: 2025-04-15 11:12
19
23
  */
20
- export declare const useAppointmentBookingProduct: () => void;
24
+ export declare const useAppointmentBookingProduct: () => {
25
+ checkProductType: (productId: number) => Promise<any>;
26
+ getProducts: () => Promise<any>;
27
+ };
21
28
  /**
22
29
  * @title: 更新购物车数据
23
30
  * @description:
@@ -48,6 +55,10 @@ export declare const useAppointmentBookingLogin: () => {
48
55
  */
49
56
  export declare const useAppointmentBookingAccount: () => {
50
57
  accountLists: any;
58
+ getHolders: () => Promise<any>;
59
+ form_id: any;
60
+ addAccount: (val: any, type?: string) => Promise<any>;
61
+ checkAccount: (type: any) => any;
51
62
  };
52
63
  /**
53
64
  * @title: 获取资源数据
@@ -74,3 +85,20 @@ export declare const useAppointmentBookingResource: () => {
74
85
  export declare const useIsSkipResourceStep: () => {
75
86
  checkSkipResourceStep: () => Promise<boolean>;
76
87
  };
88
+ /**
89
+ * @title: 获取预约配置
90
+ * @description:
91
+ * @return {*}
92
+ * @Author: WangHan
93
+ * @Date: 2025-04-24 18:15
94
+ */
95
+ export declare const useAppointmentBookingSetting: () => {
96
+ isDateSelectedFirst: boolean;
97
+ isFormSubject: boolean;
98
+ customPageId: any;
99
+ getLoadAllSchedule: () => void;
100
+ bookingSubject: any;
101
+ setOtherData: (key: string, val: any) => any;
102
+ getOtherData: (key: string) => any;
103
+ formName: any;
104
+ };
@@ -29,12 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/appointmentBooking/hooks.ts
30
30
  var hooks_exports = {};
31
31
  __export(hooks_exports, {
32
+ contextUtils: () => contextUtils,
32
33
  useAppointmentBooking: () => useAppointmentBooking,
33
34
  useAppointmentBookingAccount: () => useAppointmentBookingAccount,
34
35
  useAppointmentBookingCart: () => useAppointmentBookingCart,
35
36
  useAppointmentBookingLogin: () => useAppointmentBookingLogin,
36
37
  useAppointmentBookingProduct: () => useAppointmentBookingProduct,
37
38
  useAppointmentBookingResource: () => useAppointmentBookingResource,
39
+ useAppointmentBookingSetting: () => useAppointmentBookingSetting,
38
40
  useAppointmentBookingStep: () => useAppointmentBookingStep,
39
41
  useIsSkipResourceStep: () => useIsSkipResourceStep,
40
42
  useShopDiscount: () => useShopDiscount
@@ -53,15 +55,26 @@ var useShopDiscount = () => {
53
55
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
54
56
  return pisellOS.getModule("shopDiscount");
55
57
  };
58
+ var contextUtils = () => {
59
+ var _a;
60
+ const context = (0, import_useEngineContext2.default)();
61
+ const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
62
+ return utils;
63
+ };
56
64
  var useAppointmentBookingStep = () => {
57
65
  var _a, _b, _c;
58
66
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
59
- const { appointmentBooking, setCurrentStep, setIsLastStep } = (0, import_context.useAppointmentBookingContext)();
67
+ const { appointmentBooking, setCurrentStep, setStepParams, stepParams } = (0, import_context.useAppointmentBookingContext)();
60
68
  const stepList = ((_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList) || [];
61
69
  const getCurrentAndLastStep = () => {
62
- const _currentStep = appointmentBooking.getCurrentStep();
63
- setCurrentStep(_currentStep);
64
- setIsLastStep((_currentStep == null ? void 0 : _currentStep.index) === stepList.length - 1);
70
+ const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
71
+ console.log("appointmentBooking_step:changed", currentStep);
72
+ setCurrentStep(currentStep);
73
+ setStepParams({
74
+ ...stepParams,
75
+ isLastStep: (currentStep == null ? void 0 : currentStep.index) === stepList.length - 1,
76
+ isTwoLastStep: (currentStep == null ? void 0 : currentStep.index) === stepList.length - 2
77
+ });
65
78
  };
66
79
  (0, import_react.useEffect)(() => {
67
80
  getCurrentAndLastStep();
@@ -69,13 +82,14 @@ var useAppointmentBookingStep = () => {
69
82
  "appointmentBooking_step:changed",
70
83
  async (res) => {
71
84
  if (res.path === "currentStep") {
85
+ console.log("appointmentBooking_step:changed", res);
72
86
  getCurrentAndLastStep();
73
87
  }
74
88
  }
75
89
  );
76
90
  }, []);
77
91
  const getStepIndex = (type, skipNumber = 0) => {
78
- const currentStep = appointmentBooking.getCurrentStep();
92
+ const currentStep = appointmentBooking == null ? void 0 : appointmentBooking.getCurrentStep();
79
93
  const index = (currentStep == null ? void 0 : currentStep.index) || 1;
80
94
  if (type === "next") {
81
95
  const nextIndex = index + skipNumber;
@@ -83,28 +97,72 @@ var useAppointmentBookingStep = () => {
83
97
  }
84
98
  if (type === "prev") {
85
99
  const prevIndex = index - skipNumber;
86
- return prevIndex < 1 ? 1 : prevIndex;
100
+ return prevIndex < 0 ? 0 : prevIndex;
87
101
  }
88
102
  };
89
- return { getStepIndex };
103
+ const removeStep = (key) => {
104
+ return appointmentBooking.removeStep(key);
105
+ };
106
+ const addStep = (props, stepKey) => {
107
+ const { index, key, description } = props;
108
+ return appointmentBooking.addStep({
109
+ index,
110
+ key,
111
+ description
112
+ }, stepKey);
113
+ };
114
+ return { getStepIndex, stepList, removeStep, addStep };
90
115
  };
91
116
  var useAppointmentBookingProduct = () => {
92
- const { appointmentBooking, setProducts } = (0, import_context.useAppointmentBookingContext)();
93
- const { productModuleParams } = appointmentBooking.otherParams;
94
- (0, import_react.useEffect)(() => {
95
- appointmentBooking.loadProducts(productModuleParams).then((res) => {
96
- setProducts(res || []);
97
- });
98
- }, []);
117
+ const { appointmentBooking, carts } = (0, import_context.useAppointmentBookingContext)();
118
+ const { productModuleParams } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
119
+ const { bookingProcess, bookingSubject } = productModuleParams || {};
120
+ const getProducts = async () => {
121
+ var _a;
122
+ await appointmentBooking.loadAllSchedule();
123
+ if (bookingProcess === "date_first") {
124
+ const dates = await appointmentBooking.getDateRange();
125
+ if (!dates || !dates.length) return;
126
+ const { productModuleParams: productModuleParams3 } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
127
+ const productList2 = await appointmentBooking.loadProductByScheduleDate({
128
+ date: (_a = dates[0]) == null ? void 0 : _a.date,
129
+ ...productModuleParams3
130
+ });
131
+ return productList2;
132
+ }
133
+ const { productModuleParams: productModuleParams2 } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
134
+ const productList = await appointmentBooking.loadProducts(
135
+ productModuleParams2
136
+ );
137
+ return productList;
138
+ };
139
+ const checkProductType = async (productId) => {
140
+ const result = await appointmentBooking.getProductTypeById(productId);
141
+ return result;
142
+ };
143
+ return { checkProductType, getProducts };
99
144
  };
100
145
  var useAppointmentBookingCart = () => {
146
+ var _a;
101
147
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
102
- const { appointmentBooking, setCarts, setSummary } = (0, import_context.useAppointmentBookingContext)();
148
+ const utils = contextUtils();
149
+ const { appointmentBooking, setCarts, setSummary, setIsAgreeDepositPolicy } = (0, import_context.useAppointmentBookingContext)();
150
+ const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
103
151
  const getCartAndSummary = async () => {
104
152
  const carts = await appointmentBooking.getCart();
105
- setCarts(carts || []);
153
+ console.log(carts, appointmentBooking, utils, "3khhsdjf");
154
+ const newCarts = carts == null ? void 0 : carts.map((item) => {
155
+ return {
156
+ ...item,
157
+ addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name)
158
+ };
159
+ });
160
+ setCarts(newCarts || []);
106
161
  const summary = await appointmentBooking.getSummary();
107
162
  setSummary(summary || {});
163
+ if (!carts.length) {
164
+ setIsAgreeDepositPolicy(false);
165
+ }
108
166
  console.log(carts, summary, "appointmentBooking_cart:changed");
109
167
  };
110
168
  (0, import_react.useEffect)(() => {
@@ -119,9 +177,9 @@ var useAppointmentBookingCart = () => {
119
177
  };
120
178
  var useAppointmentBookingLogin = () => {
121
179
  var _a, _b;
122
- const context = (0, import_useEngineContext2.default)();
123
- const utils = context.appHelper.utils || {};
180
+ const utils = contextUtils();
124
181
  const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
182
+ console.log(isLogin, "isLogin");
125
183
  const openLoginModal = (params) => {
126
184
  const { callback } = params || {};
127
185
  utils.action({
@@ -135,12 +193,16 @@ var useAppointmentBookingLogin = () => {
135
193
  return { isLogin, openLoginModal };
136
194
  };
137
195
  var useAppointmentBookingAccount = () => {
196
+ var _a;
197
+ const utils = contextUtils();
138
198
  const pisellOS = (0, import_useEngineContext.usePisellOS)();
139
199
  const appointmentBooking = useAppointmentBooking();
140
200
  const [accountLists, setAccountLists] = (0, import_react.useState)([]);
201
+ const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
202
+ const form_id = bookingSubject == null ? void 0 : bookingSubject.form_id;
203
+ const customer = (0, import_utils.getCustomer)();
141
204
  const getAccountLists = async () => {
142
205
  const data = await appointmentBooking.getAccounts();
143
- console.log("appointmentBooking_accountList:changed", data);
144
206
  setAccountLists(data || []);
145
207
  };
146
208
  (0, import_react.useEffect)(() => {
@@ -155,7 +217,35 @@ var useAppointmentBookingAccount = () => {
155
217
  }
156
218
  );
157
219
  }, []);
158
- return { accountLists };
220
+ const getHolders = async () => {
221
+ var _a2, _b, _c;
222
+ const shop_id = (_c = (_b = (_a2 = utils.getStore().getState()) == null ? void 0 : _a2.global) == null ? void 0 : _b.shop) == null ? void 0 : _c.id;
223
+ if (!shop_id || !form_id || !(customer == null ? void 0 : customer.id)) return [];
224
+ const params = {
225
+ url: "/form/data/v1",
226
+ query: {
227
+ customer_id: customer == null ? void 0 : customer.id,
228
+ form_id,
229
+ shop_id
230
+ }
231
+ };
232
+ const data = await appointmentBooking.fetchHolderAccountsAsync(params);
233
+ const newData = data == null ? void 0 : data.map((item) => {
234
+ return {
235
+ id: item == null ? void 0 : item.form_record_id,
236
+ label: item == null ? void 0 : item.main_field
237
+ };
238
+ });
239
+ return newData || [];
240
+ };
241
+ const addAccount = async (val, type) => {
242
+ const result = await appointmentBooking.addAccount(val, { type, customerId: customer == null ? void 0 : customer.id });
243
+ return result;
244
+ };
245
+ const checkAccount = (type) => {
246
+ return appointmentBooking.checkBeforeSubmitOrder(type);
247
+ };
248
+ return { accountLists, getHolders, form_id, addAccount, checkAccount };
159
249
  };
160
250
  var useAppointmentBookingResource = () => {
161
251
  const { appointmentBooking, setResources, setTimes, setResourceOtherParams, resourceOtherParams } = (0, import_context.useAppointmentBookingContext)();
@@ -172,6 +262,7 @@ var useAppointmentBookingResource = () => {
172
262
  const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
173
263
  const resourceCodes = _resources.map((item) => item.code);
174
264
  setResources(resources || []);
265
+ console.log(resourceCodes, resources, "getResourceList");
175
266
  return { resources, resourceCodes };
176
267
  };
177
268
  const getResourceTimeSlot = async (index) => {
@@ -195,12 +286,14 @@ var useAppointmentBookingResource = () => {
195
286
  return { getResourceTimeSlot, getResourceList, autoSelectAllProductResources };
196
287
  };
197
288
  var useIsSkipResourceStep = () => {
198
- const { accountLists } = useAppointmentBookingAccount();
289
+ const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
199
290
  const { getResourceList, autoSelectAllProductResources } = useAppointmentBookingResource();
291
+ const { isFormSubject } = useAppointmentBookingSetting();
200
292
  const checkSkipResourceStep = async () => {
201
293
  var _a, _b, _c, _d, _e;
202
294
  try {
203
- if ((accountLists == null ? void 0 : accountLists.length) === 1) {
295
+ const accountLists = await appointmentBooking.getAccounts();
296
+ if ((accountLists == null ? void 0 : accountLists.length) === 1 || isFormSubject) {
204
297
  const res = await autoSelectAllProductResources();
205
298
  const { resources } = getResourceList();
206
299
  if (!((_a = res == null ? void 0 : res.errorList) == null ? void 0 : _a.length) && ((_e = (_d = (_c = (_b = resources == null ? void 0 : resources[0]) == null ? void 0 : _b.resources) == null ? void 0 : _c[0]) == null ? void 0 : _d.renderList) == null ? void 0 : _e.length) === 1) {
@@ -217,14 +310,47 @@ var useIsSkipResourceStep = () => {
217
310
  };
218
311
  return { checkSkipResourceStep };
219
312
  };
313
+ var useAppointmentBookingSetting = () => {
314
+ var _a;
315
+ const utils = contextUtils();
316
+ const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
317
+ const { bookingProcess, bookingSubject, customPageId } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
318
+ const getLoadAllSchedule = () => {
319
+ const res = appointmentBooking.loadAllSchedule();
320
+ console.log(res, "loadAllSchedule");
321
+ };
322
+ const setOtherData = (key, val) => {
323
+ return appointmentBooking.setOtherData(key, val);
324
+ };
325
+ const getOtherData = (key) => {
326
+ return appointmentBooking.getOtherData(key);
327
+ };
328
+ const formName = (0, import_react.useMemo)(() => {
329
+ return utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name);
330
+ }, [bookingSubject]);
331
+ return {
332
+ // 是否先选择日期
333
+ isDateSelectedFirst: bookingProcess === "date_first",
334
+ // 主体是否是表单
335
+ isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
336
+ customPageId,
337
+ getLoadAllSchedule,
338
+ bookingSubject,
339
+ setOtherData,
340
+ getOtherData,
341
+ formName
342
+ };
343
+ };
220
344
  // Annotate the CommonJS export names for ESM import in node:
221
345
  0 && (module.exports = {
346
+ contextUtils,
222
347
  useAppointmentBooking,
223
348
  useAppointmentBookingAccount,
224
349
  useAppointmentBookingCart,
225
350
  useAppointmentBookingLogin,
226
351
  useAppointmentBookingProduct,
227
352
  useAppointmentBookingResource,
353
+ useAppointmentBookingSetting,
228
354
  useAppointmentBookingStep,
229
355
  useIsSkipResourceStep,
230
356
  useShopDiscount
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AppointmentBooking: () => JSX.Element;
4
3
  export default AppointmentBooking;
@@ -42,16 +42,18 @@ var import_hooks = require("./hooks");
42
42
  var import_utils2 = require("./utils");
43
43
  var import_index = require("./index.less");
44
44
  var AppointmentBooking = () => {
45
- var _a;
45
+ var _a, _b;
46
46
  const context = (0, import_useEngineContext.default)();
47
- const utils = context.appHelper.utils || {};
48
- import_utils.locales.init(import_locales.default, ((_a = utils == null ? void 0 : utils.storage) == null ? void 0 : _a.get("umi_locale")) || "en");
47
+ import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
49
48
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
50
49
  const currentUser = (0, import_utils2.formatCurrentUser)();
51
50
  (0, import_react.useEffect)(() => {
51
+ var _a2;
52
+ const { bookingSubject } = ((_a2 = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a2.productModuleParams) || {};
53
+ if ((bookingSubject == null ? void 0 : bookingSubject.type) === "form") return;
52
54
  appointmentBooking.getAccounts().then((data) => {
53
55
  if (!data.length) {
54
- appointmentBooking.addAccount([currentUser]);
56
+ appointmentBooking.addAccounts([currentUser]);
55
57
  }
56
58
  });
57
59
  }, []);
@@ -12,7 +12,7 @@ declare const _default: {
12
12
  'pisell2.event.close.tip': string;
13
13
  'pisell2.event.close.continue': string;
14
14
  'pisell2.event.close.exit': string;
15
- 'pisell2.event.step': (step: number) => string;
15
+ 'pisell2.appointment.step': (step: number) => string;
16
16
  'pisell2.event.select.category': (val: string) => string;
17
17
  'pisell2.event.select.campus': (val: string) => string;
18
18
  'pisell2.event.select.event': string;
@@ -70,6 +70,7 @@ declare const _default: {
70
70
  'pisell2.event.capacity.limit.reached.title': string;
71
71
  'pisell2.event.capacity.limit.reached.tip': string;
72
72
  'pisell2.appointment.booking.empty.service': string;
73
+ 'pisell2.appointment.booking.empty.data': string;
73
74
  'pisell2.appointment.booking.empty.time': string;
74
75
  'pisell2.appointment.service.title': (val: number) => string;
75
76
  'pisell2.appointment.add.guest': string;
@@ -87,6 +88,21 @@ declare const _default: {
87
88
  'pisell2.appointment.sunday': string;
88
89
  'pisell2.appointment.any.professional': string;
89
90
  'pisell2.appointment.for.maximum.availability': string;
91
+ 'pisell2.appointment.deposit': string;
92
+ 'pisell2.appointment.deposit.agreed': string;
93
+ 'pisell2.appointment.deposit.agree.policy': string;
94
+ 'pisell2.appointment.deposit.and': string;
95
+ 'pisell2.appointment.deposit.amount.tip1': string;
96
+ 'pisell2.appointment.deposit.amount.tip2': string;
97
+ 'pisell2.appointment.deposit.close': string;
98
+ 'pisell2.appointment.tips': string;
99
+ 'pisell2.appointment.tips.content': string;
100
+ 'pisell2.appointment.fill-form': string;
101
+ 'pisell2.appointment.select.holder': (val: string) => string;
102
+ 'pisell2.appointment.select.time': string;
103
+ 'pisell2.appointment.unselect.time': string;
104
+ 'pisell2.appointment.unselect.date': string;
105
+ 'pisell2.appointment.add-guests': string;
90
106
  'pisell2.text.apply': string;
91
107
  'pisell2.text.goodpass': string;
92
108
  'pisell2.text.goodpass.product-vouchers': string;
@@ -110,7 +126,7 @@ declare const _default: {
110
126
  'pisell2.event.close.tip': string;
111
127
  'pisell2.event.close.continue': string;
112
128
  'pisell2.event.close.exit': string;
113
- 'pisell2.event.step': (step: number) => string;
129
+ 'pisell2.appointment.step': (step: number) => string;
114
130
  'pisell2.event.select.category': (val: string) => string;
115
131
  'pisell2.event.select.event': string;
116
132
  'pisell2.event.select.campus': (val: string) => string;
@@ -168,6 +184,7 @@ declare const _default: {
168
184
  'pisell2.event.capacity.limit.reached.title': string;
169
185
  'pisell2.event.capacity.limit.reached.tip': string;
170
186
  'pisell2.appointment.booking.empty.service': string;
187
+ 'pisell2.appointment.booking.empty.data': string;
171
188
  'pisell2.appointment.booking.empty.time': string;
172
189
  'pisell2.appointment.service.title': (val: number) => string;
173
190
  'pisell2.appointment.add.guest': string;
@@ -185,6 +202,21 @@ declare const _default: {
185
202
  'pisell2.appointment.sunday': string;
186
203
  'pisell2.appointment.any.professional': string;
187
204
  'pisell2.appointment.for.maximum.availability': string;
205
+ 'pisell2.appointment.deposit': string;
206
+ 'pisell2.appointment.deposit.agreed': string;
207
+ 'pisell2.appointment.deposit.agree.policy': string;
208
+ 'pisell2.appointment.deposit.and': string;
209
+ 'pisell2.appointment.deposit.amount.tip1': string;
210
+ 'pisell2.appointment.deposit.amount.tip2': string;
211
+ 'pisell2.appointment.deposit.close': string;
212
+ 'pisell2.appointment.tips': string;
213
+ 'pisell2.appointment.tips.content': string;
214
+ 'pisell2.appointment.fill-form': string;
215
+ 'pisell2.appointment.select.holder': (val: string) => string;
216
+ 'pisell2.appointment.select.time': string;
217
+ 'pisell2.appointment.unselect.time': string;
218
+ 'pisell2.appointment.unselect.date': string;
219
+ 'pisell2.appointment.add-guests': string;
188
220
  'pisell2.text.apply': string;
189
221
  'pisell2.text.goodpass': string;
190
222
  'pisell2.text.goodpass.product-vouchers': string;
@@ -208,7 +240,7 @@ declare const _default: {
208
240
  'pisell2.event.close.tip': string;
209
241
  'pisell2.event.close.continue': string;
210
242
  'pisell2.event.close.exit': string;
211
- 'pisell2.event.step': (step: number) => string;
243
+ 'pisell2.appointment.step': (step: number) => string;
212
244
  'pisell2.event.select.category': (val: string) => string;
213
245
  'pisell2.event.select.event': string;
214
246
  'pisell2.event.select.campus': (val: string) => string;
@@ -266,6 +298,7 @@ declare const _default: {
266
298
  'pisell2.event.capacity.limit.reached.title': string;
267
299
  'pisell2.event.capacity.limit.reached.tip': string;
268
300
  'pisell2.appointment.booking.empty.service': string;
301
+ 'pisell2.appointment.booking.empty.data': string;
269
302
  'pisell2.appointment.booking.empty.time': string;
270
303
  'pisell2.appointment.service.title': (val: number) => string;
271
304
  'pisell2.appointment.add.guest': string;
@@ -283,6 +316,21 @@ declare const _default: {
283
316
  'pisell2.appointment.sunday': string;
284
317
  'pisell2.appointment.any.professional': string;
285
318
  'pisell2.appointment.for.maximum.availability': string;
319
+ 'pisell2.appointment.deposit': string;
320
+ 'pisell2.appointment.deposit.agreed': string;
321
+ 'pisell2.appointment.deposit.agree.policy': string;
322
+ 'pisell2.appointment.deposit.and': string;
323
+ 'pisell2.appointment.deposit.amount.tip1': string;
324
+ 'pisell2.appointment.deposit.amount.tip2': string;
325
+ 'pisell2.appointment.deposit.close': string;
326
+ 'pisell2.appointment.tips': string;
327
+ 'pisell2.appointment.tips.content': string;
328
+ 'pisell2.appointment.fill-form': string;
329
+ 'pisell2.appointment.select.holder': (val: string) => string;
330
+ 'pisell2.appointment.select.time': string;
331
+ 'pisell2.appointment.unselect.time': string;
332
+ 'pisell2.appointment.unselect.date': string;
333
+ 'pisell2.appointment.add-guests': string;
286
334
  'pisell2.text.apply': string;
287
335
  'pisell2.text.goodpass': string;
288
336
  'pisell2.text.goodpass.product-vouchers': string;