@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,100 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/ticketBooking/components/ProductDisplayAdapter/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
formatSkuDataSource: () => formatSkuDataSource,
|
|
23
|
+
generateProductTabs: () => generateProductTabs
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(utils_exports);
|
|
26
|
+
var formatSkuDataSource = (dataSource) => {
|
|
27
|
+
return {
|
|
28
|
+
id: dataSource.id,
|
|
29
|
+
title: dataSource.title,
|
|
30
|
+
subtitle: dataSource.subtitle,
|
|
31
|
+
cover: dataSource.cover,
|
|
32
|
+
price: dataSource.price,
|
|
33
|
+
original_price: dataSource.original_price,
|
|
34
|
+
stock: dataSource.stock_quantity,
|
|
35
|
+
sortKeys: ["title", "subtitle", "price"]
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
var generateProductTabs = (products, tabStyle = "switch") => {
|
|
39
|
+
if (!products || products.length === 0) {
|
|
40
|
+
return [{ key: "all", label: "全部" }];
|
|
41
|
+
}
|
|
42
|
+
if (tabStyle === "switch") {
|
|
43
|
+
const categoryMap = /* @__PURE__ */ new Map();
|
|
44
|
+
products.forEach((product) => {
|
|
45
|
+
if (product.category && Array.isArray(product.category)) {
|
|
46
|
+
product.category.forEach((cat) => {
|
|
47
|
+
if (!categoryMap.has(cat.id)) {
|
|
48
|
+
categoryMap.set(cat.id, cat);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
const sortedCategories = Array.from(categoryMap.values()).sort(
|
|
54
|
+
(a, b) => (b.sort || 0) - (a.sort || 0)
|
|
55
|
+
);
|
|
56
|
+
const tabs = [
|
|
57
|
+
{ key: "all", label: "全部" }
|
|
58
|
+
];
|
|
59
|
+
sortedCategories.forEach((category) => {
|
|
60
|
+
tabs.push({
|
|
61
|
+
key: String(category.id),
|
|
62
|
+
label: category.name,
|
|
63
|
+
group: String(category.id)
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
return tabs;
|
|
67
|
+
} else {
|
|
68
|
+
const categoryCount = products.reduce((acc, product) => {
|
|
69
|
+
if (product.category && Array.isArray(product.category)) {
|
|
70
|
+
product.category.forEach((cat) => {
|
|
71
|
+
const key = String(cat.id);
|
|
72
|
+
if (!acc[key]) {
|
|
73
|
+
acc[key] = { count: 0, category: cat };
|
|
74
|
+
}
|
|
75
|
+
acc[key].count += 1;
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return acc;
|
|
79
|
+
}, {});
|
|
80
|
+
const tabs = [
|
|
81
|
+
{ key: "all", label: `全部 (${products.length})` }
|
|
82
|
+
];
|
|
83
|
+
const sortedEntries = Object.entries(categoryCount).sort(
|
|
84
|
+
([, a], [, b]) => (b.category.sort || 0) - (a.category.sort || 0)
|
|
85
|
+
);
|
|
86
|
+
sortedEntries.forEach(([key, { count, category }]) => {
|
|
87
|
+
tabs.push({
|
|
88
|
+
key,
|
|
89
|
+
label: `${category.name} (${count})`,
|
|
90
|
+
group: key
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
return tabs;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
formatSkuDataSource,
|
|
99
|
+
generateProductTabs
|
|
100
|
+
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter';
|
|
1
2
|
import './index.less';
|
|
2
3
|
interface AddServiceProps {
|
|
3
4
|
onEdit?: any;
|
|
@@ -5,6 +6,25 @@ interface AddServiceProps {
|
|
|
5
6
|
state?: any;
|
|
6
7
|
renderMode?: 'current' | 'drawer';
|
|
7
8
|
onPrerenderComplete?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* 产品展示配置
|
|
11
|
+
*
|
|
12
|
+
* 支持两种方式:
|
|
13
|
+
* 1. 简易模式:传入预设字符串,如 'product-select', 'sku-list-a1', 'sku-list-a2', 'sku-list-a5'
|
|
14
|
+
* 2. 完整配置模式:传入完整的配置对象
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // 简易模式
|
|
18
|
+
* <AddService productDisplayConfig="sku-list-a1" />
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // 完整配置模式
|
|
22
|
+
* <AddService productDisplayConfig={{
|
|
23
|
+
* displayMode: 'sku-list',
|
|
24
|
+
* skuListConfig: { ... }
|
|
25
|
+
* }} />
|
|
26
|
+
*/
|
|
27
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
8
28
|
}
|
|
9
29
|
declare const AddSerivce: (props: AddServiceProps) => JSX.Element | null;
|
|
10
30
|
export default AddSerivce;
|
|
@@ -41,7 +41,7 @@ var import_utils3 = require("../../../booking/info2/service/addService/utils");
|
|
|
41
41
|
var import_utils4 = require("../../../booking/info/service2/utils");
|
|
42
42
|
var import_utils5 = require("../../../booking/info/utils");
|
|
43
43
|
var import_serviceManager = require("../../../booking/info/service/serviceManager");
|
|
44
|
-
var
|
|
44
|
+
var import_ProductDisplayAdapter = __toESM(require("../ProductDisplayAdapter"));
|
|
45
45
|
var import_index = require("./index.less");
|
|
46
46
|
var import_utils6 = require("../../utils");
|
|
47
47
|
var import_notAvailable = __toESM(require("../notAvailable"));
|
|
@@ -49,6 +49,7 @@ var import_dayjs = __toESM(require("dayjs"));
|
|
|
49
49
|
var import_pisellos = require("../../hooks/pisellos");
|
|
50
50
|
var import_utils7 = require("./utils");
|
|
51
51
|
var import_materials = require("@pisell/materials");
|
|
52
|
+
var import_IsActiveContext = require("../../context/IsActiveContext");
|
|
52
53
|
var productListLayout = {
|
|
53
54
|
grid: true,
|
|
54
55
|
config: "12:12"
|
|
@@ -63,11 +64,19 @@ var productListSetting = {
|
|
|
63
64
|
};
|
|
64
65
|
var AddSerivce = (props) => {
|
|
65
66
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
66
|
-
const {
|
|
67
|
+
const {
|
|
68
|
+
onEdit,
|
|
69
|
+
state,
|
|
70
|
+
dispatch,
|
|
71
|
+
renderMode = "current",
|
|
72
|
+
onPrerenderComplete,
|
|
73
|
+
productDisplayConfig
|
|
74
|
+
} = props;
|
|
67
75
|
const context = (0, import_useEngineContext.default)();
|
|
68
76
|
const notAvailableRef = (0, import_react.useRef)(null);
|
|
69
77
|
const isLoadedServiceRef = (0, import_react.useRef)(false);
|
|
70
78
|
import_utils2.request.setRequest(context.appHelper.utils.request);
|
|
79
|
+
const isActive = (0, import_IsActiveContext.useIsActive)();
|
|
71
80
|
const Toast = (0, import_materials.useToast)();
|
|
72
81
|
const { createBookingData, createBooking } = (0, import_serviceManager.useService)({
|
|
73
82
|
renderMode,
|
|
@@ -167,8 +176,10 @@ var AddSerivce = (props) => {
|
|
|
167
176
|
});
|
|
168
177
|
});
|
|
169
178
|
(0, import_react.useMemo)(() => {
|
|
170
|
-
|
|
171
|
-
|
|
179
|
+
if (isActive) {
|
|
180
|
+
(0, import_utils7.setHandleSetService)(scanAddService);
|
|
181
|
+
}
|
|
182
|
+
}, [isActive]);
|
|
172
183
|
const handleAddToast = (title, quantity) => {
|
|
173
184
|
var _a2;
|
|
174
185
|
(_a2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _a2.call(
|
|
@@ -444,17 +455,31 @@ var AddSerivce = (props) => {
|
|
|
444
455
|
});
|
|
445
456
|
}
|
|
446
457
|
}, [renderMode, currentDate, customerId, menuList, currentDatetime]);
|
|
458
|
+
const finalDisplayConfig = (0, import_react.useMemo)(() => {
|
|
459
|
+
var _a2, _b2;
|
|
460
|
+
const resolvedConfig = (0, import_ProductDisplayAdapter.resolveProductDisplayConfig)(productDisplayConfig);
|
|
461
|
+
if (resolvedConfig.displayMode === "product-select") {
|
|
462
|
+
return {
|
|
463
|
+
...resolvedConfig,
|
|
464
|
+
productSelectConfig: {
|
|
465
|
+
...resolvedConfig.productSelectConfig,
|
|
466
|
+
layout: ((_a2 = resolvedConfig.productSelectConfig) == null ? void 0 : _a2.layout) || productListLayout,
|
|
467
|
+
productListSetting: ((_b2 = resolvedConfig.productSelectConfig) == null ? void 0 : _b2.productListSetting) || productListSetting
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
return resolvedConfig;
|
|
472
|
+
}, [productDisplayConfig]);
|
|
447
473
|
return (0, import_react.useMemo)(() => {
|
|
448
474
|
if (renderMode === "current") {
|
|
449
475
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
450
|
-
|
|
476
|
+
import_ProductDisplayAdapter.default,
|
|
451
477
|
{
|
|
478
|
+
config: finalDisplayConfig,
|
|
452
479
|
dataSource: renderList,
|
|
453
|
-
layout: productListLayout,
|
|
454
|
-
onChange: handleSelectProduct,
|
|
455
|
-
value: currentProduct == null ? void 0 : currentProduct.id,
|
|
456
480
|
loading: !renderList.length && loading,
|
|
457
|
-
|
|
481
|
+
currentProductId: currentProduct == null ? void 0 : currentProduct.id,
|
|
482
|
+
onSelectProduct: handleSelectProduct
|
|
458
483
|
}
|
|
459
484
|
), /* @__PURE__ */ import_react.default.createElement(import_notAvailable.default, { ref: notAvailableRef }));
|
|
460
485
|
}
|
|
@@ -469,7 +494,8 @@ var AddSerivce = (props) => {
|
|
|
469
494
|
(0, import_utils4.holderId)(state),
|
|
470
495
|
loading,
|
|
471
496
|
currentProduct,
|
|
472
|
-
isBooking4
|
|
497
|
+
isBooking4,
|
|
498
|
+
finalDisplayConfig
|
|
473
499
|
]);
|
|
474
500
|
};
|
|
475
501
|
var addService_default = AddSerivce;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
|
|
1
2
|
interface AddServiceVariantProps {
|
|
2
3
|
globalState: any;
|
|
3
4
|
setGlobalState: any;
|
|
4
5
|
onPrerenderComplete?: () => void;
|
|
6
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
5
7
|
}
|
|
6
8
|
declare const AddServiceVariant: (props: AddServiceVariantProps) => JSX.Element;
|
|
7
9
|
export default AddServiceVariant;
|
|
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(addServiceVariant_exports);
|
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_addService = __toESM(require("./addService"));
|
|
37
37
|
var AddServiceVariant = (props) => {
|
|
38
|
-
const { globalState, setGlobalState, onPrerenderComplete } = props;
|
|
38
|
+
const { globalState, setGlobalState, onPrerenderComplete, productDisplayConfig } = props;
|
|
39
39
|
const stateRef = (0, import_react.useRef)(globalState);
|
|
40
40
|
stateRef.current = globalState;
|
|
41
41
|
const dispatch = ({ type, payload }) => {
|
|
@@ -50,7 +50,8 @@ var AddServiceVariant = (props) => {
|
|
|
50
50
|
{
|
|
51
51
|
state: globalState,
|
|
52
52
|
dispatch,
|
|
53
|
-
onPrerenderComplete
|
|
53
|
+
onPrerenderComplete,
|
|
54
|
+
productDisplayConfig
|
|
54
55
|
}
|
|
55
56
|
);
|
|
56
57
|
};
|
|
@@ -39,8 +39,21 @@ var import_antd = require("antd");
|
|
|
39
39
|
var import_icons = require("@ant-design/icons");
|
|
40
40
|
var import_utils = require("@pisell/utils");
|
|
41
41
|
var import_materials = require("@pisell/materials");
|
|
42
|
-
var index = () => {
|
|
42
|
+
var index = (props) => {
|
|
43
|
+
const { activeNavKey = "ticket", onNavChange } = props;
|
|
43
44
|
const status = (0, import_useNetworkStatus.useNetworkStatus)();
|
|
45
|
+
const navItems = [
|
|
46
|
+
{
|
|
47
|
+
key: "ticket",
|
|
48
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-ticket", style: { fontSize: 32 } }),
|
|
49
|
+
label: ""
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: "food",
|
|
53
|
+
label: "",
|
|
54
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_materials.Iconfont, { type: "pisell2-food", style: { fontSize: 32 } })
|
|
55
|
+
}
|
|
56
|
+
];
|
|
44
57
|
const items = [
|
|
45
58
|
{
|
|
46
59
|
key: "1",
|
|
@@ -81,6 +94,9 @@ var index = () => {
|
|
|
81
94
|
window.location.href = "/login";
|
|
82
95
|
}
|
|
83
96
|
};
|
|
97
|
+
const handleNavClick = (key) => {
|
|
98
|
+
onNavChange == null ? void 0 : onNavChange(key);
|
|
99
|
+
};
|
|
84
100
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-menu-bar" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("div", { className: "logo-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
85
101
|
"svg",
|
|
86
102
|
{
|
|
@@ -97,25 +113,15 @@ var index = () => {
|
|
|
97
113
|
fill: "#8157D5"
|
|
98
114
|
}
|
|
99
115
|
)
|
|
100
|
-
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "nav-wrapper" },
|
|
101
|
-
"
|
|
116
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { className: "nav-wrapper" }, navItems.map((navItem) => /* @__PURE__ */ import_react.default.createElement(
|
|
117
|
+
"div",
|
|
102
118
|
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
viewBox: "0 0 34 27",
|
|
107
|
-
fill: "none"
|
|
119
|
+
key: navItem.key,
|
|
120
|
+
className: `nav-item ${activeNavKey === navItem.key ? "active" : ""}`,
|
|
121
|
+
onClick: () => handleNavClick(navItem.key)
|
|
108
122
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
{
|
|
112
|
-
d: "M13.8 7.05078V5.48828M13.8 14.082V12.5195M13.8 21.1133V19.5508M6.12 0.800781H27.88C29.6722 0.800781 30.5683 0.800781 31.2528 1.14139C31.8549 1.44099 32.3444 1.91905 32.6512 2.50706C33 3.17554 33 4.05062 33 5.80078V7.83203C29.9072 7.83203 27.4 10.2805 27.4 13.3008C27.4 16.3211 29.9072 18.7695 33 18.7695V20.8008C33 22.5509 33 23.426 32.6512 24.0945C32.3444 24.6825 31.8549 25.1606 31.2528 25.4602C30.5683 25.8008 29.6722 25.8008 27.88 25.8008H6.12C4.32783 25.8008 3.43175 25.8008 2.74723 25.4602C2.14511 25.1606 1.65557 24.6825 1.34878 24.0945C1 23.426 1 22.5509 1 20.8008V18.7695C4.09279 18.7695 6.6 16.3211 6.6 13.3008C6.6 10.2805 4.09279 7.83203 1 7.83203V5.80078C1 4.05062 1 3.17554 1.34878 2.50706C1.65557 1.91905 2.14511 1.44099 2.74723 1.14139C3.43175 0.800781 4.32783 0.800781 6.12 0.800781Z",
|
|
113
|
-
stroke: "white",
|
|
114
|
-
"stroke-width": "1.5",
|
|
115
|
-
"stroke-linecap": "round",
|
|
116
|
-
"stroke-linejoin": "round"
|
|
117
|
-
}
|
|
118
|
-
)
|
|
123
|
+
navItem.icon && navItem.icon,
|
|
124
|
+
navItem.label && navItem.label
|
|
119
125
|
)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "menu-wrapper" }, /* @__PURE__ */ import_react.default.createElement(
|
|
120
126
|
import_materials.ConfigProvider,
|
|
121
127
|
{
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
display: flex;
|
|
29
29
|
flex-direction: column;
|
|
30
30
|
align-items: center;
|
|
31
|
+
gap: 12px;
|
|
31
32
|
|
|
32
33
|
.nav-item {
|
|
33
34
|
cursor: pointer;
|
|
@@ -38,10 +39,35 @@
|
|
|
38
39
|
justify-content: center;
|
|
39
40
|
align-items: center;
|
|
40
41
|
position: relative;
|
|
41
|
-
background:
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: rgba(255, 255, 255, 0.75);
|
|
44
|
+
transition: all 0.3s ease;
|
|
45
|
+
|
|
46
|
+
svg {
|
|
47
|
+
transition: all 0.3s ease;
|
|
48
|
+
|
|
49
|
+
path {
|
|
50
|
+
stroke: rgba(255, 255, 255, 0.75);
|
|
51
|
+
transition: all 0.3s ease;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: rgba(129, 87, 213, 0.1);
|
|
57
|
+
color: rgba(255, 255, 255, 0.95);
|
|
58
|
+
|
|
59
|
+
svg path {
|
|
60
|
+
stroke: rgba(255, 255, 255, 0.95);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
42
63
|
|
|
43
64
|
&.active {
|
|
44
65
|
background: #8157d5;
|
|
66
|
+
color: #ffffff;
|
|
67
|
+
|
|
68
|
+
svg path {
|
|
69
|
+
stroke: #ffffff;
|
|
70
|
+
}
|
|
45
71
|
|
|
46
72
|
&::before {
|
|
47
73
|
display: block;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import './index.less';
|
|
2
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from '../ProductDisplayAdapter/types';
|
|
2
3
|
export declare const _formatBookingDetail: (data: any, modalState: any) => any;
|
|
3
4
|
interface TicketBookingProps {
|
|
4
5
|
onPrerenderComplete?: () => void;
|
|
6
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
7
|
+
isShowTimeBar?: boolean;
|
|
8
|
+
isShowFloatButtons?: boolean;
|
|
5
9
|
}
|
|
6
10
|
declare const TicketBooking: (props: TicketBookingProps) => JSX.Element;
|
|
7
11
|
export default TicketBooking;
|
|
@@ -60,6 +60,8 @@ var import_pisellos = require("../../hooks/pisellos");
|
|
|
60
60
|
var import_ahooks = require("ahooks");
|
|
61
61
|
var import_useScanManager = __toESM(require("../../hooks/pisellos/useScanManager"));
|
|
62
62
|
var import_ahooks2 = require("ahooks");
|
|
63
|
+
var import_IsActiveContext = require("../../context/IsActiveContext");
|
|
64
|
+
var import_useShopDiscountModule = require("../../hooks/pisellos/useShopDiscountModule");
|
|
63
65
|
var _formatBookingDetail = (data, modalState) => {
|
|
64
66
|
var _a, _b, _c, _d;
|
|
65
67
|
let {
|
|
@@ -240,7 +242,7 @@ var formatProductValues = (data) => {
|
|
|
240
242
|
};
|
|
241
243
|
var TicketBooking = (props) => {
|
|
242
244
|
var _a, _b, _c, _d, _e;
|
|
243
|
-
const { onPrerenderComplete } = props;
|
|
245
|
+
const { onPrerenderComplete, productDisplayConfig, isShowTimeBar = true, isShowFloatButtons = true } = props;
|
|
244
246
|
const [state, setState] = (0, import_miniRedux.useStore)();
|
|
245
247
|
const engineContext = (0, import_useEngineContext.default)();
|
|
246
248
|
const { props: engineProps } = engineContext.engine;
|
|
@@ -267,6 +269,8 @@ var TicketBooking = (props) => {
|
|
|
267
269
|
const [showTerminalUpgradeModal, setShowTerminalUpgradeModal] = (0, import_react.useState)(false);
|
|
268
270
|
const pisellFloatingPanelRef = (0, import_react.useRef)(null);
|
|
269
271
|
const closeRef = (0, import_react.useRef)(null);
|
|
272
|
+
const shopDiscount = (0, import_useShopDiscountModule.useShopDiscountModule)();
|
|
273
|
+
const isActive = (0, import_IsActiveContext.useIsActive)();
|
|
270
274
|
const bookingTicket = (0, import_bookingTicket.useBookingTicket)();
|
|
271
275
|
const { openScan, closeScan } = (0, import_useScanGlobal.default)();
|
|
272
276
|
const handleScan = (0, import_useScanGlobalHandle.default)();
|
|
@@ -305,16 +309,16 @@ var TicketBooking = (props) => {
|
|
|
305
309
|
}
|
|
306
310
|
}
|
|
307
311
|
});
|
|
308
|
-
(0, import_react.useMemo)(() => {
|
|
309
|
-
openScan((data) => {
|
|
310
|
-
handleScan(data);
|
|
311
|
-
});
|
|
312
|
-
}, []);
|
|
313
312
|
(0, import_react.useEffect)(() => {
|
|
313
|
+
if (isActive) {
|
|
314
|
+
openScan((data) => {
|
|
315
|
+
handleScan(data);
|
|
316
|
+
});
|
|
317
|
+
}
|
|
314
318
|
return () => {
|
|
315
319
|
closeScan();
|
|
316
320
|
};
|
|
317
|
-
}, []);
|
|
321
|
+
}, [isActive]);
|
|
318
322
|
const { run: clearAllCart } = (0, import_ahooks2.useDebounceFn)(
|
|
319
323
|
(type, orderId) => {
|
|
320
324
|
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h;
|
|
@@ -1159,9 +1163,10 @@ var TicketBooking = (props) => {
|
|
|
1159
1163
|
productExtensionType: state.productExtensionType,
|
|
1160
1164
|
isBookingTicket2: true
|
|
1161
1165
|
},
|
|
1162
|
-
setGlobalState: _setModalState
|
|
1166
|
+
setGlobalState: _setModalState,
|
|
1167
|
+
productDisplayConfig
|
|
1163
1168
|
}
|
|
1164
|
-
), /* @__PURE__ */ import_react.default.createElement(import_floatButtons.default, { items: floatButtons })), /* @__PURE__ */ import_react.default.createElement(
|
|
1169
|
+
), isShowFloatButtons && /* @__PURE__ */ import_react.default.createElement(import_floatButtons.default, { items: floatButtons })), isShowTimeBar && /* @__PURE__ */ import_react.default.createElement(
|
|
1165
1170
|
import_timeBar.default,
|
|
1166
1171
|
{
|
|
1167
1172
|
onCreateClick: handleCreateClick,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* IsActive Context
|
|
4
|
+
* 用于在 TicketBooking 组件树中提供 isActive 状态
|
|
5
|
+
* isActive 用于标识当前组件是否处于激活状态
|
|
6
|
+
*/
|
|
7
|
+
interface IsActiveContextType {
|
|
8
|
+
/** 是否激活 */
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const IsActiveContext: React.Context<IsActiveContextType>;
|
|
12
|
+
interface IsActiveProviderProps {
|
|
13
|
+
isActive: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* IsActive Provider
|
|
18
|
+
* 提供 isActive 给子组件使用
|
|
19
|
+
*/
|
|
20
|
+
export declare const IsActiveProvider: React.FC<IsActiveProviderProps>;
|
|
21
|
+
/**
|
|
22
|
+
* useIsActive Hook
|
|
23
|
+
* 在子组件中使用此 hook 获取 isActive 状态
|
|
24
|
+
*/
|
|
25
|
+
export declare const useIsActive: () => boolean;
|
|
26
|
+
export default IsActiveContext;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/ticketBooking/context/IsActiveContext.tsx
|
|
30
|
+
var IsActiveContext_exports = {};
|
|
31
|
+
__export(IsActiveContext_exports, {
|
|
32
|
+
IsActiveProvider: () => IsActiveProvider,
|
|
33
|
+
default: () => IsActiveContext_default,
|
|
34
|
+
useIsActive: () => useIsActive
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(IsActiveContext_exports);
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var IsActiveContext = (0, import_react.createContext)({
|
|
39
|
+
isActive: true
|
|
40
|
+
});
|
|
41
|
+
var IsActiveProvider = ({ isActive, children }) => {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(IsActiveContext.Provider, { value: { isActive } }, children);
|
|
43
|
+
};
|
|
44
|
+
var useIsActive = () => {
|
|
45
|
+
const context = (0, import_react.useContext)(IsActiveContext);
|
|
46
|
+
if (!context) {
|
|
47
|
+
throw new Error("useIsActive must be used within an IsActiveProvider");
|
|
48
|
+
}
|
|
49
|
+
return context.isActive;
|
|
50
|
+
};
|
|
51
|
+
var IsActiveContext_default = IsActiveContext;
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
IsActiveProvider,
|
|
55
|
+
useIsActive
|
|
56
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* OsKey Context
|
|
4
|
+
* 用于在 TicketBooking 组件树中提供 pisellos 的 osKey
|
|
5
|
+
* osKey 用于区分不同页面使用同一个组件时的模块标识
|
|
6
|
+
*/
|
|
7
|
+
interface OsKeyContextType {
|
|
8
|
+
/** pisellos 模块的唯一标识 */
|
|
9
|
+
osKey: string | undefined;
|
|
10
|
+
}
|
|
11
|
+
declare const OsKeyContext: React.Context<OsKeyContextType>;
|
|
12
|
+
interface OsKeyProviderProps {
|
|
13
|
+
osKey: string | undefined;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* OsKey Provider
|
|
18
|
+
* 提供 osKey 给子组件使用
|
|
19
|
+
*/
|
|
20
|
+
export declare const OsKeyProvider: React.FC<OsKeyProviderProps>;
|
|
21
|
+
/**
|
|
22
|
+
* useOsKey Hook
|
|
23
|
+
* 在子组件中使用此 hook 获取 osKey
|
|
24
|
+
*/
|
|
25
|
+
export declare const useOsKey: () => string | undefined;
|
|
26
|
+
export default OsKeyContext;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/ticketBooking/context/OsKeyContext.tsx
|
|
30
|
+
var OsKeyContext_exports = {};
|
|
31
|
+
__export(OsKeyContext_exports, {
|
|
32
|
+
OsKeyProvider: () => OsKeyProvider,
|
|
33
|
+
default: () => OsKeyContext_default,
|
|
34
|
+
useOsKey: () => useOsKey
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(OsKeyContext_exports);
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var OsKeyContext = (0, import_react.createContext)({
|
|
39
|
+
osKey: void 0
|
|
40
|
+
});
|
|
41
|
+
var OsKeyProvider = ({ osKey, children }) => {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(OsKeyContext.Provider, { value: { osKey } }, children);
|
|
43
|
+
};
|
|
44
|
+
var useOsKey = () => {
|
|
45
|
+
const context = (0, import_react.useContext)(OsKeyContext);
|
|
46
|
+
if (!context) {
|
|
47
|
+
throw new Error("useOsKey must be used within an OsKeyProvider");
|
|
48
|
+
}
|
|
49
|
+
return context.osKey;
|
|
50
|
+
};
|
|
51
|
+
var OsKeyContext_default = OsKeyContext;
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
OsKeyProvider,
|
|
55
|
+
useOsKey
|
|
56
|
+
});
|