@pisell/private-materials 6.5.13 → 6.5.14
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/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/actionButtons/index.js +15 -9
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/forms/footer.js +4 -13
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/PaymentModal.js +17 -12
- package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +40 -22
- 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 +2 -2
- package/es/components/eftposPay/store/index.d.ts +5 -5
- 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 +415 -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/pay/toC/model.d.ts +9 -1
- package/es/components/schedules/model.d.ts +9 -1
- 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 +32 -10
- 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 +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +20 -10
- 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/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 -12
- package/es/components/ticketBooking/utils/index.d.ts +28 -1
- package/es/components/ticketBooking/utils/index.js +40 -0
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/model.d.ts +9 -1
- 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/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/actionButtons/index.js +22 -17
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/forms/footer.js +7 -13
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/PaymentModal.js +15 -12
- package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +61 -46
- 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 +2 -2
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- 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 +415 -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/pay/toC/model.d.ts +9 -1
- package/lib/components/schedules/model.d.ts +9 -1
- 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 +36 -10
- 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 +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +14 -9
- 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/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 +69 -7
- package/lib/components/ticketBooking/utils/index.d.ts +28 -1
- package/lib/components/ticketBooking/utils/index.js +45 -2
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/model.d.ts +9 -1
- 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/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- 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
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import PisellPriceText from "../../../../components/pisellPriceText";
|
|
4
|
+
import { PREFIX } from "../../status";
|
|
5
|
+
import "./index.less";
|
|
6
|
+
var Price = function Price(_ref) {
|
|
7
|
+
var props = _ref.props;
|
|
8
|
+
var dataSource = props.dataSource,
|
|
9
|
+
skuTextConfig = props.skuTextConfig;
|
|
10
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuPriceConfig) || {},
|
|
11
|
+
isOpen = _ref2.isOpen,
|
|
12
|
+
isOriginPrice = _ref2.isOriginPrice,
|
|
13
|
+
isPrice = _ref2.isPrice,
|
|
14
|
+
isTaxPrice = _ref2.isTaxPrice,
|
|
15
|
+
originPriceFontSize = _ref2.originPriceFontSize,
|
|
16
|
+
originPriceFontWeight = _ref2.originPriceFontWeight,
|
|
17
|
+
originPriceColor = _ref2.originPriceColor,
|
|
18
|
+
priceFontSize = _ref2.priceFontSize,
|
|
19
|
+
priceFontWeight = _ref2.priceFontWeight,
|
|
20
|
+
priceColor = _ref2.priceColor,
|
|
21
|
+
isCustomText = _ref2.isCustomText,
|
|
22
|
+
customTextType = _ref2.customTextType,
|
|
23
|
+
customTextValue = _ref2.customTextValue,
|
|
24
|
+
customTextMinValue = _ref2.customTextMinValue,
|
|
25
|
+
customTextMaxValue = _ref2.customTextMaxValue,
|
|
26
|
+
isShowZeroPrice = _ref2.isShowZeroPrice,
|
|
27
|
+
isShowFreePrice = _ref2.isShowFreePrice,
|
|
28
|
+
isMiniPrice = _ref2.isMiniPrice;
|
|
29
|
+
|
|
30
|
+
// 不开启
|
|
31
|
+
if (!isOpen) return null;
|
|
32
|
+
|
|
33
|
+
// 自定义文本
|
|
34
|
+
// if (customText) return customText;
|
|
35
|
+
|
|
36
|
+
var isShowPrice = useMemo(function () {
|
|
37
|
+
if (!isPrice) return false;
|
|
38
|
+
|
|
39
|
+
// 0元不显示
|
|
40
|
+
if (Number(dataSource === null || dataSource === void 0 ? void 0 : dataSource.price) === 0 && !isShowZeroPrice) return false;
|
|
41
|
+
return true;
|
|
42
|
+
}, [isPrice, isShowZeroPrice, dataSource === null || dataSource === void 0 ? void 0 : dataSource.price]);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* @title: 价格文本
|
|
46
|
+
* @description:
|
|
47
|
+
* @param {*} useMemo
|
|
48
|
+
* @return {*}
|
|
49
|
+
* @Author: WangHan
|
|
50
|
+
* @Date: 2025-09-18 16:23
|
|
51
|
+
*/
|
|
52
|
+
var priceText = useMemo(function () {
|
|
53
|
+
if (!isShowPrice) return null;
|
|
54
|
+
|
|
55
|
+
// 免费
|
|
56
|
+
if (Number(dataSource === null || dataSource === void 0 ? void 0 : dataSource.price) === 0 && isShowFreePrice) {
|
|
57
|
+
return locales.getText('pisell2.sku-card.free');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 自定义文本
|
|
61
|
+
if (isCustomText) {
|
|
62
|
+
// 从起点
|
|
63
|
+
if (customTextType === 'from') {
|
|
64
|
+
return /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
65
|
+
value: customTextValue || 0,
|
|
66
|
+
isMini: true
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// 终点
|
|
71
|
+
if (customTextType === 'end') {
|
|
72
|
+
return /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
73
|
+
value: customTextValue || 0,
|
|
74
|
+
isMini: true,
|
|
75
|
+
customPrefixText: locales.getText('pisell2.sku-card.max'),
|
|
76
|
+
customSuffixText: locales.getText('pisell2.sku-card.max')
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// 区间
|
|
81
|
+
if (customTextType === 'range') {
|
|
82
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
83
|
+
className: "".concat(PREFIX, "__card-price-range")
|
|
84
|
+
}, /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
85
|
+
value: customTextMinValue || 0
|
|
86
|
+
}), "~", /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
87
|
+
value: customTextMaxValue || 0
|
|
88
|
+
}));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
92
|
+
value: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.price) || 0
|
|
93
|
+
});
|
|
94
|
+
}, [isShowPrice, dataSource === null || dataSource === void 0 ? void 0 : dataSource.price, isShowFreePrice, isCustomText, customTextType, customTextValue, customTextMinValue, customTextMaxValue]);
|
|
95
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: "".concat(PREFIX, "__card-price-wrap")
|
|
97
|
+
}, isShowPrice ? /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: "".concat(PREFIX, "__card-price"),
|
|
99
|
+
style: {
|
|
100
|
+
fontSize: priceFontSize,
|
|
101
|
+
fontWeight: priceFontWeight,
|
|
102
|
+
color: priceColor
|
|
103
|
+
}
|
|
104
|
+
}, priceText) : null, isTaxPrice && parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.tax_fee) || 0)) > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
105
|
+
className: "".concat(PREFIX, "__card-tax-price")
|
|
106
|
+
}, "(".concat(locales.getText('pisell2.sku-card.gst'), " : "), /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
107
|
+
value: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.tax_fee) || 0,
|
|
108
|
+
isMini: isMiniPrice
|
|
109
|
+
}), ")") : null, isOriginPrice && parseFloat(String((dataSource === null || dataSource === void 0 ? void 0 : dataSource.original_price) || 0)) ? /*#__PURE__*/React.createElement("div", {
|
|
110
|
+
className: "".concat(PREFIX, "__card-original-price"),
|
|
111
|
+
style: {
|
|
112
|
+
fontSize: originPriceFontSize,
|
|
113
|
+
fontWeight: originPriceFontWeight,
|
|
114
|
+
color: originPriceColor
|
|
115
|
+
}
|
|
116
|
+
}, /*#__PURE__*/React.createElement(PisellPriceText, {
|
|
117
|
+
value: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.original_price) || 0,
|
|
118
|
+
isMini: isMiniPrice
|
|
119
|
+
})) : null);
|
|
120
|
+
};
|
|
121
|
+
export default Price;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.pisell-product-sku__card-price-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
gap: unset;
|
|
6
|
+
gap: 4px;
|
|
7
|
+
|
|
8
|
+
.pisell-product-sku__card-price {
|
|
9
|
+
color: var(--ps-color-text, #1b1b1b);
|
|
10
|
+
font-size: 18px;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
line-height: 28px;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-product-sku__card-price-range {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.pisell-product-sku__card-original-price {
|
|
23
|
+
color: var(--ps-color-text-secondary, #4e4e4e);
|
|
24
|
+
font-size: 16px;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
line-height: 24px;
|
|
28
|
+
position: relative;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
|
|
31
|
+
&::before {
|
|
32
|
+
content: '';
|
|
33
|
+
display: block;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 0;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 1px;
|
|
39
|
+
background-color: #4e4e4e;
|
|
40
|
+
transform: translateY(-50%);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
> span {
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.pisell-product-sku__card-tax-price {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
color: #667085;
|
|
52
|
+
font-size: 16px;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
word-wrap: break-word;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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, { useCallback, useMemo } from 'react';
|
|
9
|
+
import { PisellTags } from '@pisell/materials';
|
|
10
|
+
import { PREFIX } from "../../status";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
var Promotions = function Promotions(_ref) {
|
|
13
|
+
var props = _ref.props;
|
|
14
|
+
var dataSource = props.dataSource,
|
|
15
|
+
skuTextConfig = props.skuTextConfig;
|
|
16
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuPromotionsConfig) || {},
|
|
17
|
+
isOpen = _ref2.isOpen,
|
|
18
|
+
marginX = _ref2.marginX,
|
|
19
|
+
isShowAll = _ref2.isShowAll,
|
|
20
|
+
maxCount = _ref2.maxCount,
|
|
21
|
+
lists = _ref2.lists;
|
|
22
|
+
if (!isOpen) return null;
|
|
23
|
+
var listsData = useMemo(function () {
|
|
24
|
+
var _dataSource$promotion;
|
|
25
|
+
var _lists = dataSource !== null && dataSource !== void 0 && (_dataSource$promotion = dataSource.promotions) !== null && _dataSource$promotion !== void 0 && _dataSource$promotion.length ? dataSource === null || dataSource === void 0 ? void 0 : dataSource.promotions : lists;
|
|
26
|
+
return _lists || [];
|
|
27
|
+
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.promotions, lists]);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @title: 文本样式
|
|
31
|
+
* @description:
|
|
32
|
+
* @param {*} useCallback
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-09-10 11:27
|
|
36
|
+
*/
|
|
37
|
+
var textStyle = useCallback(function (tag) {
|
|
38
|
+
return {
|
|
39
|
+
fontSize: tag.fontSize,
|
|
40
|
+
fontWeight: tag.fontWeight,
|
|
41
|
+
color: tag.color
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @title: 促销信息样式
|
|
47
|
+
* @description:
|
|
48
|
+
* @param {*} useCallback
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @Author: WangHan
|
|
51
|
+
* @Date: 2025-09-10 11:27
|
|
52
|
+
*/
|
|
53
|
+
var tagStyle = useCallback(function (tag) {
|
|
54
|
+
return {
|
|
55
|
+
background: tag.background,
|
|
56
|
+
padding: "".concat(tag.paddingY, "px ").concat(tag.paddingX, "px"),
|
|
57
|
+
borderRadius: tag.radius,
|
|
58
|
+
border: tag.isBorder ? "".concat(tag.borderWidth, "px solid ").concat(tag.borderColor) : 'none',
|
|
59
|
+
margin: 0,
|
|
60
|
+
lineHeight: '18px'
|
|
61
|
+
};
|
|
62
|
+
}, [marginX]);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @title: 处理促销信息数据
|
|
66
|
+
* @description:
|
|
67
|
+
* @param {*} useMemo
|
|
68
|
+
* @return {*}
|
|
69
|
+
* @Author: WangHan
|
|
70
|
+
* @Date: 2025-09-11 10:59
|
|
71
|
+
*/
|
|
72
|
+
var listsResult = useMemo(function () {
|
|
73
|
+
if (isShowAll) {
|
|
74
|
+
return listsData;
|
|
75
|
+
}
|
|
76
|
+
return listsData.slice(0, maxCount);
|
|
77
|
+
}, [listsData, isShowAll, maxCount]);
|
|
78
|
+
if (listsData.length === 0) return null;
|
|
79
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "".concat(PREFIX, "__card-promotions"),
|
|
81
|
+
style: {
|
|
82
|
+
gap: "".concat(marginX, "px")
|
|
83
|
+
}
|
|
84
|
+
}, listsResult.map(function (tag, tagIndex) {
|
|
85
|
+
return /*#__PURE__*/React.createElement(PisellTags, _extends({
|
|
86
|
+
key: tagIndex,
|
|
87
|
+
style: _objectSpread({}, tagStyle(tag))
|
|
88
|
+
}, tag.props), /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
style: textStyle(tag)
|
|
90
|
+
}, tag === null || tag === void 0 ? void 0 : tag.title));
|
|
91
|
+
}), (listsData === null || listsData === void 0 ? void 0 : listsData.length) > listsResult.length && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "".concat(PREFIX, "__card-tags-remaining")
|
|
93
|
+
}, "+", (listsData === null || listsData === void 0 ? void 0 : listsData.length) - listsResult.length));
|
|
94
|
+
};
|
|
95
|
+
export default Promotions;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.pisell-product-sku__card-promotions {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
align-items: center;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
flex-shrink: 1;
|
|
9
|
+
|
|
10
|
+
&-remaining {
|
|
11
|
+
color: #b42318;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
line-height: 18px;
|
|
15
|
+
word-wrap: break-word;
|
|
16
|
+
margin-left: 4px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { PREFIX } from "../../status";
|
|
3
|
+
var Resource = function Resource(_ref) {
|
|
4
|
+
var props = _ref.props;
|
|
5
|
+
var dataSource = props.dataSource,
|
|
6
|
+
skuTextConfig = props.skuTextConfig;
|
|
7
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuResourceConfig) || {},
|
|
8
|
+
isOpen = _ref2.isOpen,
|
|
9
|
+
fontSize = _ref2.fontSize,
|
|
10
|
+
fontWeight = _ref2.fontWeight,
|
|
11
|
+
color = _ref2.color,
|
|
12
|
+
customText = _ref2.customText;
|
|
13
|
+
|
|
14
|
+
// 不开启
|
|
15
|
+
if (!isOpen) return null;
|
|
16
|
+
|
|
17
|
+
// 自定义文本
|
|
18
|
+
if (customText) return customText;
|
|
19
|
+
var finalStyle = useMemo(function () {
|
|
20
|
+
return {
|
|
21
|
+
fontSize: fontSize,
|
|
22
|
+
fontWeight: fontWeight,
|
|
23
|
+
color: color
|
|
24
|
+
};
|
|
25
|
+
}, [fontSize, fontWeight, color]);
|
|
26
|
+
return dataSource !== null && dataSource !== void 0 && dataSource.resources ? /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "".concat(PREFIX, "__card-resource"),
|
|
28
|
+
style: finalStyle
|
|
29
|
+
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.resources) : null;
|
|
30
|
+
};
|
|
31
|
+
export default Resource;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import { PREFIX } from "../../status";
|
|
4
|
+
var Stock = function Stock(_ref) {
|
|
5
|
+
var props = _ref.props;
|
|
6
|
+
var dataSource = props.dataSource,
|
|
7
|
+
skuTextConfig = props.skuTextConfig;
|
|
8
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuStockConfig) || {},
|
|
9
|
+
isOpen = _ref2.isOpen,
|
|
10
|
+
fontSize = _ref2.fontSize,
|
|
11
|
+
fontWeight = _ref2.fontWeight,
|
|
12
|
+
color = _ref2.color,
|
|
13
|
+
customText = _ref2.customText;
|
|
14
|
+
|
|
15
|
+
// 不开启
|
|
16
|
+
if (!isOpen) return null;
|
|
17
|
+
|
|
18
|
+
// 自定义文本
|
|
19
|
+
if (customText) return customText;
|
|
20
|
+
var finalStyle = useMemo(function () {
|
|
21
|
+
return {
|
|
22
|
+
fontSize: fontSize,
|
|
23
|
+
fontWeight: fontWeight,
|
|
24
|
+
color: color
|
|
25
|
+
};
|
|
26
|
+
}, [fontSize, fontWeight, color]);
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @title: 库存文本
|
|
30
|
+
* @description:
|
|
31
|
+
* @param {*} useMemo
|
|
32
|
+
* @return {*}
|
|
33
|
+
* @Author: WangHan
|
|
34
|
+
* @Date: 2025-09-08 15:31
|
|
35
|
+
*/
|
|
36
|
+
var stockText = useMemo(function () {
|
|
37
|
+
if ((dataSource === null || dataSource === void 0 ? void 0 : dataSource.is_track) === 0) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return "".concat(locales.getText('pisell2.sku-card.stock'), ": ").concat(dataSource === null || dataSource === void 0 ? void 0 : dataSource.stock_quantity);
|
|
41
|
+
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.stock_quantity, dataSource === null || dataSource === void 0 ? void 0 : dataSource.is_track]);
|
|
42
|
+
return !!(dataSource !== null && dataSource !== void 0 && dataSource.is_track) ? /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "".concat(PREFIX, "__card-stock"),
|
|
44
|
+
style: finalStyle
|
|
45
|
+
}, stockText) : null;
|
|
46
|
+
};
|
|
47
|
+
export default Stock;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import useEngineContext from "../../../../../../hooks/useEngineContext";
|
|
3
|
+
import { PREFIX } from "../../status";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
var SubTitle = function SubTitle(_ref) {
|
|
6
|
+
var _engineContext$appHel2;
|
|
7
|
+
var props = _ref.props;
|
|
8
|
+
var dataSource = props.dataSource,
|
|
9
|
+
skuTextConfig = props.skuTextConfig;
|
|
10
|
+
var engineContext = useEngineContext();
|
|
11
|
+
var _engineContext$appHel = (_engineContext$appHel2 = engineContext.appHelper) === null || _engineContext$appHel2 === void 0 ? void 0 : _engineContext$appHel2.utils,
|
|
12
|
+
translation = _engineContext$appHel.translation;
|
|
13
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuSubtitleConfig) || {},
|
|
14
|
+
isOpen = _ref2.isOpen,
|
|
15
|
+
value = _ref2.value,
|
|
16
|
+
fontSize = _ref2.fontSize,
|
|
17
|
+
fontWeight = _ref2.fontWeight,
|
|
18
|
+
color = _ref2.color,
|
|
19
|
+
ellipsisCount = _ref2.ellipsisCount;
|
|
20
|
+
if (!isOpen) return null;
|
|
21
|
+
var finalStyle = useMemo(function () {
|
|
22
|
+
return {
|
|
23
|
+
fontSize: fontSize,
|
|
24
|
+
fontWeight: fontWeight,
|
|
25
|
+
color: color,
|
|
26
|
+
lineClamp: ellipsisCount
|
|
27
|
+
};
|
|
28
|
+
}, [fontSize, fontWeight, color, ellipsisCount]);
|
|
29
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: "".concat(PREFIX, "__card-subtitle"),
|
|
31
|
+
style: finalStyle
|
|
32
|
+
}, translation(value || (dataSource === null || dataSource === void 0 ? void 0 : dataSource.subtitle)));
|
|
33
|
+
};
|
|
34
|
+
export default SubTitle;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.pisell-product-sku__card-subtitle {
|
|
2
|
+
color: var(--ps-color-text, #1b1b1b);
|
|
3
|
+
font-size: 16px;
|
|
4
|
+
font-style: normal;
|
|
5
|
+
font-weight: 500;
|
|
6
|
+
line-height: 24px;
|
|
7
|
+
display: -webkit-box;
|
|
8
|
+
line-clamp: 2;
|
|
9
|
+
-webkit-line-clamp: 2;
|
|
10
|
+
-webkit-box-orient: vertical;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
text-overflow: ellipsis;
|
|
13
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
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, { useCallback, useMemo } from 'react';
|
|
9
|
+
import { PisellTags } from '@pisell/materials';
|
|
10
|
+
import { PREFIX } from "../../status";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
var Tags = function Tags(_ref) {
|
|
13
|
+
var props = _ref.props;
|
|
14
|
+
var dataSource = props.dataSource,
|
|
15
|
+
skuTextConfig = props.skuTextConfig;
|
|
16
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuTagsConfig) || {},
|
|
17
|
+
isOpen = _ref2.isOpen,
|
|
18
|
+
marginX = _ref2.marginX,
|
|
19
|
+
isShowAll = _ref2.isShowAll,
|
|
20
|
+
maxCount = _ref2.maxCount,
|
|
21
|
+
lists = _ref2.lists;
|
|
22
|
+
if (!isOpen) return null;
|
|
23
|
+
var listsData = useMemo(function () {
|
|
24
|
+
var _dataSource$tags;
|
|
25
|
+
var _lists = dataSource !== null && dataSource !== void 0 && (_dataSource$tags = dataSource.tags) !== null && _dataSource$tags !== void 0 && _dataSource$tags.length ? dataSource === null || dataSource === void 0 ? void 0 : dataSource.tags : lists;
|
|
26
|
+
return _lists || [];
|
|
27
|
+
}, [dataSource === null || dataSource === void 0 ? void 0 : dataSource.tags, lists]);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @title: 文本样式
|
|
31
|
+
* @description:
|
|
32
|
+
* @param {*} useCallback
|
|
33
|
+
* @return {*}
|
|
34
|
+
* @Author: WangHan
|
|
35
|
+
* @Date: 2025-09-10 11:27
|
|
36
|
+
*/
|
|
37
|
+
var textStyle = useCallback(function (tag) {
|
|
38
|
+
return {
|
|
39
|
+
fontSize: tag.fontSize,
|
|
40
|
+
fontWeight: tag.fontWeight,
|
|
41
|
+
color: tag.color
|
|
42
|
+
};
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @title: 标签样式
|
|
47
|
+
* @description:
|
|
48
|
+
* @param {*} useCallback
|
|
49
|
+
* @return {*}
|
|
50
|
+
* @Author: WangHan
|
|
51
|
+
* @Date: 2025-09-10 11:27
|
|
52
|
+
*/
|
|
53
|
+
var tagStyle = useCallback(function (tag) {
|
|
54
|
+
return {
|
|
55
|
+
background: tag.background,
|
|
56
|
+
padding: "".concat(tag.paddingY, "px ").concat(tag.paddingX, "px"),
|
|
57
|
+
borderRadius: tag.radius,
|
|
58
|
+
border: tag.isBorder ? "".concat(tag.borderWidth, "px solid ").concat(tag.borderColor) : 'none',
|
|
59
|
+
margin: 0,
|
|
60
|
+
lineHeight: '18px'
|
|
61
|
+
};
|
|
62
|
+
}, [marginX]);
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @title: 处理标签数据
|
|
66
|
+
* @description:
|
|
67
|
+
* @param {*} useMemo
|
|
68
|
+
* @return {*}
|
|
69
|
+
* @Author: WangHan
|
|
70
|
+
* @Date: 2025-09-11 10:59
|
|
71
|
+
*/
|
|
72
|
+
var listsResult = useMemo(function () {
|
|
73
|
+
if (isShowAll) {
|
|
74
|
+
return listsData;
|
|
75
|
+
}
|
|
76
|
+
return listsData.slice(0, maxCount);
|
|
77
|
+
}, [listsData, isShowAll, maxCount]);
|
|
78
|
+
if (listsData.length === 0) return null;
|
|
79
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "".concat(PREFIX, "__card-tags"),
|
|
81
|
+
style: {
|
|
82
|
+
gap: "".concat(marginX, "px")
|
|
83
|
+
}
|
|
84
|
+
}, listsResult.map(function (tag, tagIndex) {
|
|
85
|
+
return /*#__PURE__*/React.createElement(PisellTags, _extends({
|
|
86
|
+
key: tagIndex,
|
|
87
|
+
style: _objectSpread({}, tagStyle(tag))
|
|
88
|
+
}, tag.props), /*#__PURE__*/React.createElement("span", {
|
|
89
|
+
style: textStyle(tag)
|
|
90
|
+
}, tag === null || tag === void 0 ? void 0 : tag.title));
|
|
91
|
+
}), (listsData === null || listsData === void 0 ? void 0 : listsData.length) > listsResult.length && /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "".concat(PREFIX, "__card-tags-remaining")
|
|
93
|
+
}, "+", (listsData === null || listsData === void 0 ? void 0 : listsData.length) - listsResult.length));
|
|
94
|
+
};
|
|
95
|
+
export default Tags;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.pisell-product-sku__card-tags {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-wrap: wrap;
|
|
4
|
+
align-items: center;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
max-width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
flex-shrink: 1;
|
|
9
|
+
|
|
10
|
+
&-remaining {
|
|
11
|
+
color: #b42318;
|
|
12
|
+
font-size: 12px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
line-height: 18px;
|
|
15
|
+
word-wrap: break-word;
|
|
16
|
+
margin-left: 4px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { PREFIX } from "../../status";
|
|
3
|
+
var Time = function Time(_ref) {
|
|
4
|
+
var props = _ref.props;
|
|
5
|
+
var dataSource = props.dataSource,
|
|
6
|
+
skuTextConfig = props.skuTextConfig;
|
|
7
|
+
var _ref2 = (skuTextConfig === null || skuTextConfig === void 0 ? void 0 : skuTextConfig.skuTimeConfig) || {},
|
|
8
|
+
isOpen = _ref2.isOpen,
|
|
9
|
+
fontSize = _ref2.fontSize,
|
|
10
|
+
fontWeight = _ref2.fontWeight,
|
|
11
|
+
color = _ref2.color,
|
|
12
|
+
customText = _ref2.customText;
|
|
13
|
+
|
|
14
|
+
// 不开启
|
|
15
|
+
if (!isOpen) return null;
|
|
16
|
+
|
|
17
|
+
// 自定义文本
|
|
18
|
+
if (customText) return customText;
|
|
19
|
+
var finalStyle = useMemo(function () {
|
|
20
|
+
return {
|
|
21
|
+
fontSize: fontSize,
|
|
22
|
+
fontWeight: fontWeight,
|
|
23
|
+
color: color
|
|
24
|
+
};
|
|
25
|
+
}, [fontSize, fontWeight, color]);
|
|
26
|
+
return dataSource !== null && dataSource !== void 0 && dataSource.time ? /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "".concat(PREFIX, "__card-time"),
|
|
28
|
+
style: finalStyle
|
|
29
|
+
}, dataSource === null || dataSource === void 0 ? void 0 : dataSource.time) : null;
|
|
30
|
+
};
|
|
31
|
+
export default Time;
|