@pisell/private-materials 3.3.74 → 3.3.76
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 +1 -1
- package/build/lowcode/preview.js +8 -8
- 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 +2 -4
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Date/index.js +14 -24
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.js +14 -8
- package/es/components/appointmentBooking/components/Services/index.js +36 -38
- package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/appointmentBooking/locales.js +3 -3
- package/es/components/booking/addons/index.js +3 -12
- package/es/components/booking/addons/model.js +0 -5
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
- package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +1 -2
- package/es/components/booking/components/footer/index.js +3 -9
- package/es/components/booking/components/footer/utils.js +35 -73
- package/es/components/booking/components/voucher/index.js +66 -110
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +1 -16
- package/es/components/booking/info/client/index.js +3 -12
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.js +1 -1
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.js +1 -3
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +2 -6
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +4 -9
- package/es/components/booking/info2/serve.d.ts +1 -1
- package/es/components/booking/info2/serve.js +8 -12
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.js +3 -5
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/index.js +2 -5
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info2/utils.d.ts +1 -1
- package/es/components/booking/info2/utils.js +2 -3
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/es/components/booking/info2/utilsByBooking.js +3 -5
- package/es/components/booking/locales.d.ts +0 -3
- package/es/components/booking/locales.js +3 -6
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/utils.d.ts +0 -1
- package/es/components/booking/utils.js +0 -4
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +2 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +2 -2
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +6 -9
- package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/es/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/locales.d.ts +146 -164
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/ticketBooking/utils/index.d.ts +1 -5
- package/es/components/ticketBooking/utils/index.js +6 -58
- package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Date/index.js +5 -12
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.js +3 -2
- package/lib/components/appointmentBooking/components/Services/index.js +18 -19
- package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/appointmentBooking/locales.js +3 -3
- package/lib/components/booking/addons/index.js +2 -12
- package/lib/components/booking/addons/model.js +0 -3
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
- package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +1 -2
- package/lib/components/booking/components/footer/index.js +5 -10
- package/lib/components/booking/components/footer/utils.js +11 -47
- package/lib/components/booking/components/voucher/index.js +67 -111
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -19
- package/lib/components/booking/info/client/index.js +3 -10
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.js +1 -1
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.js +0 -2
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +1 -3
- package/lib/components/booking/info/utils.js +3 -1
- package/lib/components/booking/info2/index.js +9 -9
- package/lib/components/booking/info2/serve.d.ts +1 -1
- package/lib/components/booking/info2/serve.js +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.js +2 -4
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/index.js +2 -5
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info2/utils.d.ts +1 -1
- package/lib/components/booking/info2/utils.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
- package/lib/components/booking/info2/utilsByBooking.js +2 -3
- package/lib/components/booking/locales.d.ts +0 -3
- package/lib/components/booking/locales.js +3 -6
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/utils.d.ts +0 -1
- package/lib/components/booking/utils.js +0 -6
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +2 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +2 -2
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/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/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -8
- package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
- package/lib/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/locales.d.ts +146 -164
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/ticketBooking/utils/index.d.ts +1 -5
- package/lib/components/ticketBooking/utils/index.js +5 -48
- package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/package.json +4 -4
- package/es/components/booking/components/voucher/utils.d.ts +0 -4
- package/es/components/booking/components/voucher/utils.js +0 -15
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/lib/components/booking/components/voucher/utils.d.ts +0 -4
- package/lib/components/booking/components/voucher/utils.js +0 -43
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
|
@@ -12,12 +12,8 @@ export declare const restoreProductOtherData: (data: any) => {
|
|
|
12
12
|
product_variant_id: number;
|
|
13
13
|
quantity: number;
|
|
14
14
|
} | undefined;
|
|
15
|
-
export declare const addService: (list: any[], addItem: any
|
|
15
|
+
export declare const addService: (list: any[], addItem: any) => {
|
|
16
16
|
list: any[];
|
|
17
17
|
quantity: any;
|
|
18
18
|
};
|
|
19
19
|
export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
|
|
20
|
-
export declare const getCartProductOverlay: (state: any) => any;
|
|
21
|
-
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
|
22
|
-
export declare const getIsShowNumber: (item: any, state: any) => any;
|
|
23
|
-
export declare const genServiceKey: (item: any) => string;
|
|
@@ -33,12 +33,8 @@ __export(utils_exports, {
|
|
|
33
33
|
addServiceScroll: () => addServiceScroll,
|
|
34
34
|
formatBookingList: () => formatBookingList,
|
|
35
35
|
formatDateToStr: () => formatDateToStr,
|
|
36
|
-
genServiceKey: () => genServiceKey,
|
|
37
|
-
getCartProductOverlay: () => getCartProductOverlay,
|
|
38
36
|
getDefaultStartParam: () => getDefaultStartParam,
|
|
39
37
|
getDisabledEdit: () => getDisabledEdit,
|
|
40
|
-
getIsOverlayProduct: () => getIsOverlayProduct,
|
|
41
|
-
getIsShowNumber: () => getIsShowNumber,
|
|
42
38
|
getNextTimeSlice: () => getNextTimeSlice,
|
|
43
39
|
restoreProductOtherData: () => restoreProductOtherData
|
|
44
40
|
});
|
|
@@ -128,29 +124,23 @@ var restoreProductOtherData = (data) => {
|
|
|
128
124
|
};
|
|
129
125
|
};
|
|
130
126
|
var isSameProduct = (a, b) => {
|
|
131
|
-
var _a, _b, _c, _d
|
|
132
|
-
|
|
133
|
-
return ((_b = (_a = a._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.rowKey) === ((_d = (_c = b._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.rowKey);
|
|
134
|
-
}
|
|
135
|
-
return ((_f = (_e = a._extend) == null ? void 0 : _e.other) == null ? void 0 : _f.rowKey) === ((_h = (_g = b._extend) == null ? void 0 : _g.other) == null ? void 0 : _h.rowKey) && a._serviceKey === b._serviceKey;
|
|
127
|
+
var _a, _b, _c, _d;
|
|
128
|
+
return ((_b = (_a = a._extend) == null ? void 0 : _a.other) == null ? void 0 : _b.rowKey) === ((_d = (_c = b._extend) == null ? void 0 : _c.other) == null ? void 0 : _d.rowKey);
|
|
136
129
|
};
|
|
137
|
-
var addService = (list, addItem
|
|
130
|
+
var addService = (list, addItem) => {
|
|
138
131
|
let value = list;
|
|
139
132
|
let count;
|
|
140
|
-
if (!(0, import_utils.isNormalProductByDurationSchedule)(addItem)
|
|
133
|
+
if (!(0, import_utils.isNormalProductByDurationSchedule)(addItem)) {
|
|
141
134
|
value.push(addItem);
|
|
142
135
|
count = addItem._extend.quantity;
|
|
143
136
|
} else {
|
|
144
137
|
let isNotSame = true;
|
|
145
|
-
let isSetCount = false;
|
|
146
138
|
value = list.map((item) => {
|
|
147
139
|
var _a, _b, _c;
|
|
148
|
-
|
|
149
|
-
if (isSameProduct(item, addItem) && !isSetCount && !isGoodPassDiscountProduct) {
|
|
140
|
+
if (isSameProduct(item, addItem)) {
|
|
150
141
|
isNotSame = false;
|
|
151
142
|
const quantity = (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1);
|
|
152
143
|
count = quantity;
|
|
153
|
-
isSetCount = true;
|
|
154
144
|
return {
|
|
155
145
|
...item,
|
|
156
146
|
_extend: {
|
|
@@ -193,47 +183,14 @@ var addServiceScroll = (rowKey, cacheItem) => {
|
|
|
193
183
|
}
|
|
194
184
|
});
|
|
195
185
|
};
|
|
196
|
-
var getCartProductOverlay = (state) => {
|
|
197
|
-
var _a, _b, _c;
|
|
198
|
-
return ((_c = (_b = (_a = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a.config) == null ? void 0 : _b.basic) == null ? void 0 : _c.cart_product_overlay) || { type: "product_all" };
|
|
199
|
-
};
|
|
200
|
-
var getIsOverlayProduct = (item, state) => {
|
|
201
|
-
const { type, product_ids } = getCartProductOverlay(state);
|
|
202
|
-
if (type === "product_all") {
|
|
203
|
-
return true;
|
|
204
|
-
}
|
|
205
|
-
return product_ids.includes(item.product_id || item.id);
|
|
206
|
-
};
|
|
207
|
-
var getIsShowNumber = (item, state) => {
|
|
208
|
-
const isBookingTicket2 = state.isBookingTicket2;
|
|
209
|
-
return (0, import_utils.isNormalProductByDurationSchedule)(item) || isBookingTicket2 && getIsOverlayProduct(item, state);
|
|
210
|
-
};
|
|
211
|
-
var genServiceKey = (item) => {
|
|
212
|
-
var _a, _b, _c;
|
|
213
|
-
const product_id = item.product_id;
|
|
214
|
-
const durationKey = (_a = item._extend) == null ? void 0 : _a.duration;
|
|
215
|
-
const start_time = (_b = item._extend) == null ? void 0 : _b.start_time;
|
|
216
|
-
const total = (_c = item._extend) == null ? void 0 : _c.total;
|
|
217
|
-
let resourceKey = "";
|
|
218
|
-
Object.values(item._extend.resource).forEach((resources) => {
|
|
219
|
-
resources.forEach((resource) => {
|
|
220
|
-
resourceKey += `${resource.relation_id}`;
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
return `${product_id}-${durationKey}-${resourceKey}-${start_time}-${total}`;
|
|
224
|
-
};
|
|
225
186
|
// Annotate the CommonJS export names for ESM import in node:
|
|
226
187
|
0 && (module.exports = {
|
|
227
188
|
addService,
|
|
228
189
|
addServiceScroll,
|
|
229
190
|
formatBookingList,
|
|
230
191
|
formatDateToStr,
|
|
231
|
-
genServiceKey,
|
|
232
|
-
getCartProductOverlay,
|
|
233
192
|
getDefaultStartParam,
|
|
234
193
|
getDisabledEdit,
|
|
235
|
-
getIsOverlayProduct,
|
|
236
|
-
getIsShowNumber,
|
|
237
194
|
getNextTimeSlice,
|
|
238
195
|
restoreProductOtherData
|
|
239
196
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.76",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"react-infinite-scroll-component": "^6.1.0",
|
|
60
60
|
"rc-virtual-list": "^3.11.3",
|
|
61
61
|
"decimal.js": "^10.4.3",
|
|
62
|
+
"@pisell/materials": "3.3.28",
|
|
62
63
|
"@pisell/utils": "1.0.42",
|
|
63
|
-
"@pisell/
|
|
64
|
-
"@pisell/icon": "0.0.11"
|
|
65
|
-
"@pisell/date-picker": "3.0.2"
|
|
64
|
+
"@pisell/date-picker": "3.0.2",
|
|
65
|
+
"@pisell/icon": "0.0.11"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0",
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export var getServiceAddons = function getServiceAddons(list) {
|
|
2
|
-
var serviceList = [];
|
|
3
|
-
var addonsList = [];
|
|
4
|
-
list.forEach(function (item) {
|
|
5
|
-
if (item.isAddons) {
|
|
6
|
-
addonsList.push(item);
|
|
7
|
-
} else {
|
|
8
|
-
serviceList.push(item);
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
return {
|
|
12
|
-
serviceList: serviceList,
|
|
13
|
-
addonsList: addonsList
|
|
14
|
-
};
|
|
15
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { formatAmount } from '@pisell/utils';
|
|
2
|
-
import { getServiceTime } from "./formatTime";
|
|
3
|
-
var formatProductMessage = function formatProductMessage(product, utils) {
|
|
4
|
-
var product_option_string = product.product_option_string,
|
|
5
|
-
options = product.options,
|
|
6
|
-
bundle = product.bundle,
|
|
7
|
-
currency_symbol = product.currency_symbol,
|
|
8
|
-
start_date = product.start_date,
|
|
9
|
-
end_date = product.end_date,
|
|
10
|
-
holder_id = product.holder_id,
|
|
11
|
-
holders = product.holders,
|
|
12
|
-
multiResources = product.multiResources;
|
|
13
|
-
var str = '';
|
|
14
|
-
if (start_date && end_date) {
|
|
15
|
-
str += "".concat(getServiceTime(product, start_date, utils), " \n");
|
|
16
|
-
}
|
|
17
|
-
if (holder_id && Array.isArray(holders)) {
|
|
18
|
-
var targetHolder = holders.find(function (holder) {
|
|
19
|
-
return holder.id === holder_id;
|
|
20
|
-
});
|
|
21
|
-
if (targetHolder !== null && targetHolder !== void 0 && targetHolder.label) {
|
|
22
|
-
str += "".concat(targetHolder.label, " \n");
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (Array.isArray(multiResources) && multiResources.length > 0) {
|
|
26
|
-
multiResources.forEach(function (resource) {
|
|
27
|
-
var ids = resource.id,
|
|
28
|
-
lists = resource.lists;
|
|
29
|
-
if (Array.isArray(ids)) {
|
|
30
|
-
ids.forEach(function (id) {
|
|
31
|
-
var targetRes = lists.find(function (l) {
|
|
32
|
-
return l.id === id;
|
|
33
|
-
});
|
|
34
|
-
if (targetRes !== null && targetRes !== void 0 && targetRes.label) str += "".concat(targetRes === null || targetRes === void 0 ? void 0 : targetRes.label, " \n");
|
|
35
|
-
});
|
|
36
|
-
} else {
|
|
37
|
-
var targetRes = lists.find(function (l) {
|
|
38
|
-
return l.id === ids;
|
|
39
|
-
});
|
|
40
|
-
if (targetRes !== null && targetRes !== void 0 && targetRes.label) str += "".concat(targetRes === null || targetRes === void 0 ? void 0 : targetRes.label, " \n");
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// 组合规格 单规格
|
|
46
|
-
if (product_option_string) str += "".concat(product_option_string, "\n");
|
|
47
|
-
if (Array.isArray(options) && options.length) {
|
|
48
|
-
options.forEach(function (opt) {
|
|
49
|
-
str += "".concat(opt.name, " ").concat(formatAmount(opt === null || opt === void 0 ? void 0 : opt.price, 2, currency_symbol), " x ").concat(opt.num, "\n");
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 套餐
|
|
54
|
-
if (Array.isArray(bundle) && bundle.length) {
|
|
55
|
-
bundle.forEach(function (item) {
|
|
56
|
-
str += "".concat(item.title, " \n");
|
|
57
|
-
str += "".concat(formatAmount(item.price, 2, currency_symbol), " x ").concat(item.num);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
return str;
|
|
61
|
-
};
|
|
62
|
-
export default formatProductMessage;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import 'dayjs/locale/zh-cn';
|
|
2
|
-
import 'dayjs/locale/en';
|
|
3
|
-
import 'dayjs/locale/zh-tw';
|
|
4
|
-
/**
|
|
5
|
-
* @title: 是否英文
|
|
6
|
-
* @description:
|
|
7
|
-
* @param {any} item
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-12-28 22:49
|
|
11
|
-
*/
|
|
12
|
-
export declare const isEn: (item: any) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 跨日预约时间
|
|
15
|
-
* @description:
|
|
16
|
-
* @param {any} item
|
|
17
|
-
* @return {*}
|
|
18
|
-
* @Author: WangHan
|
|
19
|
-
* @Date: 2024-12-28 22:50
|
|
20
|
-
*/
|
|
21
|
-
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
-
/**
|
|
23
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
-
* @description:
|
|
25
|
-
* @param {any} item
|
|
26
|
-
* @param {any} currentDate
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: zhiwei.Wang
|
|
29
|
-
* @Date: 2024-04-26 14:04
|
|
30
|
-
*/
|
|
31
|
-
export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import { locales } from '@pisell/utils';
|
|
3
|
-
import 'dayjs/locale/zh-cn';
|
|
4
|
-
import 'dayjs/locale/en';
|
|
5
|
-
import 'dayjs/locale/zh-tw';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title: 是否英文
|
|
9
|
-
* @description:
|
|
10
|
-
* @param {any} item
|
|
11
|
-
* @return {*}
|
|
12
|
-
* @Author: WangHan
|
|
13
|
-
* @Date: 2024-12-28 22:49
|
|
14
|
-
*/
|
|
15
|
-
export var isEn = function isEn(item) {
|
|
16
|
-
var locale = (item === null || item === void 0 ? void 0 : item.locale) || 'en-US';
|
|
17
|
-
var _isEn = locale === 'en-US' || locale === 'en';
|
|
18
|
-
var localeTypes = {
|
|
19
|
-
'en-US': 'en',
|
|
20
|
-
'zh-CN': 'zh-cn',
|
|
21
|
-
'zh-HK': 'zh-tw'
|
|
22
|
-
};
|
|
23
|
-
dayjs.locale(localeTypes[locale]);
|
|
24
|
-
return _isEn;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @title: 跨日预约时间
|
|
29
|
-
* @description:
|
|
30
|
-
* @param {any} item
|
|
31
|
-
* @return {*}
|
|
32
|
-
* @Author: WangHan
|
|
33
|
-
* @Date: 2024-12-28 22:50
|
|
34
|
-
*/
|
|
35
|
-
export var formatMultiDayDate = function formatMultiDayDate(item) {
|
|
36
|
-
var _isEn = isEn(item);
|
|
37
|
-
|
|
38
|
-
// 跨日
|
|
39
|
-
var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
|
|
40
|
-
var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
|
|
41
|
-
var _format = _isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
42
|
-
var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
|
|
43
|
-
return date;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
48
|
-
* @description:
|
|
49
|
-
* @param {any} item
|
|
50
|
-
* @param {any} currentDate
|
|
51
|
-
* @return {*}
|
|
52
|
-
* @Author: zhiwei.Wang
|
|
53
|
-
* @Date: 2024-04-26 14:04
|
|
54
|
-
*/
|
|
55
|
-
export var getServiceTime = function getServiceTime(item, currentDate, utils) {
|
|
56
|
-
var _utils$storage, _item$format;
|
|
57
|
-
if (!dayjs(currentDate).isValid()) return '';
|
|
58
|
-
var locale = (item === null || item === void 0 ? void 0 : item.locale) || (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
|
|
59
|
-
var isEn = locale === 'en-US' || locale === 'en';
|
|
60
|
-
var localeTypes = {
|
|
61
|
-
'en-US': 'en',
|
|
62
|
-
'zh-CN': 'zh-cn',
|
|
63
|
-
'zh-HK': 'zh-tw'
|
|
64
|
-
};
|
|
65
|
-
dayjs.locale(localeTypes[locale]);
|
|
66
|
-
var startDate = dayjs(item === null || item === void 0 ? void 0 : item.start_date);
|
|
67
|
-
var endDate = dayjs(item === null || item === void 0 ? void 0 : item.end_date);
|
|
68
|
-
var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
|
|
69
|
-
|
|
70
|
-
// 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
|
|
71
|
-
if (item !== null && item !== void 0 && item.duration_type) {
|
|
72
|
-
var sameDay = startDate.isSame(endDate, 'day');
|
|
73
|
-
var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
|
|
74
|
-
var timeFormat = 'HH:mm';
|
|
75
|
-
var startTime = (item === null || item === void 0 ? void 0 : item.start_time) || startDate.format(timeFormat);
|
|
76
|
-
var endTime = (item === null || item === void 0 ? void 0 : item.end_time) || endDate.format(timeFormat);
|
|
77
|
-
var dateTime = '';
|
|
78
|
-
if (sameDay) {
|
|
79
|
-
if (isEn) {
|
|
80
|
-
// 英文:开始时间 - 结束时间 年月日
|
|
81
|
-
dateTime = "".concat(startTime, " ~ ").concat(endTime, " ").concat(startDate.format(dateFormat));
|
|
82
|
-
} else {
|
|
83
|
-
// 中文:年月日 开始时间 - 结束时间
|
|
84
|
-
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endTime);
|
|
85
|
-
}
|
|
86
|
-
} else {
|
|
87
|
-
// 不同天
|
|
88
|
-
if (isEn) {
|
|
89
|
-
// 英文:开始时间 年月日 - 结束时间 年月日
|
|
90
|
-
dateTime = "".concat(startTime, " ").concat(startDate.format(dateFormat), " ~ ").concat(endTime, " ").concat(endDate.format(dateFormat));
|
|
91
|
-
} else {
|
|
92
|
-
// 中文:年月日 开始时间 - 年月日 结束时间
|
|
93
|
-
dateTime = "".concat(startDate.format(dateFormat), " ").concat(startTime, " ~ ").concat(endDate.format(dateFormat), " ").concat(endTime);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
|
|
97
|
-
var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
|
|
98
|
-
var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
|
|
99
|
-
var durationText = '';
|
|
100
|
-
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
101
|
-
// 转为小时+分钟
|
|
102
|
-
var hours = Math.floor(_duration / 60);
|
|
103
|
-
var minutes = _duration % 60;
|
|
104
|
-
durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
|
|
105
|
-
} else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
|
|
106
|
-
durationText = locales.getText('pisell2.product.card.day')(_duration);
|
|
107
|
-
} else {
|
|
108
|
-
durationText = "".concat(_duration);
|
|
109
|
-
}
|
|
110
|
-
return "".concat(dateTime, " (").concat(durationText, ")");
|
|
111
|
-
}
|
|
112
|
-
var _format = isEn ? 'ddd, DD/MM/YYYY' : 'YYYY-MM-DD,ddd';
|
|
113
|
-
|
|
114
|
-
// 是否自定义格式
|
|
115
|
-
if (item !== null && item !== void 0 && item.hasOwnProperty('format') && (item === null || item === void 0 || (_item$format = item.format) === null || _item$format === void 0 ? void 0 : _item$format.length) > 0) {
|
|
116
|
-
var _item$format2, _item$format3;
|
|
117
|
-
_format = isEn ? item === null || item === void 0 || (_item$format2 = item.format) === null || _item$format2 === void 0 ? void 0 : _item$format2[0] : item === null || item === void 0 || (_item$format3 = item.format) === null || _item$format3 === void 0 ? void 0 : _item$format3[1];
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// 是否显示时间
|
|
121
|
-
if (item !== null && item !== void 0 && item.show_time) {
|
|
122
|
-
startDate = dayjs(item !== null && item !== void 0 && item.start_time ? "".concat(item === null || item === void 0 ? void 0 : item.start_date, " ").concat(item === null || item === void 0 ? void 0 : item.start_time) : startDate.format('YYYY-MM-DD HH:mm'));
|
|
123
|
-
endDate = dayjs(item !== null && item !== void 0 && item.end_time ? "".concat(item === null || item === void 0 ? void 0 : item.end_date, " ").concat(item === null || item === void 0 ? void 0 : item.end_time) : endDate.format('YYYY-MM-DD HH:mm'));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// 显示时长分钟
|
|
127
|
-
if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
|
|
128
|
-
diffInDays = endDate.diff(startDate, 'minute');
|
|
129
|
-
}
|
|
130
|
-
var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
|
|
131
|
-
|
|
132
|
-
// 自定义文案
|
|
133
|
-
var text = locales.getText('pisell2.product.card.day')(diffInDays);
|
|
134
|
-
if (item !== null && item !== void 0 && item.custom_day_count) {
|
|
135
|
-
text = locales.getText('pisell2.product.card.day.event')(diffInDays);
|
|
136
|
-
}
|
|
137
|
-
var textTypes = {
|
|
138
|
-
'minutes': locales.getText('pisell2.product.card.minute')(diffInDays),
|
|
139
|
-
'event': locales.getText('pisell2.product.card.day.event')(diffInDays)
|
|
140
|
-
};
|
|
141
|
-
text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[item === null || item === void 0 ? void 0 : item.duration_type]) || text;
|
|
142
|
-
var duration = "".concat(diffInDays).concat(text);
|
|
143
|
-
return "".concat(date, " (").concat(duration, ")");
|
|
144
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/booking/components/voucher/utils.ts
|
|
20
|
-
var utils_exports = {};
|
|
21
|
-
__export(utils_exports, {
|
|
22
|
-
getServiceAddons: () => getServiceAddons
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(utils_exports);
|
|
25
|
-
var getServiceAddons = (list) => {
|
|
26
|
-
const serviceList = [];
|
|
27
|
-
const addonsList = [];
|
|
28
|
-
list.forEach((item) => {
|
|
29
|
-
if (item.isAddons) {
|
|
30
|
-
addonsList.push(item);
|
|
31
|
-
} else {
|
|
32
|
-
serviceList.push(item);
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
serviceList,
|
|
37
|
-
addonsList
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 && (module.exports = {
|
|
42
|
-
getServiceAddons
|
|
43
|
-
});
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/components/ticketBooking/utils/formatProductMessage.ts
|
|
20
|
-
var formatProductMessage_exports = {};
|
|
21
|
-
__export(formatProductMessage_exports, {
|
|
22
|
-
default: () => formatProductMessage_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(formatProductMessage_exports);
|
|
25
|
-
var import_utils = require("@pisell/utils");
|
|
26
|
-
var import_formatTime = require("./formatTime");
|
|
27
|
-
var formatProductMessage = (product, utils) => {
|
|
28
|
-
const {
|
|
29
|
-
product_option_string,
|
|
30
|
-
options,
|
|
31
|
-
bundle,
|
|
32
|
-
currency_symbol,
|
|
33
|
-
start_date,
|
|
34
|
-
end_date,
|
|
35
|
-
holder_id,
|
|
36
|
-
holders,
|
|
37
|
-
multiResources
|
|
38
|
-
} = product;
|
|
39
|
-
let str = "";
|
|
40
|
-
if (start_date && end_date) {
|
|
41
|
-
str += `${(0, import_formatTime.getServiceTime)(product, start_date, utils)}
|
|
42
|
-
`;
|
|
43
|
-
}
|
|
44
|
-
if (holder_id && Array.isArray(holders)) {
|
|
45
|
-
const targetHolder = holders.find((holder) => holder.id === holder_id);
|
|
46
|
-
if (targetHolder == null ? void 0 : targetHolder.label) {
|
|
47
|
-
str += `${targetHolder.label}
|
|
48
|
-
`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (Array.isArray(multiResources) && multiResources.length > 0) {
|
|
52
|
-
multiResources.forEach((resource) => {
|
|
53
|
-
const { id: ids, lists } = resource;
|
|
54
|
-
if (Array.isArray(ids)) {
|
|
55
|
-
ids.forEach((id) => {
|
|
56
|
-
const targetRes = lists.find((l) => l.id === id);
|
|
57
|
-
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
58
|
-
`;
|
|
59
|
-
});
|
|
60
|
-
} else {
|
|
61
|
-
const targetRes = lists.find((l) => l.id === ids);
|
|
62
|
-
if (targetRes == null ? void 0 : targetRes.label) str += `${targetRes == null ? void 0 : targetRes.label}
|
|
63
|
-
`;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
if (product_option_string) str += `${product_option_string}
|
|
68
|
-
`;
|
|
69
|
-
if (Array.isArray(options) && options.length) {
|
|
70
|
-
options.forEach((opt) => {
|
|
71
|
-
str += `${opt.name} ${(0, import_utils.formatAmount)(opt == null ? void 0 : opt.price, 2, currency_symbol)} x ${opt.num}
|
|
72
|
-
`;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
if (Array.isArray(bundle) && bundle.length) {
|
|
76
|
-
bundle.forEach((item) => {
|
|
77
|
-
str += `${item.title}
|
|
78
|
-
`;
|
|
79
|
-
str += `${(0, import_utils.formatAmount)(item.price, 2, currency_symbol)} x ${item.num}`;
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
return str;
|
|
83
|
-
};
|
|
84
|
-
var formatProductMessage_default = formatProductMessage;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import 'dayjs/locale/zh-cn';
|
|
2
|
-
import 'dayjs/locale/en';
|
|
3
|
-
import 'dayjs/locale/zh-tw';
|
|
4
|
-
/**
|
|
5
|
-
* @title: 是否英文
|
|
6
|
-
* @description:
|
|
7
|
-
* @param {any} item
|
|
8
|
-
* @return {*}
|
|
9
|
-
* @Author: WangHan
|
|
10
|
-
* @Date: 2024-12-28 22:49
|
|
11
|
-
*/
|
|
12
|
-
export declare const isEn: (item: any) => boolean;
|
|
13
|
-
/**
|
|
14
|
-
* @title: 跨日预约时间
|
|
15
|
-
* @description:
|
|
16
|
-
* @param {any} item
|
|
17
|
-
* @return {*}
|
|
18
|
-
* @Author: WangHan
|
|
19
|
-
* @Date: 2024-12-28 22:50
|
|
20
|
-
*/
|
|
21
|
-
export declare const formatMultiDayDate: (item: any) => string;
|
|
22
|
-
/**
|
|
23
|
-
* @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
|
|
24
|
-
* @description:
|
|
25
|
-
* @param {any} item
|
|
26
|
-
* @param {any} currentDate
|
|
27
|
-
* @return {*}
|
|
28
|
-
* @Author: zhiwei.Wang
|
|
29
|
-
* @Date: 2024-04-26 14:04
|
|
30
|
-
*/
|
|
31
|
-
export declare const getServiceTime: (item: any, currentDate: any, utils: any) => string;
|