@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
@@ -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;
@@ -8,16 +8,21 @@ import { useAppointmentBooking } from "./hooks";
8
8
  import { formatCurrentUser } from "./utils";
9
9
  import "./index.less";
10
10
  var AppointmentBooking = function AppointmentBooking() {
11
- var _utils$storage;
11
+ var _context$engine;
12
12
  var context = useEngineContext();
13
- var utils = context.appHelper.utils || {};
14
- locales.init(localeTexts, (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en');
13
+ locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
15
14
  var appointmentBooking = useAppointmentBooking();
16
15
  var currentUser = formatCurrentUser();
17
16
  useEffect(function () {
17
+ var _appointmentBooking$o;
18
+ var _ref = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o = appointmentBooking.otherParams) === null || _appointmentBooking$o === void 0 ? void 0 : _appointmentBooking$o.productModuleParams) || {},
19
+ bookingSubject = _ref.bookingSubject;
20
+
21
+ // 预约主体是表单则不需要添加账户
22
+ if ((bookingSubject === null || bookingSubject === void 0 ? void 0 : bookingSubject.type) === 'form') return;
18
23
  appointmentBooking.getAccounts().then(function (data) {
19
24
  if (!data.length) {
20
- appointmentBooking.addAccount([currentUser]);
25
+ appointmentBooking.addAccounts([currentUser]);
21
26
  }
22
27
  });
23
28
  }, []);
@@ -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;
@@ -12,7 +12,7 @@ export default {
12
12
  'pisell2.event.close.tip': "All entered information will be lost. Are you sure you want to exit?",
13
13
  'pisell2.event.close.continue': "Continue",
14
14
  'pisell2.event.close.exit': "Exit",
15
- 'pisell2.event.step': function pisell2EventStep(step) {
15
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
16
16
  return "Step ".concat(step);
17
17
  },
18
18
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -82,6 +82,7 @@ export default {
82
82
  'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
83
83
  'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
84
84
  'pisell2.appointment.booking.empty.service': 'No service',
85
+ 'pisell2.appointment.booking.empty.data': 'No data',
85
86
  'pisell2.appointment.booking.empty.time': 'No time',
86
87
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
87
88
  return "".concat(val, " ").concat(val > 1 ? 'services' : 'service');
@@ -99,8 +100,25 @@ export default {
99
100
  'pisell2.appointment.friday': 'Fri',
100
101
  'pisell2.appointment.saturday': 'Sat',
101
102
  'pisell2.appointment.sunday': 'Sun',
102
- 'pisell2.appointment.any.professional': 'Any professional',
103
+ 'pisell2.appointment.any.professional': 'No preference',
103
104
  'pisell2.appointment.for.maximum.availability': 'for maximum availability',
105
+ 'pisell2.appointment.deposit': 'Deposit',
106
+ 'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
107
+ 'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
108
+ 'pisell2.appointment.deposit.and': ' & ',
109
+ 'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
110
+ 'pisell2.appointment.deposit.amount.tip2': ' ',
111
+ 'pisell2.appointment.deposit.close': 'Close',
112
+ 'pisell2.appointment.tips': 'Tips',
113
+ 'pisell2.appointment.tips.content': "Please carefully review the items in your shopping cart and click the \"Checkout\" button below to proceed with the payment.",
114
+ 'pisell2.appointment.fill-form': 'Enter your details',
115
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
116
+ return "Please select ".concat(val);
117
+ },
118
+ 'pisell2.appointment.select.time': 'Select time',
119
+ 'pisell2.appointment.unselect.time': 'No times available. Go back',
120
+ 'pisell2.appointment.unselect.date': 'Please select date',
121
+ 'pisell2.appointment.add-guests': 'Add guests',
104
122
  'pisell2.text.apply': 'Apply',
105
123
  'pisell2.text.goodpass': "GoodPass",
106
124
  'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
@@ -124,7 +142,7 @@ export default {
124
142
  'pisell2.event.close.tip': "退出后将丢失所有已填写的信息,确定要退出吗?",
125
143
  'pisell2.event.close.continue': "继续",
126
144
  'pisell2.event.close.exit': "退出",
127
- 'pisell2.event.step': function pisell2EventStep(step) {
145
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
128
146
  return "\u6B65\u9AA4 ".concat(step);
129
147
  },
130
148
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -194,6 +212,7 @@ export default {
194
212
  'pisell2.event.capacity.limit.reached.title': '活动名额已满',
195
213
  'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
196
214
  'pisell2.appointment.booking.empty.service': '暂无服务',
215
+ 'pisell2.appointment.booking.empty.data': '暂无数据',
197
216
  'pisell2.appointment.booking.empty.time': '暂无时间',
198
217
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
199
218
  return "".concat(val, "\u4E2A\u670D\u52A1");
@@ -213,6 +232,23 @@ export default {
213
232
  'pisell2.appointment.sunday': '周日',
214
233
  'pisell2.appointment.any.professional': '随机分配',
215
234
  'pisell2.appointment.for.maximum.availability': '立即匹配',
235
+ 'pisell2.appointment.deposit': '定金',
236
+ 'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
237
+ 'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
238
+ 'pisell2.appointment.deposit.and': ' 和 ',
239
+ 'pisell2.appointment.deposit.amount.tip1': '请支付 ',
240
+ 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
241
+ 'pisell2.appointment.deposit.close': '关闭',
242
+ 'pisell2.appointment.tips': '提示',
243
+ 'pisell2.appointment.tips.content': "\u8BF7\u4ED4\u7EC6\u67E5\u770B\u8D2D\u7269\u8F66\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u540E\u70B9\u51FB\u4E0B\u9762\u7684\u201C\u7ED3\u7B97\u201D\u6309\u94AE\u7EE7\u7EED\u4ED8\u6B3E\u3002",
244
+ 'pisell2.appointment.fill-form': '填写信息',
245
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
246
+ return "\u8BF7\u9009\u62E9".concat(val);
247
+ },
248
+ 'pisell2.appointment.select.time': '选择时间',
249
+ 'pisell2.appointment.unselect.time': '无可用时间,请返回',
250
+ 'pisell2.appointment.unselect.date': '请选择日期',
251
+ 'pisell2.appointment.add-guests': '添加预约人',
216
252
  'pisell2.text.apply': '应用',
217
253
  'pisell2.text.goodpass': "商品券",
218
254
  'pisell2.text.goodpass.product-vouchers': "商品兑换券",
@@ -236,7 +272,7 @@ export default {
236
272
  'pisell2.event.close.tip': "退出後將丟失所有已填寫的信息,確定要退出嗎?",
237
273
  'pisell2.event.close.continue': "繼續",
238
274
  'pisell2.event.close.exit': "退出",
239
- 'pisell2.event.step': function pisell2EventStep(step) {
275
+ 'pisell2.appointment.step': function pisell2AppointmentStep(step) {
240
276
  return "\u6B65\u9A5F ".concat(step);
241
277
  },
242
278
  'pisell2.event.select.category': function pisell2EventSelectCategory(val) {
@@ -306,6 +342,7 @@ export default {
306
342
  'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
307
343
  'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
308
344
  'pisell2.appointment.booking.empty.service': '暫無服務',
345
+ 'pisell2.appointment.booking.empty.data': '暫無數據',
309
346
  'pisell2.appointment.booking.empty.time': '暫無時間',
310
347
  'pisell2.appointment.service.title': function pisell2AppointmentServiceTitle(val) {
311
348
  return "".concat(val, "\u4E2A\u670D\u52D9");
@@ -325,6 +362,23 @@ export default {
325
362
  'pisell2.appointment.sunday': '周日',
326
363
  'pisell2.appointment.any.professional': '隨機分配',
327
364
  'pisell2.appointment.for.maximum.availability': '立即匹配',
365
+ 'pisell2.appointment.deposit': '定金',
366
+ 'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
367
+ 'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
368
+ 'pisell2.appointment.deposit.and': ' 和 ',
369
+ 'pisell2.appointment.deposit.amount.tip1': '請支付 ',
370
+ 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
371
+ 'pisell2.appointment.deposit.close': '关闭',
372
+ 'pisell2.appointment.tips': '提示',
373
+ 'pisell2.appointment.tips.content': "\u8ACB\u4ED4\u7D30\u67E5\u770B\u8CFC\u7269\u8ECA\u4E2D\u7684\u5546\u54C1\uFF0C\u7136\u5F8C\u9EDE\u64CA\u4E0B\u9762\u7684\"\u7D50\u7B97\"\u6309\u9215\u7E7C\u7E8C\u4ED8\u6B3E\u3002",
374
+ 'pisell2.appointment.fill-form': '填寫資訊',
375
+ 'pisell2.appointment.select.holder': function pisell2AppointmentSelectHolder(val) {
376
+ return "\u8ACB\u9078\u64C7".concat(val);
377
+ },
378
+ 'pisell2.appointment.select.time': '選擇時間',
379
+ 'pisell2.appointment.unselect.time': '無可用時間,請返回',
380
+ 'pisell2.appointment.unselect.date': '請選擇日期',
381
+ 'pisell2.appointment.add-guests': '添加預約人',
328
382
  'pisell2.text.apply': '應用',
329
383
  'pisell2.text.goodpass': "商品券",
330
384
  'pisell2.text.goodpass.product-vouchers': "商品兌換券",
@@ -45,7 +45,7 @@ export declare const formatMonthDisplay: (dateString: string) => string;
45
45
  export declare const resourceTitle: (data: any) => any;
46
46
  export declare const formatHolder: (data: any[]) => any[];
47
47
  export declare const formatGuest: (data: any[], products: any) => any[];
48
- export declare const formatCarts: (data: any[], resources: any[]) => any[];
48
+ export declare const formatCarts: (data: any[], resources: any[], accountLists?: any) => any[];
49
49
  /**
50
50
  * @title: 对资源进行排序
51
51
  * @description:
@@ -57,6 +57,7 @@ export declare const formatCarts: (data: any[], resources: any[]) => any[];
57
57
  */
58
58
  export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
59
59
  export declare const getMeAccount: (val: any[]) => any;
60
+ export declare const getCustomer: () => any;
60
61
  export declare const formatCustomer: (val: any) => {
61
62
  id: any;
62
63
  username: string;
@@ -84,3 +85,67 @@ export declare const isEmptyGuest: (carts: any[], accounts: any[]) => boolean;
84
85
  * @Date: 2025-04-15 21:51
85
86
  */
86
87
  export declare const isEmptyCartsResourceId: (carts: any[]) => boolean;
88
+ /**
89
+ * @title: 定金合并的标点符号
90
+ * @description:
91
+ * @return {*}
92
+ * @Author: WangHan
93
+ * @Date: 2025-04-21 17:52
94
+ */
95
+ export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
96
+ /**
97
+ * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
98
+ * @description:
99
+ * @param {any} array
100
+ * @param {any} resources
101
+ * @return {*}
102
+ * @Author: WangHan
103
+ * @Date: 2025-04-25 19:05
104
+ */
105
+ export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
106
+ export declare const formatForms: (array: any[]) => ({
107
+ form_id: any;
108
+ policy_id: any;
109
+ id: any;
110
+ cart_id: any;
111
+ } | null)[];
112
+ /**
113
+ * @title: 打开表单
114
+ * @description:
115
+ * @param {string} title
116
+ * @param {any} callback
117
+ * @return {*}
118
+ * @Author: WangHan
119
+ * @Date: 2025-04-26 15:26
120
+ */
121
+ export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
122
+ /**
123
+ * @title: 更新数组
124
+ * @description:
125
+ * @return {*}
126
+ * @Author: WangHan
127
+ * @Date: 2025-04-26 18:13
128
+ */
129
+ export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
130
+ /**
131
+ * @title: 检查表单是否有未完成或错误
132
+ * @description:
133
+ * @param {any} formStatus
134
+ * @param {any} formLists
135
+ * @return {*}
136
+ * @Author: WangHan
137
+ * @Date: 2025-04-26 18:52
138
+ */
139
+ export declare function hasFormError(formStatus: any[], formLists: any[]): boolean;
140
+ /**
141
+ * @title: 更新表单存储
142
+ * @description:
143
+ * @param {any} bookingForm
144
+ * @param {number} id
145
+ * @param {any} newData
146
+ * @return {*}
147
+ * @Author: WangHan
148
+ * @Date: 2025-04-27 17:27
149
+ */
150
+ export declare const updateBookingFormStorage: (bookingForm: any, id: number, newData: any) => any;
151
+ export declare const Toast: (text: string) => void;
@@ -1,4 +1,8 @@
1
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2
6
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
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); }
4
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; }
@@ -8,7 +12,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
8
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
13
  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
14
  import dayjs from 'dayjs';
11
- import { getUniqueId } from "@pisell/utils";
15
+ import { getUniqueId, locales } from "@pisell/utils";
16
+ import { PisellToast } from '@pisell/materials';
12
17
  import useEngineContext from "../../hooks/useEngineContext";
13
18
 
14
19
  /**
@@ -132,35 +137,42 @@ export var formatGuest = function formatGuest(data, products) {
132
137
  });
133
138
  });
134
139
  };
135
- export var formatCarts = function formatCarts(data, resources) {
136
- var _utils$storage2;
137
- var context = useEngineContext();
138
- var utils = context.appHelper.utils || {};
139
- var locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
140
- var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
141
- console.log(data, resources, 'formatCartsformatCarts');
142
- return data === null || data === void 0 ? void 0 : data.map(function (d) {
143
- var _currentResource$reso, _currentResources;
144
- var currentResource = resources.find(function (r) {
145
- return (d === null || d === void 0 ? void 0 : d._id) === (r === null || r === void 0 ? void 0 : r._id);
146
- });
147
- var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
148
- currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
140
+ export var formatCarts = function formatCarts(data, resources, accountLists) {
141
+ try {
142
+ var _utils$storage2;
143
+ var context = useEngineContext();
144
+ var utils = context.appHelper.utils || {};
145
+ var locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
146
+ var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
147
+ console.log(data, resources, 'wh9786876');
148
+ return data === null || data === void 0 ? void 0 : data.map(function (d) {
149
+ var _currentResource$reso, _currentResources, _d$duration;
150
+ var currentResource = resources === null || resources === void 0 ? void 0 : resources.find(function (r) {
151
+ return (d === null || d === void 0 ? void 0 : d._id) === (r === null || r === void 0 ? void 0 : r._id);
152
+ });
153
+ var currentResources = currentResource === null || currentResource === void 0 || (_currentResource$reso = currentResource.resources) === null || _currentResource$reso === void 0 || (_currentResource$reso = _currentResource$reso[0]) === null || _currentResource$reso === void 0 ? void 0 : _currentResource$reso.renderList;
154
+ currentResources = (_currentResources = currentResources) === null || _currentResources === void 0 ? void 0 : _currentResources.map(function (d) {
155
+ return _objectSpread(_objectSpread({}, d), {}, {
156
+ label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
157
+ });
158
+ });
149
159
  return _objectSpread(_objectSpread({}, d), {}, {
150
- label: (d === null || d === void 0 ? void 0 : d.main_field) || (d === null || d === void 0 ? void 0 : d.id)
160
+ format: ['HH:mm', 'HH:mm'],
161
+ show_time: true,
162
+ duration_type: (d === null || d === void 0 || (_d$duration = d.duration) === null || _d$duration === void 0 ? void 0 : _d$duration.type) || 'minutes',
163
+ locale: locale,
164
+ symbol: symbol,
165
+ resources: currentResources,
166
+ is_hide_like: true,
167
+ holders: formatHolder(accountLists),
168
+ allowClearHolder: true,
169
+ allowClearResource: true
151
170
  });
152
171
  });
153
- return _objectSpread(_objectSpread({}, d), {}, {
154
- format: ['HH:mm', 'HH:mm'],
155
- show_time: true,
156
- duration_type: d.duration.type,
157
- locale: locale,
158
- symbol: symbol,
159
- resources: currentResources,
160
- is_hide_like: true,
161
- holder_title: ''
162
- });
163
- });
172
+ } catch (error) {
173
+ console.log(error, 'formatCarts');
174
+ return [];
175
+ }
164
176
  };
165
177
 
166
178
  /**
@@ -206,6 +218,15 @@ export var getMeAccount = function getMeAccount(val) {
206
218
  return !(d !== null && d !== void 0 && d.isGuest);
207
219
  });
208
220
  };
221
+ export var getCustomer = function getCustomer() {
222
+ var _utils$getStore$getSt, _userInfo;
223
+ var context = useEngineContext();
224
+ var utils = context.appHelper.utils || {};
225
+ var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
226
+ var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
227
+ userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
228
+ return userInfo;
229
+ };
209
230
  export var formatCustomer = function formatCustomer(val) {
210
231
  var currentUserName = "".concat((val === null || val === void 0 ? void 0 : val.first_name) || '').concat(val !== null && val !== void 0 && val.last_name ? " ".concat(val === null || val === void 0 ? void 0 : val.last_name) : '');
211
232
  currentUserName = currentUserName || (val === null || val === void 0 ? void 0 : val.nickname) || 'Me';
@@ -215,12 +236,7 @@ export var formatCustomer = function formatCustomer(val) {
215
236
  };
216
237
  };
217
238
  export var formatCurrentUser = function formatCurrentUser() {
218
- var _utils$getStore$getSt, _userInfo;
219
- var context = useEngineContext();
220
- var utils = context.appHelper.utils || {};
221
- var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
222
- var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
223
- userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
239
+ var userInfo = getCustomer();
224
240
  var customer = formatCustomer(userInfo);
225
241
  return customer;
226
242
  };
@@ -280,4 +296,181 @@ export var isEmptyCartsResourceId = function isEmptyCartsResourceId(carts) {
280
296
  });
281
297
  console.log(isEmptyResourceId, 'isEmptyResourceId');
282
298
  return isEmptyResourceId;
299
+ };
300
+
301
+ /**
302
+ * @title: 定金合并的标点符号
303
+ * @description:
304
+ * @return {*}
305
+ * @Author: WangHan
306
+ * @Date: 2025-04-21 17:52
307
+ */
308
+ export var getPunctuationMark = function getPunctuationMark(index, totalLength, isEn) {
309
+ var isLastItem = index === totalLength - 1;
310
+ var isSecondLastItem = index === totalLength - 2;
311
+ if (isLastItem) {
312
+ return isEn ? '.' : '。';
313
+ }
314
+ if (isSecondLastItem) {
315
+ return locales.getText('pisell2.appointment.deposit.and');
316
+ }
317
+ return isEn ? ', ' : '、';
318
+ };
319
+
320
+ /**
321
+ * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
322
+ * @description:
323
+ * @param {any} array
324
+ * @param {any} resources
325
+ * @return {*}
326
+ * @Author: WangHan
327
+ * @Date: 2025-04-25 19:05
328
+ */
329
+ export var hasResourceFormId = function hasResourceFormId(array) {
330
+ try {
331
+ if (!(array !== null && array !== void 0 && array.length)) {
332
+ return false;
333
+ }
334
+
335
+ // 检查数组中的任何一个 resource_id 是否满足条件
336
+ return array.some(function (item) {
337
+ var _item$resources;
338
+ // 获取当前项的 resource_id
339
+ var resourceId = item.resource_id;
340
+
341
+ // 在 resources 中查找匹配的项
342
+ var foundResource = item === null || item === void 0 || (_item$resources = item.resources) === null || _item$resources === void 0 ? void 0 : _item$resources.find(function (resource) {
343
+ return resource.id === resourceId;
344
+ });
345
+ console.log(foundResource, item, 'foundResource');
346
+ // 如果找到匹配项并且其 resource_form_id 存在且有值
347
+ return foundResource && foundResource.resource_form_id;
348
+ });
349
+ } catch (error) {
350
+ console.log(error, 'hasResourceFormId');
351
+ }
352
+ };
353
+ export var formatForms = function formatForms(array) {
354
+ try {
355
+ if (!(array !== null && array !== void 0 && array.length)) {
356
+ return [];
357
+ }
358
+ var mappedResources = array.map(function (item) {
359
+ var _item$resources2;
360
+ // 在 resources 中查找匹配的项
361
+ var foundResource = item === null || item === void 0 || (_item$resources2 = item.resources) === null || _item$resources2 === void 0 ? void 0 : _item$resources2.find(function (resource) {
362
+ return resource.id === item.resource_id;
363
+ });
364
+ if (foundResource && (foundResource !== null && foundResource !== void 0 && foundResource.resource_form_id || foundResource !== null && foundResource !== void 0 && foundResource.policy_id)) {
365
+ return {
366
+ form_id: foundResource.resource_form_id,
367
+ policy_id: foundResource.policy_id,
368
+ id: foundResource === null || foundResource === void 0 ? void 0 : foundResource.id,
369
+ cart_id: item === null || item === void 0 ? void 0 : item._id
370
+ };
371
+ }
372
+ return null;
373
+ }).filter(Boolean);
374
+ return mappedResources;
375
+ } catch (error) {
376
+ console.log(error, 'hasResourceFormId');
377
+ return [];
378
+ }
379
+ };
380
+
381
+ /**
382
+ * @title: 打开表单
383
+ * @description:
384
+ * @param {string} title
385
+ * @param {any} callback
386
+ * @return {*}
387
+ * @Author: WangHan
388
+ * @Date: 2025-04-26 15:26
389
+ */
390
+ export var openForm = function openForm(_ref) {
391
+ var form_id = _ref.form_id,
392
+ title = _ref.title,
393
+ callback = _ref.callback,
394
+ utils = _ref.utils;
395
+ utils.action({
396
+ type: 'pisell1.form',
397
+ data: {
398
+ form_id: form_id,
399
+ form_title: title,
400
+ isV2API: true
401
+ },
402
+ callback: callback
403
+ });
404
+ };
405
+
406
+ /**
407
+ * @title: 更新数组
408
+ * @description:
409
+ * @return {*}
410
+ * @Author: WangHan
411
+ * @Date: 2025-04-26 18:13
412
+ */
413
+ export function updateLists(list, key, value, newData) {
414
+ var idx = list.findIndex(function (item) {
415
+ return item[key] === value;
416
+ });
417
+ if (idx > -1) {
418
+ // 存在则合并更新
419
+ var updated = _objectSpread(_objectSpread({}, list[idx]), newData);
420
+ var newList = _toConsumableArray(list);
421
+ newList[idx] = updated;
422
+ return newList;
423
+ } else {
424
+ // 不存在则添加
425
+ return [].concat(_toConsumableArray(list), [_objectSpread(_objectSpread({}, newData), {}, _defineProperty({}, key, value))]);
426
+ }
427
+ }
428
+
429
+ /**
430
+ * @title: 检查表单是否有未完成或错误
431
+ * @description:
432
+ * @param {any} formStatus
433
+ * @param {any} formLists
434
+ * @return {*}
435
+ * @Author: WangHan
436
+ * @Date: 2025-04-26 18:52
437
+ */
438
+ export function hasFormError(formStatus, formLists) {
439
+ if (formStatus.length !== formLists.length) return true;
440
+ return formStatus.some(function (item) {
441
+ return item.status === 'error';
442
+ });
443
+ }
444
+
445
+ /**
446
+ * @title: 更新表单存储
447
+ * @description:
448
+ * @param {any} bookingForm
449
+ * @param {number} id
450
+ * @param {any} newData
451
+ * @return {*}
452
+ * @Author: WangHan
453
+ * @Date: 2025-04-27 17:27
454
+ */
455
+ export var updateBookingFormStorage = function updateBookingFormStorage(bookingForm, id, newData) {
456
+ // 浅拷贝,避免直接修改原对象
457
+ var newBookingForm = _objectSpread({}, bookingForm);
458
+ if (newBookingForm[id]) {
459
+ // 已存在,合并更新
460
+ newBookingForm[id] = _objectSpread(_objectSpread({}, newBookingForm[id]), newData);
461
+ } else {
462
+ // 不存在,直接添加
463
+ newBookingForm[id] = _objectSpread({}, newData);
464
+ }
465
+ return newBookingForm;
466
+ };
467
+ export var Toast = function Toast(text) {
468
+ try {
469
+ PisellToast({
470
+ content: text
471
+ });
472
+ } catch (error) {
473
+ var _window;
474
+ (_window = window) === null || _window === void 0 || _window.alert(text);
475
+ }
283
476
  };