@pisell/private-materials 6.4.56 → 6.4.58
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -12
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +6 -6
- package/es/components/booking/components/actionButtons/index.js +15 -7
- package/es/components/booking/components/footer/amount.js +1 -1
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/footer/utils.js +7 -2
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/checkout/PaymentModal.js +17 -12
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +36 -21
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/list/List.d.ts +5 -0
- package/es/components/list/List.js +957 -0
- package/es/components/list/List.less +2 -0
- package/es/components/list/ResponsiveWrapper.d.ts +16 -0
- package/es/components/list/ResponsiveWrapper.js +130 -0
- package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/es/components/list/TestResponsiveWrapper.js +816 -0
- package/es/components/list/TestResponsiveWrapper.less +968 -0
- package/es/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/es/components/list/components/EmptyState/EmptyState.js +75 -0
- package/es/components/list/components/EmptyState/EmptyState.less +121 -0
- package/es/components/list/components/EmptyState/index.d.ts +2 -0
- package/es/components/list/components/EmptyState/index.js +1 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ListItemSkeleton/index.js +2 -0
- package/es/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/es/components/list/components/Pagination/Pagination.js +240 -0
- package/es/components/list/components/Pagination/Pagination.less +439 -0
- package/es/components/list/components/Pagination/index.d.ts +1 -0
- package/es/components/list/components/Pagination/index.js +1 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/index.js +1 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/Tab.js +43 -0
- package/es/components/list/components/Tab/Tab.less +139 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/index.js +1 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/Tab/types.js +1 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/TabSkeleton/index.js +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
- package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/index.js +1 -0
- package/es/components/list/examples/GroupedListExample.d.ts +3 -0
- package/es/components/list/examples/GroupedListExample.js +207 -0
- package/es/components/list/hooks/index.d.ts +5 -0
- package/es/components/list/hooks/index.js +3 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useDevice.js +102 -0
- package/es/components/list/hooks/useListState.d.ts +43 -0
- package/es/components/list/hooks/useListState.js +176 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/hooks/useWaterfall.js +161 -0
- package/es/components/list/index.d.ts +10 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/locales.d.ts +66 -0
- package/es/components/list/locales.js +107 -0
- package/es/components/list/styles/base.less +39 -0
- package/es/components/list/styles/content.less +416 -0
- package/es/components/list/styles/floatButton.less +107 -0
- package/es/components/list/styles/footer.less +49 -0
- package/es/components/list/styles/header.less +69 -0
- package/es/components/list/styles/responsive.less +166 -0
- package/es/components/list/types.d.ts +177 -0
- package/es/components/list/types.js +1 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/getText.js +150 -0
- package/es/components/list/utils/index.d.ts +4 -0
- package/es/components/list/utils/index.js +5 -0
- package/es/components/pay/toB/store/hooks.js +19 -5
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +46 -11
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/es/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/es/components/ticketBooking/components/menuBar/index.js +40 -17
- package/es/components/ticketBooking/components/menuBar/index.less +27 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
- package/es/components/ticketBooking/components/ticketBooking/index.js +66 -23
- package/es/components/ticketBooking/components/timeBar/index.less +1 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/context/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +43 -9
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
- package/es/components/ticketBooking/index.d.ts +6 -0
- package/es/components/ticketBooking/index.js +86 -11
- package/es/components/ticketBooking/utils/index.d.ts +30 -2
- package/es/components/ticketBooking/utils/index.js +50 -1
- package/es/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/es/components/ticketBooking/utils/productCache.js +184 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
- package/es/plus/saasLogin/utils.d.ts +5 -5
- package/lib/components/booking/components/actionButtons/index.js +22 -15
- package/lib/components/booking/components/footer/amount.js +1 -1
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/footer/utils.js +7 -2
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/checkout/PaymentModal.js +15 -12
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +57 -45
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/list/List.d.ts +5 -0
- package/lib/components/list/List.js +771 -0
- package/lib/components/list/List.less +2 -0
- package/lib/components/list/ResponsiveWrapper.d.ts +16 -0
- package/lib/components/list/ResponsiveWrapper.js +145 -0
- package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/lib/components/list/TestResponsiveWrapper.js +493 -0
- package/lib/components/list/TestResponsiveWrapper.less +968 -0
- package/lib/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
- package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
- package/lib/components/list/components/EmptyState/index.d.ts +2 -0
- package/lib/components/list/components/EmptyState/index.js +35 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
- package/lib/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/lib/components/list/components/Pagination/Pagination.js +205 -0
- package/lib/components/list/components/Pagination/Pagination.less +439 -0
- package/lib/components/list/components/Pagination/index.d.ts +1 -0
- package/lib/components/list/components/Pagination/index.js +35 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/index.js +35 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/Tab.js +72 -0
- package/lib/components/list/components/Tab/Tab.less +139 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/index.js +35 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/Tab/types.js +17 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/TabSkeleton/index.js +41 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/index.js +35 -0
- package/lib/components/list/examples/GroupedListExample.d.ts +3 -0
- package/lib/components/list/examples/GroupedListExample.js +210 -0
- package/lib/components/list/hooks/index.d.ts +5 -0
- package/lib/components/list/hooks/index.js +47 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useDevice.js +96 -0
- package/lib/components/list/hooks/useListState.d.ts +43 -0
- package/lib/components/list/hooks/useListState.js +149 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/hooks/useWaterfall.js +124 -0
- package/lib/components/list/index.d.ts +10 -0
- package/lib/components/list/index.js +60 -0
- package/lib/components/list/locales.d.ts +66 -0
- package/lib/components/list/locales.js +113 -0
- package/lib/components/list/styles/base.less +39 -0
- package/lib/components/list/styles/content.less +416 -0
- package/lib/components/list/styles/floatButton.less +107 -0
- package/lib/components/list/styles/footer.less +49 -0
- package/lib/components/list/styles/header.less +69 -0
- package/lib/components/list/styles/responsive.less +166 -0
- package/lib/components/list/types.d.ts +177 -0
- package/lib/components/list/types.js +17 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/getText.js +95 -0
- package/lib/components/list/utils/index.d.ts +4 -0
- package/lib/components/list/utils/index.js +43 -0
- package/lib/components/pay/toB/store/hooks.js +16 -8
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +20 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +46 -11
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +2 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
- package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +6 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.js +56 -25
- package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/context/index.js +44 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +26 -4
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
- package/lib/components/ticketBooking/index.d.ts +6 -0
- package/lib/components/ticketBooking/index.js +64 -8
- package/lib/components/ticketBooking/utils/index.d.ts +30 -2
- package/lib/components/ticketBooking/utils/index.js +70 -2
- package/lib/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/lib/components/ticketBooking/utils/productCache.js +144 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
- package/lib/plus/saasLogin/utils.d.ts +5 -5
- package/lowcode/sku-card/meta.ts +1812 -0
- package/lowcode/sku-card/snippets.ts +372 -0
- package/lowcode/sku-list/meta.ts +410 -0
- package/package.json +12 -12
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
/**
|
|
8
|
+
* 格式化 SKU 数据源,适配 SkuCard 组件
|
|
9
|
+
*/
|
|
10
|
+
export var formatSkuDataSource = function formatSkuDataSource(dataSource) {
|
|
11
|
+
return {
|
|
12
|
+
id: dataSource.id,
|
|
13
|
+
title: dataSource.title,
|
|
14
|
+
subtitle: dataSource.subtitle,
|
|
15
|
+
cover: dataSource.cover,
|
|
16
|
+
price: dataSource.price,
|
|
17
|
+
original_price: dataSource.original_price,
|
|
18
|
+
stock: dataSource.stock_quantity,
|
|
19
|
+
sortKeys: ['title', 'subtitle', 'price']
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Tab 项接口定义(与 List 组件保持一致)
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 产品分类信息接口
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 产品项接口
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 根据产品数据生成分类 Tabs(Switch 模式)
|
|
37
|
+
* 参考 TestResponsiveWrapper 的 generateSimpleTabItems 函数
|
|
38
|
+
*
|
|
39
|
+
* @param products 产品列表
|
|
40
|
+
* @param tabStyle tab 样式类型
|
|
41
|
+
* @returns TabItem 数组
|
|
42
|
+
*/
|
|
43
|
+
export var generateProductTabs = function generateProductTabs(products) {
|
|
44
|
+
var tabStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'switch';
|
|
45
|
+
if (!products || products.length === 0) {
|
|
46
|
+
return [{
|
|
47
|
+
key: 'all',
|
|
48
|
+
label: '全部'
|
|
49
|
+
}];
|
|
50
|
+
}
|
|
51
|
+
if (tabStyle === 'switch') {
|
|
52
|
+
// 切换模式:提取产品的分类信息,不显示动态数量
|
|
53
|
+
var categoryMap = new Map();
|
|
54
|
+
|
|
55
|
+
// 收集所有分类
|
|
56
|
+
products.forEach(function (product) {
|
|
57
|
+
if (product.category && Array.isArray(product.category)) {
|
|
58
|
+
product.category.forEach(function (cat) {
|
|
59
|
+
if (!categoryMap.has(cat.id)) {
|
|
60
|
+
categoryMap.set(cat.id, cat);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// 按 sort 字段排序(降序,sort 越大越靠前)
|
|
67
|
+
var sortedCategories = Array.from(categoryMap.values()).sort(function (a, b) {
|
|
68
|
+
return (b.sort || 0) - (a.sort || 0);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
// 生成 tabs
|
|
72
|
+
var tabs = [{
|
|
73
|
+
key: 'all',
|
|
74
|
+
label: '全部'
|
|
75
|
+
}];
|
|
76
|
+
sortedCategories.forEach(function (category) {
|
|
77
|
+
tabs.push({
|
|
78
|
+
key: String(category.id),
|
|
79
|
+
label: category.name,
|
|
80
|
+
group: String(category.id)
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
return tabs;
|
|
84
|
+
} else {
|
|
85
|
+
// 锚点模式:基于实际数据统计数量
|
|
86
|
+
var categoryCount = products.reduce(function (acc, product) {
|
|
87
|
+
if (product.category && Array.isArray(product.category)) {
|
|
88
|
+
product.category.forEach(function (cat) {
|
|
89
|
+
var key = String(cat.id);
|
|
90
|
+
if (!acc[key]) {
|
|
91
|
+
acc[key] = {
|
|
92
|
+
count: 0,
|
|
93
|
+
category: cat
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
acc[key].count += 1;
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
return acc;
|
|
100
|
+
}, {});
|
|
101
|
+
|
|
102
|
+
// 生成 tabs
|
|
103
|
+
var _tabs = [{
|
|
104
|
+
key: 'all',
|
|
105
|
+
label: "\u5168\u90E8 (".concat(products.length, ")")
|
|
106
|
+
}];
|
|
107
|
+
|
|
108
|
+
// 按 sort 排序
|
|
109
|
+
var sortedEntries = Object.entries(categoryCount).sort(function (_ref, _ref2) {
|
|
110
|
+
var _ref3 = _slicedToArray(_ref, 2),
|
|
111
|
+
a = _ref3[1];
|
|
112
|
+
var _ref4 = _slicedToArray(_ref2, 2),
|
|
113
|
+
b = _ref4[1];
|
|
114
|
+
return (b.category.sort || 0) - (a.category.sort || 0);
|
|
115
|
+
});
|
|
116
|
+
sortedEntries.forEach(function (_ref5) {
|
|
117
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
118
|
+
key = _ref6[0],
|
|
119
|
+
_ref6$ = _ref6[1],
|
|
120
|
+
count = _ref6$.count,
|
|
121
|
+
category = _ref6$.category;
|
|
122
|
+
_tabs.push({
|
|
123
|
+
key: key,
|
|
124
|
+
label: "".concat(category.name, " (").concat(count, ")"),
|
|
125
|
+
group: key
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
return _tabs;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
@@ -1,9 +1,29 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter';
|
|
1
2
|
import './index.less';
|
|
2
3
|
interface AddServiceProps {
|
|
3
4
|
onEdit?: any;
|
|
4
5
|
dispatch?: any;
|
|
5
6
|
state?: any;
|
|
6
7
|
renderMode?: 'current' | 'drawer';
|
|
8
|
+
/**
|
|
9
|
+
* 产品展示配置
|
|
10
|
+
*
|
|
11
|
+
* 支持两种方式:
|
|
12
|
+
* 1. 简易模式:传入预设字符串,如 'product-select', 'sku-list-a1', 'sku-list-a2', 'sku-list-a5'
|
|
13
|
+
* 2. 完整配置模式:传入完整的配置对象
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // 简易模式
|
|
17
|
+
* <AddService productDisplayConfig="sku-list-a1" />
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* // 完整配置模式
|
|
21
|
+
* <AddService productDisplayConfig={{
|
|
22
|
+
* displayMode: 'sku-list',
|
|
23
|
+
* skuListConfig: { ... }
|
|
24
|
+
* }} />
|
|
25
|
+
*/
|
|
26
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
7
27
|
}
|
|
8
28
|
declare const AddSerivce: (props: AddServiceProps) => JSX.Element | null;
|
|
9
29
|
export default AddSerivce;
|
|
@@ -26,7 +26,7 @@ import { getProductExtend } from "../../../booking/info2/service/addService/util
|
|
|
26
26
|
import { holderId, isDaysBooking, isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
|
|
27
27
|
import { isBooking4Shop } from "../../../booking/info/utils";
|
|
28
28
|
import { useService } from "../../../booking/info/service/serviceManager";
|
|
29
|
-
import
|
|
29
|
+
import ProductDisplayAdapter, { resolveProductDisplayConfig } from "../ProductDisplayAdapter";
|
|
30
30
|
import "./index.less";
|
|
31
31
|
import { addService, addServiceScroll, createSimpleCacheItem, genServiceKey, getIsShowNumber, isSameProduct } from "../../utils";
|
|
32
32
|
import NotAvailable from "../notAvailable";
|
|
@@ -34,6 +34,7 @@ import dayjs from 'dayjs';
|
|
|
34
34
|
import { useProducts } from "../../hooks/pisellos";
|
|
35
35
|
import { createCacheItem, genValues, isBundle, isOption, setHandleSetService } from "./utils";
|
|
36
36
|
import { useToast } from '@pisell/materials';
|
|
37
|
+
import { useIsActive } from "../../context/IsActiveContext";
|
|
37
38
|
var productListLayout = {
|
|
38
39
|
grid: true,
|
|
39
40
|
config: '12:12'
|
|
@@ -52,11 +53,13 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
52
53
|
state = props.state,
|
|
53
54
|
dispatch = props.dispatch,
|
|
54
55
|
_props$renderMode = props.renderMode,
|
|
55
|
-
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode
|
|
56
|
+
renderMode = _props$renderMode === void 0 ? 'current' : _props$renderMode,
|
|
57
|
+
productDisplayConfig = props.productDisplayConfig;
|
|
56
58
|
var context = useEngineContext();
|
|
57
59
|
var notAvailableRef = useRef(null);
|
|
58
60
|
var isLoadedServiceRef = useRef(false);
|
|
59
61
|
request.setRequest(context.appHelper.utils.request);
|
|
62
|
+
var isActive = useIsActive();
|
|
60
63
|
var Toast = useToast();
|
|
61
64
|
var _useService = useService({
|
|
62
65
|
renderMode: renderMode,
|
|
@@ -71,12 +74,25 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
71
74
|
_useState2 = _slicedToArray(_useState, 2),
|
|
72
75
|
currentProduct = _useState2[0],
|
|
73
76
|
setCurrentProduct = _useState2[1];
|
|
77
|
+
var _useState3 = useState(true),
|
|
78
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
79
|
+
firstLoading = _useState4[0],
|
|
80
|
+
setFirstLoading = _useState4[1];
|
|
74
81
|
var stateRef = useRef(state);
|
|
75
82
|
stateRef.current = state;
|
|
76
83
|
var _useProducts = useProducts(),
|
|
77
84
|
getProducts = _useProducts.getProducts,
|
|
78
85
|
products = _useProducts.products,
|
|
79
86
|
loading = _useProducts.loading;
|
|
87
|
+
useEffect(function () {
|
|
88
|
+
var timer = setTimeout(function () {
|
|
89
|
+
setFirstLoading(false);
|
|
90
|
+
}, 300);
|
|
91
|
+
return function () {
|
|
92
|
+
clearTimeout(timer);
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
|
|
80
96
|
// 组件卸载时清理所有定时器
|
|
81
97
|
useEffect(function () {
|
|
82
98
|
return function () {
|
|
@@ -140,8 +156,10 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
140
156
|
});
|
|
141
157
|
});
|
|
142
158
|
useMemo(function () {
|
|
143
|
-
|
|
144
|
-
|
|
159
|
+
if (isActive) {
|
|
160
|
+
setHandleSetService(scanAddService);
|
|
161
|
+
}
|
|
162
|
+
}, [isActive]);
|
|
145
163
|
|
|
146
164
|
/*
|
|
147
165
|
const removeNotAvailableService = (list: any) => {
|
|
@@ -543,20 +561,37 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
543
561
|
});
|
|
544
562
|
}
|
|
545
563
|
}, [renderMode, currentDate, customerId, menuList, currentDatetime]);
|
|
564
|
+
|
|
565
|
+
// 产品展示配置,支持字符串预设或完整配置对象
|
|
566
|
+
var finalDisplayConfig = useMemo(function () {
|
|
567
|
+
// 解析配置(支持字符串或对象)
|
|
568
|
+
var resolvedConfig = resolveProductDisplayConfig(productDisplayConfig);
|
|
569
|
+
|
|
570
|
+
// 如果是 ProductSelect 模式,合并默认的 layout 和 setting
|
|
571
|
+
if (resolvedConfig.displayMode === 'product-select') {
|
|
572
|
+
var _resolvedConfig$produ, _resolvedConfig$produ2;
|
|
573
|
+
return _objectSpread(_objectSpread({}, resolvedConfig), {}, {
|
|
574
|
+
productSelectConfig: _objectSpread(_objectSpread({}, resolvedConfig.productSelectConfig), {}, {
|
|
575
|
+
layout: ((_resolvedConfig$produ = resolvedConfig.productSelectConfig) === null || _resolvedConfig$produ === void 0 ? void 0 : _resolvedConfig$produ.layout) || productListLayout,
|
|
576
|
+
productListSetting: ((_resolvedConfig$produ2 = resolvedConfig.productSelectConfig) === null || _resolvedConfig$produ2 === void 0 ? void 0 : _resolvedConfig$produ2.productListSetting) || productListSetting
|
|
577
|
+
})
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
return resolvedConfig;
|
|
581
|
+
}, [productDisplayConfig]);
|
|
546
582
|
return useMemo(function () {
|
|
547
583
|
if (renderMode === 'current') {
|
|
548
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
584
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ProductDisplayAdapter, {
|
|
585
|
+
config: finalDisplayConfig,
|
|
549
586
|
dataSource: renderList,
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
loading: !renderList.length && loading,
|
|
554
|
-
productListSetting: productListSetting
|
|
587
|
+
loading: !renderList.length && loading || firstLoading,
|
|
588
|
+
currentProductId: currentProduct === null || currentProduct === void 0 ? void 0 : currentProduct.id,
|
|
589
|
+
onSelectProduct: handleSelectProduct
|
|
555
590
|
}), /*#__PURE__*/React.createElement(NotAvailable, {
|
|
556
591
|
ref: notAvailableRef
|
|
557
592
|
}));
|
|
558
593
|
}
|
|
559
594
|
return null;
|
|
560
|
-
}, [state.service.addModal, locales, renderList, state.amountSymbol, state.renderType, state === null || state === void 0 ? void 0 : state.activeCartId, holderId(state), loading, currentProduct, isBooking4]);
|
|
595
|
+
}, [firstLoading, state.service.addModal, locales, renderList, state.amountSymbol, state.renderType, state === null || state === void 0 ? void 0 : state.activeCartId, holderId(state), loading, currentProduct, isBooking4, finalDisplayConfig]);
|
|
561
596
|
};
|
|
562
597
|
export default AddSerivce;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
|
|
1
2
|
interface AddServiceVariantProps {
|
|
2
3
|
globalState: any;
|
|
3
4
|
setGlobalState: any;
|
|
5
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
4
6
|
}
|
|
5
7
|
declare const AddServiceVariant: (props: AddServiceVariantProps) => JSX.Element;
|
|
6
8
|
export default AddServiceVariant;
|
|
@@ -8,7 +8,8 @@ import React, { useRef } from 'react';
|
|
|
8
8
|
import AddService from "./addService";
|
|
9
9
|
var AddServiceVariant = function AddServiceVariant(props) {
|
|
10
10
|
var globalState = props.globalState,
|
|
11
|
-
setGlobalState = props.setGlobalState
|
|
11
|
+
setGlobalState = props.setGlobalState,
|
|
12
|
+
productDisplayConfig = props.productDisplayConfig;
|
|
12
13
|
var stateRef = useRef(globalState);
|
|
13
14
|
stateRef.current = globalState;
|
|
14
15
|
var dispatch = function dispatch(_ref) {
|
|
@@ -22,7 +23,8 @@ var AddServiceVariant = function AddServiceVariant(props) {
|
|
|
22
23
|
};
|
|
23
24
|
return /*#__PURE__*/React.createElement(AddService, {
|
|
24
25
|
state: globalState,
|
|
25
|
-
dispatch: dispatch
|
|
26
|
+
dispatch: dispatch,
|
|
27
|
+
productDisplayConfig: productDisplayConfig
|
|
26
28
|
});
|
|
27
29
|
};
|
|
28
30
|
export default AddServiceVariant;
|
|
@@ -4,9 +4,33 @@ import "./index.less";
|
|
|
4
4
|
import { Menu } from 'antd';
|
|
5
5
|
import { SettingOutlined } from '@ant-design/icons';
|
|
6
6
|
import { locales } from '@pisell/utils';
|
|
7
|
-
import { ConfigProvider } from '@pisell/materials';
|
|
8
|
-
var index = function index() {
|
|
7
|
+
import { ConfigProvider, Iconfont } from '@pisell/materials';
|
|
8
|
+
var index = function index(props) {
|
|
9
|
+
var _props$activeNavKey = props.activeNavKey,
|
|
10
|
+
activeNavKey = _props$activeNavKey === void 0 ? 'ticket' : _props$activeNavKey,
|
|
11
|
+
onNavChange = props.onNavChange;
|
|
9
12
|
var status = useNetworkStatus();
|
|
13
|
+
|
|
14
|
+
// 导航项配置
|
|
15
|
+
var navItems = [{
|
|
16
|
+
key: 'ticket',
|
|
17
|
+
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
18
|
+
type: "pisell2-ticket",
|
|
19
|
+
style: {
|
|
20
|
+
fontSize: 32
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
label: ''
|
|
24
|
+
}, {
|
|
25
|
+
key: 'food',
|
|
26
|
+
label: '',
|
|
27
|
+
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
28
|
+
type: "pisell2-food",
|
|
29
|
+
style: {
|
|
30
|
+
fontSize: 32
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
}];
|
|
10
34
|
var items = [{
|
|
11
35
|
key: '1',
|
|
12
36
|
icon: /*#__PURE__*/React.createElement(SettingOutlined, null),
|
|
@@ -43,6 +67,11 @@ var index = function index() {
|
|
|
43
67
|
window.location.href = '/login';
|
|
44
68
|
}
|
|
45
69
|
};
|
|
70
|
+
|
|
71
|
+
// 处理导航项点击
|
|
72
|
+
var handleNavClick = function handleNavClick(key) {
|
|
73
|
+
onNavChange === null || onNavChange === void 0 || onNavChange(key);
|
|
74
|
+
};
|
|
46
75
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
76
|
className: "pisell-ticket-booking-menu-bar"
|
|
48
77
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -58,21 +87,15 @@ var index = function index() {
|
|
|
58
87
|
fill: "#8157D5"
|
|
59
88
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
60
89
|
className: "nav-wrapper"
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, /*#__PURE__*/React.createElement("
|
|
70
|
-
d: "M13.8 7.05078V5.48828M13.8 14.082V12.5195M13.8 21.1133V19.5508M6.12 0.800781H27.88C29.6722 0.800781 30.5683 0.800781 31.2528 1.14139C31.8549 1.44099 32.3444 1.91905 32.6512 2.50706C33 3.17554 33 4.05062 33 5.80078V7.83203C29.9072 7.83203 27.4 10.2805 27.4 13.3008C27.4 16.3211 29.9072 18.7695 33 18.7695V20.8008C33 22.5509 33 23.426 32.6512 24.0945C32.3444 24.6825 31.8549 25.1606 31.2528 25.4602C30.5683 25.8008 29.6722 25.8008 27.88 25.8008H6.12C4.32783 25.8008 3.43175 25.8008 2.74723 25.4602C2.14511 25.1606 1.65557 24.6825 1.34878 24.0945C1 23.426 1 22.5509 1 20.8008V18.7695C4.09279 18.7695 6.6 16.3211 6.6 13.3008C6.6 10.2805 4.09279 7.83203 1 7.83203V5.80078C1 4.05062 1 3.17554 1.34878 2.50706C1.65557 1.91905 2.14511 1.44099 2.74723 1.14139C3.43175 0.800781 4.32783 0.800781 6.12 0.800781Z",
|
|
71
|
-
stroke: "white",
|
|
72
|
-
"stroke-width": "1.5",
|
|
73
|
-
"stroke-linecap": "round",
|
|
74
|
-
"stroke-linejoin": "round"
|
|
75
|
-
}))))), /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
}, navItems.map(function (navItem) {
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
key: navItem.key,
|
|
93
|
+
className: "nav-item ".concat(activeNavKey === navItem.key ? 'active' : ''),
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return handleNavClick(navItem.key);
|
|
96
|
+
}
|
|
97
|
+
}, navItem.icon && navItem.icon, navItem.label && navItem.label);
|
|
98
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
76
99
|
className: "menu-wrapper"
|
|
77
100
|
}, /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
78
101
|
theme: {
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
align-items: center;
|
|
31
|
+
gap: 12px;
|
|
31
32
|
|
|
32
33
|
.nav-item {
|
|
33
34
|
cursor: pointer;
|
|
@@ -38,10 +39,35 @@
|
|
|
38
39
|
justify-content: center;
|
|
39
40
|
align-items: center;
|
|
40
41
|
position: relative;
|
|
41
|
-
background:
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: rgba(255, 255, 255, 0.75);
|
|
44
|
+
transition: all 0.3s ease;
|
|
45
|
+
|
|
46
|
+
svg {
|
|
47
|
+
transition: all 0.3s ease;
|
|
48
|
+
|
|
49
|
+
path {
|
|
50
|
+
stroke: rgba(255, 255, 255, 0.75);
|
|
51
|
+
transition: all 0.3s ease;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: rgba(129, 87, 213, 0.1);
|
|
57
|
+
color: rgba(255, 255, 255, 0.95);
|
|
58
|
+
|
|
59
|
+
svg path {
|
|
60
|
+
stroke: rgba(255, 255, 255, 0.95);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
42
63
|
|
|
43
64
|
&.active {
|
|
44
65
|
background: #8157d5;
|
|
66
|
+
color: #ffffff;
|
|
67
|
+
|
|
68
|
+
svg path {
|
|
69
|
+
stroke: #ffffff;
|
|
70
|
+
}
|
|
45
71
|
|
|
46
72
|
&::before {
|
|
47
73
|
display: block;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import './index.less';
|
|
2
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
|
|
2
3
|
export declare const _formatBookingDetail: (data: any, modalState: any) => any;
|
|
3
|
-
declare const TicketBooking: (
|
|
4
|
+
declare const TicketBooking: (props: {
|
|
5
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
6
|
+
isShowTimeBar?: boolean;
|
|
7
|
+
isShowFloatButtons?: boolean;
|
|
8
|
+
}) => JSX.Element;
|
|
4
9
|
export default TicketBooking;
|
|
@@ -32,7 +32,7 @@ import dayjs from 'dayjs';
|
|
|
32
32
|
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
33
33
|
import { useStore } from "../../miniRedux";
|
|
34
34
|
import BookingInfo from "../../../../components/booking/info";
|
|
35
|
-
import { formatDateToStr, getNextTimeSlice, getDisabledEdit, restoreProductOtherData, getIsParallelResourcesBooking, formatHolder } from "../../utils";
|
|
35
|
+
import { formatDateToStr, getNextTimeSlice, getDisabledEdit, restoreProductOtherData, getIsParallelResourcesBooking, formatHolder, getBoardConfigCache, setBoardConfigCache } from "../../utils";
|
|
36
36
|
import AddServiceVariant from "../addServiceVariant";
|
|
37
37
|
import TimeBar from "../timeBar";
|
|
38
38
|
import { formatProducts } from "../../../booking/info/service2/utils";
|
|
@@ -49,6 +49,9 @@ import { useCustomer } from "../../hooks/pisellos";
|
|
|
49
49
|
import { useMemoizedFn } from 'ahooks';
|
|
50
50
|
import useScanManager from "../../hooks/pisellos/useScanManager";
|
|
51
51
|
import { useDebounceFn } from 'ahooks';
|
|
52
|
+
import { useOsKey } from "../../context";
|
|
53
|
+
import { useIsActive } from "../../context/IsActiveContext";
|
|
54
|
+
import { useShopDiscountModule } from "../../hooks/pisellos/useShopDiscountModule";
|
|
52
55
|
export var _formatBookingDetail = function _formatBookingDetail(data, modalState) {
|
|
53
56
|
var _bookings$list, _bookings$list2;
|
|
54
57
|
var customer_id = data.customer_id,
|
|
@@ -218,8 +221,13 @@ var formatProductValues = function formatProductValues(data) {
|
|
|
218
221
|
});
|
|
219
222
|
});
|
|
220
223
|
};
|
|
221
|
-
var TicketBooking = function TicketBooking() {
|
|
224
|
+
var TicketBooking = function TicketBooking(props) {
|
|
222
225
|
var _engineContext$appHel2, _state$modalState2, _state$modalState4;
|
|
226
|
+
var productDisplayConfig = props.productDisplayConfig,
|
|
227
|
+
_props$isShowTimeBar = props.isShowTimeBar,
|
|
228
|
+
isShowTimeBar = _props$isShowTimeBar === void 0 ? true : _props$isShowTimeBar,
|
|
229
|
+
_props$isShowFloatBut = props.isShowFloatButtons,
|
|
230
|
+
isShowFloatButtons = _props$isShowFloatBut === void 0 ? true : _props$isShowFloatBut;
|
|
223
231
|
var _useStore = useStore(),
|
|
224
232
|
_useStore2 = _slicedToArray(_useStore, 2),
|
|
225
233
|
state = _useStore2[0],
|
|
@@ -244,6 +252,7 @@ var TicketBooking = function TicketBooking() {
|
|
|
244
252
|
var _listTimerRef = useRef();
|
|
245
253
|
var _timerRef = useRef();
|
|
246
254
|
var _callbackFnRef = useRef();
|
|
255
|
+
var _isFirstLoadBoardConfigRef = useRef(true); // 跟踪 boardConfig 是否首次加载
|
|
247
256
|
var _useState = useState(0),
|
|
248
257
|
_useState2 = _slicedToArray(_useState, 2),
|
|
249
258
|
activeBookingId = _useState2[0],
|
|
@@ -254,6 +263,9 @@ var TicketBooking = function TicketBooking() {
|
|
|
254
263
|
setShowTerminalUpgradeModal = _useState4[1];
|
|
255
264
|
var pisellFloatingPanelRef = useRef(null);
|
|
256
265
|
var closeRef = useRef(null);
|
|
266
|
+
var shopDiscount = useShopDiscountModule();
|
|
267
|
+
var isActive = useIsActive();
|
|
268
|
+
var osKey = useOsKey();
|
|
257
269
|
var bookingTicket = useBookingTicket();
|
|
258
270
|
var _useScanGlobal = useScanGlobal(),
|
|
259
271
|
openScan = _useScanGlobal.openScan,
|
|
@@ -302,16 +314,16 @@ var TicketBooking = function TicketBooking() {
|
|
|
302
314
|
}
|
|
303
315
|
}
|
|
304
316
|
});
|
|
305
|
-
useMemo(function () {
|
|
306
|
-
openScan(function (data) {
|
|
307
|
-
handleScan(data);
|
|
308
|
-
});
|
|
309
|
-
}, []);
|
|
310
317
|
useEffect(function () {
|
|
318
|
+
if (isActive) {
|
|
319
|
+
openScan(function (data) {
|
|
320
|
+
handleScan(data);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
311
323
|
return function () {
|
|
312
324
|
closeScan();
|
|
313
325
|
};
|
|
314
|
-
}, []);
|
|
326
|
+
}, [isActive]);
|
|
315
327
|
var _useDebounceFn = useDebounceFn(function (type, orderId) {
|
|
316
328
|
// 支付成功后清空状态
|
|
317
329
|
try {
|
|
@@ -720,27 +732,57 @@ var TicketBooking = function TicketBooking() {
|
|
|
720
732
|
*/
|
|
721
733
|
var _getBoardConfig = /*#__PURE__*/function () {
|
|
722
734
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
723
|
-
var
|
|
724
|
-
var bookingConfigParams, data;
|
|
735
|
+
var bookingConfigParams, isHasCache, cachedBoardConfig, _cachedBoardConfig$co, data;
|
|
725
736
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
726
737
|
while (1) switch (_context2.prev = _context2.next) {
|
|
727
738
|
case 0:
|
|
728
|
-
bookingConfigParams = state.bookingConfigParams;
|
|
729
|
-
|
|
739
|
+
bookingConfigParams = state.bookingConfigParams;
|
|
740
|
+
isHasCache = false; // 1. 如果是首次加载,尝试从缓存中获取数据
|
|
741
|
+
if (_isFirstLoadBoardConfigRef.current && osKey) {
|
|
742
|
+
cachedBoardConfig = getBoardConfigCache(osKey);
|
|
743
|
+
if (cachedBoardConfig) {
|
|
744
|
+
isHasCache = true;
|
|
745
|
+
// 先展示缓存数据
|
|
746
|
+
setState({
|
|
747
|
+
bookingConfig: cachedBoardConfig
|
|
748
|
+
});
|
|
749
|
+
console.log('[BoardConfigCache] 使用缓存数据展示');
|
|
750
|
+
|
|
751
|
+
// 如果缓存数据中有 quick_time 配置,也加载快捷时间产品
|
|
752
|
+
if (cachedBoardConfig !== null && cachedBoardConfig !== void 0 && (_cachedBoardConfig$co = cachedBoardConfig.config) !== null && _cachedBoardConfig$co !== void 0 && (_cachedBoardConfig$co = _cachedBoardConfig$co.information_tab) !== null && _cachedBoardConfig$co !== void 0 && (_cachedBoardConfig$co = _cachedBoardConfig$co.appointment_card) !== null && _cachedBoardConfig$co !== void 0 && _cachedBoardConfig$co.quick_time) {
|
|
753
|
+
_getAddTimeProducts();
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
_isFirstLoadBoardConfigRef.current = false;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
// 2. 无论是否有缓存,都调用接口获取最新数据
|
|
760
|
+
_context2.prev = 3;
|
|
761
|
+
_context2.next = 6;
|
|
730
762
|
return getBookingConfig(_objectSpread({}, bookingConfigParams));
|
|
731
|
-
case
|
|
763
|
+
case 6:
|
|
732
764
|
data = _context2.sent;
|
|
733
|
-
if (
|
|
734
|
-
|
|
765
|
+
if (!isHasCache) {
|
|
766
|
+
setState({
|
|
767
|
+
bookingConfig: data
|
|
768
|
+
});
|
|
735
769
|
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
770
|
+
// 4. 将新数据缓存到 storage
|
|
771
|
+
if (osKey && data) {
|
|
772
|
+
setBoardConfigCache(osKey, data);
|
|
773
|
+
console.log('[BoardConfigCache] 已更新缓存');
|
|
774
|
+
}
|
|
775
|
+
_context2.next = 14;
|
|
776
|
+
break;
|
|
777
|
+
case 11:
|
|
778
|
+
_context2.prev = 11;
|
|
779
|
+
_context2.t0 = _context2["catch"](3);
|
|
780
|
+
console.error('[BoardConfigCache] 获取配置失败:', _context2.t0);
|
|
781
|
+
case 14:
|
|
740
782
|
case "end":
|
|
741
783
|
return _context2.stop();
|
|
742
784
|
}
|
|
743
|
-
}, _callee2);
|
|
785
|
+
}, _callee2, null, [[3, 11]]);
|
|
744
786
|
}));
|
|
745
787
|
return function _getBoardConfig() {
|
|
746
788
|
return _ref2.apply(this, arguments);
|
|
@@ -1265,10 +1307,11 @@ var TicketBooking = function TicketBooking() {
|
|
|
1265
1307
|
productExtensionType: state.productExtensionType,
|
|
1266
1308
|
isBookingTicket2: true
|
|
1267
1309
|
}),
|
|
1268
|
-
setGlobalState: _setModalState
|
|
1269
|
-
|
|
1310
|
+
setGlobalState: _setModalState,
|
|
1311
|
+
productDisplayConfig: productDisplayConfig
|
|
1312
|
+
}), isShowFloatButtons && /*#__PURE__*/React.createElement(FloatButtons, {
|
|
1270
1313
|
items: floatButtons
|
|
1271
|
-
})), /*#__PURE__*/React.createElement(TimeBar, {
|
|
1314
|
+
})), isShowTimeBar && /*#__PURE__*/React.createElement(TimeBar, {
|
|
1272
1315
|
onCreateClick: handleCreateClick,
|
|
1273
1316
|
setGlobalState: setState,
|
|
1274
1317
|
globalState: state,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* IsActive Context
|
|
4
|
+
* 用于在 TicketBooking 组件树中提供 isActive 状态
|
|
5
|
+
* isActive 用于标识当前组件是否处于激活状态
|
|
6
|
+
*/
|
|
7
|
+
interface IsActiveContextType {
|
|
8
|
+
/** 是否激活 */
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const IsActiveContext: React.Context<IsActiveContextType>;
|
|
12
|
+
interface IsActiveProviderProps {
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* IsActive Provider
|
|
18
|
+
* 提供 isActive 给子组件使用
|
|
19
|
+
*/
|
|
20
|
+
export declare const IsActiveProvider: React.FC<IsActiveProviderProps>;
|
|
21
|
+
/**
|
|
22
|
+
* useIsActive Hook
|
|
23
|
+
* 在子组件中使用此 hook 获取 isActive 状态
|
|
24
|
+
*/
|
|
25
|
+
export declare const useIsActive: () => boolean;
|
|
26
|
+
export default IsActiveContext;
|