@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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SelectHolderModalOptions {
|
|
3
|
+
/** 状态对象 */
|
|
4
|
+
state: any;
|
|
5
|
+
/** dispatch 函数 */
|
|
6
|
+
dispatch: any;
|
|
7
|
+
/** 初始选中的值 */
|
|
8
|
+
initialValue?: string | number | (string | number)[];
|
|
9
|
+
/** 最大可选数量,用于决定单选或多选模式 */
|
|
10
|
+
maxSelectedCount?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare type SelectHolderResult = number[] | null;
|
|
13
|
+
/**
|
|
14
|
+
* SelectHolderModal 组件(单例模式)
|
|
15
|
+
* 使用 Portal 在 body 上渲染,确保全局只有一个实例
|
|
16
|
+
* 可以在多个地方挂载,但实际只会渲染一个实例
|
|
17
|
+
*/
|
|
18
|
+
export declare const SelectHolderModal: React.FC;
|
|
19
|
+
/**
|
|
20
|
+
* 通过 await 调用的 Holder 选择弹窗
|
|
21
|
+
* @param options 配置选项
|
|
22
|
+
* @returns Promise,resolve 时返回选中的 holder ID 数组,或 null(用户取消时)
|
|
23
|
+
*/
|
|
24
|
+
export declare function selectHolderModal(options: SelectHolderModalOptions): Promise<SelectHolderResult>;
|
|
@@ -0,0 +1,319 @@
|
|
|
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/booking/utils/selectHolderModal.tsx
|
|
30
|
+
var selectHolderModal_exports = {};
|
|
31
|
+
__export(selectHolderModal_exports, {
|
|
32
|
+
SelectHolderModal: () => SelectHolderModal,
|
|
33
|
+
selectHolderModal: () => selectHolderModal
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(selectHolderModal_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_react_dom = require("react-dom");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_utils2 = require("../utils");
|
|
40
|
+
var import_selectHolder = __toESM(require("../../../plus/selectHolder"));
|
|
41
|
+
var modalState = null;
|
|
42
|
+
var allSetStateCallbacks = /* @__PURE__ */ new Set();
|
|
43
|
+
var renderingInstanceId = null;
|
|
44
|
+
function notifyAllInstances(newState) {
|
|
45
|
+
modalState = newState;
|
|
46
|
+
allSetStateCallbacks.forEach((setState) => {
|
|
47
|
+
setState(newState);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function getFormDataConfig(state) {
|
|
51
|
+
var _a, _b, _c, _d, _e;
|
|
52
|
+
let _holder = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.holder;
|
|
53
|
+
if (!_holder) {
|
|
54
|
+
return { formDataConfig: null, isMinorAndWaiver: false };
|
|
55
|
+
}
|
|
56
|
+
const formDataConfig = {
|
|
57
|
+
..._holder,
|
|
58
|
+
..._holder == null ? void 0 : _holder.form,
|
|
59
|
+
options: [],
|
|
60
|
+
form_id: (_b = _holder == null ? void 0 : _holder.form) == null ? void 0 : _b.id,
|
|
61
|
+
field: (_c = _holder == null ? void 0 : _holder.form) == null ? void 0 : _c.form_field,
|
|
62
|
+
relation_type: "appointment_booking",
|
|
63
|
+
form_record: []
|
|
64
|
+
};
|
|
65
|
+
let isMinorAndWaiver = false;
|
|
66
|
+
if ((formDataConfig == null ? void 0 : formDataConfig.form_type) === "minors") {
|
|
67
|
+
const detail = (_d = formDataConfig == null ? void 0 : formDataConfig.form_field) == null ? void 0 : _d.find(
|
|
68
|
+
(item) => item.filed_type === "form_to_form" && item.status === "hide"
|
|
69
|
+
);
|
|
70
|
+
if (detail) {
|
|
71
|
+
isMinorAndWaiver = (_e = detail == null ? void 0 : detail.setting) == null ? void 0 : _e.linkedTable;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return { formDataConfig, isMinorAndWaiver };
|
|
75
|
+
}
|
|
76
|
+
function getHolderOptions(state) {
|
|
77
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
78
|
+
const holdersFromState = Array.isArray((_a = state == null ? void 0 : state.pet) == null ? void 0 : _a.holders) ? state.pet.holders : [];
|
|
79
|
+
const formId = ((_e = (_d = (_c = (_b = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _b.config) == null ? void 0 : _c.basic) == null ? void 0 : _d.appointment_subject) == null ? void 0 : _e.form_id) || 0;
|
|
80
|
+
const holdersFromValue = Array.isArray((_g = (_f = state == null ? void 0 : state.pet) == null ? void 0 : _f.value) == null ? void 0 : _g[formId]) ? (_i = (_h = state == null ? void 0 : state.pet) == null ? void 0 : _h.value) == null ? void 0 : _i[formId] : [];
|
|
81
|
+
const rawList = holdersFromState.length > 0 ? holdersFromState : holdersFromValue;
|
|
82
|
+
return rawList.map((item) => {
|
|
83
|
+
const id = (item == null ? void 0 : item.id) || (item == null ? void 0 : item.form_record_id) || (item == null ? void 0 : item.value);
|
|
84
|
+
if (id === void 0 || id === null) return null;
|
|
85
|
+
return {
|
|
86
|
+
label: (item == null ? void 0 : item.main_field) || (item == null ? void 0 : item.label) || (item == null ? void 0 : item.name) || import_utils.locales.getText("pisell-select-holder-please-select"),
|
|
87
|
+
value: id,
|
|
88
|
+
avatar: item == null ? void 0 : item.avatar,
|
|
89
|
+
subtitle: (item == null ? void 0 : item.subtitle) || (item == null ? void 0 : item.second_field) || (item == null ? void 0 : item.sub_field)
|
|
90
|
+
};
|
|
91
|
+
}).filter(Boolean);
|
|
92
|
+
}
|
|
93
|
+
function buildDisplayConfig(state, holderOptions, maxSelectedCount = 1) {
|
|
94
|
+
var _a, _b, _c;
|
|
95
|
+
const selectType = maxSelectedCount > 1 ? "multiple" : "single";
|
|
96
|
+
return {
|
|
97
|
+
direction: "vertical",
|
|
98
|
+
selectType,
|
|
99
|
+
showAvatar: true,
|
|
100
|
+
showTitle: true,
|
|
101
|
+
showSubtitle: Boolean(holderOptions.some((option) => option.subtitle)),
|
|
102
|
+
isSkipable: ((_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.subject_require) === "optional"
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
var SelectHolderModal = () => {
|
|
106
|
+
const [localState, setLocalState] = (0, import_react.useState)(modalState);
|
|
107
|
+
const [container, setContainer] = (0, import_react.useState)(null);
|
|
108
|
+
const instanceIdRef = (0, import_react.useRef)(Symbol("SelectHolderModal"));
|
|
109
|
+
const isRenderingInstanceRef = (0, import_react.useRef)(false);
|
|
110
|
+
(0, import_react.useEffect)(() => {
|
|
111
|
+
let containerElement = document.getElementById("select-holder-modal-container");
|
|
112
|
+
if (!containerElement) {
|
|
113
|
+
containerElement = document.createElement("div");
|
|
114
|
+
containerElement.id = "select-holder-modal-container";
|
|
115
|
+
document.body.appendChild(containerElement);
|
|
116
|
+
}
|
|
117
|
+
setContainer(containerElement);
|
|
118
|
+
if (renderingInstanceId === null) {
|
|
119
|
+
renderingInstanceId = instanceIdRef.current;
|
|
120
|
+
isRenderingInstanceRef.current = true;
|
|
121
|
+
} else {
|
|
122
|
+
isRenderingInstanceRef.current = renderingInstanceId === instanceIdRef.current;
|
|
123
|
+
}
|
|
124
|
+
allSetStateCallbacks.add(setLocalState);
|
|
125
|
+
if (modalState && modalState !== localState) {
|
|
126
|
+
setLocalState(modalState);
|
|
127
|
+
}
|
|
128
|
+
return () => {
|
|
129
|
+
allSetStateCallbacks.delete(setLocalState);
|
|
130
|
+
if (isRenderingInstanceRef.current) {
|
|
131
|
+
renderingInstanceId = null;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
}, []);
|
|
135
|
+
if (!localState || !localState.open || !container) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
if (!isRenderingInstanceRef.current) {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
const { state, dispatch, initialValue, maxSelectedCount, resolve } = localState;
|
|
142
|
+
return (0, import_react_dom.createPortal)(
|
|
143
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
144
|
+
SelectHolderModalContent,
|
|
145
|
+
{
|
|
146
|
+
state,
|
|
147
|
+
dispatch,
|
|
148
|
+
initialValue,
|
|
149
|
+
maxSelectedCount,
|
|
150
|
+
resolve,
|
|
151
|
+
onClose: () => {
|
|
152
|
+
setTimeout(() => {
|
|
153
|
+
notifyAllInstances(null);
|
|
154
|
+
}, 350);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
container
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
var SelectHolderModalContent = ({ state, dispatch, initialValue, maxSelectedCount, resolve, onClose }) => {
|
|
162
|
+
var _a, _b, _c, _d, _e;
|
|
163
|
+
const [open, setOpen] = (0, import_react.useState)(true);
|
|
164
|
+
const [holderOptions, setHolderOptions] = (0, import_react.useState)(
|
|
165
|
+
() => getHolderOptions(state)
|
|
166
|
+
);
|
|
167
|
+
const [selectedValues, setSelectedValues] = (0, import_react.useState)(() => {
|
|
168
|
+
if (Array.isArray(initialValue)) {
|
|
169
|
+
return initialValue.filter(
|
|
170
|
+
(item) => item !== void 0 && item !== null
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
if (initialValue === void 0 || initialValue === null || initialValue === "") {
|
|
174
|
+
return [];
|
|
175
|
+
}
|
|
176
|
+
return [initialValue];
|
|
177
|
+
});
|
|
178
|
+
const stateRef = { current: state };
|
|
179
|
+
(0, import_react.useEffect)(() => {
|
|
180
|
+
stateRef.current = state;
|
|
181
|
+
const newOptions = getHolderOptions(state);
|
|
182
|
+
setHolderOptions(newOptions);
|
|
183
|
+
}, [state]);
|
|
184
|
+
const displayConfig = (0, import_react.useMemo)(
|
|
185
|
+
() => {
|
|
186
|
+
var _a2, _b2, _c2;
|
|
187
|
+
return buildDisplayConfig(
|
|
188
|
+
stateRef.current,
|
|
189
|
+
holderOptions,
|
|
190
|
+
maxSelectedCount || ((_c2 = (_b2 = (_a2 = stateRef.current) == null ? void 0 : _a2.bookingConfig) == null ? void 0 : _b2.holder) == null ? void 0 : _c2.maxSelectedCount) || 1
|
|
191
|
+
);
|
|
192
|
+
},
|
|
193
|
+
[holderOptions, maxSelectedCount, state]
|
|
194
|
+
);
|
|
195
|
+
const { formDataConfig, isMinorAndWaiver } = (0, import_react.useMemo)(
|
|
196
|
+
() => getFormDataConfig(stateRef.current),
|
|
197
|
+
[(_b = (_a = stateRef.current) == null ? void 0 : _a.bookingConfig) == null ? void 0 : _b.holder]
|
|
198
|
+
);
|
|
199
|
+
const holderConfig = ((_d = (_c = stateRef.current) == null ? void 0 : _c.bookingConfig) == null ? void 0 : _d.holder) || {};
|
|
200
|
+
const title = ((_e = holderConfig == null ? void 0 : holderConfig.form) == null ? void 0 : _e.title) || (holderConfig == null ? void 0 : holderConfig.title) || import_utils.locales.getText("pisell2.text.holder");
|
|
201
|
+
const updateStateHolders = (holders) => {
|
|
202
|
+
dispatch({
|
|
203
|
+
type: "setPet",
|
|
204
|
+
payload: {
|
|
205
|
+
holders
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
};
|
|
209
|
+
const handleClose = () => {
|
|
210
|
+
setOpen(false);
|
|
211
|
+
if (resolve) {
|
|
212
|
+
resolve(null);
|
|
213
|
+
}
|
|
214
|
+
setTimeout(() => {
|
|
215
|
+
onClose();
|
|
216
|
+
}, 300);
|
|
217
|
+
};
|
|
218
|
+
const handleConfirm = (nextValues) => {
|
|
219
|
+
setOpen(false);
|
|
220
|
+
if (resolve) {
|
|
221
|
+
if (nextValues && nextValues.length > 0) {
|
|
222
|
+
const selectedIds = nextValues.map((val) => Number(val));
|
|
223
|
+
resolve(selectedIds);
|
|
224
|
+
} else {
|
|
225
|
+
resolve(null);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
setTimeout(() => {
|
|
229
|
+
onClose();
|
|
230
|
+
}, 300);
|
|
231
|
+
};
|
|
232
|
+
const handleAdd = () => {
|
|
233
|
+
var _a2, _b2, _c2, _d2, _e2, _f, _g, _h;
|
|
234
|
+
const currentState = stateRef.current;
|
|
235
|
+
const waiverForm = (_a2 = currentState == null ? void 0 : currentState.pet) == null ? void 0 : _a2.waiverForm;
|
|
236
|
+
currentState.action({
|
|
237
|
+
type: "pisell1.goCustomFormAddData",
|
|
238
|
+
data: {
|
|
239
|
+
zIndex: 1101,
|
|
240
|
+
customerId: (_c2 = (_b2 = currentState.client) == null ? void 0 : _b2.value) == null ? void 0 : _c2.id,
|
|
241
|
+
formDataConfig: isMinorAndWaiver ? {
|
|
242
|
+
...waiverForm,
|
|
243
|
+
customer_id: (_e2 = (_d2 = currentState.client) == null ? void 0 : _d2.value) == null ? void 0 : _e2.id,
|
|
244
|
+
is_franchisor: (_g = (_f = currentState.pet.formData) == null ? void 0 : _f[0]) == null ? void 0 : _g.is_franchisor
|
|
245
|
+
} : { ...((_h = currentState.pet.formData) == null ? void 0 : _h[0]) || {} }
|
|
246
|
+
},
|
|
247
|
+
callback: (res) => {
|
|
248
|
+
var _a3, _b3;
|
|
249
|
+
let obj = {};
|
|
250
|
+
for (let item of res) {
|
|
251
|
+
obj[item.key] = item.value;
|
|
252
|
+
}
|
|
253
|
+
const isWalkInBol = (0, import_utils2.isWalkIn)((_b3 = (_a3 = currentState.client) == null ? void 0 : _a3.value) == null ? void 0 : _b3.id);
|
|
254
|
+
const newHolders = !isWalkInBol ? [obj, ...currentState.pet.holders || []] : currentState.pet.holders || [];
|
|
255
|
+
updateStateHolders(newHolders);
|
|
256
|
+
const updatedState = {
|
|
257
|
+
...currentState,
|
|
258
|
+
pet: {
|
|
259
|
+
...currentState.pet,
|
|
260
|
+
holders: newHolders
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
stateRef.current = updatedState;
|
|
264
|
+
const newOptions = getHolderOptions(updatedState);
|
|
265
|
+
setHolderOptions(newOptions);
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
const handleSkip = () => {
|
|
270
|
+
setOpen(false);
|
|
271
|
+
if (resolve) {
|
|
272
|
+
resolve(null);
|
|
273
|
+
}
|
|
274
|
+
setTimeout(() => {
|
|
275
|
+
onClose();
|
|
276
|
+
}, 300);
|
|
277
|
+
};
|
|
278
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
279
|
+
import_selectHolder.default,
|
|
280
|
+
{
|
|
281
|
+
open,
|
|
282
|
+
modalConfig: {
|
|
283
|
+
title: `${import_utils.locales.getText("pisell-select-holder-please-select")} ${maxSelectedCount || 1} ${title}`,
|
|
284
|
+
confirmText: import_utils.locales.getText("pisell2.text.confirm")
|
|
285
|
+
},
|
|
286
|
+
dataSource: holderOptions,
|
|
287
|
+
value: selectedValues,
|
|
288
|
+
displayConfig,
|
|
289
|
+
maxSelectedCount,
|
|
290
|
+
allowAdd: true,
|
|
291
|
+
onClose: handleClose,
|
|
292
|
+
onConfirm: handleConfirm,
|
|
293
|
+
onAdd: handleAdd,
|
|
294
|
+
onSkip: handleSkip
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
};
|
|
298
|
+
function selectHolderModal(options) {
|
|
299
|
+
const { state, dispatch, initialValue, maxSelectedCount } = options;
|
|
300
|
+
return new Promise((resolve) => {
|
|
301
|
+
if (modalState && modalState.resolve) {
|
|
302
|
+
modalState.resolve(null);
|
|
303
|
+
}
|
|
304
|
+
const newState = {
|
|
305
|
+
open: true,
|
|
306
|
+
state,
|
|
307
|
+
dispatch,
|
|
308
|
+
initialValue,
|
|
309
|
+
maxSelectedCount,
|
|
310
|
+
resolve
|
|
311
|
+
};
|
|
312
|
+
notifyAllInstances(newState);
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
316
|
+
0 && (module.exports = {
|
|
317
|
+
SelectHolderModal,
|
|
318
|
+
selectHolderModal
|
|
319
|
+
});
|
|
@@ -26,6 +26,14 @@ export declare const request: Request;
|
|
|
26
26
|
* @Date: 2024-04-26 14:00
|
|
27
27
|
*/
|
|
28
28
|
export declare const getDiscountTime: (service_times: number, isDay?: boolean) => string;
|
|
29
|
+
/**
|
|
30
|
+
* @title: 格式化跨日预约的时长用于展示
|
|
31
|
+
* @description:
|
|
32
|
+
* @param {number} days
|
|
33
|
+
* @param {number} minutes
|
|
34
|
+
* @return {*}
|
|
35
|
+
*/
|
|
36
|
+
export declare const getDiscountTimeByDayMinutes: (days: number, minutes: number) => string;
|
|
29
37
|
/**
|
|
30
38
|
* @title: 时间切片(带缓存版本)
|
|
31
39
|
* @description: 使用 memoize 高阶函数包裹 sliceDayIntoFiveMinutes,相同参数时直接返回缓存结果
|
|
@@ -112,7 +120,7 @@ export declare const flexibleObj: {
|
|
|
112
120
|
export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
|
|
113
121
|
export declare const getServiceTimes: (service: any) => {
|
|
114
122
|
startDate: dayjs.Dayjs;
|
|
115
|
-
endDate:
|
|
123
|
+
endDate: any;
|
|
116
124
|
};
|
|
117
125
|
export declare const getErrorList: (resource: any, cacheItem: any, isDay?: boolean) => {
|
|
118
126
|
label: any;
|
|
@@ -165,10 +173,10 @@ export declare const getProductTotalPrice: (item: any) => number;
|
|
|
165
173
|
export declare const getDuration: (duration: number | {
|
|
166
174
|
type: string;
|
|
167
175
|
value: number;
|
|
168
|
-
}) => number |
|
|
176
|
+
}) => number | {
|
|
169
177
|
type: string;
|
|
170
178
|
value: number;
|
|
171
|
-
};
|
|
179
|
+
} | "flexible";
|
|
172
180
|
export declare const isWalkIn: (customer_id?: number | string) => boolean;
|
|
173
181
|
export declare const getIsEdit: (state: any) => boolean;
|
|
174
182
|
export {};
|
|
@@ -39,6 +39,7 @@ __export(utils_exports, {
|
|
|
39
39
|
getCacheParams: () => getCacheParams,
|
|
40
40
|
getDays: () => getDays,
|
|
41
41
|
getDiscountTime: () => getDiscountTime,
|
|
42
|
+
getDiscountTimeByDayMinutes: () => getDiscountTimeByDayMinutes,
|
|
42
43
|
getDuration: () => getDuration,
|
|
43
44
|
getEndDate: () => getEndDate,
|
|
44
45
|
getErrorList: () => getErrorList,
|
|
@@ -69,6 +70,7 @@ var import_utils2 = require("./info/service2/utils");
|
|
|
69
70
|
var import_lodash = require("lodash");
|
|
70
71
|
var import_utilsByBooking = require("./info2/utilsByBooking");
|
|
71
72
|
var import_decimal = __toESM(require("decimal.js"));
|
|
73
|
+
var import_utils3 = require("./info2/service/addService/utils");
|
|
72
74
|
function memoize(fn) {
|
|
73
75
|
const cache = /* @__PURE__ */ new Map();
|
|
74
76
|
return function(...args) {
|
|
@@ -113,6 +115,12 @@ var getDiscountTime = (service_times, isDay) => {
|
|
|
113
115
|
return str;
|
|
114
116
|
}
|
|
115
117
|
};
|
|
118
|
+
var getDiscountTimeByDayMinutes = (days, minutes) => {
|
|
119
|
+
if (days === 0) {
|
|
120
|
+
return getDiscountTime(minutes);
|
|
121
|
+
}
|
|
122
|
+
return `${days} ${import_utils.locales.getText("pisell2.text.day")(days)} ${getDiscountTime(minutes)}`;
|
|
123
|
+
};
|
|
116
124
|
var _sliceDayIntoFiveMinutes = (config, locale, isDay) => {
|
|
117
125
|
let _locale = locale;
|
|
118
126
|
let dayjsLocale = _locale === "en-US" || _locale === "en" ? "en" : "zh-cn";
|
|
@@ -426,6 +434,12 @@ var getServiceTimes = (service) => {
|
|
|
426
434
|
const startDate = (0, import_dayjs.default)(
|
|
427
435
|
(0, import_dayjs.default)(service._extend.start_date).format("YYYY-MM-DD ") + getServeStartTime(service._extend.start_time)
|
|
428
436
|
);
|
|
437
|
+
if ((0, import_utils3.isMultiDayProduct)(service)) {
|
|
438
|
+
return {
|
|
439
|
+
startDate,
|
|
440
|
+
endDate: service._extend.end_date
|
|
441
|
+
};
|
|
442
|
+
}
|
|
429
443
|
const endDate = startDate.add(
|
|
430
444
|
flexibleObj.getValue(service._extend.duration),
|
|
431
445
|
"minute"
|
|
@@ -723,6 +737,7 @@ var getIsEdit = (state) => {
|
|
|
723
737
|
getCacheParams,
|
|
724
738
|
getDays,
|
|
725
739
|
getDiscountTime,
|
|
740
|
+
getDiscountTimeByDayMinutes,
|
|
726
741
|
getDuration,
|
|
727
742
|
getEndDate,
|
|
728
743
|
getErrorList,
|
|
@@ -1422,7 +1422,7 @@ var PaymentModal = ({
|
|
|
1422
1422
|
isLocalOrderCreated.current = true;
|
|
1423
1423
|
const shop_wallet_pass_id = await (0, import_utils2.getShopWalletPassId)(interaction);
|
|
1424
1424
|
checkout.setOtherParams({
|
|
1425
|
-
is_price_include_tax: getData("is_price_include_tax"),
|
|
1425
|
+
is_price_include_tax: getData("is_price_include_tax") ?? 1,
|
|
1426
1426
|
tax_rate: getData("tax_rate") || "10",
|
|
1427
1427
|
surcharge_list: getData("surcharge_list"),
|
|
1428
1428
|
currency_format: getData("currency_format"),
|
|
@@ -1626,12 +1626,15 @@ var PaymentModal = ({
|
|
|
1626
1626
|
}
|
|
1627
1627
|
setOrderInfo(orderInfo2);
|
|
1628
1628
|
isLocalOrderCreated.current = true;
|
|
1629
|
+
} else {
|
|
1630
|
+
throw new Error("pisellos is not available");
|
|
1629
1631
|
}
|
|
1630
1632
|
} catch (error) {
|
|
1631
1633
|
console.error("Failed to initialize checkout data:", error);
|
|
1634
|
+
const domain = window.location.hostname;
|
|
1632
1635
|
logger == null ? void 0 : logger.addLog({
|
|
1633
1636
|
type: "error",
|
|
1634
|
-
title:
|
|
1637
|
+
title: `${domain}: Failed to initialize checkout data`,
|
|
1635
1638
|
metadata: {
|
|
1636
1639
|
error
|
|
1637
1640
|
}
|
|
@@ -9,7 +9,7 @@ import { PosProps } from './const';
|
|
|
9
9
|
*/
|
|
10
10
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
|
11
11
|
className?: string | undefined;
|
|
12
|
-
onChange?: ((status: "
|
|
12
|
+
onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
|
|
13
13
|
[keys: string]: unknown;
|
|
14
14
|
} | undefined, other?: any) => void) | undefined;
|
|
15
15
|
onClose: () => void;
|
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
|
12
12
|
api: PayProps['api'];
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
onChange?: ((status: "
|
|
14
|
+
onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
|
|
15
15
|
[keys: string]: unknown;
|
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
|
17
17
|
onClose: () => void;
|
|
@@ -295,10 +295,10 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
295
295
|
name?: string | undefined;
|
|
296
296
|
symbol?: string | undefined;
|
|
297
297
|
amount?: string | number | undefined;
|
|
298
|
-
mode?: "refund" | "
|
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
299
|
order_id?: string | number | undefined;
|
|
300
300
|
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
|
301
|
-
action?: "
|
|
301
|
+
action?: "pay" | "amount" | "deviceList" | undefined;
|
|
302
302
|
key?: number | undefined;
|
|
303
303
|
step?: number | undefined;
|
|
304
304
|
title?: string | undefined;
|
|
@@ -10,7 +10,6 @@ import RuleSetting from './ruleSetting';
|
|
|
10
10
|
import TaxSelect from './taxSelect';
|
|
11
11
|
import ToCPay from './pay/toC';
|
|
12
12
|
import WalletList from './walletList';
|
|
13
|
-
import Wallet from './wallet';
|
|
14
13
|
import WorkspaceListDetail from './workSpaceListDetail/';
|
|
15
14
|
import WorkspaceList from './workSpaceList';
|
|
16
15
|
import PisellSelectCustomerModal from './pisellSelectCustomerModal';
|
|
@@ -21,4 +20,4 @@ import PinModal from './pinModal';
|
|
|
21
20
|
import PinVerifyModal from './pinVerifyModal';
|
|
22
21
|
import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
|
|
23
22
|
import Registry from './systemSettings/registry';
|
|
24
|
-
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal,
|
|
23
|
+
export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, };
|
package/lib/components/index.js
CHANGED
|
@@ -56,7 +56,6 @@ __export(components_exports, {
|
|
|
56
56
|
SubTotal: () => import_subTotal.default,
|
|
57
57
|
TaxSelect: () => import_taxSelect.default,
|
|
58
58
|
ToCPay: () => import_toC.default,
|
|
59
|
-
Wallet: () => import_wallet.default,
|
|
60
59
|
WalletList: () => import_walletList.default,
|
|
61
60
|
WorkspaceList: () => import_workSpaceList.default,
|
|
62
61
|
WorkspaceListDetail: () => import_workSpaceListDetail.default
|
|
@@ -74,7 +73,6 @@ var import_ruleSetting = __toESM(require("./ruleSetting"));
|
|
|
74
73
|
var import_taxSelect = __toESM(require("./taxSelect"));
|
|
75
74
|
var import_toC = __toESM(require("./pay/toC"));
|
|
76
75
|
var import_walletList = __toESM(require("./walletList"));
|
|
77
|
-
var import_wallet = __toESM(require("./wallet"));
|
|
78
76
|
var import_workSpaceListDetail = __toESM(require("./workSpaceListDetail/"));
|
|
79
77
|
var import_workSpaceList = __toESM(require("./workSpaceList"));
|
|
80
78
|
var import_pisellSelectCustomerModal = __toESM(require("./pisellSelectCustomerModal"));
|
|
@@ -114,7 +112,6 @@ var import_registry = __toESM(require("./systemSettings/registry"));
|
|
|
114
112
|
SubTotal,
|
|
115
113
|
TaxSelect,
|
|
116
114
|
ToCPay,
|
|
117
|
-
Wallet,
|
|
118
115
|
WalletList,
|
|
119
116
|
WorkspaceList,
|
|
120
117
|
WorkspaceListDetail
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export interface FormState {
|
|
3
2
|
platform: 'pc' | 'h5' | '' | undefined;
|
|
4
3
|
order: any;
|
|
@@ -30,11 +29,4 @@ export interface PayGroup {
|
|
|
30
29
|
_order: any;
|
|
31
30
|
front_order_uuid?: string;
|
|
32
31
|
}
|
|
33
|
-
export declare const Provider:
|
|
34
|
-
state: FormState;
|
|
35
|
-
} & {
|
|
36
|
-
dispatch: (params: {
|
|
37
|
-
type: string;
|
|
38
|
-
payload: any;
|
|
39
|
-
}) => void;
|
|
40
|
-
}>;
|
|
32
|
+
export declare const Provider: any, Context: any;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { CalendarDataItem, ScheduleItem } from "./type";
|
|
3
2
|
import dayjs from "dayjs";
|
|
4
3
|
export interface FormState {
|
|
@@ -69,11 +68,4 @@ export interface FormState {
|
|
|
69
68
|
};
|
|
70
69
|
setGlobalState: Function | null;
|
|
71
70
|
}
|
|
72
|
-
export declare const Provider:
|
|
73
|
-
state: FormState;
|
|
74
|
-
} & {
|
|
75
|
-
dispatch: (params: {
|
|
76
|
-
type: string;
|
|
77
|
-
payload: any;
|
|
78
|
-
}) => void;
|
|
79
|
-
}>;
|
|
71
|
+
export declare const Provider: any, Context: any;
|
|
@@ -54,6 +54,7 @@ var Product = (props) => {
|
|
|
54
54
|
platform,
|
|
55
55
|
isShowChangeResource,
|
|
56
56
|
isShowDelete,
|
|
57
|
+
isShowAmountFooter,
|
|
57
58
|
isShowChangeHolder,
|
|
58
59
|
isShowHolder,
|
|
59
60
|
isShowAddHolderButton,
|
|
@@ -82,7 +83,8 @@ var Product = (props) => {
|
|
|
82
83
|
isShowDelete,
|
|
83
84
|
isShowHolder,
|
|
84
85
|
isShowAddHolderButton,
|
|
85
|
-
isShowEditProduct
|
|
86
|
+
isShowEditProduct,
|
|
87
|
+
isShowAmountFooter
|
|
86
88
|
};
|
|
87
89
|
}, [
|
|
88
90
|
isShowNote,
|
|
@@ -93,7 +95,8 @@ var Product = (props) => {
|
|
|
93
95
|
isShowHolder,
|
|
94
96
|
isShowAddHolderButton,
|
|
95
97
|
isShowChangeHolder,
|
|
96
|
-
isShowEditProduct
|
|
98
|
+
isShowEditProduct,
|
|
99
|
+
isShowAmountFooter
|
|
97
100
|
]);
|
|
98
101
|
const getProductCardStyleProps = (0, import_ahooks.useMemoizedFn)(
|
|
99
102
|
(type) => {
|
|
@@ -101,7 +104,8 @@ var Product = (props) => {
|
|
|
101
104
|
if (state.scenario !== "booking2") return {};
|
|
102
105
|
return {
|
|
103
106
|
isShowImage: conf == null ? void 0 : conf.show_product_image,
|
|
104
|
-
isShowDelete: conf == null ? void 0 : conf.show_remove_button,
|
|
107
|
+
isShowDelete: (conf == null ? void 0 : conf.show_remove_button) && isShowDelete,
|
|
108
|
+
isShowAmountFooter,
|
|
105
109
|
disabledEdit: true
|
|
106
110
|
};
|
|
107
111
|
}
|