@pisell/private-materials 6.2.24 → 6.2.26
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 +9 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Cart/index.js +1 -0
- 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/booking/addons/index.js +4 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/actionButtons/index.js +395 -0
- package/es/components/booking/components/actionButtons/index.less +148 -0
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/clearCartModal/index.js +50 -0
- package/es/components/booking/components/clearCartModal/index.less +109 -0
- package/es/components/booking/components/customSelect/index.js +1 -0
- package/es/components/booking/components/customiseItemModal/index.js +294 -0
- package/es/components/booking/components/customiseItemModal/index.less +606 -0
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +15 -3
- package/es/components/booking/components/footer/index.js +106 -39
- package/es/components/booking/components/footer/utils.js +52 -24
- package/es/components/booking/components/tabPane/index.js +86 -5
- package/es/components/booking/components/tabPane/index.less +75 -1
- package/es/components/booking/components/voucher/index.js +19 -8
- package/es/components/booking/components/voucher/index.less +1 -1
- package/es/components/booking/dashboard/index.js +10 -3
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/hooks/useClearCart.js +11 -8
- package/es/components/booking/hooks/useQuotation.js +17 -7
- package/es/components/booking/info/client/index.js +3 -2
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.js +15 -7
- package/es/components/booking/info/index.less +18 -2
- package/es/components/booking/info/main.js +14 -15
- package/es/components/booking/info/service/Lists.js +41 -28
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.js +3 -0
- package/es/components/booking/info/service/editService/index.js +15 -10
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serviceItem/index.js +2 -2
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +4 -0
- package/es/components/booking/info/service2/utils.js +32 -23
- package/es/components/booking/info2/cartClientCard/index.js +343 -0
- package/es/components/booking/info2/cartClientCard/index.less +6 -0
- package/es/components/booking/info2/cartClientCard/locales.js +26 -0
- package/es/components/booking/info2/cartClientCard/types.js +1 -0
- package/es/components/booking/info2/cartClientCard/utils.js +7 -0
- package/es/components/booking/info2/index.js +41 -18
- package/es/components/booking/info2/service/addService/utils.js +6 -3
- package/es/components/booking/info2/service/addTimeModal/index.js +5 -1
- package/es/components/booking/info2/service/editNormalService/index.js +67 -0
- package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
- package/es/components/booking/info2/service/editService/index.js +267 -171
- package/es/components/booking/info2/service/index.js +27 -18
- package/es/components/booking/info2/service/serviceItem/index.js +2 -2
- package/es/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/es/components/booking/info2/utilsByBooking.js +26 -3
- package/es/components/booking/locales.js +99 -3
- package/es/components/booking/materiels/duration/index.js +9 -2
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.js +52 -32
- package/es/components/booking/notes/addNote/index.less +53 -0
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- 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/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/listComponent/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/shoppingCart/components/Cart/Product.js +62 -41
- package/es/components/shoppingCart/components/Cart/index.js +21 -18
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/subTotal/index.less +1 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +309 -351
- package/es/components/ticketBooking/components/addServiceVariant/utils.js +190 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +33 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +213 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +79 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.js +25 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.js +74 -0
- package/es/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/es/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +71 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/es/components/ticketBooking/components/floatButtons/index.js +19 -0
- package/es/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +208 -33
- package/es/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +79 -68
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +244 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +52 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +30 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +29 -0
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +49 -0
- package/es/components/ticketBooking/index.js +21 -3
- package/es/components/ticketBooking/locales.js +6 -3
- package/es/components/ticketBooking/serve.js +11 -11
- package/es/components/ticketBooking/utils/index.d.ts +39 -2
- package/es/components/ticketBooking/utils/index.js +104 -11
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/useToast.js +9 -0
- package/es/hooks/useTranslationOriginal.js +10 -0
- package/es/index.js +5 -1
- package/es/plus/clientCard/index.js +452 -0
- package/es/plus/clientCard/index.less +539 -0
- package/es/plus/clientCard/line/index.js +157 -0
- package/es/plus/clientCard/line/index.less +142 -0
- package/es/plus/clientCard/locales.js +17 -0
- package/es/plus/clientCard/types.js +1 -0
- package/es/plus/clientCard/utils.js +59 -0
- package/es/plus/clientName/index.js +18 -0
- package/es/plus/clientName/index.less +10 -0
- package/es/plus/clientName/type.js +1 -0
- package/es/plus/clientName/utils.js +18 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.js +277 -0
- package/es/plus/clinetSearch/Add/GenderField/index.js +18 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.js +52 -0
- package/es/plus/clinetSearch/Add/PhoneField/serve.js +166 -0
- package/es/plus/clinetSearch/Add/index.js +212 -0
- package/es/plus/clinetSearch/Add/index.less +30 -0
- package/es/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +265 -0
- package/es/plus/clinetSearch/InfiniteScroll/index.js +1 -0
- package/es/plus/clinetSearch/InfiniteScroll/types.js +1 -0
- package/es/plus/clinetSearch/index.js +214 -0
- package/es/plus/clinetSearch/index.less +91 -0
- package/es/plus/clinetSearch/locales.js +101 -0
- package/es/plus/clinetSearch/serve.js +31 -0
- package/es/plus/clinetSearch/types.js +1 -0
- package/es/plus/noteModal/AddTempModal.js +64 -0
- package/es/plus/noteModal/index.js +199 -0
- package/es/plus/noteModal/index.less +168 -0
- package/es/plus/noteModal/locales.js +32 -0
- package/es/plus/noteModal/types.js +1 -0
- package/es/pro/comprehensiveSearch/camera.svg +4 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.js +342 -0
- package/es/pro/comprehensiveSearch/index.less +323 -0
- package/es/pro/comprehensiveSearch/locales.js +17 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.js +231 -0
- package/es/pro/pisellNumberSelector/index.less +193 -0
- package/es/pro/pisellPhoneKeyboard/index.js +211 -0
- package/es/pro/pisellPhoneKeyboard/index.less +157 -0
- package/es/pro/pisellPhoneKeyboard/locales.js +11 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/es/pro/pisellPriceKeyboardModal/index.js +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.js +1 -0
- package/es/pro/pisellPriceRadio/index.js +113 -0
- package/es/pro/pisellPriceRadio/index.less +158 -0
- package/es/pro/skuDetailModal/index.js +352 -0
- package/es/pro/skuDetailModal/index.less +236 -0
- package/es/pro/skuDetailModal/locales.js +47 -0
- package/es/pro/skuDetailModal/types.js +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Cart/index.js +1 -0
- 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/booking/addons/index.js +4 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/actionButtons/index.js +325 -0
- package/lib/components/booking/components/actionButtons/index.less +148 -0
- package/lib/components/booking/components/clearCartModal/index.js +80 -0
- package/lib/components/booking/components/clearCartModal/index.less +109 -0
- package/lib/components/booking/components/customSelect/index.js +1 -0
- package/lib/components/booking/components/customiseItemModal/index.js +279 -0
- package/lib/components/booking/components/customiseItemModal/index.less +606 -0
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +5 -3
- package/lib/components/booking/components/footer/index.js +93 -23
- package/lib/components/booking/components/footer/utils.js +38 -13
- package/lib/components/booking/components/tabPane/index.js +78 -4
- package/lib/components/booking/components/tabPane/index.less +75 -1
- package/lib/components/booking/components/voucher/index.js +18 -7
- package/lib/components/booking/components/voucher/index.less +1 -1
- package/lib/components/booking/dashboard/index.js +7 -2
- package/lib/components/booking/hooks/useClearCart.js +16 -13
- package/lib/components/booking/hooks/useQuotation.js +3 -1
- package/lib/components/booking/info/client/index.js +5 -4
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.js +16 -9
- package/lib/components/booking/info/index.less +18 -2
- package/lib/components/booking/info/main.js +12 -5
- package/lib/components/booking/info/service/Lists.js +41 -25
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.js +31 -0
- package/lib/components/booking/info/service/editService/index.js +7 -1
- package/lib/components/booking/info/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +4 -0
- package/lib/components/booking/info/service2/utils.js +31 -19
- package/lib/components/booking/info2/cartClientCard/index.js +298 -0
- package/lib/components/booking/info2/cartClientCard/index.less +6 -0
- package/lib/components/booking/info2/cartClientCard/locales.js +50 -0
- package/lib/components/booking/info2/cartClientCard/types.js +17 -0
- package/lib/components/booking/info2/cartClientCard/utils.js +37 -0
- package/lib/components/booking/info2/index.js +30 -9
- package/lib/components/booking/info2/service/addService/utils.js +4 -2
- package/lib/components/booking/info2/service/addTimeModal/index.js +4 -0
- package/lib/components/booking/info2/service/editNormalService/index.js +100 -0
- package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
- package/lib/components/booking/info2/service/editService/index.js +139 -74
- package/lib/components/booking/info2/service/index.js +16 -12
- package/lib/components/booking/info2/service/serviceItem/index.js +2 -2
- package/lib/components/booking/info2/utilsByBooking.d.ts +1 -0
- package/lib/components/booking/info2/utilsByBooking.js +23 -4
- package/lib/components/booking/locales.js +93 -3
- package/lib/components/booking/materiels/duration/index.js +7 -2
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/notes/addNote/index.js +41 -23
- package/lib/components/booking/notes/addNote/index.less +53 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- 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/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +42 -21
- package/lib/components/shoppingCart/components/Cart/index.js +18 -15
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/subTotal/index.less +1 -1
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +176 -248
- package/lib/components/ticketBooking/components/addServiceVariant/utils.js +173 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.js +75 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingDashboard/index.less +5 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.js +210 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/index.less +69 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.js +105 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.js +57 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.js +113 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/index.less +61 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/pisellFloatingPanel/index.js +84 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.js +0 -0
- package/lib/components/ticketBooking/components/floatButtons/index.js +52 -0
- package/lib/components/ticketBooking/components/floatButtons/index.less +17 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +228 -80
- package/lib/components/ticketBooking/components/ticketBooking/index.less +28 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +100 -86
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +33 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +27 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +144 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +64 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +65 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobalHandle.js +83 -0
- package/lib/components/ticketBooking/index.js +31 -4
- package/lib/components/ticketBooking/locales.js +6 -3
- package/lib/components/ticketBooking/serve.js +11 -11
- package/lib/components/ticketBooking/utils/index.d.ts +39 -2
- package/lib/components/ticketBooking/utils/index.js +71 -10
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/useToast.js +42 -0
- package/lib/hooks/useTranslationOriginal.js +42 -0
- package/lib/index.js +12 -0
- package/lib/plus/clientCard/index.js +442 -0
- package/lib/plus/clientCard/index.less +539 -0
- package/lib/plus/clientCard/line/index.js +153 -0
- package/lib/plus/clientCard/line/index.less +142 -0
- package/lib/plus/clientCard/locales.js +41 -0
- package/lib/plus/clientCard/types.js +17 -0
- package/lib/plus/clientCard/utils.js +75 -0
- package/lib/plus/clientName/index.js +53 -0
- package/lib/plus/clientName/index.less +10 -0
- package/lib/plus/clientName/type.js +17 -0
- package/lib/plus/clientName/utils.js +43 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.js +256 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.js +52 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.js +78 -0
- package/lib/plus/clinetSearch/Add/PhoneField/serve.js +193 -0
- package/lib/plus/clinetSearch/Add/index.js +243 -0
- package/lib/plus/clinetSearch/Add/index.less +30 -0
- package/lib/plus/clinetSearch/InfiniteScroll/InfiniteScroll.js +235 -0
- package/lib/plus/clinetSearch/InfiniteScroll/index.js +35 -0
- package/lib/plus/clinetSearch/InfiniteScroll/types.js +17 -0
- package/lib/plus/clinetSearch/index.js +205 -0
- package/lib/plus/clinetSearch/index.less +91 -0
- package/lib/plus/clinetSearch/locales.js +125 -0
- package/lib/plus/clinetSearch/serve.js +33 -0
- package/lib/plus/clinetSearch/types.js +17 -0
- package/lib/plus/noteModal/AddTempModal.js +95 -0
- package/lib/plus/noteModal/index.js +199 -0
- package/lib/plus/noteModal/index.less +168 -0
- package/lib/plus/noteModal/locales.js +56 -0
- package/lib/plus/noteModal/types.js +17 -0
- package/lib/pro/comprehensiveSearch/camera.svg +4 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.js +259 -0
- package/lib/pro/comprehensiveSearch/index.less +323 -0
- package/lib/pro/comprehensiveSearch/locales.js +41 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.js +260 -0
- package/lib/pro/pisellNumberSelector/index.less +193 -0
- package/lib/pro/pisellPhoneKeyboard/index.js +220 -0
- package/lib/pro/pisellPhoneKeyboard/index.less +157 -0
- package/lib/pro/pisellPhoneKeyboard/locales.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +158 -0
- package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.less +13 -0
- package/lib/pro/pisellPriceKeyboardModal/index.js +35 -0
- package/lib/pro/pisellPriceKeyboardModal/types.js +17 -0
- package/lib/pro/pisellPriceRadio/index.js +130 -0
- package/lib/pro/pisellPriceRadio/index.less +158 -0
- package/lib/pro/skuDetailModal/index.js +311 -0
- package/lib/pro/skuDetailModal/index.less +236 -0
- package/lib/pro/skuDetailModal/locales.js +71 -0
- package/lib/pro/skuDetailModal/types.js +17 -0
- package/lowcode/client-card/fragments/cardStyle.ts +63 -0
- package/lowcode/client-card/fragments/nameStyle.ts +34 -0
- package/lowcode/client-card/fragments/pisellAvatar.ts +87 -0
- package/lowcode/client-card/fragments/tagConfig.ts +88 -0
- package/lowcode/client-card/meta.ts +337 -0
- package/lowcode/comprehensive-search/meta.ts +261 -0
- package/package.json +26 -26
- package/es/components/Sales/Cart/index.d.ts +0 -53
- package/es/components/booking/addons/index.d.ts +0 -17
- package/es/components/booking/components/tabPane/index.d.ts +0 -4
- package/es/components/booking/components/voucher/index.d.ts +0 -3
- package/es/components/booking/dashboard/index.d.ts +0 -20
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/es/components/booking/locales.d.ts +0 -828
- package/es/components/booking/notes/addNote/index.d.ts +0 -3
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/ticketBooking/locales.d.ts +0 -174
- package/es/components/ticketBooking/serve.d.ts +0 -287
- package/es/index.d.ts +0 -47
- package/lib/components/Sales/Cart/index.d.ts +0 -53
- package/lib/components/booking/addons/index.d.ts +0 -17
- package/lib/components/booking/components/tabPane/index.d.ts +0 -4
- package/lib/components/booking/components/voucher/index.d.ts +0 -3
- package/lib/components/booking/dashboard/index.d.ts +0 -20
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -3
- package/lib/components/booking/locales.d.ts +0 -828
- package/lib/components/booking/notes/addNote/index.d.ts +0 -3
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/ticketBooking/locales.d.ts +0 -174
- package/lib/components/ticketBooking/serve.d.ts +0 -287
- package/lib/index.d.ts +0 -47
@@ -0,0 +1,49 @@
|
|
1
|
+
import { locales } from "@pisell/utils";
|
2
|
+
import { getHandleSetClient } from "../../../booking/info2/cartClientCard/utils";
|
3
|
+
import { getHandleSetService } from "../../components/addServiceVariant/utils";
|
4
|
+
import useToast from "../../../../hooks/useToast";
|
5
|
+
var useScanGlobalHandle = function useScanGlobalHandle() {
|
6
|
+
var Toast = useToast();
|
7
|
+
var walletHandle = function walletHandle(data) {
|
8
|
+
var handleSetClient = getHandleSetClient();
|
9
|
+
if (!data.data) {
|
10
|
+
Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
|
11
|
+
return;
|
12
|
+
}
|
13
|
+
if (handleSetClient && data.data) {
|
14
|
+
handleSetClient(data.data);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
var walletPassHandle = function walletPassHandle(data) {
|
18
|
+
var handleSetClient = getHandleSetClient();
|
19
|
+
if (!data.data) {
|
20
|
+
Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
|
21
|
+
return;
|
22
|
+
}
|
23
|
+
if (handleSetClient && data.data) {
|
24
|
+
handleSetClient(data.data);
|
25
|
+
}
|
26
|
+
};
|
27
|
+
var productHandle = function productHandle(data) {
|
28
|
+
var _data$data, _data$data2;
|
29
|
+
var handleSetService = getHandleSetService();
|
30
|
+
if (!((_data$data = data.data) !== null && _data$data !== void 0 && _data$data.list)) {
|
31
|
+
Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
if (handleSetService && data !== null && data !== void 0 && (_data$data2 = data.data) !== null && _data$data2 !== void 0 && _data$data2.list) {
|
35
|
+
handleSetService(data.data.list, data.scanCode);
|
36
|
+
}
|
37
|
+
};
|
38
|
+
var handleScan = function handleScan(data) {
|
39
|
+
if (data.searchType === 'wallet') {
|
40
|
+
walletHandle(data);
|
41
|
+
} else if (data.searchType === 'walletPass') {
|
42
|
+
walletPassHandle(data);
|
43
|
+
} else if (data.searchType === 'product' || data.searchType === 'local_product') {
|
44
|
+
productHandle(data);
|
45
|
+
}
|
46
|
+
};
|
47
|
+
return handleScan;
|
48
|
+
};
|
49
|
+
export default useScanGlobalHandle;
|
@@ -130,15 +130,22 @@ var initialState = {
|
|
130
130
|
bookingConfigParams: {
|
131
131
|
item_type: 'appointment_booking'
|
132
132
|
},
|
133
|
-
productExtensionType: ['appointment_ticket', 'session_ticket',
|
133
|
+
productExtensionType: ['appointment_ticket', 'session_ticket', 'product_appointment', 'service_product', 'session_product', 'normal', 'product_appointment'],
|
134
|
+
// 是否是平行资源预约的booking
|
135
|
+
isParallelResourcesBooking: null
|
134
136
|
};
|
135
137
|
export default (function (props) {
|
136
|
-
var _context$appHelper$
|
138
|
+
var _context$appHelper, _context$appHelper$ut2;
|
137
139
|
var productExtensionType = props.productExtensionType,
|
138
140
|
bookingConfigParams = props.bookingConfigParams;
|
139
141
|
var storeRef = useRef(null);
|
140
142
|
var context = useEngineContext();
|
141
|
-
|
143
|
+
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
144
|
+
pisellos = _context$appHelper$ut.pisellos,
|
145
|
+
pisellosAllModule = _context$appHelper$ut.pisellosAllModule;
|
146
|
+
var _ref = pisellosAllModule || {},
|
147
|
+
BookingTicket = _ref.BookingTicket;
|
148
|
+
locales.init(localeTexts, ((_context$appHelper$ut2 = context.appHelper.utils) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.storage) === null || _context$appHelper$ut2 === void 0 ? void 0 : _context$appHelper$ut2.get('umi_locale')) || 'en');
|
142
149
|
useLayoutEffect(function () {
|
143
150
|
request.setRequest(context.appHelper.utils.request);
|
144
151
|
}, []);
|
@@ -149,6 +156,17 @@ export default (function (props) {
|
|
149
156
|
}));
|
150
157
|
storeRef.current = store;
|
151
158
|
}, []);
|
159
|
+
useMemo(function () {
|
160
|
+
if (BookingTicket) {
|
161
|
+
pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket('bookingTicket'), {
|
162
|
+
initialState: {},
|
163
|
+
otherParams: {
|
164
|
+
cacheId: 'test-cache',
|
165
|
+
platform: 'shop'
|
166
|
+
}
|
167
|
+
});
|
168
|
+
}
|
169
|
+
}, []);
|
152
170
|
return /*#__PURE__*/React.createElement("div", {
|
153
171
|
className: "pisell-ticket-booking-wrapper"
|
154
172
|
}, /*#__PURE__*/React.createElement(MenuBar, null), /*#__PURE__*/React.createElement(Provider, {
|
@@ -66,7 +66,8 @@ export default {
|
|
66
66
|
'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
|
67
67
|
return "".concat(val > 1 ? ' minutes' : ' minute');
|
68
68
|
},
|
69
|
-
|
69
|
+
'pisell2.ticket-booking.reload': 'Reload',
|
70
|
+
'pisell2.text.scan-global-failed': 'No matching results'
|
70
71
|
},
|
71
72
|
'zh-CN': {
|
72
73
|
'pisell2.ticket-booking.info': '信息',
|
@@ -135,7 +136,8 @@ export default {
|
|
135
136
|
'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
|
136
137
|
return '分钟';
|
137
138
|
},
|
138
|
-
|
139
|
+
'pisell2.ticket-booking.reload': '重新加载',
|
140
|
+
'pisell2.text.scan-global-failed': '无搜索结果'
|
139
141
|
},
|
140
142
|
'zh-HK': {
|
141
143
|
'pisell2.ticket-booking.info': '資訊',
|
@@ -204,6 +206,7 @@ export default {
|
|
204
206
|
'pisell2.product.card.minute': function pisell2ProductCardMinute(val) {
|
205
207
|
return '分鐘';
|
206
208
|
},
|
207
|
-
|
209
|
+
'pisell2.ticket-booking.reload': '重新載入',
|
210
|
+
'pisell2.text.scan-global-failed': '無搜索結果'
|
208
211
|
}
|
209
212
|
};
|
@@ -314,7 +314,7 @@ export var getAddonsByOrderId = /*#__PURE__*/function () {
|
|
314
314
|
while (1) switch (_context10.prev = _context10.next) {
|
315
315
|
case 0:
|
316
316
|
_context10.next = 2;
|
317
|
-
return request.getRequest().get("/order/appointment/addons/".concat(bookingId), params);
|
317
|
+
return request.getRequest().get("".concat(prefix, "/order/appointment/addons/").concat(bookingId), params);
|
318
318
|
case 2:
|
319
319
|
_yield$request$getReq9 = _context10.sent;
|
320
320
|
data = _yield$request$getReq9.data;
|
@@ -346,7 +346,7 @@ export var saveAddonsByOrderId = /*#__PURE__*/function () {
|
|
346
346
|
while (1) switch (_context11.prev = _context11.next) {
|
347
347
|
case 0:
|
348
348
|
_context11.next = 2;
|
349
|
-
return request.getRequest().put("/order/appointment/addons/".concat(bookingId), params);
|
349
|
+
return request.getRequest().put("".concat(prefix, "/order/appointment/addons/").concat(bookingId), params);
|
350
350
|
case 2:
|
351
351
|
_yield$request$getReq10 = _context11.sent;
|
352
352
|
data = _yield$request$getReq10.data;
|
@@ -378,7 +378,7 @@ export var getBookingDetail = /*#__PURE__*/function () {
|
|
378
378
|
while (1) switch (_context12.prev = _context12.next) {
|
379
379
|
case 0:
|
380
380
|
_context12.next = 2;
|
381
|
-
return request.getRequest().get("/order/appointment/".concat(bookingId), params);
|
381
|
+
return request.getRequest().get("".concat(prefix, "/order/appointment/").concat(bookingId), params);
|
382
382
|
case 2:
|
383
383
|
_yield$request$getReq11 = _context12.sent;
|
384
384
|
data = _yield$request$getReq11.data;
|
@@ -410,7 +410,7 @@ export var editBookingStatus = /*#__PURE__*/function () {
|
|
410
410
|
while (1) switch (_context13.prev = _context13.next) {
|
411
411
|
case 0:
|
412
412
|
_context13.next = 2;
|
413
|
-
return request.getRequest().put("/schedule/booking/appointment-status/".concat(bookingId), params);
|
413
|
+
return request.getRequest().put("".concat(prefix, "/schedule/booking/appointment-status/").concat(bookingId), params);
|
414
414
|
case 2:
|
415
415
|
_yield$request$getReq12 = _context13.sent;
|
416
416
|
data = _yield$request$getReq12.data;
|
@@ -442,7 +442,7 @@ export var editBooking = /*#__PURE__*/function () {
|
|
442
442
|
while (1) switch (_context14.prev = _context14.next) {
|
443
443
|
case 0:
|
444
444
|
_context14.next = 2;
|
445
|
-
return request.getRequest().put("/order/appointment/".concat(bookingId), params);
|
445
|
+
return request.getRequest().put("".concat(prefix, "/order/appointment/v1.1/").concat(bookingId), params);
|
446
446
|
case 2:
|
447
447
|
_yield$request$getReq13 = _context14.sent;
|
448
448
|
data = _yield$request$getReq13.data;
|
@@ -536,7 +536,7 @@ export var editNoteByOrder = /*#__PURE__*/function () {
|
|
536
536
|
while (1) switch (_context17.prev = _context17.next) {
|
537
537
|
case 0:
|
538
538
|
_context17.next = 2;
|
539
|
-
return request.getRequest().put("/schedule/event-note/".concat(bookingId), params);
|
539
|
+
return request.getRequest().put("".concat(prefix, "/schedule/event-note/").concat(bookingId), params);
|
540
540
|
case 2:
|
541
541
|
_yield$request$getReq16 = _context17.sent;
|
542
542
|
data = _yield$request$getReq16.data;
|
@@ -568,7 +568,7 @@ export var removeNoteByOrder = /*#__PURE__*/function () {
|
|
568
568
|
while (1) switch (_context18.prev = _context18.next) {
|
569
569
|
case 0:
|
570
570
|
_context18.next = 2;
|
571
|
-
return request.getRequest().remove("/schedule/event-note/".concat(bookingId), params);
|
571
|
+
return request.getRequest().remove("".concat(prefix, "/schedule/event-note/").concat(bookingId), params);
|
572
572
|
case 2:
|
573
573
|
_yield$request$getReq17 = _context18.sent;
|
574
574
|
data = _yield$request$getReq17.data;
|
@@ -662,7 +662,7 @@ export var editOrderNote = /*#__PURE__*/function () {
|
|
662
662
|
while (1) switch (_context21.prev = _context21.next) {
|
663
663
|
case 0:
|
664
664
|
_context21.next = 2;
|
665
|
-
return request.getRequest().put("/order/order/".concat(bookingId, "/note"), params);
|
665
|
+
return request.getRequest().put("".concat(prefix, "/order/order/").concat(bookingId, "/note"), params);
|
666
666
|
case 2:
|
667
667
|
_yield$request$getReq20 = _context21.sent;
|
668
668
|
data = _yield$request$getReq20.data;
|
@@ -694,7 +694,7 @@ export var getRefundInfo = /*#__PURE__*/function () {
|
|
694
694
|
while (1) switch (_context22.prev = _context22.next) {
|
695
695
|
case 0:
|
696
696
|
_context22.next = 2;
|
697
|
-
return request.getRequest().get("/order/refund-info/".concat(bookingId), params);
|
697
|
+
return request.getRequest().get("".concat(prefix, "/order/refund-info/").concat(bookingId), params);
|
698
698
|
case 2:
|
699
699
|
_yield$request$getReq21 = _context22.sent;
|
700
700
|
data = _yield$request$getReq21.data;
|
@@ -757,7 +757,7 @@ export var getEventBookingDetail = /*#__PURE__*/function () {
|
|
757
757
|
while (1) switch (_context24.prev = _context24.next) {
|
758
758
|
case 0:
|
759
759
|
_context24.next = 2;
|
760
|
-
return request.getRequest().get("/eventbookingv2/order/".concat(bookingId), params);
|
760
|
+
return request.getRequest().get("".concat(prefix, "/eventbookingv2/order/").concat(bookingId), params);
|
761
761
|
case 2:
|
762
762
|
_yield$request$getReq23 = _context24.sent;
|
763
763
|
data = _yield$request$getReq23.data;
|
@@ -789,7 +789,7 @@ export var editEventBooking = /*#__PURE__*/function () {
|
|
789
789
|
while (1) switch (_context25.prev = _context25.next) {
|
790
790
|
case 0:
|
791
791
|
_context25.next = 2;
|
792
|
-
return request.getRequest().put("/eventbookingv2/order/".concat(bookingId), params);
|
792
|
+
return request.getRequest().put("".concat(prefix, "/eventbookingv2/order/").concat(bookingId), params);
|
793
793
|
case 2:
|
794
794
|
_yield$request$getReq24 = _context25.sent;
|
795
795
|
data = _yield$request$getReq24.data;
|
@@ -5,11 +5,13 @@ export declare const getDefaultStartParam: () => string | string[];
|
|
5
5
|
export declare const formatBookingList: (bookingList: any[]) => any[];
|
6
6
|
export declare const getNextTimeSlice: (sliceMinutes: number) => Dayjs;
|
7
7
|
export declare const getDisabledEdit: ({ shop_discount, bookings, payment_status }: any) => boolean;
|
8
|
+
export declare const formatOptions: (detail: any) => any;
|
9
|
+
export declare const formatHolder: (detail: any) => any;
|
8
10
|
export declare const restoreProductOtherData: (data: any) => {
|
9
11
|
product_id: any;
|
10
|
-
option:
|
12
|
+
option: any;
|
11
13
|
bundle: any;
|
12
|
-
product_variant_id:
|
14
|
+
product_variant_id: any;
|
13
15
|
quantity: number;
|
14
16
|
} | undefined;
|
15
17
|
export declare const addService: (list: any[], addItem: any, state: any) => {
|
@@ -21,3 +23,38 @@ export declare const getCartProductOverlay: (state: any) => any;
|
|
21
23
|
export declare const getIsOverlayProduct: (item: any, state: any) => any;
|
22
24
|
export declare const getIsShowNumber: (item: any, state: any) => any;
|
23
25
|
export declare const genServiceKey: (item: any) => string;
|
26
|
+
export declare const getIsParallelResourcesBooking: (record: any) => boolean;
|
27
|
+
declare type ScanData = {
|
28
|
+
type: string;
|
29
|
+
status: 'success' | 'failed';
|
30
|
+
scanType: 'nfc' | 'scanner';
|
31
|
+
scanCode: string;
|
32
|
+
result: {
|
33
|
+
searchType: 'customer' | 'wallet' | 'walletPass' | 'product' | 'local_product';
|
34
|
+
response: {
|
35
|
+
status: boolean;
|
36
|
+
code: number;
|
37
|
+
message: string;
|
38
|
+
data: any;
|
39
|
+
};
|
40
|
+
};
|
41
|
+
};
|
42
|
+
export declare const formatScanCustomer: (data: ScanData) => {
|
43
|
+
searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
|
44
|
+
data: any;
|
45
|
+
scanCode: string;
|
46
|
+
} | null;
|
47
|
+
export declare const formatScanGlobal: (data: ScanData) => {
|
48
|
+
searchType: "wallet";
|
49
|
+
data: any;
|
50
|
+
scanCode: string;
|
51
|
+
} | {
|
52
|
+
searchType: "walletPass";
|
53
|
+
data: any;
|
54
|
+
scanCode: string;
|
55
|
+
} | {
|
56
|
+
searchType: "product" | "local_product";
|
57
|
+
data: any;
|
58
|
+
scanCode: string;
|
59
|
+
} | null | undefined;
|
60
|
+
export {};
|
@@ -1,5 +1,11 @@
|
|
1
1
|
var _excluded = ["detail"];
|
2
2
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
5
|
+
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); }
|
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
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
3
9
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
4
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
5
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
@@ -9,6 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
9
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
10
16
|
import dayjs from 'dayjs';
|
11
17
|
import { isNormalProductByDurationSchedule } from "../../booking/info/service2/utils";
|
18
|
+
import { isArr } from '@pisell/utils';
|
12
19
|
|
13
20
|
/** dayjs对象格式化为字符串时间 */
|
14
21
|
export var formatDateToStr = function formatDateToStr(date) {
|
@@ -58,10 +65,11 @@ export var getDisabledEdit = function getDisabledEdit(_ref) {
|
|
58
65
|
return true;
|
59
66
|
}
|
60
67
|
|
61
|
-
//有整单折扣 不可编辑
|
62
|
-
if (shop_discount && Number(shop_discount)) {
|
63
|
-
|
64
|
-
}
|
68
|
+
// //有整单折扣 不可编辑
|
69
|
+
// if (shop_discount && Number(shop_discount)) {
|
70
|
+
// return true;
|
71
|
+
// }
|
72
|
+
|
65
73
|
var list = ['unfulfilled', 'paid', 'partially_paid', 'unpaid', 'payment_processing'];
|
66
74
|
// (支付状态 = 已支付 || 部分付款 || 未付款 || 支付处理中) && 预约状态 !== 已取消
|
67
75
|
if (bookings.appointment_status === 'cancelled' || !list.includes(payment_status)) {
|
@@ -69,6 +77,18 @@ export var getDisabledEdit = function getDisabledEdit(_ref) {
|
|
69
77
|
}
|
70
78
|
return false;
|
71
79
|
};
|
80
|
+
export var formatOptions = function formatOptions(detail) {
|
81
|
+
var _detail$product_sku;
|
82
|
+
return ((detail === null || detail === void 0 || (_detail$product_sku = detail.product_sku) === null || _detail$product_sku === void 0 ? void 0 : _detail$product_sku.option) || []).map(function (item) {
|
83
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
84
|
+
price: item.price || item.add_price
|
85
|
+
});
|
86
|
+
});
|
87
|
+
};
|
88
|
+
export var formatHolder = function formatHolder(detail) {
|
89
|
+
var _detail$holder;
|
90
|
+
return detail === null || detail === void 0 || (_detail$holder = detail.holder) === null || _detail$holder === void 0 || (_detail$holder = _detail$holder.form_record) === null || _detail$holder === void 0 ? void 0 : _detail$holder[0];
|
91
|
+
};
|
72
92
|
|
73
93
|
// 还原商品other数据
|
74
94
|
export var restoreProductOtherData = function restoreProductOtherData(data) {
|
@@ -79,13 +99,14 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
79
99
|
}
|
80
100
|
return {
|
81
101
|
product_id: detail.product_id,
|
82
|
-
option:
|
102
|
+
option: formatOptions(detail),
|
83
103
|
bundle: (detail.product_bundle || []).map(function (bundleItem) {
|
84
104
|
return _objectSpread(_objectSpread({}, bundleItem), {}, {
|
85
105
|
title: bundleItem.bundle_title,
|
86
106
|
group_id: bundleItem.bundle_group_id,
|
87
107
|
id: bundleItem.bundle_id,
|
88
108
|
product_id: bundleItem.bundle_product_id,
|
109
|
+
_bundle_product_id: bundleItem.bundle_product_id,
|
89
110
|
bundle_variant_id: bundleItem.bundle_variant_id,
|
90
111
|
quantity: bundleItem.num,
|
91
112
|
option: bundleItem.option.map(function (optionItem) {
|
@@ -98,7 +119,7 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
98
119
|
price: (bundleItem === null || bundleItem === void 0 ? void 0 : bundleItem.bundle_sum_type) === 'markdown' ? "-".concat(Number(bundleItem.bundle_sum_price)) : Number(bundleItem.bundle_sum_price)
|
99
120
|
});
|
100
121
|
}),
|
101
|
-
product_variant_id: 0,
|
122
|
+
product_variant_id: detail.product_variant_id || 0,
|
102
123
|
quantity: Number(detail.product_quantity)
|
103
124
|
};
|
104
125
|
};
|
@@ -117,7 +138,7 @@ export var addService = function addService(list, addItem, state) {
|
|
117
138
|
var count;
|
118
139
|
// 预约商品 并且配置商品卡片不叠加 直接添加
|
119
140
|
if (!isNormalProductByDurationSchedule(addItem) && !getIsOverlayProduct(addItem, state)) {
|
120
|
-
value.
|
141
|
+
value.unshift(addItem);
|
121
142
|
count = addItem._extend.quantity;
|
122
143
|
} else {
|
123
144
|
// 非预约商品判断是否相同,相同合并
|
@@ -146,8 +167,18 @@ export var addService = function addService(list, addItem, state) {
|
|
146
167
|
}
|
147
168
|
return item;
|
148
169
|
});
|
170
|
+
var _idx = value.findIndex(function (item) {
|
171
|
+
return item.id === addItem.id;
|
172
|
+
});
|
173
|
+
if (_idx !== -1) {
|
174
|
+
var _value$splice = value.splice(_idx, 1),
|
175
|
+
_value$splice2 = _slicedToArray(_value$splice, 1),
|
176
|
+
removed = _value$splice2[0];
|
177
|
+
// 再添加到数组开头
|
178
|
+
value.unshift(removed);
|
179
|
+
}
|
149
180
|
if (isNotSame) {
|
150
|
-
value.
|
181
|
+
value.unshift(addItem);
|
151
182
|
count = addItem._extend.quantity;
|
152
183
|
}
|
153
184
|
}
|
@@ -166,10 +197,10 @@ export var addServiceScroll = function addServiceScroll(rowKey, cacheItem) {
|
|
166
197
|
});
|
167
198
|
} else {
|
168
199
|
setTimeout(function () {
|
169
|
-
var bookingWrap = document.querySelectorAll(".
|
200
|
+
var bookingWrap = document.querySelectorAll(".pisell-lowcode__booking-service-wrap");
|
170
201
|
if (bookingWrap.length) {
|
171
202
|
bookingWrap[0].scrollTo({
|
172
|
-
top:
|
203
|
+
top: 0,
|
173
204
|
behavior: 'smooth'
|
174
205
|
});
|
175
206
|
}
|
@@ -211,10 +242,72 @@ export var genServiceKey = function genServiceKey(item) {
|
|
211
242
|
var start_time = (_item$_extend4 = item._extend) === null || _item$_extend4 === void 0 ? void 0 : _item$_extend4.start_time;
|
212
243
|
var total = (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.total;
|
213
244
|
var resourceKey = '';
|
214
|
-
Object.values(item._extend.resource).forEach(function (resources) {
|
245
|
+
Object.values(item._extend.resource || []).forEach(function (resources) {
|
215
246
|
resources.forEach(function (resource) {
|
216
247
|
resourceKey += "".concat(resource.relation_id);
|
217
248
|
});
|
218
249
|
});
|
219
250
|
return "".concat(product_id, "-").concat(durationKey, "-").concat(resourceKey, "-").concat(start_time, "-").concat(total);
|
251
|
+
};
|
252
|
+
|
253
|
+
// 是否是平行资源预约
|
254
|
+
export var getIsParallelResourcesBooking = function getIsParallelResourcesBooking(record) {
|
255
|
+
return (record === null || record === void 0 ? void 0 : record.relation_id) === 0 && (record === null || record === void 0 ? void 0 : record.relation_type) === "";
|
256
|
+
};
|
257
|
+
export var formatScanCustomer = function formatScanCustomer(data) {
|
258
|
+
var result = data.result,
|
259
|
+
scanCode = data.scanCode;
|
260
|
+
var response = result.response,
|
261
|
+
searchType = result.searchType;
|
262
|
+
var customerData = response.data,
|
263
|
+
code = response.code;
|
264
|
+
if (code !== 200) {
|
265
|
+
return null;
|
266
|
+
}
|
267
|
+
if (isArr(customerData)) {
|
268
|
+
var _customerData$;
|
269
|
+
return {
|
270
|
+
searchType: searchType,
|
271
|
+
data: (_customerData$ = customerData[0]) === null || _customerData$ === void 0 ? void 0 : _customerData$.customer,
|
272
|
+
scanCode: scanCode
|
273
|
+
};
|
274
|
+
}
|
275
|
+
return {
|
276
|
+
searchType: searchType,
|
277
|
+
data: customerData === null || customerData === void 0 ? void 0 : customerData.customer,
|
278
|
+
scanCode: scanCode
|
279
|
+
};
|
280
|
+
};
|
281
|
+
export var formatScanGlobal = function formatScanGlobal(data) {
|
282
|
+
var result = data.result,
|
283
|
+
scanCode = data.scanCode;
|
284
|
+
var response = result.response,
|
285
|
+
searchType = result.searchType;
|
286
|
+
var resultData = response.data,
|
287
|
+
code = response.code;
|
288
|
+
if (code !== 200 && searchType !== 'local_product') {
|
289
|
+
return null;
|
290
|
+
}
|
291
|
+
if (searchType === 'wallet') {
|
292
|
+
return {
|
293
|
+
searchType: searchType,
|
294
|
+
data: resultData.customer,
|
295
|
+
scanCode: scanCode
|
296
|
+
};
|
297
|
+
}
|
298
|
+
if (searchType === 'walletPass') {
|
299
|
+
var _resultData$;
|
300
|
+
return {
|
301
|
+
searchType: searchType,
|
302
|
+
data: resultData === null || resultData === void 0 || (_resultData$ = resultData[0]) === null || _resultData$ === void 0 ? void 0 : _resultData$.customer,
|
303
|
+
scanCode: scanCode
|
304
|
+
};
|
305
|
+
}
|
306
|
+
if (searchType === 'product' || searchType === 'local_product') {
|
307
|
+
return {
|
308
|
+
searchType: searchType,
|
309
|
+
data: resultData,
|
310
|
+
scanCode: scanCode
|
311
|
+
};
|
312
|
+
}
|
220
313
|
};
|
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
|
|
8
8
|
var _utils$getComponents;
|
9
9
|
var _ref = appHelper || {},
|
10
10
|
utils = _ref.utils;
|
11
|
-
return (utils === null || utils === void 0
|
11
|
+
return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
|
12
12
|
}, [components]);
|
13
13
|
return Cpt;
|
14
14
|
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import useEngineContext from "../hooks/useEngineContext";
|
2
|
+
var useToast = function useToast() {
|
3
|
+
var _context$appHelper;
|
4
|
+
var context = useEngineContext();
|
5
|
+
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
6
|
+
Toast = _context$appHelper$ut.Toast;
|
7
|
+
return Toast;
|
8
|
+
};
|
9
|
+
export default useToast;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import useEngineContext from "./useEngineContext";
|
2
|
+
export default function useTranslationOriginal() {
|
3
|
+
var context = useEngineContext();
|
4
|
+
var appHelper = context.appHelper;
|
5
|
+
var _ref = appHelper || {},
|
6
|
+
utils = _ref.utils;
|
7
|
+
var _ref2 = utils || {},
|
8
|
+
translationOriginal = _ref2.translationOriginal;
|
9
|
+
return translationOriginal;
|
10
|
+
}
|
package/es/index.js
CHANGED
@@ -48,4 +48,8 @@ export { default as AppointmentDeposit } from "./components/appointmentBooking/d
|
|
48
48
|
export { default as TicketBooking } from "./components/ticketBooking";
|
49
49
|
export { default as SubTotal } from "./components/subTotal";
|
50
50
|
export { default as EditBookingModal } from "./components/booking/editBookingModal";
|
51
|
-
export { default as StepController } from "./components/stepController";
|
51
|
+
export { default as StepController } from "./components/stepController";
|
52
|
+
export { default as ClientCard } from "./plus/clientCard";
|
53
|
+
export { default as ClientSearch } from "./plus/clinetSearch";
|
54
|
+
export { default as ComprehensiveSearch } from "./pro/comprehensiveSearch";
|
55
|
+
export { default as NoteModal } from "./plus/noteModal";
|