@pisell/private-materials 6.8.7 → 6.8.9
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 +19 -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/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 +10 -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/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 +4 -4
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- 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/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -61
- 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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* @title: 选项数据类型
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2025-10-11 14:18
|
|
8
|
+
*/
|
|
9
|
+
export interface HolderOption {
|
|
10
|
+
/** 显示的标签文本 */
|
|
11
|
+
label: string;
|
|
12
|
+
/** 选项的值(唯一标识) */
|
|
13
|
+
value: any;
|
|
14
|
+
/** 头像地址 */
|
|
15
|
+
avatar?: string;
|
|
16
|
+
/** 副标题/描述 */
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/** 其他字段 */
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @title: 模态框配置
|
|
23
|
+
* @description:
|
|
24
|
+
* @return {*}
|
|
25
|
+
* @Author: WangHan
|
|
26
|
+
* @Date: 2025-10-10 14:32
|
|
27
|
+
*/
|
|
28
|
+
export interface HolderModalProps {
|
|
29
|
+
title?: string;
|
|
30
|
+
confirmText?: string;
|
|
31
|
+
showClose?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @title: 字段展示配置
|
|
35
|
+
* @description:
|
|
36
|
+
* @return {*}
|
|
37
|
+
* @Author: WangHan
|
|
38
|
+
* @Date: 2025-10-10 14:32
|
|
39
|
+
*/
|
|
40
|
+
export interface HolderDisplayProps {
|
|
41
|
+
showAvatar?: boolean;
|
|
42
|
+
showTitle?: boolean;
|
|
43
|
+
showSubtitle?: boolean;
|
|
44
|
+
isSkipable?: boolean;
|
|
45
|
+
direction?: 'horizontal' | 'vertical';
|
|
46
|
+
selectType?: 'single' | 'multiple';
|
|
47
|
+
showExtraFields?: boolean;
|
|
48
|
+
extraFields?: any[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* @title: SelectHolder 组件属性
|
|
52
|
+
* @description:
|
|
53
|
+
* @return {*}
|
|
54
|
+
* @Author: WangHan
|
|
55
|
+
* @Date: 2025-10-11 14:18
|
|
56
|
+
*/
|
|
57
|
+
export interface PisellSelectHolderProps {
|
|
58
|
+
/** 选项列表 */
|
|
59
|
+
dataSource?: HolderOption[];
|
|
60
|
+
/** 是否打开模态框 */
|
|
61
|
+
open?: boolean;
|
|
62
|
+
/** 关闭事件(右上角 X 按钮) */
|
|
63
|
+
onClose?: () => void;
|
|
64
|
+
/** 确认事件,返回选中的值 */
|
|
65
|
+
onConfirm?: (selected: any) => void;
|
|
66
|
+
/** 跳过事件(底部跳过按钮) */
|
|
67
|
+
onSkip?: () => void;
|
|
68
|
+
/** 点击添加按钮事件 */
|
|
69
|
+
onAdd?: () => void;
|
|
70
|
+
/** 当前选中的值(单选) 或 选中的值数组(多选) */
|
|
71
|
+
value?: any;
|
|
72
|
+
modalConfig?: HolderModalProps;
|
|
73
|
+
displayConfig?: HolderDisplayProps;
|
|
74
|
+
/** 是否禁用确认按钮 */
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
/** 错误提示文案 */
|
|
77
|
+
errorTipText?: string;
|
|
78
|
+
/** 是否显示添加按钮 */
|
|
79
|
+
allowAdd?: boolean;
|
|
80
|
+
/** 添加按钮文案 */
|
|
81
|
+
addText?: string;
|
|
82
|
+
/** 每行显示的列数 */
|
|
83
|
+
columns?: number;
|
|
84
|
+
/** 水平间距 */
|
|
85
|
+
horizontalGap?: number;
|
|
86
|
+
/** 垂直间距 */
|
|
87
|
+
verticalGap?: number;
|
|
88
|
+
/** 最大可选数量 */
|
|
89
|
+
maxSelectedCount?: number;
|
|
90
|
+
/** 是否内联模式(不显示弹窗,直接渲染内容,用于页面级别) */
|
|
91
|
+
isInline?: boolean;
|
|
92
|
+
/** 内联模式的容器样式类名 */
|
|
93
|
+
className?: string;
|
|
94
|
+
/** 内联模式的容器样式 */
|
|
95
|
+
style?: React.CSSProperties;
|
|
96
|
+
}
|
|
97
|
+
export interface HolderItemProps {
|
|
98
|
+
item: HolderOption;
|
|
99
|
+
displayDirection?: 'horizontal' | 'vertical';
|
|
100
|
+
displayConfig?: HolderDisplayProps;
|
|
101
|
+
onClick?: (value?: any) => void;
|
|
102
|
+
value?: any;
|
|
103
|
+
isAddItem?: boolean;
|
|
104
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/plus/selectHolder/types.ts
|
|
16
|
+
var types_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
|
@@ -16,18 +16,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
};
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
|
-
// src/
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
22
|
-
|
|
19
|
+
// src/plus/selectHolder/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
getAvatarText: () => getAvatarText
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var getAvatarText = (label) => {
|
|
26
|
+
if (!label) return "";
|
|
27
|
+
const words = label.trim().split(/\s+/);
|
|
28
|
+
const initials = words.slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
|
|
29
|
+
return initials;
|
|
29
30
|
};
|
|
30
31
|
// Annotate the CommonJS export names for ESM import in node:
|
|
31
32
|
0 && (module.exports = {
|
|
32
|
-
|
|
33
|
+
getAvatarText
|
|
33
34
|
});
|
|
@@ -44,6 +44,7 @@ var import_sortableWalletPassTypes = __toESM(require("./components/sortableWalle
|
|
|
44
44
|
var import_ValidityPeriodSelector = __toESM(require("./components/ValidityPeriodSelector"));
|
|
45
45
|
var import_relationProduct = __toESM(require("./components/relationProduct"));
|
|
46
46
|
var import_WalletEditor = require("./WalletEditor.less");
|
|
47
|
+
var import_useComponents = __toESM(require("../../hooks/useComponents"));
|
|
47
48
|
var WalletEditor = (0, import_react.forwardRef)(
|
|
48
49
|
(props, ref) => {
|
|
49
50
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
@@ -60,6 +61,10 @@ var WalletEditor = (0, import_react.forwardRef)(
|
|
|
60
61
|
const [previewVisible, setPreviewVisible] = (0, import_react.useState)(false);
|
|
61
62
|
const [form] = import_antd.Form.useForm();
|
|
62
63
|
const isControlled = value !== void 0;
|
|
64
|
+
const [HolderSelector] = (0, import_useComponents.default)({
|
|
65
|
+
components: ["HolderSelector"]
|
|
66
|
+
});
|
|
67
|
+
const holderSelectorRef = (0, import_react.useRef)(null);
|
|
63
68
|
const defaultValue = (0, import_react.useMemo)(
|
|
64
69
|
() => ({
|
|
65
70
|
status: "enable",
|
|
@@ -69,6 +74,9 @@ var WalletEditor = (0, import_react.forwardRef)(
|
|
|
69
74
|
type: "normal"
|
|
70
75
|
},
|
|
71
76
|
metadata: {
|
|
77
|
+
holder: {
|
|
78
|
+
type: "customer"
|
|
79
|
+
},
|
|
72
80
|
showcaseWalletPassNew: import_sortableWalletPassTypes.DEFAULT_WALLET_PASS_TYPES_CONFIG.map(
|
|
73
81
|
(item) => ({
|
|
74
82
|
...item,
|
|
@@ -202,6 +210,51 @@ var WalletEditor = (0, import_react.forwardRef)(
|
|
|
202
210
|
},
|
|
203
211
|
/* @__PURE__ */ import_react.default.createElement(import_relationProduct.default, null)
|
|
204
212
|
),
|
|
213
|
+
HolderSelector && /* @__PURE__ */ import_react.default.createElement(
|
|
214
|
+
import_antd.Form.Item,
|
|
215
|
+
{
|
|
216
|
+
label: import_utils.locales.getText("pisell2.wallet-editor.holder"),
|
|
217
|
+
name: ["metadata", "holder"],
|
|
218
|
+
initialValue: {
|
|
219
|
+
type: "customer"
|
|
220
|
+
},
|
|
221
|
+
rules: [
|
|
222
|
+
{
|
|
223
|
+
validator: async (_, value2) => {
|
|
224
|
+
var _a2, _b2, _c2;
|
|
225
|
+
if ((value2 == null ? void 0 : value2.type) === "custom") {
|
|
226
|
+
if (!((_a2 = value2 == null ? void 0 : value2.custom) == null ? void 0 : _a2.custom_id)) {
|
|
227
|
+
return Promise.reject(
|
|
228
|
+
new Error(
|
|
229
|
+
import_utils.locales.getText(
|
|
230
|
+
"pisell2.wallet-editor.holder.required"
|
|
231
|
+
)
|
|
232
|
+
)
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
const options = ((_c2 = (_b2 = holderSelectorRef.current) == null ? void 0 : _b2.getOptions) == null ? void 0 : _c2.call(_b2)) || [];
|
|
236
|
+
if (!(options == null ? void 0 : options.find(
|
|
237
|
+
(item) => {
|
|
238
|
+
var _a3;
|
|
239
|
+
return item.value === ((_a3 = value2 == null ? void 0 : value2.custom) == null ? void 0 : _a3.custom_id);
|
|
240
|
+
}
|
|
241
|
+
))) {
|
|
242
|
+
return Promise.reject(
|
|
243
|
+
new Error(
|
|
244
|
+
import_utils.locales.getText(
|
|
245
|
+
"pisell2.wallet-editor.holder.invalid"
|
|
246
|
+
)
|
|
247
|
+
)
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
return Promise.resolve();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
/* @__PURE__ */ import_react.default.createElement(HolderSelector, { ref: holderSelectorRef })
|
|
257
|
+
),
|
|
205
258
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Form.Item, { label: import_utils.locales.getText("sort"), name: "sort" }, /* @__PURE__ */ import_react.default.createElement(import_antd.InputNumber, { style: { width: "100%" } })),
|
|
206
259
|
/* @__PURE__ */ import_react.default.createElement(
|
|
207
260
|
import_antd.Form.Item,
|
|
@@ -39,6 +39,9 @@ declare const _default: {
|
|
|
39
39
|
selectValidityPeriod: string;
|
|
40
40
|
selectCustomDate: string;
|
|
41
41
|
registerToIssue: string;
|
|
42
|
+
'pisell2.wallet-editor.holder': string;
|
|
43
|
+
'pisell2.wallet-editor.holder.required': string;
|
|
44
|
+
'pisell2.wallet-editor.holder.invalid': string;
|
|
42
45
|
};
|
|
43
46
|
'zh-CN': {
|
|
44
47
|
walletName: string;
|
|
@@ -80,6 +83,9 @@ declare const _default: {
|
|
|
80
83
|
selectValidityPeriod: string;
|
|
81
84
|
selectCustomDate: string;
|
|
82
85
|
registerToIssue: string;
|
|
86
|
+
'pisell2.wallet-editor.holder': string;
|
|
87
|
+
'pisell2.wallet-editor.holder.required': string;
|
|
88
|
+
'pisell2.wallet-editor.holder.invalid': string;
|
|
83
89
|
};
|
|
84
90
|
'zh-HK': {
|
|
85
91
|
walletName: string;
|
|
@@ -121,6 +127,9 @@ declare const _default: {
|
|
|
121
127
|
selectValidityPeriod: string;
|
|
122
128
|
selectCustomDate: string;
|
|
123
129
|
registerToIssue: string;
|
|
130
|
+
'pisell2.wallet-editor.holder': string;
|
|
131
|
+
'pisell2.wallet-editor.holder.required': string;
|
|
132
|
+
'pisell2.wallet-editor.holder.invalid': string;
|
|
124
133
|
};
|
|
125
134
|
};
|
|
126
135
|
export default _default;
|
|
@@ -68,7 +68,10 @@ var locales_default = {
|
|
|
68
68
|
enterJSONConfig: 'Enter JSON config, e.g. {"type": "register"}',
|
|
69
69
|
selectValidityPeriod: "Select validity period",
|
|
70
70
|
selectCustomDate: "Select custom date",
|
|
71
|
-
registerToIssue: "Register to issue"
|
|
71
|
+
registerToIssue: "Register to issue",
|
|
72
|
+
"pisell2.wallet-editor.holder": "Holder",
|
|
73
|
+
"pisell2.wallet-editor.holder.required": "Please select a holder",
|
|
74
|
+
"pisell2.wallet-editor.holder.invalid": "Invalid holder. Please select again"
|
|
72
75
|
},
|
|
73
76
|
"zh-CN": {
|
|
74
77
|
// 表单标签
|
|
@@ -115,7 +118,10 @@ var locales_default = {
|
|
|
115
118
|
enterJSONConfig: '输入JSON配置,例如 {"type": "register"}',
|
|
116
119
|
selectValidityPeriod: "选择有效期",
|
|
117
120
|
selectCustomDate: "选择自定义日期",
|
|
118
|
-
registerToIssue: "注册即发放"
|
|
121
|
+
registerToIssue: "注册即发放",
|
|
122
|
+
"pisell2.wallet-editor.holder": "持有人",
|
|
123
|
+
"pisell2.wallet-editor.holder.required": "请选择持有人",
|
|
124
|
+
"pisell2.wallet-editor.holder.invalid": "无效持有人,请重新选择"
|
|
119
125
|
},
|
|
120
126
|
"zh-HK": {
|
|
121
127
|
// 表單標籤
|
|
@@ -162,6 +168,9 @@ var locales_default = {
|
|
|
162
168
|
enterJSONConfig: '輸入JSON配置,例如 {"type": "register"}',
|
|
163
169
|
selectValidityPeriod: "選擇有效期",
|
|
164
170
|
selectCustomDate: "選擇自定義日期",
|
|
165
|
-
registerToIssue: "註冊即發放"
|
|
171
|
+
registerToIssue: "註冊即發放",
|
|
172
|
+
"pisell2.wallet-editor.holder": "持有人",
|
|
173
|
+
"pisell2.wallet-editor.holder.required": "請選擇持有人",
|
|
174
|
+
"pisell2.wallet-editor.holder.invalid": "無效持有人,請重新選擇"
|
|
166
175
|
}
|
|
167
176
|
};
|
|
@@ -44,7 +44,8 @@ var PassList = (props) => {
|
|
|
44
44
|
valuePropName = "id",
|
|
45
45
|
hasMore,
|
|
46
46
|
onLoadMore,
|
|
47
|
-
loading
|
|
47
|
+
loading,
|
|
48
|
+
onEditHolder
|
|
48
49
|
} = props;
|
|
49
50
|
const _loadMore = /* @__PURE__ */ import_react.default.createElement(
|
|
50
51
|
"div",
|
|
@@ -66,7 +67,7 @@ var PassList = (props) => {
|
|
|
66
67
|
import_utils.locales.getText("wallet-pass-gallery.allLoaded")
|
|
67
68
|
)
|
|
68
69
|
);
|
|
69
|
-
return /* @__PURE__ */ import_react.default.createElement(
|
|
70
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
70
71
|
import_antd.List,
|
|
71
72
|
{
|
|
72
73
|
className: "pisell-wallet-pass-gallery_list",
|
|
@@ -89,6 +90,8 @@ var PassList = (props) => {
|
|
|
89
90
|
product_cover = "",
|
|
90
91
|
par_value = "",
|
|
91
92
|
unified_messages = {},
|
|
93
|
+
holder,
|
|
94
|
+
metadata,
|
|
92
95
|
...rest
|
|
93
96
|
} = item;
|
|
94
97
|
const itemValue = item == null ? void 0 : item[valuePropName];
|
|
@@ -125,12 +128,21 @@ var PassList = (props) => {
|
|
|
125
128
|
discount: isDiscountCard ? Number(par_value) : void 0,
|
|
126
129
|
showDiscount: isDiscountCard,
|
|
127
130
|
code: encoded,
|
|
128
|
-
validDate: expire_date
|
|
131
|
+
validDate: expire_date,
|
|
132
|
+
holder,
|
|
133
|
+
onSetHolder: () => {
|
|
134
|
+
var _a;
|
|
135
|
+
onEditHolder == null ? void 0 : onEditHolder({
|
|
136
|
+
wallet_pass_detail_id: id,
|
|
137
|
+
customer_id: holder == null ? void 0 : holder.customer_id,
|
|
138
|
+
form_id: (_a = holder == null ? void 0 : holder.metadata) == null ? void 0 : _a.custom_id
|
|
139
|
+
});
|
|
140
|
+
}
|
|
129
141
|
}
|
|
130
142
|
)
|
|
131
143
|
));
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
|
-
);
|
|
146
|
+
));
|
|
135
147
|
};
|
|
136
148
|
var passList_default = PassList;
|
|
@@ -44,6 +44,7 @@ var import_utils2 = require("../../utils");
|
|
|
44
44
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
45
45
|
var import_passList = __toESM(require("./components/passList"));
|
|
46
46
|
var import_passDetail = __toESM(require("./components/passDetail"));
|
|
47
|
+
var import_tempHolderSelector = __toESM(require("../../components/walletList/tempHolderSelector"));
|
|
47
48
|
var import_index = require("./index.less");
|
|
48
49
|
var { Title } = import_antd.Typography;
|
|
49
50
|
var KEYS = {
|
|
@@ -65,6 +66,8 @@ var WalletPassGallery = (props) => {
|
|
|
65
66
|
const [currentItemId, setCurrentItemId] = (0, import_react.useState)(void 0);
|
|
66
67
|
const [isOpenAddModal, setIsOpenAddModal] = (0, import_react.useState)(false);
|
|
67
68
|
const [currentUnbindItem, setCurrentUnbindItem] = (0, import_react.useState)(null);
|
|
69
|
+
const [editHolderData, setEditHolderData] = (0, import_react.useState)(null);
|
|
70
|
+
const [updateHolderLoading, setUpdateHolderLoading] = (0, import_react.useState)(false);
|
|
68
71
|
const context = (0, import_useEngineContext.default)();
|
|
69
72
|
const utils = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
|
|
70
73
|
const platform = (0, import_react.useMemo)(() => {
|
|
@@ -83,14 +86,17 @@ var WalletPassGallery = (props) => {
|
|
|
83
86
|
});
|
|
84
87
|
const _getAvailableList = (0, import_ahooks.useInfiniteScroll)(
|
|
85
88
|
async (d) => {
|
|
86
|
-
const
|
|
87
|
-
const
|
|
89
|
+
const _searchParams = new URLSearchParams(window.location.search);
|
|
90
|
+
const walletId = _searchParams.get("id");
|
|
91
|
+
const holderId = _searchParams.get("holder_id");
|
|
92
|
+
const res = await (0, import_serve.getWalletPassList)({
|
|
88
93
|
available: 1,
|
|
89
94
|
num: 20,
|
|
90
95
|
skip: (d == null ? void 0 : d.nextId) || 1,
|
|
91
96
|
tags: TAGS,
|
|
92
97
|
filter_wallet_id: walletId || void 0,
|
|
93
|
-
|
|
98
|
+
filter_holder_id: holderId || void 0,
|
|
99
|
+
with: ["holder.detail"]
|
|
94
100
|
});
|
|
95
101
|
return {
|
|
96
102
|
list: (res == null ? void 0 : res.list) || [],
|
|
@@ -110,14 +116,17 @@ var WalletPassGallery = (props) => {
|
|
|
110
116
|
);
|
|
111
117
|
const _getUnavailableList = (0, import_ahooks.useInfiniteScroll)(
|
|
112
118
|
async (d) => {
|
|
113
|
-
const
|
|
114
|
-
const
|
|
119
|
+
const _searchParams = new URLSearchParams(window.location.search);
|
|
120
|
+
const walletId = _searchParams.get("id");
|
|
121
|
+
const holderId = _searchParams.get("holder_id");
|
|
122
|
+
const res = await (0, import_serve.getWalletPassList)({
|
|
115
123
|
available: 0,
|
|
116
124
|
num: 20,
|
|
117
125
|
skip: (d == null ? void 0 : d.nextId) || 1,
|
|
118
126
|
tags: TAGS,
|
|
119
127
|
filter_wallet_id: walletId || void 0,
|
|
120
|
-
|
|
128
|
+
filter_holder_id: holderId || void 0,
|
|
129
|
+
with: ["holder.detail"]
|
|
121
130
|
});
|
|
122
131
|
return {
|
|
123
132
|
list: (res == null ? void 0 : res.list) || [],
|
|
@@ -135,24 +144,82 @@ var WalletPassGallery = (props) => {
|
|
|
135
144
|
);
|
|
136
145
|
(0, import_react.useEffect)(() => {
|
|
137
146
|
const walletId = new URLSearchParams(window.location.search).get("id");
|
|
147
|
+
const passId = new URLSearchParams(window.location.search).get(
|
|
148
|
+
"wallet_pass_detail_id"
|
|
149
|
+
);
|
|
138
150
|
if (walletId) {
|
|
139
151
|
_getWalletDetail.runAsync(walletId);
|
|
140
152
|
}
|
|
141
153
|
const req1 = _getAvailableList.loadMoreAsync();
|
|
142
154
|
const req2 = _getUnavailableList.loadMoreAsync();
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
let req3 = passId ? (0, import_serve.getWalletPassDetail)(passId, {
|
|
156
|
+
with: ["holder.detail"]
|
|
157
|
+
}) : Promise.resolve();
|
|
158
|
+
Promise.all([req1, req2, req3]).then(([data1, data2, data3]) => {
|
|
159
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
160
|
+
if (platform !== "h5") {
|
|
161
|
+
const list1 = (data1 == null ? void 0 : data1.list) || [];
|
|
162
|
+
const list2 = (data2 == null ? void 0 : data2.list) || [];
|
|
163
|
+
if (passId) {
|
|
164
|
+
const matchedInList1 = list1.find(
|
|
165
|
+
(item) => String(item.id) === passId
|
|
166
|
+
);
|
|
167
|
+
const matchedInList2 = list2.find(
|
|
168
|
+
(item) => String(item.id) === passId
|
|
169
|
+
);
|
|
170
|
+
if (matchedInList1 || matchedInList2) {
|
|
171
|
+
setCurrentItemId(Number(passId));
|
|
172
|
+
if (matchedInList2) {
|
|
173
|
+
setActiveKey("unavailable");
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
if (data3) {
|
|
177
|
+
if (data3.unified_available_status === 1) {
|
|
178
|
+
_getAvailableList.mutate((data) => ({
|
|
179
|
+
...data,
|
|
180
|
+
list: [data3, ...(data == null ? void 0 : data.list) || []]
|
|
181
|
+
}));
|
|
182
|
+
setCurrentItemId(data3.id);
|
|
183
|
+
} else {
|
|
184
|
+
_getUnavailableList.mutate((data) => ({
|
|
185
|
+
...data,
|
|
186
|
+
list: [data3, ...(data == null ? void 0 : data.list) || []]
|
|
187
|
+
}));
|
|
188
|
+
setCurrentItemId(data3.id);
|
|
189
|
+
setActiveKey("unavailable");
|
|
190
|
+
}
|
|
191
|
+
} else {
|
|
192
|
+
const firstAvailable = list1[0];
|
|
193
|
+
if (firstAvailable) {
|
|
194
|
+
setCurrentItemId(firstAvailable.id);
|
|
195
|
+
} else {
|
|
196
|
+
const firstUnavailable = list2[0];
|
|
197
|
+
if (firstUnavailable) {
|
|
198
|
+
setCurrentItemId(firstUnavailable.id);
|
|
199
|
+
setActiveKey("unavailable");
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (data3 && ((_a2 = data3.holder) == null ? void 0 : _a2.holder_type) === "form" && !((_b2 = data3.holder) == null ? void 0 : _b2.holder_id)) {
|
|
205
|
+
setEditHolderData({
|
|
206
|
+
wallet_pass_detail_id: passId,
|
|
207
|
+
customer_id: (_c2 = data3.holder) == null ? void 0 : _c2.customer_id,
|
|
208
|
+
form_id: (_e2 = (_d2 = data3.holder) == null ? void 0 : _d2.metadata) == null ? void 0 : _e2.custom_id
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
const firstAvailable = list1[0];
|
|
213
|
+
if (firstAvailable) {
|
|
214
|
+
setCurrentItemId(firstAvailable.id);
|
|
215
|
+
} else {
|
|
216
|
+
const firstUnavailable = list2[0];
|
|
217
|
+
if (firstUnavailable) {
|
|
218
|
+
setCurrentItemId(firstUnavailable.id);
|
|
219
|
+
setActiveKey("unavailable");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
156
223
|
}
|
|
157
224
|
});
|
|
158
225
|
}, []);
|
|
@@ -199,10 +266,6 @@ var WalletPassGallery = (props) => {
|
|
|
199
266
|
const newId = key === KEYS.unavailable ? (_a2 = _unavailable[0]) == null ? void 0 : _a2.id : (_b2 = _avaliable[0]) == null ? void 0 : _b2.id;
|
|
200
267
|
setCurrentItemId(newId);
|
|
201
268
|
};
|
|
202
|
-
const _handleMenuChange = (key) => {
|
|
203
|
-
setActiveKey(key);
|
|
204
|
-
setCurrentItemId(void 0);
|
|
205
|
-
};
|
|
206
269
|
const _resetSearchState = () => {
|
|
207
270
|
setCurrentUnbindItem(null);
|
|
208
271
|
_getUnbindList.mutate([]);
|
|
@@ -251,6 +314,53 @@ var WalletPassGallery = (props) => {
|
|
|
251
314
|
});
|
|
252
315
|
}
|
|
253
316
|
};
|
|
317
|
+
const _handleHolderChange = (passId, holder) => {
|
|
318
|
+
if (_avaliable.find((item) => item.id === passId)) {
|
|
319
|
+
_getAvailableList.mutate((data) => {
|
|
320
|
+
const newList = data.list.map(
|
|
321
|
+
(item) => item.id === passId ? { ...item, holder } : item
|
|
322
|
+
);
|
|
323
|
+
return {
|
|
324
|
+
...data,
|
|
325
|
+
list: newList
|
|
326
|
+
};
|
|
327
|
+
});
|
|
328
|
+
} else if (_unavailable.find((item) => item.id === passId)) {
|
|
329
|
+
_getUnavailableList.mutate((data) => {
|
|
330
|
+
const newList = data.list.map(
|
|
331
|
+
(item) => item.id === passId ? { ...item, holder } : item
|
|
332
|
+
);
|
|
333
|
+
return {
|
|
334
|
+
...data,
|
|
335
|
+
list: newList
|
|
336
|
+
};
|
|
337
|
+
});
|
|
338
|
+
} else {
|
|
339
|
+
console.log("pass not found", passId);
|
|
340
|
+
}
|
|
341
|
+
};
|
|
342
|
+
const _handleBindHolder = async (holderId) => {
|
|
343
|
+
setUpdateHolderLoading(true);
|
|
344
|
+
const { wallet_pass_detail_id: passId } = editHolderData;
|
|
345
|
+
try {
|
|
346
|
+
const res = await (0, import_serve.updateWalletPassHolder)(passId, {
|
|
347
|
+
holder_type: "form",
|
|
348
|
+
holder_id: holderId
|
|
349
|
+
});
|
|
350
|
+
setEditHolderData(null);
|
|
351
|
+
if (holderId) {
|
|
352
|
+
if (res) {
|
|
353
|
+
_handleHolderChange == null ? void 0 : _handleHolderChange(Number(passId), res);
|
|
354
|
+
}
|
|
355
|
+
} else {
|
|
356
|
+
_handleHolderChange == null ? void 0 : _handleHolderChange(Number(passId), null);
|
|
357
|
+
}
|
|
358
|
+
} catch (error) {
|
|
359
|
+
console.error("Error updating wallet pass holder:", error);
|
|
360
|
+
} finally {
|
|
361
|
+
setUpdateHolderLoading(false);
|
|
362
|
+
}
|
|
363
|
+
};
|
|
254
364
|
const _currentItem = (0, import_react.useMemo)(() => {
|
|
255
365
|
if (!currentItemId) return null;
|
|
256
366
|
const found1 = _avaliable.find(
|
|
@@ -281,7 +391,8 @@ var WalletPassGallery = (props) => {
|
|
|
281
391
|
hasMore: !_getAvailableList.noMore,
|
|
282
392
|
dataSource: _avaliable,
|
|
283
393
|
value: currentItemId,
|
|
284
|
-
onChange: _handleCardClick
|
|
394
|
+
onChange: _handleCardClick,
|
|
395
|
+
onEditHolder: setEditHolderData
|
|
285
396
|
}
|
|
286
397
|
);
|
|
287
398
|
}
|
|
@@ -293,7 +404,8 @@ var WalletPassGallery = (props) => {
|
|
|
293
404
|
hasMore: !_getAvailableList.noMore,
|
|
294
405
|
dataSource: _avaliable,
|
|
295
406
|
value: currentItemId,
|
|
296
|
-
onChange: _handleCardClick
|
|
407
|
+
onChange: _handleCardClick,
|
|
408
|
+
onEditHolder: setEditHolderData
|
|
297
409
|
}
|
|
298
410
|
)), /* @__PURE__ */ import_react.default.createElement(ACol, { flex: "auto" }, /* @__PURE__ */ import_react.default.createElement(import_passDetail.default, { dataSource: _currentItem, platform })));
|
|
299
411
|
};
|
|
@@ -307,7 +419,8 @@ var WalletPassGallery = (props) => {
|
|
|
307
419
|
loading: _getUnavailableList.loadingMore,
|
|
308
420
|
dataSource: _unavailable,
|
|
309
421
|
value: currentItemId,
|
|
310
|
-
onChange: _handleCardClick
|
|
422
|
+
onChange: _handleCardClick,
|
|
423
|
+
onEditHolder: setEditHolderData
|
|
311
424
|
}
|
|
312
425
|
);
|
|
313
426
|
}
|
|
@@ -319,7 +432,8 @@ var WalletPassGallery = (props) => {
|
|
|
319
432
|
loading: _getUnavailableList.loadingMore,
|
|
320
433
|
dataSource: _unavailable,
|
|
321
434
|
value: currentItemId,
|
|
322
|
-
onChange: _handleCardClick
|
|
435
|
+
onChange: _handleCardClick,
|
|
436
|
+
onEditHolder: setEditHolderData
|
|
323
437
|
}
|
|
324
438
|
)), /* @__PURE__ */ import_react.default.createElement(ACol, { flex: "auto" }, /* @__PURE__ */ import_react.default.createElement(import_passDetail.default, { dataSource: _currentItem, platform })));
|
|
325
439
|
};
|
|
@@ -497,6 +611,19 @@ var WalletPassGallery = (props) => {
|
|
|
497
611
|
onChangeType: _resetSearchState
|
|
498
612
|
}
|
|
499
613
|
), (_getUnbindList.data || []).map(renderSearchCard))
|
|
614
|
+
), !!editHolderData && /* @__PURE__ */ import_react.default.createElement(
|
|
615
|
+
import_tempHolderSelector.default,
|
|
616
|
+
{
|
|
617
|
+
visible: true,
|
|
618
|
+
onCancel: () => {
|
|
619
|
+
setEditHolderData(null);
|
|
620
|
+
},
|
|
621
|
+
onConfirm: _handleBindHolder,
|
|
622
|
+
confirmLoading: updateHolderLoading,
|
|
623
|
+
formId: editHolderData == null ? void 0 : editHolderData.form_id,
|
|
624
|
+
customerId: editHolderData == null ? void 0 : editHolderData.customer_id,
|
|
625
|
+
value: editHolderData == null ? void 0 : editHolderData.holder_id
|
|
626
|
+
}
|
|
500
627
|
));
|
|
501
628
|
};
|
|
502
629
|
var walletPassGallery_default = WalletPassGallery;
|