@pisell/private-materials 6.4.55 → 6.4.57

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 (448) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  12. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  16. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  17. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  18. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  19. package/es/components/booking/components/actionButtons/index.js +15 -7
  20. package/es/components/booking/components/footer/amount.js +1 -1
  21. package/es/components/booking/components/footer/index.js +2 -2
  22. package/es/components/booking/components/footer/utils.js +8 -1
  23. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  24. package/es/components/booking/components/voucher/index.js +23 -19
  25. package/es/components/booking/forms/footer.d.ts +0 -1
  26. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  27. package/es/components/booking/forms/single/index.d.ts +0 -1
  28. package/es/components/booking/info2/cartClientCard/index.js +7 -3
  29. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  30. package/es/components/checkout/PaymentModal.js +34 -28
  31. package/es/components/checkout/hooks/useWalletPass.js +36 -21
  32. package/es/components/eftpos/form/index.d.ts +0 -1
  33. package/es/components/eftpos/hooks.d.ts +0 -1
  34. package/es/components/eftpos/index.d.ts +0 -1
  35. package/es/components/eftpos/pos.d.ts +0 -1
  36. package/es/components/eftposPay/amount.d.ts +0 -1
  37. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  38. package/es/components/eftposPay/component/fail/index.d.ts +0 -1
  39. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  40. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  41. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  42. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  43. package/es/components/eftposPay/hooks.d.ts +1 -1
  44. package/es/components/eftposPay/pay.d.ts +0 -1
  45. package/es/components/eftposPay/store/index.d.ts +2 -2
  46. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  47. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  48. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  49. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  50. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  51. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  52. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  53. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  54. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  55. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  56. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  57. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  59. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  60. package/es/components/list/List.js +957 -0
  61. package/es/components/list/List.less +2 -0
  62. package/es/components/list/ResponsiveWrapper.js +130 -0
  63. package/es/components/list/TestResponsiveWrapper.js +816 -0
  64. package/es/components/list/TestResponsiveWrapper.less +968 -0
  65. package/es/components/list/components/EmptyState/EmptyState.js +75 -0
  66. package/es/components/list/components/EmptyState/EmptyState.less +121 -0
  67. package/es/components/list/components/EmptyState/index.js +1 -0
  68. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
  69. package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  70. package/es/components/list/components/ListItemSkeleton/index.js +2 -0
  71. package/es/components/list/components/Pagination/Pagination.js +240 -0
  72. package/es/components/list/components/Pagination/Pagination.less +439 -0
  73. package/es/components/list/components/Pagination/index.js +1 -0
  74. package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
  75. package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  76. package/es/components/list/components/ScrollLoader/index.js +1 -0
  77. package/es/components/list/components/Tab/Tab.js +43 -0
  78. package/es/components/list/components/Tab/Tab.less +139 -0
  79. package/es/components/list/components/Tab/index.js +1 -0
  80. package/es/components/list/components/Tab/types.js +1 -0
  81. package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
  82. package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  83. package/es/components/list/components/TabSkeleton/index.js +2 -0
  84. package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
  85. package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
  86. package/es/components/list/components/WaterfallList/index.js +1 -0
  87. package/es/components/list/examples/GroupedListExample.js +207 -0
  88. package/es/components/list/hooks/index.js +3 -0
  89. package/es/components/list/hooks/useDevice.js +102 -0
  90. package/es/components/list/hooks/useListState.js +176 -0
  91. package/es/components/list/hooks/useWaterfall.js +161 -0
  92. package/es/components/list/index.js +7 -0
  93. package/es/components/list/locales.js +107 -0
  94. package/es/components/list/styles/base.less +39 -0
  95. package/es/components/list/styles/content.less +416 -0
  96. package/es/components/list/styles/floatButton.less +107 -0
  97. package/es/components/list/styles/footer.less +49 -0
  98. package/es/components/list/styles/header.less +69 -0
  99. package/es/components/list/styles/responsive.less +166 -0
  100. package/es/components/list/types.js +1 -0
  101. package/es/components/list/utils/getText.js +150 -0
  102. package/es/components/list/utils/index.js +5 -0
  103. package/es/components/pay/toB/store/hooks.js +19 -5
  104. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  105. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  106. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  107. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  108. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  109. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  110. package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  111. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  112. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  113. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  114. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  115. package/es/components/schedules/products/index.d.ts +0 -1
  116. package/es/components/schedules/resources/index.d.ts +0 -1
  117. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  118. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  119. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  120. package/es/components/schedules/schedules/index.d.ts +0 -1
  121. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  122. package/es/components/shoppingCart/index.d.ts +0 -1
  123. package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
  124. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
  125. package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  126. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
  127. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
  128. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  129. package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -11
  130. package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
  131. package/es/components/ticketBooking/components/menuBar/index.js +40 -17
  132. package/es/components/ticketBooking/components/menuBar/index.less +27 -1
  133. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
  134. package/es/components/ticketBooking/components/ticketBooking/index.js +66 -23
  135. package/es/components/ticketBooking/components/timeBar/index.less +1 -0
  136. package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
  137. package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
  138. package/es/components/ticketBooking/context/index.js +2 -0
  139. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
  140. package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
  141. package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
  142. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
  143. package/es/components/ticketBooking/hooks/pisellos/useProducts.js +43 -9
  144. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
  145. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
  146. package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
  147. package/es/components/ticketBooking/index.d.ts +6 -0
  148. package/es/components/ticketBooking/index.js +86 -11
  149. package/es/components/ticketBooking/utils/index.js +50 -1
  150. package/es/components/ticketBooking/utils/productCache.js +184 -0
  151. package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
  152. package/es/index.js +3 -1
  153. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
  154. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  155. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
  156. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  157. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
  158. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  159. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
  160. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  161. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
  162. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  163. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
  164. package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  165. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
  166. package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  167. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
  168. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  169. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
  170. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  171. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
  172. package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  173. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
  174. package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  175. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
  176. package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  177. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
  178. package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  179. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
  180. package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  181. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
  182. package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  183. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
  184. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  185. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
  186. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  187. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
  188. package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  189. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
  190. package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  191. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
  192. package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  193. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
  194. package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  195. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
  196. package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  197. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
  198. package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  199. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
  200. package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  201. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
  202. package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  203. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
  204. package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  205. package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
  206. package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
  207. package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
  208. package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
  209. package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
  210. package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
  211. package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
  212. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  213. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  214. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  215. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  216. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  217. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  218. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  219. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  220. package/lib/components/booking/components/actionButtons/index.js +22 -15
  221. package/lib/components/booking/components/footer/amount.js +1 -1
  222. package/lib/components/booking/components/footer/index.js +2 -2
  223. package/lib/components/booking/components/footer/utils.js +8 -1
  224. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  225. package/lib/components/booking/components/voucher/index.js +33 -40
  226. package/lib/components/booking/forms/footer.d.ts +0 -1
  227. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  228. package/lib/components/booking/forms/single/index.d.ts +0 -1
  229. package/lib/components/booking/info2/cartClientCard/index.js +7 -3
  230. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  231. package/lib/components/checkout/PaymentModal.js +20 -16
  232. package/lib/components/checkout/hooks/useWalletPass.js +57 -45
  233. package/lib/components/eftpos/form/index.d.ts +0 -1
  234. package/lib/components/eftpos/hooks.d.ts +0 -1
  235. package/lib/components/eftpos/index.d.ts +0 -1
  236. package/lib/components/eftpos/pos.d.ts +0 -1
  237. package/lib/components/eftposPay/amount.d.ts +0 -1
  238. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  239. package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
  240. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  241. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  242. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  243. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  244. package/lib/components/eftposPay/hooks.d.ts +1 -1
  245. package/lib/components/eftposPay/pay.d.ts +0 -1
  246. package/lib/components/eftposPay/store/index.d.ts +2 -2
  247. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  248. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
  249. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  250. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  251. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  252. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  253. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  254. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  255. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
  256. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
  257. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  258. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
  259. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
  260. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  261. package/lib/components/list/List.js +771 -0
  262. package/lib/components/list/List.less +2 -0
  263. package/lib/components/list/ResponsiveWrapper.js +145 -0
  264. package/lib/components/list/TestResponsiveWrapper.js +493 -0
  265. package/lib/components/list/TestResponsiveWrapper.less +968 -0
  266. package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
  267. package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
  268. package/lib/components/list/components/EmptyState/index.js +35 -0
  269. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
  270. package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
  271. package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
  272. package/lib/components/list/components/Pagination/Pagination.js +205 -0
  273. package/lib/components/list/components/Pagination/Pagination.less +439 -0
  274. package/lib/components/list/components/Pagination/index.js +35 -0
  275. package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
  276. package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
  277. package/lib/components/list/components/ScrollLoader/index.js +35 -0
  278. package/lib/components/list/components/Tab/Tab.js +72 -0
  279. package/lib/components/list/components/Tab/Tab.less +139 -0
  280. package/lib/components/list/components/Tab/index.js +35 -0
  281. package/lib/components/list/components/Tab/types.js +17 -0
  282. package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
  283. package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
  284. package/lib/components/list/components/TabSkeleton/index.js +41 -0
  285. package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
  286. package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
  287. package/lib/components/list/components/WaterfallList/index.js +35 -0
  288. package/lib/components/list/examples/GroupedListExample.js +210 -0
  289. package/lib/components/list/hooks/index.js +47 -0
  290. package/lib/components/list/hooks/useDevice.js +96 -0
  291. package/lib/components/list/hooks/useListState.js +149 -0
  292. package/lib/components/list/hooks/useWaterfall.js +124 -0
  293. package/lib/components/list/index.js +60 -0
  294. package/lib/components/list/locales.js +113 -0
  295. package/lib/components/list/styles/base.less +39 -0
  296. package/lib/components/list/styles/content.less +416 -0
  297. package/lib/components/list/styles/floatButton.less +107 -0
  298. package/lib/components/list/styles/footer.less +49 -0
  299. package/lib/components/list/styles/header.less +69 -0
  300. package/lib/components/list/styles/responsive.less +166 -0
  301. package/lib/components/list/types.js +17 -0
  302. package/lib/components/list/utils/getText.js +95 -0
  303. package/lib/components/list/utils/index.js +43 -0
  304. package/lib/components/pay/toB/store/hooks.js +16 -8
  305. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  306. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  307. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
  308. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  309. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  310. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  311. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
  312. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  313. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  314. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  315. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  316. package/lib/components/schedules/products/index.d.ts +0 -1
  317. package/lib/components/schedules/resources/index.d.ts +0 -1
  318. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  319. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  320. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  321. package/lib/components/schedules/schedules/index.d.ts +0 -1
  322. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  323. package/lib/components/shoppingCart/index.d.ts +0 -1
  324. package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
  325. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
  326. package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
  327. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
  328. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
  329. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
  330. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +45 -11
  331. package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
  332. package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
  333. package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
  334. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
  335. package/lib/components/ticketBooking/components/ticketBooking/index.js +56 -25
  336. package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
  337. package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
  338. package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
  339. package/lib/components/ticketBooking/context/index.js +44 -0
  340. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
  341. package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
  342. package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
  343. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
  344. package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +26 -4
  345. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
  346. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
  347. package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
  348. package/lib/components/ticketBooking/index.d.ts +6 -0
  349. package/lib/components/ticketBooking/index.js +64 -8
  350. package/lib/components/ticketBooking/utils/index.js +70 -2
  351. package/lib/components/ticketBooking/utils/productCache.js +144 -0
  352. package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
  353. package/lib/index.js +6 -0
  354. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
  355. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
  356. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
  357. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
  358. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
  359. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
  360. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
  361. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
  362. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
  363. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
  364. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
  365. package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
  366. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
  367. package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
  368. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
  369. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
  370. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
  371. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
  372. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
  373. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
  374. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
  375. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
  376. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
  377. package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
  378. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
  379. package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
  380. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
  381. package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
  382. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
  383. package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
  384. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
  385. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
  386. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
  387. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
  388. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
  389. package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
  390. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
  391. package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
  392. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
  393. package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
  394. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
  395. package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
  396. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
  397. package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
  398. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
  399. package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
  400. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
  401. package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
  402. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
  403. package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
  404. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
  405. package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
  406. package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
  407. package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
  408. package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
  409. package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
  410. package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
  411. package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
  412. package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
  413. package/lowcode/sku-card/meta.ts +1812 -0
  414. package/lowcode/sku-card/snippets.ts +372 -0
  415. package/lowcode/sku-list/meta.ts +410 -0
  416. package/package.json +1 -1
  417. package/es/components/booking/components/actionButtons/index.d.ts +0 -31
  418. package/es/components/booking/components/footer/index.d.ts +0 -11
  419. package/es/components/booking/components/voucher/index.d.ts +0 -3
  420. package/es/components/booking/info2/cartClientCard/index.d.ts +0 -6
  421. package/es/components/checkout/hooks/useWalletPass.d.ts +0 -40
  422. package/es/components/pay/toB/store/hooks.d.ts +0 -15
  423. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  424. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  425. package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  426. package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  427. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  428. package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
  429. package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
  430. package/es/components/ticketBooking/utils/index.d.ts +0 -62
  431. package/es/index.d.ts +0 -63
  432. package/es/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
  433. package/lib/components/booking/components/actionButtons/index.d.ts +0 -31
  434. package/lib/components/booking/components/footer/index.d.ts +0 -11
  435. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  436. package/lib/components/booking/info2/cartClientCard/index.d.ts +0 -6
  437. package/lib/components/checkout/hooks/useWalletPass.d.ts +0 -40
  438. package/lib/components/pay/toB/store/hooks.d.ts +0 -15
  439. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
  440. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
  441. package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
  442. package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
  443. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
  444. package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
  445. package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
  446. package/lib/components/ticketBooking/utils/index.d.ts +0 -62
  447. package/lib/index.d.ts +0 -63
  448. package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
@@ -1,6 +1,12 @@
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
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ 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); }
7
+ 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
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
9
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4
10
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
11
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
12
  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); }
@@ -12,9 +18,12 @@ import { cloneDeep } from 'lodash';
12
18
  import TicketBooking from "./components/ticketBooking/index";
13
19
  import { request } from "../../utils";
14
20
  import useEngineContext from "../../hooks/useEngineContext";
15
- import { getDefaultStartParam } from "./utils";
21
+ import { getBookingTicketKey, getDefaultStartParam, getShopDiscountKey, rulesHooks } from "./utils";
16
22
  import localeTexts from "./locales";
17
23
  import MenuBar from "./components/menuBar";
24
+ import { useLocalStorageState } from 'ahooks';
25
+ import { OsKeyProvider } from "./context/OsKeyContext";
26
+ import { IsActiveProvider } from "./context/IsActiveContext";
18
27
  import "./index.less";
19
28
  var initialState = {
20
29
  amountSymbol: '$',
@@ -137,16 +146,60 @@ var initialState = {
137
146
  export default (function (props) {
138
147
  var _context$appHelper, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5;
139
148
  var productExtensionType = props.productExtensionType,
140
- bookingConfigParams = props.bookingConfigParams,
149
+ propsBookingConfigParams = props.bookingConfigParams,
141
150
  _props$isShowMenuBar = props.isShowMenuBar,
142
- isShowMenuBar = _props$isShowMenuBar === void 0 ? true : _props$isShowMenuBar;
151
+ isShowMenuBar = _props$isShowMenuBar === void 0 ? true : _props$isShowMenuBar,
152
+ _props$isShowTimeBar = props.isShowTimeBar,
153
+ propsIsShowTimeBar = _props$isShowTimeBar === void 0 ? true : _props$isShowTimeBar,
154
+ _props$isShowFloatBut = props.isShowFloatButtons,
155
+ propsIsShowFloatButtons = _props$isShowFloatBut === void 0 ? true : _props$isShowFloatBut,
156
+ propsProductDisplayConfig = props.productDisplayConfig,
157
+ _props$isActive = props.isActive,
158
+ isActive = _props$isActive === void 0 ? true : _props$isActive,
159
+ propsRulesHooks = props.rulesHooks;
160
+ var _useLocalStorageState = useLocalStorageState('pisell-ticket-booking-nav-key', {
161
+ defaultValue: 'ticket'
162
+ }),
163
+ _useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
164
+ activeNavKey = _useLocalStorageState2[0],
165
+ setActiveNavKey = _useLocalStorageState2[1];
166
+
167
+ // 根据 activeNavKey 动态配置(仅在显示菜单栏时生效)
168
+ var bookingConfigParams = useMemo(function () {
169
+ if (isShowMenuBar && activeNavKey === 'food') {
170
+ return _objectSpread(_objectSpread({}, propsBookingConfigParams), {}, {
171
+ sub_type: 'food',
172
+ source_type: 'pos'
173
+ });
174
+ }
175
+ return propsBookingConfigParams;
176
+ }, [isShowMenuBar, activeNavKey, propsBookingConfigParams]);
177
+ var isShowTimeBar = useMemo(function () {
178
+ return isShowMenuBar && activeNavKey === 'food' ? false : propsIsShowTimeBar;
179
+ }, [isShowMenuBar, activeNavKey, propsIsShowTimeBar]);
180
+ var isShowFloatButtons = useMemo(function () {
181
+ return isShowMenuBar && activeNavKey === 'food' ? false : propsIsShowFloatButtons;
182
+ }, [isShowMenuBar, activeNavKey, propsIsShowFloatButtons]);
183
+
184
+ // 根据bookingConfigParams?.sub_type 动态配置osKey
185
+ // 多页面使用同一个组件时,需要根据不同的osKey来区分不同的页面
186
+ var osKey = useMemo(function () {
187
+ return bookingConfigParams === null || bookingConfigParams === void 0 ? void 0 : bookingConfigParams.sub_type;
188
+ }, [bookingConfigParams]);
189
+ var productDisplayConfig = useMemo(function () {
190
+ if (isShowMenuBar && activeNavKey === 'food') {
191
+ return 'sku-list-a5';
192
+ }
193
+ return propsProductDisplayConfig;
194
+ }, [isShowMenuBar, activeNavKey, propsProductDisplayConfig]);
143
195
  var storeRef = useRef(null);
144
196
  var context = useEngineContext();
145
197
  var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
146
198
  pisellos = _context$appHelper$ut.pisellos,
147
199
  pisellosAllModule = _context$appHelper$ut.pisellosAllModule;
148
200
  var _ref = pisellosAllModule || {},
149
- BookingTicket = _ref.BookingTicket;
201
+ BookingTicket = _ref.BookingTicket,
202
+ ShopDiscountImpl = _ref.ShopDiscountImpl;
150
203
  locales.init(localeTexts, ((_context$appHelper$ut2 = context.appHelper.utils) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getApp) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut3.call(_context$appHelper$ut2)) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut3.locales) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut3.getLocale) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.call(_context$appHelper$ut3)) || ((_context$appHelper$ut5 = context.appHelper.utils) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.storage) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.get('umi_locale')) || 'en');
151
204
  useLayoutEffect(function () {
152
205
  request.setRequest(context.appHelper.utils.request);
@@ -157,21 +210,43 @@ export default (function (props) {
157
210
  productExtensionType: productExtensionType
158
211
  }));
159
212
  storeRef.current = store;
160
- }, []);
213
+ }, [bookingConfigParams, productExtensionType]);
161
214
  useMemo(function () {
162
215
  if (BookingTicket) {
163
- pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket('bookingTicket'), {
216
+ pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(getBookingTicketKey(osKey)), {
164
217
  initialState: {},
165
218
  otherParams: {
166
- cacheId: 'test-cache',
219
+ cacheId: getBookingTicketKey(osKey),
167
220
  platform: 'shop'
168
221
  }
169
222
  });
170
223
  }
171
- }, []);
224
+ if (ShopDiscountImpl) {
225
+ pisellos === null || pisellos === void 0 || pisellos.registerModule(new ShopDiscountImpl(getShopDiscountKey(osKey)), {
226
+ otherParams: {
227
+ platform: "shop",
228
+ rules: {
229
+ hooks: propsRulesHooks || rulesHooks
230
+ }
231
+ }
232
+ });
233
+ }
234
+ }, [osKey]);
172
235
  return /*#__PURE__*/React.createElement("div", {
173
236
  className: "pisell-ticket-booking-wrapper"
174
- }, isShowMenuBar && /*#__PURE__*/React.createElement(MenuBar, null), /*#__PURE__*/React.createElement(Provider, {
175
- store: storeRef.current
176
- }, /*#__PURE__*/React.createElement(TicketBooking, null)));
237
+ }, isShowMenuBar && /*#__PURE__*/React.createElement(MenuBar, {
238
+ activeNavKey: activeNavKey,
239
+ onNavChange: setActiveNavKey
240
+ }), /*#__PURE__*/React.createElement(IsActiveProvider, {
241
+ isActive: isActive
242
+ }, /*#__PURE__*/React.createElement(OsKeyProvider, {
243
+ osKey: osKey
244
+ }, /*#__PURE__*/React.createElement(Provider, {
245
+ store: storeRef.current,
246
+ key: activeNavKey
247
+ }, /*#__PURE__*/React.createElement(TicketBooking, {
248
+ productDisplayConfig: productDisplayConfig,
249
+ isShowTimeBar: isShowTimeBar,
250
+ isShowFloatButtons: isShowFloatButtons
251
+ })))));
177
252
  });
@@ -332,4 +332,53 @@ export var createSimpleCacheItem = function createSimpleCacheItem(item, e, state
332
332
  new: 1
333
333
  });
334
334
  return cacheItem;
335
- };
335
+ };
336
+
337
+ // 获取bookingTicket的key
338
+ export var getBookingTicketKey = function getBookingTicketKey(osKey) {
339
+ return "bookingTicket-".concat(osKey);
340
+ };
341
+
342
+ // 获取shopDiscount的key
343
+ export var getShopDiscountKey = function getShopDiscountKey(osKey) {
344
+ return "shopDiscount-".concat(osKey);
345
+ };
346
+ export var rulesHooks = {
347
+ // 获取商品关键信息
348
+ getProduct: function getProduct(product) {
349
+ var detail = {
350
+ booking_id: product.booking_id,
351
+ id: product.id,
352
+ _id: product._id,
353
+ price: product.price,
354
+ total: product._extend.total,
355
+ discount_list: product.discount_list,
356
+ origin_total: product._extend.origin_total,
357
+ num: product._extend.quantity,
358
+ quantity: product._extend.quantity || 1,
359
+ vouchersApplicable: product.vouchersApplicable
360
+ };
361
+ return detail;
362
+ },
363
+ setProduct: function setProduct(product, values) {
364
+ var detail = _objectSpread(_objectSpread({}, product), {}, {
365
+ _id: values._id || product._id,
366
+ discount_list: values.discount_list,
367
+ _extend: _objectSpread(_objectSpread(_objectSpread({}, product._extend), 'total' in values ? {
368
+ total: values.total
369
+ } : {}), 'quantity' in values ? {
370
+ quantity: values.quantity
371
+ } : {})
372
+ });
373
+ return detail;
374
+ }
375
+ };
376
+
377
+ // 导出缓存工具函数
378
+ export {
379
+ // 通用缓存函数
380
+ getCache, setCache, clearCache, clearAllCache, clearAllCacheByOsKey,
381
+ // 产品缓存
382
+ getProductCache, setProductCache, clearProductCache, clearAllProductCache,
383
+ // BoardConfig 缓存
384
+ getBoardConfigCache, setBoardConfigCache, clearBoardConfigCache } from "./productCache";
@@ -0,0 +1,184 @@
1
+ /**
2
+ * 产品数据缓存工具
3
+ * 使用 localStorage 实现类似 SWR 的缓存功能
4
+ */
5
+
6
+ /**
7
+ * 缓存类型
8
+ */
9
+
10
+ /**
11
+ * 生成缓存键
12
+ * @param osKey - OS 实例的唯一标识
13
+ * @param cacheType - 缓存类型
14
+ */
15
+ var generateCacheKey = function generateCacheKey(osKey) {
16
+ var cacheType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'product';
17
+ return "".concat(cacheType, "_cache_").concat(osKey);
18
+ };
19
+
20
+ /**
21
+ * 通用缓存获取函数
22
+ * @param osKey - OS 实例的唯一标识
23
+ * @param cacheType - 缓存类型
24
+ * @param maxAge - 缓存最大有效期(毫秒),默认不限制
25
+ */
26
+ export var getCache = function getCache(osKey) {
27
+ var cacheType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'product';
28
+ var maxAge = arguments.length > 2 ? arguments[2] : undefined;
29
+ try {
30
+ var cacheKey = generateCacheKey(osKey, cacheType);
31
+ var cacheStr = localStorage.getItem(cacheKey);
32
+ if (!cacheStr) {
33
+ return null;
34
+ }
35
+ var cache = JSON.parse(cacheStr);
36
+
37
+ // 检查缓存是否过期
38
+ if (maxAge && Date.now() - cache.timestamp > maxAge) {
39
+ localStorage.removeItem(cacheKey);
40
+ return null;
41
+ }
42
+ return cache.data;
43
+ } catch (error) {
44
+ console.error("Failed to get ".concat(cacheType, " cache:"), error);
45
+ return null;
46
+ }
47
+ };
48
+
49
+ /**
50
+ * 从缓存中获取产品数据(兼容旧接口)
51
+ * @param osKey - OS 实例的唯一标识
52
+ * @param maxAge - 缓存最大有效期(毫秒),默认不限制
53
+ */
54
+ export var getProductCache = function getProductCache(osKey, maxAge) {
55
+ return getCache(osKey, 'product', maxAge);
56
+ };
57
+
58
+ /**
59
+ * 通用缓存设置函数
60
+ * @param osKey - OS 实例的唯一标识
61
+ * @param data - 要缓存的数据
62
+ * @param cacheType - 缓存类型
63
+ */
64
+ export var setCache = function setCache(osKey, data) {
65
+ var cacheType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'product';
66
+ try {
67
+ var cacheKey = generateCacheKey(osKey, cacheType);
68
+ var cache = {
69
+ data: data,
70
+ timestamp: Date.now()
71
+ };
72
+ localStorage.setItem(cacheKey, JSON.stringify(cache));
73
+ } catch (error) {
74
+ console.error("Failed to set ".concat(cacheType, " cache:"), error);
75
+ }
76
+ };
77
+
78
+ /**
79
+ * 设置产品缓存数据(兼容旧接口)
80
+ * @param osKey - OS 实例的唯一标识
81
+ * @param data - 要缓存的数据
82
+ */
83
+ export var setProductCache = function setProductCache(osKey, data) {
84
+ setCache(osKey, data, 'product');
85
+ };
86
+
87
+ /**
88
+ * 清除指定类型的缓存
89
+ * @param osKey - OS 实例的唯一标识
90
+ * @param cacheType - 缓存类型
91
+ */
92
+ export var clearCache = function clearCache(osKey) {
93
+ var cacheType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'product';
94
+ try {
95
+ var keys = Object.keys(localStorage);
96
+ var prefix = "".concat(cacheType, "_cache_").concat(osKey);
97
+ keys.forEach(function (key) {
98
+ if (key.startsWith(prefix)) {
99
+ localStorage.removeItem(key);
100
+ }
101
+ });
102
+ } catch (error) {
103
+ console.error("Failed to clear ".concat(cacheType, " cache:"), error);
104
+ }
105
+ };
106
+
107
+ /**
108
+ * 清除指定 osKey 的产品缓存(兼容旧接口)
109
+ * @param osKey - OS 实例的唯一标识
110
+ */
111
+ export var clearProductCache = function clearProductCache(osKey) {
112
+ clearCache(osKey, 'product');
113
+ };
114
+
115
+ /**
116
+ * 清除指定 osKey 的 BoardConfig 缓存
117
+ * @param osKey - OS 实例的唯一标识
118
+ */
119
+ export var clearBoardConfigCache = function clearBoardConfigCache(osKey) {
120
+ clearCache(osKey, 'boardConfig');
121
+ };
122
+
123
+ /**
124
+ * 清除指定 osKey 的所有类型缓存
125
+ * @param osKey - OS 实例的唯一标识
126
+ */
127
+ export var clearAllCacheByOsKey = function clearAllCacheByOsKey(osKey) {
128
+ clearCache(osKey, 'product');
129
+ clearCache(osKey, 'boardConfig');
130
+ };
131
+
132
+ /**
133
+ * 清除所有产品缓存
134
+ */
135
+ export var clearAllProductCache = function clearAllProductCache() {
136
+ try {
137
+ var keys = Object.keys(localStorage);
138
+ var prefix = 'product_cache_';
139
+ keys.forEach(function (key) {
140
+ if (key.startsWith(prefix)) {
141
+ localStorage.removeItem(key);
142
+ }
143
+ });
144
+ } catch (error) {
145
+ console.error('Failed to clear all product cache:', error);
146
+ }
147
+ };
148
+
149
+ /**
150
+ * 清除所有类型的缓存
151
+ */
152
+ export var clearAllCache = function clearAllCache() {
153
+ try {
154
+ var keys = Object.keys(localStorage);
155
+ var prefixes = ['product_cache_', 'boardConfig_cache_'];
156
+ keys.forEach(function (key) {
157
+ if (prefixes.some(function (prefix) {
158
+ return key.startsWith(prefix);
159
+ })) {
160
+ localStorage.removeItem(key);
161
+ }
162
+ });
163
+ } catch (error) {
164
+ console.error('Failed to clear all cache:', error);
165
+ }
166
+ };
167
+
168
+ /**
169
+ * 获取 BoardConfig 缓存
170
+ * @param osKey - OS 实例的唯一标识
171
+ * @param maxAge - 缓存最大有效期(毫秒),默认不限制
172
+ */
173
+ export var getBoardConfigCache = function getBoardConfigCache(osKey, maxAge) {
174
+ return getCache(osKey, 'boardConfig', maxAge);
175
+ };
176
+
177
+ /**
178
+ * 设置 BoardConfig 缓存
179
+ * @param osKey - OS 实例的唯一标识
180
+ * @param data - 要缓存的数据
181
+ */
182
+ export var setBoardConfigCache = function setBoardConfigCache(osKey, data) {
183
+ setCache(osKey, data, 'boardConfig');
184
+ };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from '../serve';
3
2
  /**
4
3
  * 钱包卡片Hook的参数
package/es/index.js CHANGED
@@ -63,5 +63,7 @@ export { default as ProSkuDetailModal } from "./pro/skuDetailModal";
63
63
  export { default as SaasLogin } from "./plus/saasLogin";
64
64
  export { default as SaasRegister } from "./plus/saasRegister";
65
65
  export { default as SaasCreateOrganization } from "./plus/saasCreateOrganization";
66
+ export { default as SkuCard } from "./plus/productSelect/ProductCard/SkuCard";
66
67
  export { default as PinModal } from "./components/pinModal";
67
- export { default as PinVerifyModal } from "./components/pinVerifyModal";
68
+ export { default as PinVerifyModal } from "./components/pinVerifyModal";
69
+ export { ResponsiveList as SkuList } from "./components/list";
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import CardCom from "../components/CardCom";
3
+ import { PREFIX } from "../status";
4
+ import "./index.less";
5
+ var SkuCardA1 = function SkuCardA1(props) {
6
+ return /*#__PURE__*/React.createElement(CardCom, {
7
+ props: props,
8
+ className: "".concat(PREFIX, "__card-a1")
9
+ });
10
+ };
11
+ export default SkuCardA1;
@@ -0,0 +1,8 @@
1
+ .pisell-product-sku__card-a1 {
2
+ .pisell-product-sku__card-a1-content {
3
+ flex-direction: row !important;
4
+ justify-content: space-between;
5
+ align-items: center;
6
+ gap: 12px;
7
+ }
8
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import CardCom from "../components/CardCom";
3
+ import { PREFIX } from "../status";
4
+ import "./index.less";
5
+ var SkuCardA2 = function SkuCardA2(props) {
6
+ return /*#__PURE__*/React.createElement(CardCom, {
7
+ props: props,
8
+ className: "".concat(PREFIX, "__card-a2")
9
+ });
10
+ };
11
+ export default SkuCardA2;
@@ -0,0 +1,17 @@
1
+ .pisell-product-sku__card-a2 {
2
+ align-items: center;
3
+ gap: 12px;
4
+
5
+ .pisell-product-sku__card-a2-content {
6
+ gap: 8px;
7
+ }
8
+ }
9
+
10
+ // 竖向布局
11
+ .pisell-product-sku__card-a2-column {
12
+ gap: 4px;
13
+
14
+ .pisell-product-sku__card-a2-content {
15
+ gap: 2px;
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import CardCom from "../components/CardCom";
3
+ import { PREFIX } from "../status";
4
+ import "./index.less";
5
+ var SkuCardA5 = function SkuCardA5(props) {
6
+ return /*#__PURE__*/React.createElement(CardCom, {
7
+ props: props,
8
+ className: "".concat(PREFIX, "__card-a5")
9
+ });
10
+ };
11
+ export default SkuCardA5;
@@ -0,0 +1,17 @@
1
+ .pisell-product-sku__card-a5 {
2
+ gap: 12px;
3
+
4
+ .pisell-product-sku__card-a5-content {
5
+ gap: 2px;
6
+ justify-content: space-between;
7
+ }
8
+ }
9
+
10
+ // 竖向布局
11
+ .pisell-product-sku__card-a5-column {
12
+ gap: 4px;
13
+
14
+ .pisell-product-sku__card-a5-content {
15
+ justify-content: start;
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import CardCom from "../components/CardCom";
3
+ import { PREFIX } from "../status";
4
+ import "./index.less";
5
+ var SkuCardA9 = function SkuCardA9(props) {
6
+ return /*#__PURE__*/React.createElement(CardCom, {
7
+ props: props,
8
+ className: "".concat(PREFIX, "__card-a9")
9
+ });
10
+ };
11
+ export default SkuCardA9;
@@ -0,0 +1,17 @@
1
+ .pisell-product-sku__card-a9 {
2
+ gap: 12px;
3
+
4
+ .pisell-product-sku__card-a9-content {
5
+ gap: 2px;
6
+ justify-content: space-between;
7
+ }
8
+ }
9
+
10
+ // 竖向布局
11
+ .pisell-product-sku__card-a9-column {
12
+ gap: 4px;
13
+
14
+ .pisell-product-sku__card-a9-content {
15
+ justify-content: start;
16
+ }
17
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import CardCom from "../components/CardCom";
3
+ import { PREFIX } from "../status";
4
+ import "./index.less";
5
+ var SkuCardCustom = function SkuCardCustom(props) {
6
+ return /*#__PURE__*/React.createElement(CardCom, {
7
+ props: props,
8
+ className: "".concat(PREFIX, "__card-custom")
9
+ });
10
+ };
11
+ export default SkuCardCustom;
@@ -0,0 +1,2 @@
1
+ .pisell-product-sku__card-custom {
2
+ }
@@ -0,0 +1,100 @@
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ import React, { useMemo } from 'react';
8
+ import { Icon } from '@pisell/materials';
9
+ import "./index.less";
10
+ import { PREFIX } from "../../status";
11
+ var Action = function Action(_ref) {
12
+ var props = _ref.props,
13
+ className = _ref.className;
14
+ var skuActionConfig = props.skuActionConfig,
15
+ dataSource = props.dataSource,
16
+ onAction = props.onAction;
17
+ var _ref2 = skuActionConfig || {},
18
+ isOpen = _ref2.isOpen,
19
+ method = _ref2.method,
20
+ slot = _ref2.slot,
21
+ iconMethod = _ref2.iconMethod,
22
+ radioMethod = _ref2.radioMethod,
23
+ checkboxMethod = _ref2.checkboxMethod,
24
+ buttonMethod = _ref2.buttonMethod;
25
+
26
+ // 不开启
27
+ if (!isOpen) return null;
28
+
29
+ // 开启插槽
30
+ if (slot) {
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ className: "".concat(PREFIX, "__card-action ").concat(className)
33
+ }, slot);
34
+ }
35
+ var Com = useMemo(function () {
36
+ if (!method) return null;
37
+ var key = {
38
+ icon: iconMethod,
39
+ radio: radioMethod,
40
+ checkbox: checkboxMethod,
41
+ button: buttonMethod
42
+ };
43
+ var _key$method = key[method],
44
+ background = _key$method.background,
45
+ paddingY = _key$method.paddingY,
46
+ paddingX = _key$method.paddingX,
47
+ isBorder = _key$method.isBorder,
48
+ borderWidth = _key$method.borderWidth,
49
+ borderColor = _key$method.borderColor,
50
+ radius = _key$method.radius;
51
+ var baseStyle = {
52
+ background: background,
53
+ padding: "".concat(paddingY, "px ").concat(paddingX, "px"),
54
+ border: isBorder ? "".concat(borderWidth, "px solid ").concat(borderColor) : 'none',
55
+ borderRadius: "".concat(radius, "px")
56
+ };
57
+
58
+ // icon类型
59
+ if (method === 'icon' || method === 'radio') {
60
+ var _key$method2;
61
+ return /*#__PURE__*/React.createElement("div", {
62
+ style: _objectSpread({}, baseStyle)
63
+ }, ((_key$method2 = key[method]) === null || _key$method2 === void 0 ? void 0 : _key$method2.icon) || /*#__PURE__*/React.createElement(Icon, {
64
+ type: method === 'icon' ? 'pisell2-arrow-right' : 'pisell2-plus',
65
+ size: 24,
66
+ rotate: 0,
67
+ spin: false,
68
+ color: "#ffffff"
69
+ }));
70
+ }
71
+
72
+ // 按钮类型
73
+ if (method === 'checkbox' || method === 'button') {
74
+ var _key$method3 = key[method],
75
+ text = _key$method3.text,
76
+ fontSize = _key$method3.fontSize,
77
+ fontWeight = _key$method3.fontWeight,
78
+ color = _key$method3.color;
79
+ return /*#__PURE__*/React.createElement("div", {
80
+ style: _objectSpread(_objectSpread({}, baseStyle), {}, {
81
+ color: color,
82
+ fontSize: fontSize,
83
+ fontWeight: fontWeight,
84
+ width: method === 'button' ? '100%' : 'auto',
85
+ textAlign: 'center'
86
+ })
87
+ }, text);
88
+ }
89
+ return null;
90
+ }, [method, radioMethod, checkboxMethod, buttonMethod, iconMethod]);
91
+ return /*#__PURE__*/React.createElement("div", {
92
+ className: "".concat(PREFIX, "__card-action ").concat(PREFIX, "__card-action-").concat(method, " ").concat(className)
93
+ }, /*#__PURE__*/React.createElement("div", {
94
+ onClick: function onClick(e) {
95
+ e.stopPropagation();
96
+ onAction === null || onAction === void 0 || onAction(dataSource);
97
+ }
98
+ }, Com));
99
+ };
100
+ export default Action;
@@ -0,0 +1,8 @@
1
+ .pisell-product-sku__card-action {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ > div {
6
+ line-height: 1;
7
+ }
8
+ }