@pisell/private-materials 6.8.6 → 6.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.js +16 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/actionButtons/index.js +34 -16
- package/es/components/booking/components/footer/amount.js +25 -8
- package/es/components/booking/components/footer/index.js +67 -35
- package/es/components/booking/components/footer/utils.d.ts +7 -0
- package/es/components/booking/components/footer/utils.js +66 -42
- package/es/components/booking/components/voucher/index.js +58 -14
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +69 -21
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/es/components/booking/info/hooks/useHolderConfig.js +9 -2
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/service/Lists.d.ts +1 -1
- package/es/components/booking/info/service/Lists.js +8 -2
- package/es/components/booking/info/service/serve.d.ts +14 -0
- package/es/components/booking/info/service/serve.js +21 -0
- package/es/components/booking/info/service2/Group/utils.js +2 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -33
- package/es/components/booking/info/service2/utils.js +84 -36
- package/es/components/booking/info/utils.js +5 -0
- package/es/components/booking/info2/cartClientCard/index.js +23 -5
- package/es/components/booking/info2/service/addService/index.js +146 -88
- package/es/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/es/components/booking/info2/service/addService/utils.js +78 -9
- package/es/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/es/components/booking/info2/service/editService/Holder/index.js +193 -0
- package/es/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/es/components/booking/info2/service/editService/index.js +332 -76
- package/es/components/booking/info2/utilsByBooking.js +14 -5
- package/es/components/booking/locales.d.ts +30 -0
- package/es/components/booking/locales.js +39 -3
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/es/components/booking/utils/confirmHolderModal.js +318 -0
- package/es/components/booking/utils/confirmHolderModal.less +40 -0
- package/es/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/es/components/booking/utils/selectHolderModal.js +407 -0
- package/es/components/booking/utils.d.ts +11 -3
- package/es/components/booking/utils.js +24 -1
- package/es/components/checkout/PaymentModal.js +15 -10
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.js +6 -3
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/type.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/es/components/{wallet/Detail/serve.js → ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js} +112 -57
- package/es/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +29 -15
- package/es/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +14 -11
- package/es/components/ticketBooking/utils/index.d.ts +10 -2
- package/es/components/ticketBooking/utils/index.js +37 -7
- package/es/components/walletList/index.d.ts +0 -24
- package/es/components/walletList/index.js +173 -41
- package/es/components/walletList/locales.d.ts +9 -0
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
- package/es/plus/productSelect/index.js +1 -4
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/es/plus/selectHolder/components/ErrorTip/index.js +14 -0
- package/es/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/es/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/es/plus/selectHolder/components/HolderItem/index.js +77 -0
- package/es/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/es/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/es/plus/selectHolder/components/HolderList/index.js +43 -0
- package/es/plus/selectHolder/index.d.ts +7 -0
- package/es/plus/selectHolder/index.js +273 -0
- package/es/plus/selectHolder/index.less +137 -0
- package/es/plus/selectHolder/locales.d.ts +24 -0
- package/es/plus/selectHolder/locales.js +29 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/types.js +1 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/selectHolder/utils.js +16 -0
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.d.ts +9 -0
- package/es/plus/walletEditor/locales.js +12 -3
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/index.js +223 -41
- package/es/plus/walletPassGallery/locales.d.ts +15 -0
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.js +355 -0
- package/es/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/es/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/es/pro/multiDayTimeSelect/index.js +1 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/multiDayTimeSelect/types.js +1 -0
- package/es/pro/skuDetailModal/types.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +17 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/actionButtons/index.js +11 -0
- package/lib/components/booking/components/footer/amount.js +23 -6
- package/lib/components/booking/components/footer/index.js +25 -4
- package/lib/components/booking/components/footer/utils.d.ts +7 -0
- package/lib/components/booking/components/footer/utils.js +41 -29
- package/lib/components/booking/components/voucher/index.js +48 -6
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +45 -13
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +1 -0
- package/lib/components/booking/info/hooks/useHolderConfig.js +8 -3
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/service/Lists.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.js +4 -2
- package/lib/components/booking/info/service/serve.d.ts +14 -0
- package/lib/components/booking/info/service/serve.js +5 -0
- package/lib/components/booking/info/service2/Group/utils.js +2 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -33
- package/lib/components/booking/info/service2/utils.js +32 -16
- package/lib/components/booking/info/utils.js +4 -0
- package/lib/components/booking/info2/cartClientCard/index.js +11 -0
- package/lib/components/booking/info2/service/addService/index.js +22 -2
- package/lib/components/booking/info2/service/addService/utils.d.ts +8 -0
- package/lib/components/booking/info2/service/addService/utils.js +47 -9
- package/lib/components/booking/info2/service/editService/Holder/index.d.ts +12 -0
- package/lib/components/booking/info2/service/editService/Holder/index.js +199 -0
- package/lib/components/booking/info2/service/editService/Holder/index.less +63 -0
- package/lib/components/booking/info2/service/editService/index.js +273 -38
- package/lib/components/booking/info2/utilsByBooking.js +19 -8
- package/lib/components/booking/locales.d.ts +30 -0
- package/lib/components/booking/locales.js +33 -3
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils/confirmHolderModal.d.ts +13 -0
- package/lib/components/booking/utils/confirmHolderModal.js +253 -0
- package/lib/components/booking/utils/confirmHolderModal.less +40 -0
- package/lib/components/booking/utils/selectHolderModal.d.ts +24 -0
- package/lib/components/booking/utils/selectHolderModal.js +319 -0
- package/lib/components/booking/utils.d.ts +11 -3
- package/lib/components/booking/utils.js +15 -0
- package/lib/components/checkout/PaymentModal.js +5 -2
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -3
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/type.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.d.ts +18 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.js +118 -0
- package/lib/components/ticketBooking/components/addServiceVariant/MultiDayTimeSelectModal.less +0 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +23 -9
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +0 -16
- package/lib/components/ticketBooking/utils/index.d.ts +10 -2
- package/lib/components/ticketBooking/utils/index.js +31 -6
- package/lib/components/walletList/index.d.ts +0 -24
- package/lib/components/walletList/index.js +100 -4
- package/lib/components/walletList/locales.d.ts +9 -0
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +0 -3
- package/lib/plus/productSelect/index.js +1 -2
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +3 -0
- package/lib/{components/wallet/PointCard/model.js → plus/selectHolder/components/ErrorTip/index.js} +10 -23
- package/lib/plus/selectHolder/components/ErrorTip/index.less +51 -0
- package/lib/plus/selectHolder/components/HolderItem/index.d.ts +6 -0
- package/lib/plus/selectHolder/components/HolderItem/index.js +101 -0
- package/lib/plus/selectHolder/components/HolderItem/index.less +105 -0
- package/lib/plus/selectHolder/components/HolderList/index.d.ts +30 -0
- package/lib/{components/wallet/components/WalletBar → plus/selectHolder/components/HolderList}/index.js +29 -15
- package/lib/plus/selectHolder/index.d.ts +7 -0
- package/lib/plus/selectHolder/index.js +223 -0
- package/lib/plus/selectHolder/index.less +137 -0
- package/lib/plus/selectHolder/locales.d.ts +24 -0
- package/lib/{components/wallet/Voucher → plus/selectHolder}/locales.js +17 -14
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/types.js +17 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/{components/wallet/RechargeableCard/serve.js → plus/selectHolder/utils.js} +11 -10
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.d.ts +9 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/index.js +154 -27
- package/lib/plus/walletPassGallery/locales.d.ts +15 -0
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.d.ts +9 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.js +290 -0
- package/lib/pro/multiDayTimeSelect/MultiDayTimeSelect.less +8 -0
- package/lib/pro/multiDayTimeSelect/index.d.ts +3 -0
- package/lib/{components/wallet/components → pro/multiDayTimeSelect}/index.js +6 -16
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/multiDayTimeSelect/types.js +17 -0
- package/lib/pro/skuDetailModal/types.d.ts +1 -0
- package/lowcode/event-select-holder/meta.ts +2 -2
- package/lowcode/select-holder/meta.ts +220 -0
- package/lowcode/select-holder/snippets.ts +41 -0
- package/package.json +3 -3
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/serve.js +0 -205
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
|
@@ -1,874 +0,0 @@
|
|
|
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/wallet/Detail/index.tsx
|
|
30
|
-
var Detail_exports = {};
|
|
31
|
-
__export(Detail_exports, {
|
|
32
|
-
default: () => Detail_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(Detail_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_materials = require("@pisell/materials");
|
|
37
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
38
|
-
var import_XClose = __toESM(require("@pisell/icon/es/XClose"));
|
|
39
|
-
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
40
|
-
var import_utils = require("@pisell/utils");
|
|
41
|
-
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
42
|
-
var import_materials2 = require("@pisell/materials");
|
|
43
|
-
var import_useEngineContext = __toESM(require("./../../../hooks/useEngineContext"));
|
|
44
|
-
var import_locales = __toESM(require("./locales"));
|
|
45
|
-
var import_serve = require("./serve");
|
|
46
|
-
var import_utils2 = require("./../../../utils");
|
|
47
|
-
var import_components = require("../components");
|
|
48
|
-
var import_utils3 = require("../utils");
|
|
49
|
-
var import_index = require("./index.less");
|
|
50
|
-
var { Text } = import_materials2.Typography;
|
|
51
|
-
import_dayjs.default.extend(import_timezone.default);
|
|
52
|
-
import_dayjs.default.extend(import_utc.default);
|
|
53
|
-
var Detail = (0, import_react.forwardRef)((props, ref) => {
|
|
54
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
55
|
-
const {
|
|
56
|
-
detail = {},
|
|
57
|
-
buttonGroupList = [[]],
|
|
58
|
-
className,
|
|
59
|
-
showWalletBar = false,
|
|
60
|
-
onBack
|
|
61
|
-
} = props;
|
|
62
|
-
const {
|
|
63
|
-
code = "",
|
|
64
|
-
tag = "",
|
|
65
|
-
product_title = "",
|
|
66
|
-
encoded = "",
|
|
67
|
-
balance,
|
|
68
|
-
expire_date = "",
|
|
69
|
-
product = {},
|
|
70
|
-
custom_schedule_snapshot
|
|
71
|
-
} = detail;
|
|
72
|
-
console.log(detail, "detail22");
|
|
73
|
-
const {
|
|
74
|
-
description = "",
|
|
75
|
-
extension_data = [],
|
|
76
|
-
customer_order_behavior_count = 0
|
|
77
|
-
} = product || {};
|
|
78
|
-
const context = (0, import_useEngineContext.default)();
|
|
79
|
-
const [extensionData, setExtensionData] = (0, import_react.useState)([]);
|
|
80
|
-
const [customerOrderBehaviorCount, setCustomerOrderBehaviorCount] = (0, import_react.useState)(0);
|
|
81
|
-
const [totalOrderBehaviorCount, setTotalOrderBehaviorCount] = (0, import_react.useState)(0);
|
|
82
|
-
const [todayOrderBehaviorCount, setTodayOrderBehaviorCount] = (0, import_react.useState)(0);
|
|
83
|
-
const [weekOrderBehaviorCount, setWeekOrderBehaviorCount] = (0, import_react.useState)(0);
|
|
84
|
-
const [monthOrderBehaviorCount, setMonthOrderBehaviorCount] = (0, import_react.useState)(0);
|
|
85
|
-
const [usageCreditsData, setUsageCreditsData] = (0, import_react.useState)(null);
|
|
86
|
-
const [shouldShowUsageRules, setShouldShowUsageRules] = (0, import_react.useState)(false);
|
|
87
|
-
const generateUsageRules = (creditsData) => {
|
|
88
|
-
if (!creditsData) return [];
|
|
89
|
-
const rules = [];
|
|
90
|
-
if (creditsData.max_per_day > 0) {
|
|
91
|
-
rules.push({
|
|
92
|
-
type: "daily",
|
|
93
|
-
limit: creditsData.max_per_day,
|
|
94
|
-
description: "",
|
|
95
|
-
// Will be filled by localized text
|
|
96
|
-
resetTime: ""
|
|
97
|
-
// Will be filled by localized text
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
if (creditsData.max_per_week > 0) {
|
|
101
|
-
rules.push({
|
|
102
|
-
type: "weekly",
|
|
103
|
-
limit: creditsData.max_per_week,
|
|
104
|
-
description: "",
|
|
105
|
-
// Will be filled by localized text
|
|
106
|
-
resetTime: ""
|
|
107
|
-
// Will be filled by localized text
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
if (creditsData.max_per_month > 0) {
|
|
111
|
-
rules.push({
|
|
112
|
-
type: "monthly",
|
|
113
|
-
limit: creditsData.max_per_month,
|
|
114
|
-
description: "",
|
|
115
|
-
// Will be filled by localized text
|
|
116
|
-
resetTime: ""
|
|
117
|
-
// Will be filled by localized text
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return rules;
|
|
121
|
-
};
|
|
122
|
-
const generatePersonalLimit = (creditsData, usedCount = { totalOrderBehaviorCount: 0, customerOrderBehaviorCount: 0 }) => {
|
|
123
|
-
if (!creditsData) return void 0;
|
|
124
|
-
const totalCredits = creditsData.total_credits || 0;
|
|
125
|
-
const perUserLimit = creditsData.per_user_limit || 0;
|
|
126
|
-
let total = 0;
|
|
127
|
-
if (totalCredits > 0 && perUserLimit > 0) {
|
|
128
|
-
total = Math.min(totalCredits, perUserLimit);
|
|
129
|
-
} else {
|
|
130
|
-
total = Math.max(totalCredits, perUserLimit);
|
|
131
|
-
}
|
|
132
|
-
let total_remaining = 0;
|
|
133
|
-
if (totalCredits > 0) {
|
|
134
|
-
total_remaining = totalCredits - usedCount.totalOrderBehaviorCount;
|
|
135
|
-
}
|
|
136
|
-
let perUser_remaining = 0;
|
|
137
|
-
if (perUserLimit > 0) {
|
|
138
|
-
perUser_remaining = perUserLimit - usedCount.customerOrderBehaviorCount;
|
|
139
|
-
}
|
|
140
|
-
let remaining = 0;
|
|
141
|
-
if (total_remaining > 0 && perUser_remaining > 0) {
|
|
142
|
-
remaining = Math.min(total_remaining, perUser_remaining);
|
|
143
|
-
} else {
|
|
144
|
-
if (total_remaining === 0) {
|
|
145
|
-
if (totalCredits === 0) {
|
|
146
|
-
remaining = perUser_remaining;
|
|
147
|
-
} else {
|
|
148
|
-
remaining = 0;
|
|
149
|
-
}
|
|
150
|
-
} else {
|
|
151
|
-
if (perUser_remaining === 0) {
|
|
152
|
-
remaining = 0;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return {
|
|
157
|
-
total,
|
|
158
|
-
remaining,
|
|
159
|
-
note: ""
|
|
160
|
-
// Will be filled by localized text
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
const usageRules = generateUsageRules(usageCreditsData);
|
|
164
|
-
const personalLimit = generatePersonalLimit(usageCreditsData, {
|
|
165
|
-
totalOrderBehaviorCount,
|
|
166
|
-
customerOrderBehaviorCount
|
|
167
|
-
});
|
|
168
|
-
const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
169
|
-
const dvaStore = (_c = (_b = utils == null ? void 0 : utils.getStore) == null ? void 0 : _b.call(utils)) == null ? void 0 : _c.getState();
|
|
170
|
-
const [TimeLineData, setTimeLineData] = (0, import_react.useState)([]);
|
|
171
|
-
const [isShowtimeLineDetail, setIsShowtimeLineDetail] = (0, import_react.useState)(false);
|
|
172
|
-
const [isSpending, setIsSpending] = (0, import_react.useState)(true);
|
|
173
|
-
const [timeLineDetail, setTimeLineDetail] = (0, import_react.useState)({});
|
|
174
|
-
const [wechatModalOpen, setWechatModalOpen] = (0, import_react.useState)(false);
|
|
175
|
-
const [copyUrl, setCopyUrl] = (0, import_react.useState)("");
|
|
176
|
-
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
177
|
-
const [apple_wallet_url, setAppleWalletUrl] = (0, import_react.useState)("");
|
|
178
|
-
const [google_wallet_url, setGoogleWalletUrl] = (0, import_react.useState)("");
|
|
179
|
-
const stateTimeUnix = 1723255863;
|
|
180
|
-
const [listData, setListData] = (0, import_react.useState)([]);
|
|
181
|
-
const modalContentRef = (0, import_react.useRef)(null);
|
|
182
|
-
const tabsRef = (0, import_react.useRef)();
|
|
183
|
-
const [activeTab, setActiveTab] = (0, import_react.useState)("detail");
|
|
184
|
-
const [isScrolling, setIsScrolling] = (0, import_react.useState)(false);
|
|
185
|
-
const isUserClickRef = (0, import_react.useRef)(false);
|
|
186
|
-
const scrollTimeoutRef = (0, import_react.useRef)(null);
|
|
187
|
-
const [addWalletLoading, setAddWalletLoading] = (0, import_react.useState)(false);
|
|
188
|
-
const [isAddingToWallet, setIsAddingToWallet] = (0, import_react.useState)(false);
|
|
189
|
-
const anchorOptions = (0, import_react.useMemo)(
|
|
190
|
-
() => {
|
|
191
|
-
const options = [
|
|
192
|
-
{
|
|
193
|
-
id: "detail",
|
|
194
|
-
name: import_utils.locales.getText("page.wallet.detail")
|
|
195
|
-
}
|
|
196
|
-
];
|
|
197
|
-
if (tag !== "product_discount_card") {
|
|
198
|
-
options.push({
|
|
199
|
-
id: "activityLog",
|
|
200
|
-
name: import_utils.locales.getText("page.wallet.activelog")
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
return options;
|
|
204
|
-
},
|
|
205
|
-
[tag]
|
|
206
|
-
// 添加tag作为依赖项,当tag变化时重新计算
|
|
207
|
-
);
|
|
208
|
-
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
209
|
-
addWalletCard
|
|
210
|
-
}));
|
|
211
|
-
const addWalletCard = () => {
|
|
212
|
-
if ((0, import_utils.isIos)()) {
|
|
213
|
-
onAppleClick();
|
|
214
|
-
} else {
|
|
215
|
-
onGoogleClick();
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
const scheduleList = (0, import_react.useMemo)(() => {
|
|
219
|
-
return (custom_schedule_snapshot == null ? void 0 : custom_schedule_snapshot.data) || [];
|
|
220
|
-
}, [custom_schedule_snapshot]);
|
|
221
|
-
(0, import_react.useEffect)(() => {
|
|
222
|
-
var _a2;
|
|
223
|
-
const detail2 = (0, import_utils3.formatScheduleText)(scheduleList, "zh-CN");
|
|
224
|
-
let expireText = expire_date ? expire_date : import_utils.locales.getText("page.wallet.expireDate");
|
|
225
|
-
if (scheduleList.length > 0) {
|
|
226
|
-
let validityTexts = "";
|
|
227
|
-
let excludedText = "";
|
|
228
|
-
let includedText = "";
|
|
229
|
-
detail2.forEach((item) => {
|
|
230
|
-
if (item.validityTexts.length > 0) {
|
|
231
|
-
validityTexts = `${validityTexts}${item.validityTexts.join("\n")}
|
|
232
|
-
`;
|
|
233
|
-
}
|
|
234
|
-
if (item.excluded_date.length > 0) {
|
|
235
|
-
excludedText = `${excludedText}${item.excluded_date.join("\n")}
|
|
236
|
-
`;
|
|
237
|
-
}
|
|
238
|
-
if (item.included_date.length > 0) {
|
|
239
|
-
includedText = `${includedText}${item.included_date.join("\n")}
|
|
240
|
-
`;
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
expireText = /* @__PURE__ */ import_react.default.createElement("span", { className: "wallet-detail-expire-text" }, validityTexts, excludedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.notValidDate")), excludedText, includedText && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-expire-text-title" }, import_utils.locales.getText("page.wallet.includedDate")), includedText);
|
|
244
|
-
}
|
|
245
|
-
let data = [
|
|
246
|
-
{
|
|
247
|
-
label: import_utils.locales.getText("page.wallet.cardName"),
|
|
248
|
-
value: product_title
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
label: import_utils.locales.getText("page.wallet.carNumber"),
|
|
252
|
-
value: encoded,
|
|
253
|
-
isLink: false
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
label: import_utils.locales.getText("page.wallet.validDate"),
|
|
257
|
-
value: expireText
|
|
258
|
-
}
|
|
259
|
-
];
|
|
260
|
-
if (tag === "product_discount_card") {
|
|
261
|
-
const isFixedAmount = ((_a2 = detail2.metadata) == null ? void 0 : _a2.discount_card_type) === "fixed_amount";
|
|
262
|
-
data.splice(2, 0, {
|
|
263
|
-
label: import_utils.locales.getText("page.wallet.discount"),
|
|
264
|
-
value: balance ? isFixedAmount ? `${symbol}${Number(balance)}` : `${Number(balance)}%` : ""
|
|
265
|
-
});
|
|
266
|
-
} else if (tag === "point_card") {
|
|
267
|
-
data.splice(2, 0, {
|
|
268
|
-
label: import_utils.locales.getText("page.wallet.points"),
|
|
269
|
-
value: balance ? `${Number(balance)}` : ""
|
|
270
|
-
});
|
|
271
|
-
} else if (tag === "good_pass") {
|
|
272
|
-
data.splice(2, 0, {
|
|
273
|
-
label: import_utils.locales.getText("page.wallet.goodPass"),
|
|
274
|
-
value: balance ? `${Number(balance)}` : ""
|
|
275
|
-
});
|
|
276
|
-
} else {
|
|
277
|
-
data.splice(2, 0, {
|
|
278
|
-
label: import_utils.locales.getText("page.wallet.balance"),
|
|
279
|
-
value: balance ? `${symbol}${Number(balance)}` : ""
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
setListData(data);
|
|
283
|
-
}, [detail]);
|
|
284
|
-
const { symbol = "$" } = (0, import_materials.usePisellConfig)();
|
|
285
|
-
import_utils.locales.init(import_locales.default, ((_d = dvaStore == null ? void 0 : dvaStore.core) == null ? void 0 : _d.translateLocale) || "en");
|
|
286
|
-
import_utils2.request.setRequest(utils == null ? void 0 : utils.request);
|
|
287
|
-
const { store } = ((_e = context.appHelper) == null ? void 0 : _e.utils) || { store: {} };
|
|
288
|
-
const platform = (0, import_utils.isMobile)() ? "h5" : "pc";
|
|
289
|
-
const timezone2 = ((_i = (_h = (_g = (_f = store == null ? void 0 : store.getState) == null ? void 0 : _f.call(store)) == null ? void 0 : _g.global) == null ? void 0 : _h.symbol) == null ? void 0 : _i.shop.timezone) || "Asia/Shanghai";
|
|
290
|
-
const formatTimeLineDta = (data) => {
|
|
291
|
-
if (data.length < 0) return [];
|
|
292
|
-
const filteredData = data.filter(
|
|
293
|
-
(item) => !(item.tag === "point_card" && (item.amount === "0" || parseFloat(item.amount || "0") === 0))
|
|
294
|
-
);
|
|
295
|
-
const formatData = filteredData.map((item) => {
|
|
296
|
-
return {
|
|
297
|
-
children: assetActionEnum[(item == null ? void 0 : item.action) || ""] ? timeTreeNode(item) : null
|
|
298
|
-
};
|
|
299
|
-
});
|
|
300
|
-
return formatData;
|
|
301
|
-
};
|
|
302
|
-
const formatCurrencyAmount = (amount = "", isNegative = false) => {
|
|
303
|
-
if (!amount) return "";
|
|
304
|
-
const absAmount = amount.startsWith("-") ? amount.substring(1) : amount;
|
|
305
|
-
return isNegative ? `-${!["point_card", "good_pass"].includes(tag) ? symbol : ""}${absAmount}` : `${!["point_card", "good_pass"].includes(tag) ? symbol : ""}${amount}`;
|
|
306
|
-
};
|
|
307
|
-
const getDetail = async () => {
|
|
308
|
-
const {
|
|
309
|
-
apple_wallet_url: apple_wallet_url2 = "",
|
|
310
|
-
google_wallet_url: google_wallet_url2 = "",
|
|
311
|
-
extension_data: extension_data2 = [],
|
|
312
|
-
customer_order_behavior_count: customer_order_behavior_count2 = 0,
|
|
313
|
-
total_order_behavior_count = 0,
|
|
314
|
-
today_order_behavior_count = 0,
|
|
315
|
-
week_order_behavior_count = 0,
|
|
316
|
-
month_order_behavior_count = 0
|
|
317
|
-
} = await (0, import_serve.getDetailApi)({ id: detail.id || "" });
|
|
318
|
-
setAppleWalletUrl(apple_wallet_url2);
|
|
319
|
-
setGoogleWalletUrl(google_wallet_url2);
|
|
320
|
-
setExtensionData(extension_data2);
|
|
321
|
-
setCustomerOrderBehaviorCount(customer_order_behavior_count2);
|
|
322
|
-
setTotalOrderBehaviorCount(total_order_behavior_count);
|
|
323
|
-
setTodayOrderBehaviorCount(today_order_behavior_count);
|
|
324
|
-
setWeekOrderBehaviorCount(week_order_behavior_count);
|
|
325
|
-
setMonthOrderBehaviorCount(month_order_behavior_count);
|
|
326
|
-
if (Array.isArray(extension_data2) && extension_data2.length > 0) {
|
|
327
|
-
const usageCreditsItem = extension_data2.find(
|
|
328
|
-
(item) => item.field_key === "usage_credits"
|
|
329
|
-
);
|
|
330
|
-
if (usageCreditsItem == null ? void 0 : usageCreditsItem.value) {
|
|
331
|
-
setUsageCreditsData(usageCreditsItem.value);
|
|
332
|
-
setShouldShowUsageRules(true);
|
|
333
|
-
} else {
|
|
334
|
-
setUsageCreditsData(null);
|
|
335
|
-
setShouldShowUsageRules(false);
|
|
336
|
-
}
|
|
337
|
-
} else {
|
|
338
|
-
setUsageCreditsData(null);
|
|
339
|
-
setShouldShowUsageRules(false);
|
|
340
|
-
}
|
|
341
|
-
};
|
|
342
|
-
(0, import_react.useEffect)(() => {
|
|
343
|
-
if (detail.id) {
|
|
344
|
-
getDetail();
|
|
345
|
-
}
|
|
346
|
-
}, [detail.id]);
|
|
347
|
-
const timeTreeNode = (data) => {
|
|
348
|
-
const {
|
|
349
|
-
action = "",
|
|
350
|
-
created_at = "",
|
|
351
|
-
amount = "",
|
|
352
|
-
currency_symbol = ""
|
|
353
|
-
} = data;
|
|
354
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-timeline-node" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-timeline-node-left" }, /* @__PURE__ */ import_react.default.createElement("p", { className: "wallet-detail-timeline-node-action" }, action ? assetActionEnum[action] : ""), created_at && /* @__PURE__ */ import_react.default.createElement("p", { className: "wallet-detail-timeline-node-time" }, created_at, (action === "recharge" || action === "order_expend") && // @ts-ignore 忽略TypeScript错误,React类型定义问题
|
|
355
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
356
|
-
"span",
|
|
357
|
-
{
|
|
358
|
-
className: "wallet-detail-timeline-node-detail-link",
|
|
359
|
-
onClick: () => {
|
|
360
|
-
setIsShowtimeLineDetail(true);
|
|
361
|
-
setIsSpending(action === "order_expend");
|
|
362
|
-
setTimeLineDetail(data);
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
import_utils.locales.getText("page.wallet.viewDetails")
|
|
366
|
-
))), /* @__PURE__ */ import_react.default.createElement(
|
|
367
|
-
"div",
|
|
368
|
-
{
|
|
369
|
-
className: `wallet-detail-timeline-node-amount${action === "recharge" ? " wallet-detail-timeline-node-amount-positive" : ""}${action === "order_expend" ? " wallet-detail-timeline-node-amount-negative" : ""}`
|
|
370
|
-
},
|
|
371
|
-
amount && currency_symbol ? formatCurrencyAmount(amount, action === "order_expend") : ""
|
|
372
|
-
));
|
|
373
|
-
};
|
|
374
|
-
const getTimeTreeList = async () => {
|
|
375
|
-
var _a2, _b2, _c2, _d2;
|
|
376
|
-
setIsLoading(true);
|
|
377
|
-
try {
|
|
378
|
-
const { list = [] } = await (0, import_serve.getAssetList)({
|
|
379
|
-
num: "99",
|
|
380
|
-
skip: "1",
|
|
381
|
-
card_id: code,
|
|
382
|
-
sourceType: tag,
|
|
383
|
-
tag,
|
|
384
|
-
business_object: "customer"
|
|
385
|
-
});
|
|
386
|
-
let filterList = list.filter(
|
|
387
|
-
(item) => !!assetActionEnum[item.action || ""]
|
|
388
|
-
);
|
|
389
|
-
for (let i = filterList.length - 1; i >= 0; i--) {
|
|
390
|
-
if (((_a2 = filterList[i]) == null ? void 0 : _a2.action) === "order_expend" && import_dayjs.default.tz((_b2 = filterList[i]) == null ? void 0 : _b2.created_at, timezone2).unix() < stateTimeUnix) {
|
|
391
|
-
filterList.splice(i, 1);
|
|
392
|
-
}
|
|
393
|
-
if (((_c2 = filterList[i]) == null ? void 0 : _c2.tag) === "point_card" && import_dayjs.default.tz((_d2 = filterList[i]) == null ? void 0 : _d2.created_at, timezone2).unix() < stateTimeUnix) {
|
|
394
|
-
filterList.splice(i, 1);
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
setTimeLineData(formatTimeLineDta(filterList));
|
|
398
|
-
} catch (error) {
|
|
399
|
-
console.error("Failed to fetch asset list:", error);
|
|
400
|
-
} finally {
|
|
401
|
-
setIsLoading(false);
|
|
402
|
-
}
|
|
403
|
-
};
|
|
404
|
-
(0, import_react.useEffect)(() => {
|
|
405
|
-
if (code) {
|
|
406
|
-
getTimeTreeList();
|
|
407
|
-
}
|
|
408
|
-
}, [code]);
|
|
409
|
-
const addWalletPass = async (url, type) => {
|
|
410
|
-
if (!url) {
|
|
411
|
-
(0, import_materials2.PisellToast)({
|
|
412
|
-
content: import_utils.locales.getText("page.wallet.urlEmpty") || "钱包链接为空",
|
|
413
|
-
duration: 2
|
|
414
|
-
});
|
|
415
|
-
return false;
|
|
416
|
-
}
|
|
417
|
-
if (isWechat()) {
|
|
418
|
-
setWechatModalOpen(true);
|
|
419
|
-
setCopyUrl(url);
|
|
420
|
-
return false;
|
|
421
|
-
}
|
|
422
|
-
setAddWalletLoading(true);
|
|
423
|
-
try {
|
|
424
|
-
if (type === "apple") {
|
|
425
|
-
const response = await fetch(url);
|
|
426
|
-
if (!response.ok) {
|
|
427
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
428
|
-
}
|
|
429
|
-
const passData = await response.arrayBuffer();
|
|
430
|
-
const blob = new Blob([passData], {
|
|
431
|
-
type: "application/vnd.apple.pkpass"
|
|
432
|
-
});
|
|
433
|
-
const downloadUrl = URL.createObjectURL(blob);
|
|
434
|
-
const a = document.createElement("a");
|
|
435
|
-
a.href = downloadUrl;
|
|
436
|
-
a.download = "pass.pkpass";
|
|
437
|
-
a.click();
|
|
438
|
-
URL.revokeObjectURL(downloadUrl);
|
|
439
|
-
} else {
|
|
440
|
-
window.open(url);
|
|
441
|
-
}
|
|
442
|
-
} catch (error) {
|
|
443
|
-
console.error("Failed to add wallet:", error);
|
|
444
|
-
(0, import_materials2.PisellToast)({
|
|
445
|
-
content: import_utils.locales.getText("page.wallet.error.addFailed"),
|
|
446
|
-
duration: 3
|
|
447
|
-
});
|
|
448
|
-
} finally {
|
|
449
|
-
setAddWalletLoading(false);
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
const onAppleClick = async () => {
|
|
453
|
-
await addWalletPass(apple_wallet_url, "apple");
|
|
454
|
-
};
|
|
455
|
-
const onGoogleClick = async () => {
|
|
456
|
-
await addWalletPass(google_wallet_url, "google");
|
|
457
|
-
};
|
|
458
|
-
const isWechat = () => {
|
|
459
|
-
return /MicroMessenger/i.test(window.navigator.userAgent);
|
|
460
|
-
};
|
|
461
|
-
const httpCopyToClipboard = (text) => {
|
|
462
|
-
const textArea = document.createElement("textarea");
|
|
463
|
-
textArea.value = text;
|
|
464
|
-
textArea.style.position = "fixed";
|
|
465
|
-
textArea.style.top = "-10000px";
|
|
466
|
-
textArea.style.left = "-10000px";
|
|
467
|
-
document.body.appendChild(textArea);
|
|
468
|
-
textArea.focus();
|
|
469
|
-
textArea.select();
|
|
470
|
-
document.execCommand("copy");
|
|
471
|
-
document.body.removeChild(textArea);
|
|
472
|
-
};
|
|
473
|
-
const copyToClipboard = (text) => {
|
|
474
|
-
if (navigator.clipboard) {
|
|
475
|
-
return navigator.clipboard.writeText(text);
|
|
476
|
-
} else {
|
|
477
|
-
return httpCopyToClipboard(text);
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
const onCopyClick = () => {
|
|
481
|
-
copyToClipboard(copyUrl);
|
|
482
|
-
(0, import_materials2.PisellToast)({
|
|
483
|
-
content: import_utils.locales.getText("page.wallet.copySuccess"),
|
|
484
|
-
duration: 2
|
|
485
|
-
});
|
|
486
|
-
setWechatModalOpen(false);
|
|
487
|
-
};
|
|
488
|
-
const cardContentRef = (0, import_react.useRef)(null);
|
|
489
|
-
const handleTabChange = (key) => {
|
|
490
|
-
setActiveTab(typeof key === "string" ? key : key.toString());
|
|
491
|
-
if (platform === "h5") {
|
|
492
|
-
setIsScrolling(true);
|
|
493
|
-
setTimeout(() => {
|
|
494
|
-
setIsScrolling(false);
|
|
495
|
-
}, 500);
|
|
496
|
-
}
|
|
497
|
-
if (isUserClickRef.current) {
|
|
498
|
-
const section = document.querySelector(
|
|
499
|
-
`[data-section="${typeof key === "string" ? key : key.toString()}"]`
|
|
500
|
-
);
|
|
501
|
-
if (section && cardContentRef.current) {
|
|
502
|
-
const sectionTop = section.getBoundingClientRect().top;
|
|
503
|
-
const contentTop = cardContentRef.current.getBoundingClientRect().top;
|
|
504
|
-
const scrollTop = cardContentRef.current.scrollTop + (sectionTop - contentTop) - 50;
|
|
505
|
-
cardContentRef.current.scrollTo({
|
|
506
|
-
top: scrollTop,
|
|
507
|
-
behavior: "smooth"
|
|
508
|
-
});
|
|
509
|
-
}
|
|
510
|
-
isUserClickRef.current = false;
|
|
511
|
-
}
|
|
512
|
-
};
|
|
513
|
-
const preventScrollPropagation = (0, import_react.useCallback)(
|
|
514
|
-
(e) => {
|
|
515
|
-
if (!cardContentRef.current) return;
|
|
516
|
-
const scrollContainer = cardContentRef.current;
|
|
517
|
-
const isAtTop = scrollContainer.scrollTop <= 0;
|
|
518
|
-
const isAtBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop <= scrollContainer.clientHeight + 1;
|
|
519
|
-
if ("touches" in e) {
|
|
520
|
-
const touchEvent = e;
|
|
521
|
-
if (isAtTop && touchEvent.touches[0].clientY > 0 || isAtBottom && touchEvent.touches[0].clientY < 0) {
|
|
522
|
-
e.stopPropagation();
|
|
523
|
-
}
|
|
524
|
-
} else {
|
|
525
|
-
const wheelEvent = e;
|
|
526
|
-
if (isAtTop || isAtBottom) {
|
|
527
|
-
wheelEvent.stopPropagation();
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
},
|
|
531
|
-
[]
|
|
532
|
-
);
|
|
533
|
-
(0, import_react.useEffect)(() => {
|
|
534
|
-
if (!cardContentRef.current || platform !== "h5") return;
|
|
535
|
-
const scrollContainer = cardContentRef.current;
|
|
536
|
-
const handleTouchMove = (e) => {
|
|
537
|
-
preventScrollPropagation(e);
|
|
538
|
-
};
|
|
539
|
-
scrollContainer.addEventListener("touchmove", handleTouchMove, {
|
|
540
|
-
passive: false
|
|
541
|
-
});
|
|
542
|
-
return () => {
|
|
543
|
-
scrollContainer.removeEventListener("touchmove", handleTouchMove);
|
|
544
|
-
};
|
|
545
|
-
}, [platform, preventScrollPropagation]);
|
|
546
|
-
(0, import_react.useEffect)(() => {
|
|
547
|
-
if (!cardContentRef.current) return;
|
|
548
|
-
let isCurrentlyScrolling = false;
|
|
549
|
-
let lastScrollTime = 0;
|
|
550
|
-
let pendingAnchorId = null;
|
|
551
|
-
const handleScroll = () => {
|
|
552
|
-
if (isScrolling || isUserClickRef.current) return;
|
|
553
|
-
lastScrollTime = Date.now();
|
|
554
|
-
isCurrentlyScrolling = true;
|
|
555
|
-
if (scrollTimeoutRef.current) {
|
|
556
|
-
clearTimeout(scrollTimeoutRef.current);
|
|
557
|
-
}
|
|
558
|
-
const container2 = cardContentRef.current;
|
|
559
|
-
if (!container2) return;
|
|
560
|
-
const scrollTop = container2.scrollTop;
|
|
561
|
-
const headerHeight = 56;
|
|
562
|
-
const containerHeight = container2.clientHeight;
|
|
563
|
-
const sectionPositions = anchorOptions.map((option) => {
|
|
564
|
-
const element = document.getElementById(option.id) || document.querySelector(`[data-section="${option.id}"]`);
|
|
565
|
-
if (!element) return null;
|
|
566
|
-
const elementOffsetTop = element.offsetTop;
|
|
567
|
-
const elementHeight = element.offsetHeight;
|
|
568
|
-
const isElementVisible = elementOffsetTop >= scrollTop && elementOffsetTop <= scrollTop + containerHeight || elementOffsetTop + elementHeight >= scrollTop && elementOffsetTop + elementHeight <= scrollTop + containerHeight || elementOffsetTop <= scrollTop && elementOffsetTop + elementHeight >= scrollTop + containerHeight;
|
|
569
|
-
return {
|
|
570
|
-
id: option.id,
|
|
571
|
-
offsetTop: elementOffsetTop,
|
|
572
|
-
height: elementHeight,
|
|
573
|
-
distanceFromViewportTop: Math.abs(
|
|
574
|
-
elementOffsetTop - scrollTop - headerHeight
|
|
575
|
-
),
|
|
576
|
-
isVisible: isElementVisible
|
|
577
|
-
};
|
|
578
|
-
}).filter(
|
|
579
|
-
(section) => section !== null
|
|
580
|
-
);
|
|
581
|
-
const visibleSections = sectionPositions.filter(
|
|
582
|
-
(section) => section.isVisible
|
|
583
|
-
);
|
|
584
|
-
if (visibleSections.length === 0) return;
|
|
585
|
-
const bestSection = visibleSections.reduce(
|
|
586
|
-
(prev, current) => prev.distanceFromViewportTop < current.distanceFromViewportTop ? prev : current
|
|
587
|
-
);
|
|
588
|
-
if (bestSection && activeTab !== bestSection.id) {
|
|
589
|
-
pendingAnchorId = bestSection.id;
|
|
590
|
-
}
|
|
591
|
-
scrollTimeoutRef.current = setTimeout(() => {
|
|
592
|
-
const timeSinceLastScroll = Date.now() - lastScrollTime;
|
|
593
|
-
if (timeSinceLastScroll >= 300) {
|
|
594
|
-
isCurrentlyScrolling = false;
|
|
595
|
-
if (pendingAnchorId && activeTab !== pendingAnchorId && !isScrolling) {
|
|
596
|
-
setActiveTab(pendingAnchorId);
|
|
597
|
-
}
|
|
598
|
-
pendingAnchorId = null;
|
|
599
|
-
} else {
|
|
600
|
-
scrollTimeoutRef.current = setTimeout(() => {
|
|
601
|
-
isCurrentlyScrolling = false;
|
|
602
|
-
if (pendingAnchorId && activeTab !== pendingAnchorId && !isScrolling) {
|
|
603
|
-
setActiveTab(pendingAnchorId);
|
|
604
|
-
}
|
|
605
|
-
pendingAnchorId = null;
|
|
606
|
-
}, 300 - timeSinceLastScroll);
|
|
607
|
-
}
|
|
608
|
-
}, 300);
|
|
609
|
-
};
|
|
610
|
-
const container = cardContentRef.current;
|
|
611
|
-
container.addEventListener("scroll", handleScroll);
|
|
612
|
-
return () => {
|
|
613
|
-
container.removeEventListener("scroll", handleScroll);
|
|
614
|
-
if (scrollTimeoutRef.current) {
|
|
615
|
-
clearTimeout(scrollTimeoutRef.current);
|
|
616
|
-
}
|
|
617
|
-
};
|
|
618
|
-
}, [anchorOptions, activeTab, isScrolling]);
|
|
619
|
-
const handleBack = (0, import_react.useCallback)(() => {
|
|
620
|
-
if (onBack) {
|
|
621
|
-
onBack();
|
|
622
|
-
}
|
|
623
|
-
setTimeout(() => {
|
|
624
|
-
if (cardContentRef.current) {
|
|
625
|
-
cardContentRef.current.scrollTop = 0;
|
|
626
|
-
}
|
|
627
|
-
setActiveTab("detail");
|
|
628
|
-
setIsScrolling(false);
|
|
629
|
-
}, 100);
|
|
630
|
-
}, [onBack]);
|
|
631
|
-
(0, import_react.useEffect)(() => {
|
|
632
|
-
}, [onBack, platform]);
|
|
633
|
-
const detailWrapperRef = (0, import_react.useRef)(null);
|
|
634
|
-
const [contentHeight, setContentHeight] = (0, import_react.useState)(
|
|
635
|
-
void 0
|
|
636
|
-
);
|
|
637
|
-
const anchorWrapperRef = (0, import_react.useRef)(null);
|
|
638
|
-
(0, import_react.useLayoutEffect)(() => {
|
|
639
|
-
const updateContentHeight = () => {
|
|
640
|
-
if (detailWrapperRef.current) {
|
|
641
|
-
const viewportHeight = window.innerHeight;
|
|
642
|
-
const containerTop = detailWrapperRef.current.getBoundingClientRect().top;
|
|
643
|
-
const detailHeaderEl = anchorWrapperRef.current;
|
|
644
|
-
let nonScrollableHeight = 0;
|
|
645
|
-
if (detailHeaderEl) {
|
|
646
|
-
const headerHeight = detailHeaderEl.getBoundingClientRect().height;
|
|
647
|
-
nonScrollableHeight = headerHeight + 8;
|
|
648
|
-
} else {
|
|
649
|
-
nonScrollableHeight = 60;
|
|
650
|
-
}
|
|
651
|
-
const bottomPadding = 10;
|
|
652
|
-
const footerHeight = platform === "h5" ? 80 : 0;
|
|
653
|
-
const calculatedHeight = viewportHeight - containerTop - nonScrollableHeight - bottomPadding - footerHeight;
|
|
654
|
-
const finalHeight = Math.max(
|
|
655
|
-
Math.min(calculatedHeight, viewportHeight - 80),
|
|
656
|
-
400
|
|
657
|
-
);
|
|
658
|
-
setContentHeight(finalHeight);
|
|
659
|
-
} else {
|
|
660
|
-
setContentHeight(void 0);
|
|
661
|
-
}
|
|
662
|
-
};
|
|
663
|
-
const timer = setTimeout(() => {
|
|
664
|
-
updateContentHeight();
|
|
665
|
-
setTimeout(updateContentHeight, 200);
|
|
666
|
-
}, 100);
|
|
667
|
-
window.addEventListener("resize", updateContentHeight);
|
|
668
|
-
let resizeObserver = null;
|
|
669
|
-
if (detailWrapperRef.current) {
|
|
670
|
-
resizeObserver = new ResizeObserver(() => {
|
|
671
|
-
updateContentHeight();
|
|
672
|
-
});
|
|
673
|
-
resizeObserver.observe(detailWrapperRef.current);
|
|
674
|
-
}
|
|
675
|
-
return () => {
|
|
676
|
-
window.removeEventListener("resize", updateContentHeight);
|
|
677
|
-
if (resizeObserver) {
|
|
678
|
-
resizeObserver.disconnect();
|
|
679
|
-
}
|
|
680
|
-
clearTimeout(timer);
|
|
681
|
-
};
|
|
682
|
-
}, [platform]);
|
|
683
|
-
const assetActionEnum = {
|
|
684
|
-
recharge: tag === "point_card" ? import_utils.locales.getText("page.wallet.pointsEarned") : import_utils.locales.getText("page.wallet.recharge"),
|
|
685
|
-
order_expend: tag === "point_card" ? import_utils.locales.getText("page.wallet.pointsRedeemed") : import_utils.locales.getText("page.wallet.spending"),
|
|
686
|
-
order_refund: import_utils.locales.getText("page.wallet.refund"),
|
|
687
|
-
expire: import_utils.locales.getText("page.wallet.expire")
|
|
688
|
-
};
|
|
689
|
-
const handleRecharge = () => {
|
|
690
|
-
if (props.buttonGroupList && props.buttonGroupList[0] && props.buttonGroupList[0][0]) {
|
|
691
|
-
const rechargeButton = props.buttonGroupList[0][0];
|
|
692
|
-
if (rechargeButton.buttonProps && rechargeButton.buttonProps.onClick) {
|
|
693
|
-
rechargeButton.buttonProps.onClick();
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
698
|
-
"div",
|
|
699
|
-
{
|
|
700
|
-
className: `wallet-detail${platform === "h5" ? " wallet-detail-h5" : " wallet-detail-pc"} ${className || ""}`,
|
|
701
|
-
ref: detailWrapperRef
|
|
702
|
-
},
|
|
703
|
-
(platform === "h5" || showWalletBar) && !((_l = (_k = (_j = utils == null ? void 0 : utils.interaction) == null ? void 0 : _j.utils) == null ? void 0 : _k.isAppEnv) == null ? void 0 : _l.call(_k)) && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-header" }, /* @__PURE__ */ import_react.default.createElement(import_components.WalletBar, { setup: "detail", onBack: handleBack })),
|
|
704
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
705
|
-
"div",
|
|
706
|
-
{
|
|
707
|
-
className: `wallet-detail-content ${platform === "h5" ? "wallet-detail-content-h5" : "wallet-detail-content-pc"}`,
|
|
708
|
-
ref: modalContentRef
|
|
709
|
-
},
|
|
710
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
711
|
-
"div",
|
|
712
|
-
{
|
|
713
|
-
className: `wallet-detail-card ${platform === "h5" ? "wallet-detail-card-h5" : ""}`
|
|
714
|
-
},
|
|
715
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
716
|
-
"div",
|
|
717
|
-
{
|
|
718
|
-
className: `wallet-detail-card-header ${platform === "h5" ? "wallet-detail-card-header-h5" : ""}`,
|
|
719
|
-
ref: anchorWrapperRef
|
|
720
|
-
},
|
|
721
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-header-anchor" }, /* @__PURE__ */ import_react.default.createElement(
|
|
722
|
-
import_materials2.PisellAnchor,
|
|
723
|
-
{
|
|
724
|
-
ref: tabsRef,
|
|
725
|
-
options: anchorOptions,
|
|
726
|
-
tab: activeTab,
|
|
727
|
-
containerRef: cardContentRef,
|
|
728
|
-
onChange: (key) => {
|
|
729
|
-
handleTabChange(key);
|
|
730
|
-
},
|
|
731
|
-
onTabClick: () => {
|
|
732
|
-
isUserClickRef.current = true;
|
|
733
|
-
},
|
|
734
|
-
platform
|
|
735
|
-
}
|
|
736
|
-
))
|
|
737
|
-
),
|
|
738
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
739
|
-
"div",
|
|
740
|
-
{
|
|
741
|
-
className: `wallet-detail-card-content ${platform === "h5" ? "wallet-detail-card-content-h5" : "wallet-detail-card-content-pc"} wallet-detail-card-content-hide-scrollbar`,
|
|
742
|
-
ref: cardContentRef
|
|
743
|
-
},
|
|
744
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
745
|
-
"section",
|
|
746
|
-
{
|
|
747
|
-
className: "wallet-detail-card-content-section",
|
|
748
|
-
"data-section": "detail"
|
|
749
|
-
},
|
|
750
|
-
/* @__PURE__ */ import_react.default.createElement(Text, { className: "wallet-detail-card-content-section-title" }, import_utils.locales.getText("page.wallet.details")),
|
|
751
|
-
platform === "pc" && /* @__PURE__ */ import_react.default.createElement(import_materials2.ButtonGroupPreview, { buttonGroupList }),
|
|
752
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
753
|
-
import_materials2.PisellStatisticList,
|
|
754
|
-
{
|
|
755
|
-
data: listData,
|
|
756
|
-
labelColor: "#667085",
|
|
757
|
-
valueColor: "#101828",
|
|
758
|
-
backgroundColors: ["#fff"],
|
|
759
|
-
isHasBorder: false
|
|
760
|
-
}
|
|
761
|
-
),
|
|
762
|
-
description && /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-tip" }, /* @__PURE__ */ import_react.default.createElement("div", { dangerouslySetInnerHTML: { __html: description } })),
|
|
763
|
-
shouldShowUsageRules && /* @__PURE__ */ import_react.default.createElement(
|
|
764
|
-
import_components.UsageRules,
|
|
765
|
-
{
|
|
766
|
-
locales: import_utils.locales,
|
|
767
|
-
rules: usageRules,
|
|
768
|
-
personalLimit
|
|
769
|
-
}
|
|
770
|
-
)
|
|
771
|
-
),
|
|
772
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
773
|
-
"section",
|
|
774
|
-
{
|
|
775
|
-
className: "wallet-detail-card-content-section wallet-detail-card-content-section-timeline",
|
|
776
|
-
"data-section": "activityLog"
|
|
777
|
-
},
|
|
778
|
-
tag !== "product_discount_card" && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-subtitle" }, import_utils.locales.getText("page.wallet.activelog")), isLoading ? /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-timeline-loading" }, /* @__PURE__ */ import_react.default.createElement(import_materials2.Skeleton, { active: true, paragraph: { rows: 6 }, round: true })) : TimeLineData.length > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
779
|
-
import_materials2.Timeline,
|
|
780
|
-
{
|
|
781
|
-
items: TimeLineData,
|
|
782
|
-
className: "wallet-detail-timeline-list"
|
|
783
|
-
}
|
|
784
|
-
) : /* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-card-content-section-empty" }, /* @__PURE__ */ import_react.default.createElement(import_materials2.PisellEmpty, null)))
|
|
785
|
-
)
|
|
786
|
-
)
|
|
787
|
-
)
|
|
788
|
-
),
|
|
789
|
-
platform === "h5" && /* @__PURE__ */ import_react.default.createElement(
|
|
790
|
-
import_components.FooterButtons,
|
|
791
|
-
{
|
|
792
|
-
step: "detail",
|
|
793
|
-
addWalletLoading,
|
|
794
|
-
onAppleWalletClick: tag === "gift_card" ? addWalletCard : void 0,
|
|
795
|
-
onRechargeClick: tag === "gift_card" && ((_m = detail == null ? void 0 : detail.machinecode_config) == null ? void 0 : _m.hide_recharge) === 0 ? handleRecharge : void 0,
|
|
796
|
-
platform,
|
|
797
|
-
isIOS: (0, import_utils.isIos)()
|
|
798
|
-
}
|
|
799
|
-
),
|
|
800
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
801
|
-
import_materials2.PisellModal,
|
|
802
|
-
{
|
|
803
|
-
platform: platform === "pc" ? "pc" : "h5",
|
|
804
|
-
mobileModalHeight: "auto",
|
|
805
|
-
cancelVisible: false,
|
|
806
|
-
destroyOnClose: true,
|
|
807
|
-
onCancel: () => setIsShowtimeLineDetail(false),
|
|
808
|
-
title: isSpending ? import_utils.locales.getText("page.wallet.spendingDetails") : import_utils.locales.getText("page.wallet.rechargeDetails"),
|
|
809
|
-
open: isShowtimeLineDetail,
|
|
810
|
-
footer: [
|
|
811
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
812
|
-
import_materials2.Button,
|
|
813
|
-
{
|
|
814
|
-
type: "primary",
|
|
815
|
-
block: true,
|
|
816
|
-
size: "large",
|
|
817
|
-
onClick: () => setIsShowtimeLineDetail(false)
|
|
818
|
-
},
|
|
819
|
-
import_utils.locales.getText("page.wallet.done")
|
|
820
|
-
)
|
|
821
|
-
]
|
|
822
|
-
},
|
|
823
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
824
|
-
import_materials2.PisellStatisticList,
|
|
825
|
-
{
|
|
826
|
-
data: [
|
|
827
|
-
{
|
|
828
|
-
label: import_utils.locales.getText("page.wallet.date"),
|
|
829
|
-
value: timeLineDetail.created_at || ""
|
|
830
|
-
},
|
|
831
|
-
{
|
|
832
|
-
label: isSpending ? import_utils.locales.getText("page.wallet.spending") : import_utils.locales.getText("page.wallet.recharge"),
|
|
833
|
-
value: formatCurrencyAmount(
|
|
834
|
-
(timeLineDetail == null ? void 0 : timeLineDetail.amount) || "",
|
|
835
|
-
isSpending
|
|
836
|
-
)
|
|
837
|
-
},
|
|
838
|
-
{
|
|
839
|
-
label: import_utils.locales.getText("page.wallet.viewOrder"),
|
|
840
|
-
value: !!timeLineDetail.resource_code ? `#${timeLineDetail.resource_code}` : "",
|
|
841
|
-
isLink: !!timeLineDetail.resource_code,
|
|
842
|
-
link: `/order/details?id=${timeLineDetail.resource_id}`
|
|
843
|
-
}
|
|
844
|
-
],
|
|
845
|
-
labelColor: "#101828",
|
|
846
|
-
valueColor: "#101828",
|
|
847
|
-
backgroundColors: ["#fff"],
|
|
848
|
-
isHasBorder: false
|
|
849
|
-
}
|
|
850
|
-
)
|
|
851
|
-
),
|
|
852
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
853
|
-
import_materials2.PisellModal,
|
|
854
|
-
{
|
|
855
|
-
platform: platform === "pc" ? "pc" : "h5",
|
|
856
|
-
mobileModalHeight: "auto",
|
|
857
|
-
headerDivider: false,
|
|
858
|
-
closable: true,
|
|
859
|
-
maskClosable: true,
|
|
860
|
-
onCancel: () => {
|
|
861
|
-
setWechatModalOpen(false);
|
|
862
|
-
},
|
|
863
|
-
closeIcon: /* @__PURE__ */ import_react.default.createElement(import_XClose.default, { size: 20, style: { fontSize: "24px" } }),
|
|
864
|
-
open: wechatModalOpen,
|
|
865
|
-
footer: [
|
|
866
|
-
/* @__PURE__ */ import_react.default.createElement(import_materials2.Button, { onClick: onCopyClick, block: true, type: "primary", size: "large" }, import_utils.locales.getText("page.wallet.copyButton"))
|
|
867
|
-
]
|
|
868
|
-
},
|
|
869
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-copyTitle" }, import_utils.locales.getText("page.wallet.copyTitle")),
|
|
870
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "wallet-detail-copyText" }, import_utils.locales.getText("page.wallet.copyText"))
|
|
871
|
-
)
|
|
872
|
-
);
|
|
873
|
-
});
|
|
874
|
-
var Detail_default = Detail;
|