@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
|
@@ -87,6 +87,11 @@ declare const _default: {
|
|
|
87
87
|
'wallet-pass-gallery.voucherExpireNote': string;
|
|
88
88
|
'wallet-pass-gallery.viewMore': string;
|
|
89
89
|
'wallet-pass-gallery.allLoaded': string;
|
|
90
|
+
'page.wallet.tempHolderSelector.title': string;
|
|
91
|
+
'page.wallet.tempHolderSelector.create': string;
|
|
92
|
+
'page.wallet.tempHolderSelector.confirm': string;
|
|
93
|
+
'page.wallet.notValidDate': string;
|
|
94
|
+
'page.wallet.includedDate': string;
|
|
90
95
|
};
|
|
91
96
|
'zh-CN': {
|
|
92
97
|
'wallet-pass-gallery.rechargeableCard': string;
|
|
@@ -176,6 +181,11 @@ declare const _default: {
|
|
|
176
181
|
'wallet-pass-gallery.voucherExpireNote': string;
|
|
177
182
|
'wallet-pass-gallery.viewMore': string;
|
|
178
183
|
'wallet-pass-gallery.allLoaded': string;
|
|
184
|
+
'page.wallet.tempHolderSelector.title': string;
|
|
185
|
+
'page.wallet.tempHolderSelector.create': string;
|
|
186
|
+
'page.wallet.tempHolderSelector.confirm': string;
|
|
187
|
+
'page.wallet.notValidDate': string;
|
|
188
|
+
'page.wallet.includedDate': string;
|
|
179
189
|
};
|
|
180
190
|
'zh-HK': {
|
|
181
191
|
'wallet-pass-gallery.rechargeableCard': string;
|
|
@@ -265,6 +275,11 @@ declare const _default: {
|
|
|
265
275
|
'wallet-pass-gallery.voucherExpireNote': string;
|
|
266
276
|
'wallet-pass-gallery.viewMore': string;
|
|
267
277
|
'wallet-pass-gallery.allLoaded': string;
|
|
278
|
+
'page.wallet.tempHolderSelector.title': string;
|
|
279
|
+
'page.wallet.tempHolderSelector.create': string;
|
|
280
|
+
'page.wallet.tempHolderSelector.confirm': string;
|
|
281
|
+
'page.wallet.notValidDate': string;
|
|
282
|
+
'page.wallet.includedDate': string;
|
|
268
283
|
};
|
|
269
284
|
};
|
|
270
285
|
export default _default;
|
|
@@ -92,7 +92,15 @@ export default {
|
|
|
92
92
|
'wallet-pass-gallery.monthlyReset': 'Counter resets on 1st of each month at midnight',
|
|
93
93
|
'wallet-pass-gallery.voucherExpireNote': 'Voucher will automatically expire when limit is reached',
|
|
94
94
|
'wallet-pass-gallery.viewMore': 'View More',
|
|
95
|
-
'wallet-pass-gallery.allLoaded': 'All loaded'
|
|
95
|
+
'wallet-pass-gallery.allLoaded': 'All loaded',
|
|
96
|
+
// TempHolderSelector
|
|
97
|
+
'page.wallet.tempHolderSelector.title': 'Edit Holder',
|
|
98
|
+
'page.wallet.tempHolderSelector.create': 'Create New',
|
|
99
|
+
'page.wallet.tempHolderSelector.confirm': 'Confirm',
|
|
100
|
+
// temp
|
|
101
|
+
'page.wallet.notValidDate': 'Not valid on',
|
|
102
|
+
// 不可用日期
|
|
103
|
+
'page.wallet.includedDate': 'Included dates' // 包含日期
|
|
96
104
|
},
|
|
97
105
|
'zh-CN': {
|
|
98
106
|
'wallet-pass-gallery.rechargeableCard': '充值卡',
|
|
@@ -167,7 +175,7 @@ export default {
|
|
|
167
175
|
'wallet-pass-gallery.loading': '正在加载钱包...',
|
|
168
176
|
'wallet-pass-gallery.usageRules': '使用规则',
|
|
169
177
|
'wallet-pass-gallery.usageRulesSubtitle': '请仔细阅读以下使用条件',
|
|
170
|
-
'wallet-pass-gallery.timeUsageLimits': '
|
|
178
|
+
'wallet-pass-gallery.timeUsageLimits': '使用频次限制',
|
|
171
179
|
'wallet-pass-gallery.totalQuantityControl': '总量控制',
|
|
172
180
|
'wallet-pass-gallery.dailyLimit': '每日限制:',
|
|
173
181
|
'wallet-pass-gallery.weeklyLimit': '每周限制:',
|
|
@@ -183,7 +191,15 @@ export default {
|
|
|
183
191
|
'wallet-pass-gallery.monthlyReset': '每月1号0点自动重置计数',
|
|
184
192
|
'wallet-pass-gallery.voucherExpireNote': '用完后此券将自动失效',
|
|
185
193
|
'wallet-pass-gallery.viewMore': '查看更多',
|
|
186
|
-
'wallet-pass-gallery.allLoaded': '已全部加载'
|
|
194
|
+
'wallet-pass-gallery.allLoaded': '已全部加载',
|
|
195
|
+
// TempHolderSelector
|
|
196
|
+
'page.wallet.tempHolderSelector.title': '编辑持有人',
|
|
197
|
+
'page.wallet.tempHolderSelector.create': '创建新持有人',
|
|
198
|
+
'page.wallet.tempHolderSelector.confirm': '确定',
|
|
199
|
+
// temp
|
|
200
|
+
'page.wallet.notValidDate': '不可用日期',
|
|
201
|
+
// 不可用日期
|
|
202
|
+
'page.wallet.includedDate': '包含日期' // 包含日期
|
|
187
203
|
},
|
|
188
204
|
'zh-HK': {
|
|
189
205
|
'wallet-pass-gallery.rechargeableCard': '充值卡',
|
|
@@ -258,7 +274,7 @@ export default {
|
|
|
258
274
|
'wallet-pass-gallery.loading': '正在加載錢包...',
|
|
259
275
|
'wallet-pass-gallery.usageRules': '使用規則',
|
|
260
276
|
'wallet-pass-gallery.usageRulesSubtitle': '請仔細閱讀以下使用條件',
|
|
261
|
-
'wallet-pass-gallery.timeUsageLimits': '
|
|
277
|
+
'wallet-pass-gallery.timeUsageLimits': '使用頻次限制',
|
|
262
278
|
'wallet-pass-gallery.totalQuantityControl': '總量控制',
|
|
263
279
|
'wallet-pass-gallery.dailyLimit': '每日限制:',
|
|
264
280
|
'wallet-pass-gallery.weeklyLimit': '每週限制:',
|
|
@@ -274,6 +290,14 @@ export default {
|
|
|
274
290
|
'wallet-pass-gallery.monthlyReset': '每月1號0點自動重置計數',
|
|
275
291
|
'wallet-pass-gallery.voucherExpireNote': '用完後此券將自動失效',
|
|
276
292
|
'wallet-pass-gallery.viewMore': '查看更多',
|
|
277
|
-
'wallet-pass-gallery.allLoaded': '已全部加載'
|
|
293
|
+
'wallet-pass-gallery.allLoaded': '已全部加載',
|
|
294
|
+
// TempHolderSelector
|
|
295
|
+
'page.wallet.tempHolderSelector.title': '編輯持有人',
|
|
296
|
+
'page.wallet.tempHolderSelector.create': '創建新持有人',
|
|
297
|
+
'page.wallet.tempHolderSelector.confirm': '確定',
|
|
298
|
+
// temp
|
|
299
|
+
'page.wallet.notValidDate': '不可用日期',
|
|
300
|
+
// 不可用日期
|
|
301
|
+
'page.wallet.includedDate': '包含日期' // 包含日期
|
|
278
302
|
}
|
|
279
303
|
};
|
|
@@ -16,6 +16,7 @@ export interface IWalletListParmsProps {
|
|
|
16
16
|
num?: number;
|
|
17
17
|
skip?: number;
|
|
18
18
|
filter_wallet_id?: string;
|
|
19
|
+
filter_holder_id?: string;
|
|
19
20
|
available: 0 | 1;
|
|
20
21
|
with?: string[];
|
|
21
22
|
}
|
|
@@ -86,7 +87,7 @@ export declare type ErrorCallback = () => void;
|
|
|
86
87
|
* @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
|
|
87
88
|
* @throws 请求失败时抛出错误
|
|
88
89
|
*/
|
|
89
|
-
export declare const
|
|
90
|
+
export declare const getWalletPassList: (params?: IWalletListParmsProps) => Promise<{
|
|
90
91
|
list: IWalletListItemProps[];
|
|
91
92
|
count: number;
|
|
92
93
|
}>;
|
|
@@ -218,4 +219,17 @@ export declare const orderRechargeProduct: (params: OrderParams) => Promise<Orde
|
|
|
218
219
|
* @date: 2025-11-03 15:30
|
|
219
220
|
*/
|
|
220
221
|
export declare const getWalletDetail: (id: string | number) => Promise<any>;
|
|
222
|
+
/**
|
|
223
|
+
* 更新卡券持有人
|
|
224
|
+
* @param id 卡券ID
|
|
225
|
+
* @param params 更新参数
|
|
226
|
+
* @returns 更新结果
|
|
227
|
+
*/
|
|
228
|
+
export declare const updateWalletPassHolder: (id: string, params: any) => Promise<any>;
|
|
229
|
+
/**
|
|
230
|
+
* 获取卡券详情
|
|
231
|
+
* @param id 卡券ID
|
|
232
|
+
* @returns 卡券详情
|
|
233
|
+
*/
|
|
234
|
+
export declare const getWalletPassDetail: (id: string, params: any) => Promise<any>;
|
|
221
235
|
export {};
|
|
@@ -35,7 +35,7 @@ import { locales } from '@pisell/utils';
|
|
|
35
35
|
* @returns Promise<{list: IWalletListItemProps[], count: number}> 钱包列表和总数
|
|
36
36
|
* @throws 请求失败时抛出错误
|
|
37
37
|
*/
|
|
38
|
-
export var
|
|
38
|
+
export var getWalletPassList = /*#__PURE__*/function () {
|
|
39
39
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
40
40
|
var _yield$request$getReq, data;
|
|
41
41
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
@@ -65,7 +65,7 @@ export var getWalletList = /*#__PURE__*/function () {
|
|
|
65
65
|
}
|
|
66
66
|
}, _callee, null, [[0, 8]]);
|
|
67
67
|
}));
|
|
68
|
-
return function
|
|
68
|
+
return function getWalletPassList(_x) {
|
|
69
69
|
return _ref.apply(this, arguments);
|
|
70
70
|
};
|
|
71
71
|
}();
|
|
@@ -288,4 +288,61 @@ export var getWalletDetail = /*#__PURE__*/function () {
|
|
|
288
288
|
return function getWalletDetail(_x8) {
|
|
289
289
|
return _ref8.apply(this, arguments);
|
|
290
290
|
};
|
|
291
|
+
}();
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* 更新卡券持有人
|
|
295
|
+
* @param id 卡券ID
|
|
296
|
+
* @param params 更新参数
|
|
297
|
+
* @returns 更新结果
|
|
298
|
+
*/
|
|
299
|
+
export var updateWalletPassHolder = /*#__PURE__*/function () {
|
|
300
|
+
var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(id, params) {
|
|
301
|
+
var _yield$request$getReq8, data;
|
|
302
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
303
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
304
|
+
case 0:
|
|
305
|
+
_context9.next = 2;
|
|
306
|
+
return request.getRequest().post("/h5/machinecode/".concat(id, "/bind-holder"), params);
|
|
307
|
+
case 2:
|
|
308
|
+
_yield$request$getReq8 = _context9.sent;
|
|
309
|
+
data = _yield$request$getReq8.data;
|
|
310
|
+
return _context9.abrupt("return", data);
|
|
311
|
+
case 5:
|
|
312
|
+
case "end":
|
|
313
|
+
return _context9.stop();
|
|
314
|
+
}
|
|
315
|
+
}, _callee9);
|
|
316
|
+
}));
|
|
317
|
+
return function updateWalletPassHolder(_x9, _x10) {
|
|
318
|
+
return _ref9.apply(this, arguments);
|
|
319
|
+
};
|
|
320
|
+
}();
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* 获取卡券详情
|
|
324
|
+
* @param id 卡券ID
|
|
325
|
+
* @returns 卡券详情
|
|
326
|
+
*/
|
|
327
|
+
export var getWalletPassDetail = /*#__PURE__*/function () {
|
|
328
|
+
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(id, params) {
|
|
329
|
+
var _yield$request$getReq9, data;
|
|
330
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
331
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
332
|
+
case 0:
|
|
333
|
+
_context10.next = 2;
|
|
334
|
+
return request.getRequest().get("/h5/machinecode/lowcode/detail/".concat(id), params);
|
|
335
|
+
case 2:
|
|
336
|
+
_yield$request$getReq9 = _context10.sent;
|
|
337
|
+
data = _yield$request$getReq9.data;
|
|
338
|
+
return _context10.abrupt("return", data);
|
|
339
|
+
case 5:
|
|
340
|
+
case "end":
|
|
341
|
+
return _context10.stop();
|
|
342
|
+
}
|
|
343
|
+
}, _callee10);
|
|
344
|
+
}));
|
|
345
|
+
return function getWalletPassDetail(_x11, _x12) {
|
|
346
|
+
return _ref10.apply(this, arguments);
|
|
347
|
+
};
|
|
291
348
|
}();
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
interface ScheduleTextResult {
|
|
2
|
+
validityTexts: string[];
|
|
3
|
+
excluded_date: string[];
|
|
4
|
+
included_date: string[];
|
|
5
|
+
}
|
|
6
|
+
declare type Locale = 'en' | 'zh-CN' | 'zh-HK';
|
|
7
|
+
interface ScheduleItem {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string | {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
type: 'standard' | 'time-slots' | 'designation';
|
|
13
|
+
start_time: string | null;
|
|
14
|
+
end_time: string | null;
|
|
15
|
+
repeat_type: 'none' | 'daily' | 'weekly';
|
|
16
|
+
repeat_rule: {
|
|
17
|
+
end: {
|
|
18
|
+
type: 'never' | 'date' | 'occurrence';
|
|
19
|
+
end_date: string | null;
|
|
20
|
+
occurrence: number | null;
|
|
21
|
+
};
|
|
22
|
+
frequency: number;
|
|
23
|
+
excluded_date: Array<{
|
|
24
|
+
start: string;
|
|
25
|
+
end: string;
|
|
26
|
+
}>;
|
|
27
|
+
included_date: any[];
|
|
28
|
+
frequency_date: number[];
|
|
29
|
+
} | null;
|
|
30
|
+
designation: Array<{
|
|
31
|
+
start_date: string;
|
|
32
|
+
start_time: string;
|
|
33
|
+
end_date: string;
|
|
34
|
+
end_time: string;
|
|
35
|
+
}> | null;
|
|
36
|
+
is_all: number;
|
|
37
|
+
time_slot: Array<{
|
|
38
|
+
start_time: string;
|
|
39
|
+
end_time: string;
|
|
40
|
+
}>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* 根据scheduleList格式化文案展示
|
|
44
|
+
* @param scheduleList 日程列表
|
|
45
|
+
* @returns 格式化后的文案结果数组,每个日程对应一个结果
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatScheduleText(scheduleList: ScheduleItem[], locale?: Locale): ScheduleTextResult[];
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
// 日程文案格式化接口
|
|
8
|
+
|
|
9
|
+
// 日程项接口定义
|
|
10
|
+
|
|
11
|
+
// 格式化日期时间函数
|
|
12
|
+
function formatDateTime(dateTime) {
|
|
13
|
+
var isAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
14
|
+
var locale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'zh-CN';
|
|
15
|
+
var date = new Date(dateTime);
|
|
16
|
+
var year = date.getFullYear();
|
|
17
|
+
var month = String(date.getMonth() + 1).padStart(2, '0');
|
|
18
|
+
var day = String(date.getDate()).padStart(2, '0');
|
|
19
|
+
var hours = date.getHours();
|
|
20
|
+
var minutes = String(date.getMinutes()).padStart(2, '0');
|
|
21
|
+
if (isAll) {
|
|
22
|
+
// 全天情况下的日期格式
|
|
23
|
+
if (locale === 'en') {
|
|
24
|
+
return "".concat(day, "/").concat(month, "/").concat(year);
|
|
25
|
+
} else {
|
|
26
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 非全天情况下的日期时间格式
|
|
31
|
+
if (locale === 'en') {
|
|
32
|
+
// DD/MM/YYYY h:mm A 格式
|
|
33
|
+
var period = hours >= 12 ? 'PM' : 'AM';
|
|
34
|
+
var displayHours = hours === 0 ? 12 : hours > 12 ? hours - 12 : hours;
|
|
35
|
+
return "".concat(day, "/").concat(month, "/").concat(year, " ").concat(displayHours, ":").concat(minutes, " ").concat(period);
|
|
36
|
+
} else {
|
|
37
|
+
// YYYY-MM-DD HH:mm 格式
|
|
38
|
+
var _displayHours = String(hours).padStart(2, '0');
|
|
39
|
+
return "".concat(year, "-").concat(month, "-").concat(day, " ").concat(_displayHours, ":").concat(minutes);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 多语言文案配置
|
|
44
|
+
var textConfig = {
|
|
45
|
+
'zh-HK': {
|
|
46
|
+
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
|
|
47
|
+
separator: '、',
|
|
48
|
+
timeSeparator: '–',
|
|
49
|
+
rangeSeparator: ' 至 ',
|
|
50
|
+
periodSeparator: ';',
|
|
51
|
+
timeSlotSeparator: ',',
|
|
52
|
+
every: '每',
|
|
53
|
+
day: '天',
|
|
54
|
+
week: '周',
|
|
55
|
+
month: '月',
|
|
56
|
+
year: '年',
|
|
57
|
+
available: '可用',
|
|
58
|
+
unlimited: '无限期',
|
|
59
|
+
weekPrefix: '周'
|
|
60
|
+
},
|
|
61
|
+
'zh-CN': {
|
|
62
|
+
weekdays: ['日', '一', '二', '三', '四', '五', '六'],
|
|
63
|
+
separator: '、',
|
|
64
|
+
timeSeparator: '–',
|
|
65
|
+
rangeSeparator: ' 至 ',
|
|
66
|
+
periodSeparator: ';',
|
|
67
|
+
timeSlotSeparator: ',',
|
|
68
|
+
every: '每',
|
|
69
|
+
day: '天',
|
|
70
|
+
week: '周',
|
|
71
|
+
month: '月',
|
|
72
|
+
year: '年',
|
|
73
|
+
available: '可用',
|
|
74
|
+
unlimited: '无限期',
|
|
75
|
+
weekPrefix: '周'
|
|
76
|
+
},
|
|
77
|
+
'en': {
|
|
78
|
+
weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
|
79
|
+
separator: ', ',
|
|
80
|
+
timeSeparator: '–',
|
|
81
|
+
rangeSeparator: ' - ',
|
|
82
|
+
periodSeparator: '; ',
|
|
83
|
+
timeSlotSeparator: ', ',
|
|
84
|
+
every: 'every ',
|
|
85
|
+
day: 'day',
|
|
86
|
+
week: 'week',
|
|
87
|
+
month: 'month',
|
|
88
|
+
year: 'year',
|
|
89
|
+
available: 'available',
|
|
90
|
+
unlimited: 'unlimited',
|
|
91
|
+
weekPrefix: ''
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// 获取星期几的表示
|
|
96
|
+
function getWeekdayText(dayNumbers, locale) {
|
|
97
|
+
var config = textConfig[locale];
|
|
98
|
+
return dayNumbers.map(function (day) {
|
|
99
|
+
return config.weekdays[day];
|
|
100
|
+
}).join(config.separator);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// 获取重复频率文案
|
|
104
|
+
function getRepeatFrequencyText(repeatType, frequency, locale) {
|
|
105
|
+
var config = textConfig[locale];
|
|
106
|
+
var typeMap = {
|
|
107
|
+
'daily': config.day,
|
|
108
|
+
'weekly': config.week,
|
|
109
|
+
'monthly': config.month,
|
|
110
|
+
'yearly': config.year
|
|
111
|
+
};
|
|
112
|
+
if (locale === 'en') {
|
|
113
|
+
if (frequency === 1) {
|
|
114
|
+
return "".concat(config.every).concat(typeMap[repeatType]);
|
|
115
|
+
}
|
|
116
|
+
return "".concat(config.every).concat(frequency, " ").concat(typeMap[repeatType], "s");
|
|
117
|
+
} else {
|
|
118
|
+
if (frequency === 1) {
|
|
119
|
+
return "".concat(config.every).concat(typeMap[repeatType]);
|
|
120
|
+
}
|
|
121
|
+
return "".concat(config.every).concat(frequency).concat(typeMap[repeatType]);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* 根据scheduleList格式化文案展示
|
|
127
|
+
* @param scheduleList 日程列表
|
|
128
|
+
* @returns 格式化后的文案结果数组,每个日程对应一个结果
|
|
129
|
+
*/
|
|
130
|
+
export function formatScheduleText(scheduleList) {
|
|
131
|
+
var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en';
|
|
132
|
+
var results = [];
|
|
133
|
+
var config = textConfig[locale];
|
|
134
|
+
scheduleList.forEach(function (schedule) {
|
|
135
|
+
var _schedule$repeat_rule, _schedule$repeat_rule2;
|
|
136
|
+
var validityTexts = [];
|
|
137
|
+
var excluded_date = [];
|
|
138
|
+
var included_date = [];
|
|
139
|
+
|
|
140
|
+
// 处理排除日期
|
|
141
|
+
if ((_schedule$repeat_rule = schedule.repeat_rule) !== null && _schedule$repeat_rule !== void 0 && _schedule$repeat_rule.excluded_date) {
|
|
142
|
+
schedule.repeat_rule.excluded_date.forEach(function (excludeItem) {
|
|
143
|
+
var startDate = formatDateTime(excludeItem.start, true, locale);
|
|
144
|
+
var endDate = formatDateTime(excludeItem.end, true, locale);
|
|
145
|
+
if (excludeItem.start === excludeItem.end) {
|
|
146
|
+
// 开始和结束日期相同,只显示开始日期
|
|
147
|
+
excluded_date.push(startDate);
|
|
148
|
+
} else {
|
|
149
|
+
// 开始和结束日期不同,显示范围格式
|
|
150
|
+
excluded_date.push("".concat(startDate).concat(config.rangeSeparator).concat(endDate));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// 处理包含日期
|
|
156
|
+
if ((_schedule$repeat_rule2 = schedule.repeat_rule) !== null && _schedule$repeat_rule2 !== void 0 && _schedule$repeat_rule2.included_date) {
|
|
157
|
+
schedule.repeat_rule.included_date.forEach(function (includeItem) {
|
|
158
|
+
var startDate = formatDateTime(includeItem.start, true, locale);
|
|
159
|
+
var endDate = formatDateTime(includeItem.end, true, locale);
|
|
160
|
+
if (includeItem.start === includeItem.end) {
|
|
161
|
+
// 开始和结束日期相同,只显示开始日期
|
|
162
|
+
included_date.push(startDate);
|
|
163
|
+
} else {
|
|
164
|
+
// 开始和结束日期不同,显示范围格式
|
|
165
|
+
included_date.push("".concat(startDate).concat(config.rangeSeparator).concat(endDate));
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
var isAllDay = schedule.is_all === 1;
|
|
170
|
+
var validityText = '';
|
|
171
|
+
|
|
172
|
+
// 1. 非循环日程处理
|
|
173
|
+
if (schedule.repeat_type === 'none') {
|
|
174
|
+
// 1.1 单个标准日程(单日单段)
|
|
175
|
+
if (schedule.type === 'standard') {
|
|
176
|
+
var startDateTime = formatDateTime(schedule.start_time, isAllDay, locale);
|
|
177
|
+
var endDateTime = formatDateTime(schedule.end_time, isAllDay, locale);
|
|
178
|
+
validityText = "".concat(startDateTime).concat(config.rangeSeparator).concat(endDateTime);
|
|
179
|
+
}
|
|
180
|
+
// 1.2 多时间段日程(单日多段)
|
|
181
|
+
else if (schedule.type === 'time-slots' && schedule.time_slot.length > 0) {
|
|
182
|
+
var baseDate = formatDateTime(schedule.start_time, true, locale);
|
|
183
|
+
if (isAllDay) {
|
|
184
|
+
// 全天情况下,不显示时分
|
|
185
|
+
validityText = "".concat(baseDate);
|
|
186
|
+
} else {
|
|
187
|
+
// 非全天情况下,按新格式显示时间段
|
|
188
|
+
var timeSlots = schedule.time_slot.map(function (slot) {
|
|
189
|
+
return "".concat(slot.start_time).concat(config.timeSeparator).concat(slot.end_time);
|
|
190
|
+
});
|
|
191
|
+
validityText = "".concat(baseDate, " ").concat(timeSlots.join(config.timeSlotSeparator));
|
|
192
|
+
}
|
|
193
|
+
} else if (schedule.type === 'designation' && schedule.designation) {
|
|
194
|
+
var designationTexts = schedule.designation.map(function (item) {
|
|
195
|
+
if (isAllDay || item.start_time === '00:00' && item.end_time === '23:59') {
|
|
196
|
+
// 全天情况:只显示日期
|
|
197
|
+
var startDate = formatDateTime(item.start_date, true, locale);
|
|
198
|
+
var endDate = formatDateTime(item.end_date, true, locale);
|
|
199
|
+
return "".concat(startDate).concat(config.rangeSeparator).concat(endDate);
|
|
200
|
+
} else {
|
|
201
|
+
// 非全天情况:按新格式显示日期时间
|
|
202
|
+
var _startDate = formatDateTime(item.start_date, true, locale);
|
|
203
|
+
return "".concat(_startDate, " ").concat(item.start_time).concat(config.timeSeparator).concat(item.end_time);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
validityTexts.push.apply(validityTexts, _toConsumableArray(designationTexts));
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 2. 循环日程处理
|
|
211
|
+
else if (schedule.repeat_rule) {
|
|
212
|
+
var _schedule$repeat_rule3 = schedule.repeat_rule,
|
|
213
|
+
frequency = _schedule$repeat_rule3.frequency,
|
|
214
|
+
frequency_date = _schedule$repeat_rule3.frequency_date;
|
|
215
|
+
|
|
216
|
+
// 根据 is_all 决定是否显示时分
|
|
217
|
+
var startText = isAllDay ? formatDateTime(schedule.start_time, true, locale) : formatDateTime(schedule.start_time, false, locale);
|
|
218
|
+
|
|
219
|
+
// 结束日期处理
|
|
220
|
+
var endDateText = '';
|
|
221
|
+
if (schedule.repeat_rule.end.type === 'never') {
|
|
222
|
+
endDateText = config.unlimited;
|
|
223
|
+
} else if (schedule.repeat_rule.end.end_date) {
|
|
224
|
+
endDateText = formatDateTime(schedule.repeat_rule.end.end_date, true, locale);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// 2.1 标准类型循环日程
|
|
228
|
+
if (schedule.type === 'standard') {
|
|
229
|
+
// 按天循环
|
|
230
|
+
if (schedule.repeat_type === 'daily') {
|
|
231
|
+
if (isAllDay) {
|
|
232
|
+
var frequencyText = getRepeatFrequencyText('daily', frequency, locale);
|
|
233
|
+
if (locale === 'en') {
|
|
234
|
+
validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, ", ").concat(config.available, " ").concat(frequencyText);
|
|
235
|
+
} else {
|
|
236
|
+
validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(frequencyText).concat(config.available);
|
|
237
|
+
}
|
|
238
|
+
} else {
|
|
239
|
+
var startTime = formatDateTime(schedule.start_time, false, locale);
|
|
240
|
+
var endTime = formatDateTime(schedule.end_time, false, locale);
|
|
241
|
+
var timeRange = locale === 'en' ? "".concat(startTime.split(' ')[1], " ").concat(startTime.split(' ')[2]).concat(config.timeSeparator).concat(endTime.split(' ')[1], " ").concat(endTime.split(' ')[2]) : "".concat(startTime.split(' ')[1]).concat(config.timeSeparator).concat(endTime.split(' ')[1]);
|
|
242
|
+
var _frequencyText = getRepeatFrequencyText('daily', frequency, locale);
|
|
243
|
+
var dateRange = locale === 'en' ? "".concat(startTime.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText) : "".concat(startText.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText);
|
|
244
|
+
if (locale === 'en') {
|
|
245
|
+
validityText = "".concat(dateRange, ", ").concat(config.available, " ").concat(_frequencyText, " ").concat(timeRange);
|
|
246
|
+
} else {
|
|
247
|
+
validityText = "".concat(dateRange, "\uFF0C").concat(_frequencyText, " ").concat(timeRange, " ").concat(config.available);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// 按周循环
|
|
253
|
+
else if (schedule.repeat_type === 'weekly') {
|
|
254
|
+
var weekdaysText = getWeekdayText(frequency_date, locale);
|
|
255
|
+
if (isAllDay) {
|
|
256
|
+
if (locale === 'en') {
|
|
257
|
+
var _frequencyText2 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
|
|
258
|
+
validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, ", ").concat(_frequencyText2, " on ").concat(weekdaysText, " ");
|
|
259
|
+
} else {
|
|
260
|
+
var _frequencyText3 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
|
|
261
|
+
validityText = "".concat(startText).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText3).concat(config.weekPrefix).concat(weekdaysText).concat(config.available);
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
var _startTime = formatDateTime(schedule.start_time, false, locale);
|
|
265
|
+
var _endTime = formatDateTime(schedule.end_time, false, locale);
|
|
266
|
+
var _timeRange = locale === 'en' ? "".concat(_startTime.split(' ')[1], " ").concat(_startTime.split(' ')[2]).concat(config.timeSeparator).concat(_endTime.split(' ')[1], " ").concat(_endTime.split(' ')[2]) : "".concat(_startTime.split(' ')[1]).concat(config.timeSeparator).concat(_endTime.split(' ')[1]);
|
|
267
|
+
var _dateRange = locale === 'en' ? "".concat(_startTime.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText) : "".concat(startText.split(' ')[0]).concat(config.rangeSeparator).concat(endDateText);
|
|
268
|
+
if (locale === 'en') {
|
|
269
|
+
var _frequencyText4 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
|
|
270
|
+
validityText = "".concat(_dateRange, ", ").concat(_frequencyText4, " on ").concat(weekdaysText, " ").concat(_timeRange);
|
|
271
|
+
} else {
|
|
272
|
+
var _frequencyText5 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
|
|
273
|
+
validityText = "".concat(_dateRange, "\uFF0C").concat(_frequencyText5).concat(config.weekPrefix).concat(weekdaysText, " ").concat(_timeRange);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// 2.2 多时间段类型循环日程
|
|
280
|
+
else if (schedule.type === 'time-slots' && schedule.time_slot.length > 0) {
|
|
281
|
+
var _baseDate = formatDateTime(schedule.start_time, true, locale);
|
|
282
|
+
|
|
283
|
+
// 格式化时间段
|
|
284
|
+
var _timeSlots = schedule.time_slot.map(function (slot) {
|
|
285
|
+
return "".concat(slot.start_time).concat(config.timeSeparator).concat(slot.end_time);
|
|
286
|
+
});
|
|
287
|
+
var timeSlotsText = _timeSlots.join(config.timeSlotSeparator);
|
|
288
|
+
|
|
289
|
+
// 按天循环
|
|
290
|
+
if (schedule.repeat_type === 'daily') {
|
|
291
|
+
var _frequencyText6 = getRepeatFrequencyText('daily', frequency, locale);
|
|
292
|
+
if (locale === 'en') {
|
|
293
|
+
validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, ", ").concat(config.available, " ").concat(_frequencyText6, " ").concat(timeSlotsText);
|
|
294
|
+
} else {
|
|
295
|
+
validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText6, " ").concat(timeSlotsText, " ").concat(config.available);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// 按周循环
|
|
300
|
+
else if (schedule.repeat_type === 'weekly') {
|
|
301
|
+
var _weekdaysText = getWeekdayText(frequency_date, locale);
|
|
302
|
+
if (locale === 'en') {
|
|
303
|
+
var _frequencyText7 = frequency === 1 ? 'every week' : "every ".concat(frequency, " weeks");
|
|
304
|
+
validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, ", ").concat(_frequencyText7, " on ").concat(_weekdaysText, " ").concat(timeSlotsText);
|
|
305
|
+
} else {
|
|
306
|
+
var _frequencyText8 = frequency === 1 ? '每周' : "\u6BCF".concat(frequency, "\u5468\u7684");
|
|
307
|
+
validityText = "".concat(_baseDate).concat(config.rangeSeparator).concat(endDateText, "\uFF0C").concat(_frequencyText8).concat(config.weekPrefix).concat(_weekdaysText, " ").concat(timeSlotsText, " ").concat(config.available);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// 4. 指定日期日程(多天多段)
|
|
314
|
+
else if (schedule.type === 'designation' && schedule.designation) {
|
|
315
|
+
var _designationTexts = schedule.designation.map(function (item) {
|
|
316
|
+
if (isAllDay || item.start_time === '00:00' && item.end_time === '23:59') {
|
|
317
|
+
// 全天情况:只显示日期
|
|
318
|
+
var startDate = formatDateTime(item.start_date, true, locale);
|
|
319
|
+
var endDate = formatDateTime(item.end_date, true, locale);
|
|
320
|
+
return "".concat(startDate).concat(config.rangeSeparator).concat(endDate);
|
|
321
|
+
} else {
|
|
322
|
+
// 非全天情况:按新格式显示日期时间
|
|
323
|
+
var _startDate2 = formatDateTime(item.start_date, true, locale);
|
|
324
|
+
return "".concat(_startDate2, " ").concat(item.start_time).concat(config.timeSeparator).concat(item.end_time);
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
// 多天多段情况,每个时间段作为独立元素添加到validityTexts中
|
|
328
|
+
validityTexts.push.apply(validityTexts, _toConsumableArray(_designationTexts));
|
|
329
|
+
}
|
|
330
|
+
if (validityText) {
|
|
331
|
+
validityTexts.push(validityText);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
// 为每个日程创建一个结果
|
|
335
|
+
results.push({
|
|
336
|
+
validityTexts: validityTexts,
|
|
337
|
+
excluded_date: excluded_date,
|
|
338
|
+
included_date: included_date
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
return results;
|
|
342
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MultiDayTimeSelectProps, MultiDayTimeSelectValue } from './types';
|
|
3
|
+
import './MultiDayTimeSelect.less';
|
|
4
|
+
export interface MultiDayTimeSelectRef {
|
|
5
|
+
validate: () => Promise<void>;
|
|
6
|
+
getValue: () => MultiDayTimeSelectValue | null;
|
|
7
|
+
}
|
|
8
|
+
declare const MultiDayTimeSelect: React.ForwardRefExoticComponent<MultiDayTimeSelectProps & React.RefAttributes<MultiDayTimeSelectRef>>;
|
|
9
|
+
export default MultiDayTimeSelect;
|