@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.
- 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 -7
- 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 +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- 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 +8 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/checkout/PaymentModal.js +34 -28
- package/es/components/checkout/hooks/useWalletPass.js +36 -21
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/index.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/list/List.js +957 -0
- package/es/components/list/List.less +2 -0
- package/es/components/list/ResponsiveWrapper.js +130 -0
- package/es/components/list/TestResponsiveWrapper.js +816 -0
- package/es/components/list/TestResponsiveWrapper.less +968 -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.js +1 -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.js +2 -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.js +1 -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.js +1 -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.js +1 -0
- package/es/components/list/components/Tab/types.js +1 -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.js +2 -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.js +1 -0
- package/es/components/list/examples/GroupedListExample.js +207 -0
- package/es/components/list/hooks/index.js +3 -0
- package/es/components/list/hooks/useDevice.js +102 -0
- package/es/components/list/hooks/useListState.js +176 -0
- package/es/components/list/hooks/useWaterfall.js +161 -0
- package/es/components/list/index.js +7 -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.js +1 -0
- package/es/components/list/utils/getText.js +150 -0
- package/es/components/list/utils/index.js +5 -0
- package/es/components/pay/toB/store/hooks.js +19 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -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.js +273 -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.js +4 -2
- 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.js +37 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
- package/es/components/ticketBooking/context/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
- package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
- 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.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.js +50 -1
- package/es/components/ticketBooking/utils/productCache.js +184 -0
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/index.js +3 -1
- 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.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -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.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -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.js +100 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -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.js +239 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -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.js +33 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -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.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -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.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -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.js +85 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -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.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -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.js +47 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -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.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -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.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -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.js +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- 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 +8 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/checkout/PaymentModal.js +20 -16
- package/lib/components/checkout/hooks/useWalletPass.js +57 -45
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/index.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/list/List.js +771 -0
- package/lib/components/list/List.less +2 -0
- package/lib/components/list/ResponsiveWrapper.js +145 -0
- package/lib/components/list/TestResponsiveWrapper.js +493 -0
- package/lib/components/list/TestResponsiveWrapper.less +968 -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.js +35 -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.js +41 -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.js +35 -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.js +35 -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.js +35 -0
- package/lib/components/list/components/Tab/types.js +17 -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.js +41 -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.js +35 -0
- package/lib/components/list/examples/GroupedListExample.js +210 -0
- package/lib/components/list/hooks/index.js +47 -0
- package/lib/components/list/hooks/useDevice.js +96 -0
- package/lib/components/list/hooks/useListState.js +149 -0
- package/lib/components/list/hooks/useWaterfall.js +124 -0
- package/lib/components/list/index.js +60 -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.js +17 -0
- package/lib/components/list/utils/getText.js +95 -0
- package/lib/components/list/utils/index.js +43 -0
- package/lib/components/pay/toB/store/hooks.js +16 -8
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -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.js +247 -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 +45 -11
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +3 -2
- 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.js +56 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
- package/lib/components/ticketBooking/context/index.js +44 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
- 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.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.js +70 -2
- package/lib/components/ticketBooking/utils/productCache.js +144 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/index.js +6 -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.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -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.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -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.js +129 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -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.js +178 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -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.js +63 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -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.js +62 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -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.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -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.js +115 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -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.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -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.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -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.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -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.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -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.js +49 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -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 +1 -1
- package/es/components/booking/components/actionButtons/index.d.ts +0 -31
- package/es/components/booking/components/footer/index.d.ts +0 -11
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/info2/cartClientCard/index.d.ts +0 -6
- package/es/components/checkout/hooks/useWalletPass.d.ts +0 -40
- package/es/components/pay/toB/store/hooks.d.ts +0 -15
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -3
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
- package/es/components/ticketBooking/utils/index.d.ts +0 -62
- package/es/index.d.ts +0 -63
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
- package/lib/components/booking/components/actionButtons/index.d.ts +0 -31
- package/lib/components/booking/components/footer/index.d.ts +0 -11
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/info2/cartClientCard/index.d.ts +0 -6
- package/lib/components/checkout/hooks/useWalletPass.d.ts +0 -40
- package/lib/components/pay/toB/store/hooks.d.ts +0 -15
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -6
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -3
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +0 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +0 -3
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +0 -25
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +0 -5
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +0 -5
- package/lib/components/ticketBooking/utils/index.d.ts +0 -62
- package/lib/index.d.ts +0 -63
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +0 -12
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/* 响应式样式 */
|
|
2
|
+
|
|
3
|
+
/* 设备类型样式 */
|
|
4
|
+
.pisell-list {
|
|
5
|
+
&.pisell-list-pc {
|
|
6
|
+
min-width: 320px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&.pisell-list-pad {
|
|
10
|
+
min-width: 280px;
|
|
11
|
+
|
|
12
|
+
.list-items {
|
|
13
|
+
.list-item {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&.pisell-list-mobile {
|
|
20
|
+
min-width: 240px;
|
|
21
|
+
|
|
22
|
+
.list-items {
|
|
23
|
+
.list-item {
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* 响应式适配 */
|
|
31
|
+
@media (max-width: 768px) {
|
|
32
|
+
.pisell-list {
|
|
33
|
+
/* 垂直模式移动端适配 */
|
|
34
|
+
&.pisell-list-vertical {
|
|
35
|
+
.list-scroll-float-button {
|
|
36
|
+
.scroll-pause-button {
|
|
37
|
+
bottom: 16px !important;
|
|
38
|
+
padding: 12px !important;
|
|
39
|
+
|
|
40
|
+
& > div {
|
|
41
|
+
width: 28px !important;
|
|
42
|
+
height: 28px !important;
|
|
43
|
+
|
|
44
|
+
.pisell-iconfont {
|
|
45
|
+
font-size: 16px !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* 水平模式移动端适配 */
|
|
53
|
+
&.pisell-list-horizontal {
|
|
54
|
+
.list-scroll-float-button {
|
|
55
|
+
.scroll-pause-button {
|
|
56
|
+
right: 16px !important;
|
|
57
|
+
padding: 12px !important;
|
|
58
|
+
|
|
59
|
+
& > div {
|
|
60
|
+
width: 28px !important;
|
|
61
|
+
height: 28px !important;
|
|
62
|
+
|
|
63
|
+
.pisell-iconfont {
|
|
64
|
+
font-size: 16px !important;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pisell-list-header {
|
|
72
|
+
|
|
73
|
+
.pisell-list-tabs {
|
|
74
|
+
gap: 6px;
|
|
75
|
+
|
|
76
|
+
.pisell-tab-item {
|
|
77
|
+
padding-left: 12px;
|
|
78
|
+
padding-right: 12px;
|
|
79
|
+
height: 36px;
|
|
80
|
+
|
|
81
|
+
.pisell-tab-item-label {
|
|
82
|
+
font-size: 12px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.list-content {
|
|
89
|
+
|
|
90
|
+
.list-items {
|
|
91
|
+
.list-item {
|
|
92
|
+
.default-item {
|
|
93
|
+
padding: 10px;
|
|
94
|
+
min-height: 50px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.card-item {
|
|
98
|
+
.card-image {
|
|
99
|
+
width: 100px;
|
|
100
|
+
height: 80px;
|
|
101
|
+
|
|
102
|
+
.image-text {
|
|
103
|
+
font-size: 18px;
|
|
104
|
+
|
|
105
|
+
.subtitle {
|
|
106
|
+
font-size: 12px;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.card-content {
|
|
112
|
+
padding: 12px 16px;
|
|
113
|
+
|
|
114
|
+
.card-header {
|
|
115
|
+
.card-title {
|
|
116
|
+
font-size: 14px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.card-subtitle {
|
|
120
|
+
font-size: 12px;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.card-footer {
|
|
125
|
+
.card-price {
|
|
126
|
+
.price-main {
|
|
127
|
+
font-size: 16px;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media (max-width: 480px) {
|
|
141
|
+
.pisell-list {
|
|
142
|
+
.pisell-list-header {
|
|
143
|
+
.pisell-list-tabs {
|
|
144
|
+
gap: 4px;
|
|
145
|
+
|
|
146
|
+
.pisell-tab-item {
|
|
147
|
+
padding-left: 8px;
|
|
148
|
+
padding-right: 8px;
|
|
149
|
+
height: 32px;
|
|
150
|
+
|
|
151
|
+
.pisell-tab-item-label {
|
|
152
|
+
font-size: 11px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.list-content {
|
|
159
|
+
.list-items {
|
|
160
|
+
grid-gap: 8px !important;
|
|
161
|
+
column-gap: 8px !important;
|
|
162
|
+
row-gap: 8px !important;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 国际化文案获取工具函数
|
|
3
|
+
* 参考 AmountSummary 组件的实现方式,使用 useEngineContext 获取语言设置
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* import { useGetText } from './utils';
|
|
8
|
+
* import locales from './locales';
|
|
9
|
+
*
|
|
10
|
+
* const MyComponent = () => {
|
|
11
|
+
* const { getText, getTextFunc } = useGetText(locales);
|
|
12
|
+
*
|
|
13
|
+
* // 获取字符串文案
|
|
14
|
+
* const title = getText('component.title', 'Default Title');
|
|
15
|
+
*
|
|
16
|
+
* // 获取函数类型文案
|
|
17
|
+
* const formatFunc = getTextFunc('component.format');
|
|
18
|
+
* const formattedText = typeof formatFunc === 'function'
|
|
19
|
+
* ? formatFunc(arg1, arg2)
|
|
20
|
+
* : 'Default Text';
|
|
21
|
+
*
|
|
22
|
+
* return <div>{title}</div>;
|
|
23
|
+
* };
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import useEngineContext from "../../../hooks/useEngineContext";
|
|
28
|
+
// 导入全局 locales 作为回退
|
|
29
|
+
// import { locales } from '@pisell/utils';
|
|
30
|
+
|
|
31
|
+
// 支持的语言类型
|
|
32
|
+
|
|
33
|
+
// 本地化文案对象类型
|
|
34
|
+
|
|
35
|
+
// getText 函数返回类型
|
|
36
|
+
|
|
37
|
+
// Engine Context 类型定义
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 使用 useEngineContext 创建本地化文案获取函数的 Hook
|
|
41
|
+
* @param locales - 本地化文案对象
|
|
42
|
+
* @returns getText 和 getTextFunc 函数
|
|
43
|
+
*/
|
|
44
|
+
export var useGetText = function useGetText(locales) {
|
|
45
|
+
var context = useEngineContext();
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 获取当前语言
|
|
49
|
+
* 参考 AmountSummary 组件的实现方式
|
|
50
|
+
*/
|
|
51
|
+
var getCurrentLanguage = function getCurrentLanguage() {
|
|
52
|
+
var _context$appHelper, _context$appHelper$ge, _context$appHelper$ge2, _context$appHelper2;
|
|
53
|
+
return ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getApp) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.call(_context$appHelper)) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.locales) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge2 = _context$appHelper$ge.getLocale) === null || _context$appHelper$ge2 === void 0 ? void 0 : _context$appHelper$ge2.call(_context$appHelper$ge)) || ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.storage) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.get('umi_locale')) || 'zh-CN';
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 获取字符串类型的文案
|
|
58
|
+
* @param key - 文案键名
|
|
59
|
+
* @param fallback - 回退文案
|
|
60
|
+
* @returns 本地化文案字符串
|
|
61
|
+
*/
|
|
62
|
+
var getText = function getText(key, fallback) {
|
|
63
|
+
var _locales;
|
|
64
|
+
var currentLang = getCurrentLanguage();
|
|
65
|
+
var localText = (_locales = locales[currentLang]) === null || _locales === void 0 ? void 0 : _locales[key];
|
|
66
|
+
if (typeof localText === 'string') {
|
|
67
|
+
return localText;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 回退到全局语言包(如果可用)
|
|
71
|
+
// const globalText = locales?.getText(key);
|
|
72
|
+
// if (globalText) {
|
|
73
|
+
// return globalText;
|
|
74
|
+
// }
|
|
75
|
+
|
|
76
|
+
// 最终回退到默认值
|
|
77
|
+
return fallback || '';
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 获取任意类型的文案(包括函数类型)
|
|
82
|
+
* @param key - 文案键名
|
|
83
|
+
* @returns 本地化文案(可能是字符串或函数)
|
|
84
|
+
*/
|
|
85
|
+
var getTextFunc = function getTextFunc(key) {
|
|
86
|
+
var _locales2;
|
|
87
|
+
var currentLang = getCurrentLanguage();
|
|
88
|
+
var localText = (_locales2 = locales[currentLang]) === null || _locales2 === void 0 ? void 0 : _locales2[key];
|
|
89
|
+
return localText;
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
getText: getText,
|
|
93
|
+
getTextFunc: getTextFunc,
|
|
94
|
+
getCurrentLanguage: getCurrentLanguage
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* 创建本地化文案获取函数(非 Hook 版本,保持向后兼容)
|
|
100
|
+
* @param locales - 本地化文案对象
|
|
101
|
+
* @returns getText 和 getTextFunc 函数
|
|
102
|
+
* @deprecated 推荐使用 useGetText Hook 版本
|
|
103
|
+
*/
|
|
104
|
+
export var createGetText = function createGetText(locales) {
|
|
105
|
+
// 获取当前语言的函数(非 Hook 版本)
|
|
106
|
+
var getCurrentLanguage = function getCurrentLanguage() {
|
|
107
|
+
// 获取当前语言,优先从 localStorage 或其他来源获取
|
|
108
|
+
return (typeof window !== 'undefined' ? localStorage.getItem('umi_locale') : null) || 'zh-CN';
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 获取字符串类型的文案
|
|
113
|
+
* @param key - 文案键名
|
|
114
|
+
* @param fallback - 回退文案
|
|
115
|
+
* @returns 本地化文案字符串
|
|
116
|
+
*/
|
|
117
|
+
var getText = function getText(key, fallback) {
|
|
118
|
+
var _locales3;
|
|
119
|
+
var currentLang = getCurrentLanguage();
|
|
120
|
+
var localText = (_locales3 = locales[currentLang]) === null || _locales3 === void 0 ? void 0 : _locales3[key];
|
|
121
|
+
if (typeof localText === 'string') {
|
|
122
|
+
return localText;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// 回退到默认值
|
|
126
|
+
return fallback || '';
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* 获取任意类型的文案(包括函数类型)
|
|
131
|
+
* @param key - 文案键名
|
|
132
|
+
* @returns 本地化文案(可能是字符串或函数)
|
|
133
|
+
*/
|
|
134
|
+
var getTextFunc = function getTextFunc(key) {
|
|
135
|
+
var _locales4;
|
|
136
|
+
var currentLang = getCurrentLanguage();
|
|
137
|
+
var localText = (_locales4 = locales[currentLang]) === null || _locales4 === void 0 ? void 0 : _locales4[key];
|
|
138
|
+
return localText;
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
getText: getText,
|
|
142
|
+
getTextFunc: getTextFunc,
|
|
143
|
+
getCurrentLanguage: getCurrentLanguage
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* 默认导出:直接创建一个通用的 getText 函数工厂
|
|
149
|
+
*/
|
|
150
|
+
export default createGetText;
|
|
@@ -2,10 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
2
2
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
3
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
4
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useRef } from 'react';
|
|
6
6
|
import { ToBPayContext } from "./index";
|
|
7
7
|
import { usePisellOS } from "../../../../hooks/useEngineContext";
|
|
8
8
|
import { handlePayMethodList } from "./utils";
|
|
9
|
+
import { useActiveExecute } from "../../../ticketBooking/hooks/pisellos";
|
|
9
10
|
|
|
10
11
|
/**
|
|
11
12
|
* 使用商家端支付的Hook
|
|
@@ -32,15 +33,28 @@ export var useOSPaymentEffect = function useOSPaymentEffect() {
|
|
|
32
33
|
var _useToBPay = useToBPay(),
|
|
33
34
|
setOrder = _useToBPay.setOrder,
|
|
34
35
|
setPayMethodGroupList = _useToBPay.setPayMethodGroupList;
|
|
36
|
+
var _useActiveExecute = useActiveExecute(),
|
|
37
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
38
|
+
var unlisten1 = useRef(null);
|
|
39
|
+
var unlisten2 = useRef(null);
|
|
35
40
|
var osPaymentEffectOn = function osPaymentEffectOn() {
|
|
41
|
+
var wrappedOnPaymentMethodsChanged = executeIfActive(onPaymentMethodsChanged);
|
|
42
|
+
var wrappedOnOrderChanged = executeIfActive(onOrderChanged);
|
|
43
|
+
|
|
36
44
|
// 监听OS的支付方式列表变化
|
|
37
|
-
pisellOS.effects.on('payment:onPaymentMethodsChanged',
|
|
45
|
+
unlisten1.current = pisellOS.effects.on('payment:onPaymentMethodsChanged', wrappedOnPaymentMethodsChanged);
|
|
38
46
|
// 监听OS的订单信息变化,包括订单、支付项发生改变、删除、修改信息等操作
|
|
39
|
-
pisellOS.effects.on('payment:onOrderChanged',
|
|
47
|
+
unlisten2.current = pisellOS.effects.on('payment:onOrderChanged', wrappedOnOrderChanged);
|
|
40
48
|
};
|
|
41
49
|
var osPaymentEffectOff = function osPaymentEffectOff() {
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
if (unlisten1.current) {
|
|
51
|
+
var _unlisten1$current;
|
|
52
|
+
(_unlisten1$current = unlisten1.current) === null || _unlisten1$current === void 0 || _unlisten1$current.call(unlisten1);
|
|
53
|
+
}
|
|
54
|
+
if (unlisten2.current) {
|
|
55
|
+
var _unlisten2$current;
|
|
56
|
+
(_unlisten2$current = unlisten2.current) === null || _unlisten2$current === void 0 || _unlisten2$current.call(unlisten2);
|
|
57
|
+
}
|
|
44
58
|
};
|
|
45
59
|
var onPaymentMethodsChanged = /*#__PURE__*/function () {
|
|
46
60
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(res) {
|
|
@@ -0,0 +1,143 @@
|
|
|
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
import React, { useMemo, useRef } from 'react';
|
|
9
|
+
import { useSize } from 'ahooks';
|
|
10
|
+
import ProductSelect from "../../../../plus/productSelect";
|
|
11
|
+
import List from "../../../list/List";
|
|
12
|
+
import SkuCard from "../../../../plus/productSelect/ProductCard/SkuCard";
|
|
13
|
+
import { formatSkuDataSource, generateProductTabs } from "./utils";
|
|
14
|
+
import "./index.less";
|
|
15
|
+
/**
|
|
16
|
+
* 产品展示适配器组件
|
|
17
|
+
* 统一管理 ProductSelect 和 SkuList 两种展示模式
|
|
18
|
+
*/
|
|
19
|
+
var ProductDisplayAdapter = function ProductDisplayAdapter(props) {
|
|
20
|
+
var config = props.config,
|
|
21
|
+
dataSource = props.dataSource,
|
|
22
|
+
_props$loading = props.loading,
|
|
23
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
24
|
+
currentProductId = props.currentProductId,
|
|
25
|
+
onSelectProduct = props.onSelectProduct,
|
|
26
|
+
emptyDescription = props.emptyDescription,
|
|
27
|
+
style = props.style,
|
|
28
|
+
className = props.className;
|
|
29
|
+
var _config$displayMode = config.displayMode,
|
|
30
|
+
displayMode = _config$displayMode === void 0 ? 'product-select' : _config$displayMode;
|
|
31
|
+
var listRef = useRef(null);
|
|
32
|
+
var size = useSize(listRef);
|
|
33
|
+
|
|
34
|
+
// 渲染 ProductSelect 模式
|
|
35
|
+
var renderProductSelect = useMemo(function () {
|
|
36
|
+
var _ref = config.productSelectConfig || {},
|
|
37
|
+
_ref$showSearch = _ref.showSearch,
|
|
38
|
+
showSearch = _ref$showSearch === void 0 ? true : _ref$showSearch,
|
|
39
|
+
_ref$showTab = _ref.showTab,
|
|
40
|
+
showTab = _ref$showTab === void 0 ? true : _ref$showTab,
|
|
41
|
+
_ref$layout = _ref.layout,
|
|
42
|
+
layout = _ref$layout === void 0 ? {
|
|
43
|
+
grid: true,
|
|
44
|
+
config: '12:12'
|
|
45
|
+
} : _ref$layout,
|
|
46
|
+
_ref$productListSetti = _ref.productListSetting,
|
|
47
|
+
productListSetting = _ref$productListSetti === void 0 ? {
|
|
48
|
+
isProductCover: 1,
|
|
49
|
+
isTitle: 1,
|
|
50
|
+
isSubtitle: 1,
|
|
51
|
+
isPrice: 1,
|
|
52
|
+
isOriginPrice: 0,
|
|
53
|
+
isStock: 0
|
|
54
|
+
} : _ref$productListSetti;
|
|
55
|
+
return /*#__PURE__*/React.createElement(ProductSelect, {
|
|
56
|
+
dataSource: dataSource,
|
|
57
|
+
layout: layout,
|
|
58
|
+
onChange: onSelectProduct,
|
|
59
|
+
value: currentProductId,
|
|
60
|
+
loading: loading,
|
|
61
|
+
productListSetting: productListSetting,
|
|
62
|
+
showSearch: showSearch,
|
|
63
|
+
showTab: showTab,
|
|
64
|
+
emptyDescription: emptyDescription,
|
|
65
|
+
style: style
|
|
66
|
+
});
|
|
67
|
+
}, [config.productSelectConfig, dataSource, currentProductId, onSelectProduct, loading, emptyDescription, style]);
|
|
68
|
+
|
|
69
|
+
// 渲染 SkuList 模式
|
|
70
|
+
var renderSkuList = useMemo(function () {
|
|
71
|
+
var _ref2 = config.skuListConfig || {},
|
|
72
|
+
_ref2$listConfig = _ref2.listConfig,
|
|
73
|
+
listConfig = _ref2$listConfig === void 0 ? {} : _ref2$listConfig,
|
|
74
|
+
_ref2$skuCardAllConfi = _ref2.skuCardAllConfig,
|
|
75
|
+
skuCardAllConfig = _ref2$skuCardAllConfi === void 0 ? {} : _ref2$skuCardAllConfi;
|
|
76
|
+
|
|
77
|
+
// 从配置中获取各项配置
|
|
78
|
+
var displayStyle = listConfig.layout || 'grid';
|
|
79
|
+
var columns = listConfig.columns || 2;
|
|
80
|
+
var paginationType = listConfig.showPagination ? 'pager' : 'all';
|
|
81
|
+
var enableTab = listConfig.showTab || false;
|
|
82
|
+
var tabStyle = listConfig.tabStyle || 'switch';
|
|
83
|
+
var stickyTop = listConfig.stickyTop !== undefined ? listConfig.stickyTop : true;
|
|
84
|
+
var tabData = enableTab ? generateProductTabs(dataSource, tabStyle) : undefined;
|
|
85
|
+
var filteredData = dataSource.map(function (item) {
|
|
86
|
+
var _item$category, _item$category$map;
|
|
87
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
88
|
+
category: ((_item$category = item.category) === null || _item$category === void 0 || (_item$category$map = _item$category.map) === null || _item$category$map === void 0 ? void 0 : _item$category$map.call(_item$category, function (category) {
|
|
89
|
+
return "".concat(category.id);
|
|
90
|
+
})) || []
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "sku-list-container ".concat(className || ''),
|
|
95
|
+
style: style,
|
|
96
|
+
ref: listRef
|
|
97
|
+
}, /*#__PURE__*/React.createElement(List, {
|
|
98
|
+
className: "sku-list",
|
|
99
|
+
style: {
|
|
100
|
+
maxHeight: size === null || size === void 0 ? void 0 : size.height,
|
|
101
|
+
overflow: 'auto'
|
|
102
|
+
},
|
|
103
|
+
data: filteredData,
|
|
104
|
+
loading: loading,
|
|
105
|
+
displayStyle: displayStyle,
|
|
106
|
+
columns: columns,
|
|
107
|
+
paginationType: paginationType,
|
|
108
|
+
layoutDirection: "vertical"
|
|
109
|
+
// Tab 配置
|
|
110
|
+
,
|
|
111
|
+
tabStyle: enableTab ? tabStyle : 'none',
|
|
112
|
+
tabData: tabData,
|
|
113
|
+
tabGroup: "category",
|
|
114
|
+
stickyTop: stickyTop
|
|
115
|
+
// 空状态配置
|
|
116
|
+
,
|
|
117
|
+
emptyConfig: {
|
|
118
|
+
show: !loading && filteredData.length === 0,
|
|
119
|
+
text: emptyDescription
|
|
120
|
+
},
|
|
121
|
+
renderItem: function renderItem(item, index) {
|
|
122
|
+
return /*#__PURE__*/React.createElement(SkuCard, _extends({
|
|
123
|
+
key: item.id
|
|
124
|
+
}, skuCardAllConfig, {
|
|
125
|
+
dataSource: formatSkuDataSource(item),
|
|
126
|
+
onCardClick: function onCardClick() {
|
|
127
|
+
return onSelectProduct(item);
|
|
128
|
+
},
|
|
129
|
+
isSelected: item.id === currentProductId
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
}, [config.skuListConfig, dataSource, loading, currentProductId, onSelectProduct, emptyDescription, style, className, size === null || size === void 0 ? void 0 : size.height]);
|
|
134
|
+
|
|
135
|
+
// 根据配置渲染对应模式
|
|
136
|
+
if (displayMode === 'sku-list') {
|
|
137
|
+
return renderSkuList;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 默认使用 product-select 模式
|
|
141
|
+
return renderProductSelect;
|
|
142
|
+
};
|
|
143
|
+
export default ProductDisplayAdapter;
|