@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,142 @@
|
|
1
|
+
// Line类型特有样式 - 行内布局
|
2
|
+
.pisell-client-card--line {
|
3
|
+
padding: 8px 12px;
|
4
|
+
border: 1px solid #e5e7eb;
|
5
|
+
border-radius: 6px;
|
6
|
+
background: #ffffff;
|
7
|
+
|
8
|
+
// 内容容器 - 水平布局
|
9
|
+
.pisell-client-card__content {
|
10
|
+
display: flex;
|
11
|
+
align-items: center;
|
12
|
+
gap: 12px;
|
13
|
+
width: 100%;
|
14
|
+
min-width: 0; // 允许flex子元素收缩
|
15
|
+
}
|
16
|
+
|
17
|
+
// 插槽容器
|
18
|
+
.pisell-client-card__slot-left {
|
19
|
+
display: flex;
|
20
|
+
align-items: center;
|
21
|
+
flex-shrink: 0;
|
22
|
+
}
|
23
|
+
|
24
|
+
.pisell-client-card__slot-right {
|
25
|
+
display: flex;
|
26
|
+
align-items: center;
|
27
|
+
flex-shrink: 0;
|
28
|
+
}
|
29
|
+
|
30
|
+
// 头像样式
|
31
|
+
.pisell-client-card__avatar-wrapper {
|
32
|
+
position: relative;
|
33
|
+
flex-shrink: 0; // 头像不收缩
|
34
|
+
}
|
35
|
+
|
36
|
+
.pisell-client-card__avatar {
|
37
|
+
border: 1px solid #e5e7eb;
|
38
|
+
|
39
|
+
.ant-avatar-string {
|
40
|
+
font-weight: 600;
|
41
|
+
font-size: 12px;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
|
45
|
+
// 状态指示器
|
46
|
+
.pisell-client-card__status-indicator {
|
47
|
+
position: absolute;
|
48
|
+
top: -2px;
|
49
|
+
right: -2px;
|
50
|
+
width: 8px;
|
51
|
+
height: 8px;
|
52
|
+
border-radius: 50%;
|
53
|
+
border: 2px solid #ffffff;
|
54
|
+
background-color: #17B26A;
|
55
|
+
}
|
56
|
+
|
57
|
+
// 客户名称样式
|
58
|
+
.pisell-client-card__name--line {
|
59
|
+
font-size: 14px;
|
60
|
+
font-weight: 500;
|
61
|
+
color: #1f2937;
|
62
|
+
white-space: nowrap;
|
63
|
+
overflow: hidden;
|
64
|
+
text-overflow: ellipsis;
|
65
|
+
flex-shrink: 1;
|
66
|
+
min-width: 0;
|
67
|
+
}
|
68
|
+
|
69
|
+
// 联系方式样式
|
70
|
+
.pisell-client-card__contact--line {
|
71
|
+
font-size: 13px;
|
72
|
+
color: #6b7280;
|
73
|
+
white-space: nowrap;
|
74
|
+
overflow: hidden;
|
75
|
+
text-overflow: ellipsis;
|
76
|
+
flex-shrink: 1;
|
77
|
+
min-width: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
// 标签容器样式
|
81
|
+
.pisell-client-card__tags--line {
|
82
|
+
display: flex;
|
83
|
+
gap: 6px;
|
84
|
+
flex-shrink: 0; // 标签不收缩
|
85
|
+
align-items: center;
|
86
|
+
|
87
|
+
.pisell-client-card__tag {
|
88
|
+
white-space: nowrap;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
// 垂直布局样式
|
93
|
+
&.pisell-client-card--vertical {
|
94
|
+
.pisell-client-card__content {
|
95
|
+
flex-direction: column;
|
96
|
+
align-items: center;
|
97
|
+
text-align: center;
|
98
|
+
gap: 16px;
|
99
|
+
}
|
100
|
+
|
101
|
+
.pisell-client-card__name--line {
|
102
|
+
text-align: center;
|
103
|
+
}
|
104
|
+
|
105
|
+
.pisell-client-card__contact--line {
|
106
|
+
text-align: center;
|
107
|
+
}
|
108
|
+
|
109
|
+
.pisell-client-card__tags--line {
|
110
|
+
justify-content: center;
|
111
|
+
flex-wrap: wrap;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
|
115
|
+
// Line类型空状态样式
|
116
|
+
&.pisell-client-card--empty {
|
117
|
+
cursor: pointer;
|
118
|
+
justify-content: center;
|
119
|
+
align-items: center;
|
120
|
+
border-style: dashed;
|
121
|
+
border-color: #d9d9d9;
|
122
|
+
background: #fafafa;
|
123
|
+
|
124
|
+
&:hover {
|
125
|
+
border-color: #1890ff;
|
126
|
+
background: #f0f8ff;
|
127
|
+
}
|
128
|
+
|
129
|
+
.pisell-client-card__empty-title {
|
130
|
+
font-size: 14px;
|
131
|
+
font-weight: 600;
|
132
|
+
color: #374151;
|
133
|
+
margin: 0;
|
134
|
+
}
|
135
|
+
|
136
|
+
.pisell-client-card__empty-subtitle {
|
137
|
+
font-size: 12px;
|
138
|
+
color: #6b7280;
|
139
|
+
margin: 0;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
@@ -0,0 +1,41 @@
|
|
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/plus/clientCard/locales.ts
|
20
|
+
var locales_exports = {};
|
21
|
+
__export(locales_exports, {
|
22
|
+
default: () => locales_default
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(locales_exports);
|
25
|
+
var locales_default = {
|
26
|
+
en: {
|
27
|
+
"pisell2.text.add-client": "Add client",
|
28
|
+
"pisell2.text.change-client": "Change Client",
|
29
|
+
"pisell2.text.remove-client": " Remove Client"
|
30
|
+
},
|
31
|
+
"zh-CN": {
|
32
|
+
"pisell2.text.add-client": "添加客户",
|
33
|
+
"pisell2.text.change-client": "更换客户",
|
34
|
+
"pisell2.text.remove-client": "移除客戶"
|
35
|
+
},
|
36
|
+
"zh-HK": {
|
37
|
+
"pisell2.text.add-client": "新增客戶",
|
38
|
+
"pisell2.text.change-client": "更換客戶",
|
39
|
+
"pisell2.text.remove-client": "移除客户"
|
40
|
+
}
|
41
|
+
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
+
}
|
11
|
+
return to;
|
12
|
+
};
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
14
|
+
|
15
|
+
// src/plus/clientCard/types.ts
|
16
|
+
var types_exports = {};
|
17
|
+
module.exports = __toCommonJS(types_exports);
|
@@ -0,0 +1,75 @@
|
|
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/plus/clientCard/utils.ts
|
20
|
+
var utils_exports = {};
|
21
|
+
__export(utils_exports, {
|
22
|
+
getAvatarText: () => getAvatarText,
|
23
|
+
getFieldValue: () => getFieldValue,
|
24
|
+
isWalkIn: () => isWalkIn
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(utils_exports);
|
27
|
+
var import_lodash = require("lodash");
|
28
|
+
function getFieldValue(data, fieldKey, mapping) {
|
29
|
+
if (!fieldKey || typeof fieldKey !== "string") {
|
30
|
+
console.warn("getFieldValue: fieldKey must be a non-empty string");
|
31
|
+
return void 0;
|
32
|
+
}
|
33
|
+
if (!data || typeof data !== "object") {
|
34
|
+
console.warn("getFieldValue: data must be a valid object");
|
35
|
+
return void 0;
|
36
|
+
}
|
37
|
+
const fieldMapping = mapping || {};
|
38
|
+
const mappingRule = fieldMapping[fieldKey];
|
39
|
+
try {
|
40
|
+
if (typeof mappingRule === "function") {
|
41
|
+
return mappingRule(data);
|
42
|
+
}
|
43
|
+
if (typeof mappingRule === "string") {
|
44
|
+
return (0, import_lodash.get)(data, mappingRule);
|
45
|
+
}
|
46
|
+
return (0, import_lodash.get)(data, fieldKey);
|
47
|
+
} catch (error) {
|
48
|
+
console.error(
|
49
|
+
`getFieldValue: Error processing field '${fieldKey}':`,
|
50
|
+
error
|
51
|
+
);
|
52
|
+
return void 0;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
var getAvatarText = (name) => {
|
56
|
+
if (!name) return "";
|
57
|
+
const words = name.trim().split(/\s+/);
|
58
|
+
const initials = words.slice(0, 2).map((word) => word.charAt(0).toUpperCase()).join("");
|
59
|
+
return initials;
|
60
|
+
};
|
61
|
+
var isWalkIn = (customer_id) => {
|
62
|
+
if (customer_id === void 0) {
|
63
|
+
return true;
|
64
|
+
}
|
65
|
+
if (typeof customer_id === "string") {
|
66
|
+
return ["", "0", "1"].includes(customer_id);
|
67
|
+
}
|
68
|
+
return [0, 1].includes(customer_id);
|
69
|
+
};
|
70
|
+
// Annotate the CommonJS export names for ESM import in node:
|
71
|
+
0 && (module.exports = {
|
72
|
+
getAvatarText,
|
73
|
+
getFieldValue,
|
74
|
+
isWalkIn
|
75
|
+
});
|
@@ -0,0 +1,53 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/plus/clientName/index.tsx
|
30
|
+
var clientName_exports = {};
|
31
|
+
__export(clientName_exports, {
|
32
|
+
default: () => clientName_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(clientName_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
37
|
+
var import_index = require("./index.less");
|
38
|
+
var import_utils = require("./utils");
|
39
|
+
var ClientName = ({ className, dataSource, style }) => {
|
40
|
+
const name = (0, import_react.useMemo)(() => {
|
41
|
+
return (0, import_utils.getClientName)(dataSource);
|
42
|
+
}, [dataSource]);
|
43
|
+
if (!dataSource) return null;
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
45
|
+
"div",
|
46
|
+
{
|
47
|
+
className: (0, import_classnames.default)("pisell-client-name", className),
|
48
|
+
style: style || {}
|
49
|
+
},
|
50
|
+
name
|
51
|
+
);
|
52
|
+
};
|
53
|
+
var clientName_default = ClientName;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
7
|
+
for (let key of __getOwnPropNames(from))
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
10
|
+
}
|
11
|
+
return to;
|
12
|
+
};
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
14
|
+
|
15
|
+
// src/plus/clientName/type.ts
|
16
|
+
var type_exports = {};
|
17
|
+
module.exports = __toCommonJS(type_exports);
|
@@ -0,0 +1,43 @@
|
|
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/plus/clientName/utils.ts
|
20
|
+
var utils_exports = {};
|
21
|
+
__export(utils_exports, {
|
22
|
+
getClientName: () => getClientName
|
23
|
+
});
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
25
|
+
var getClientName = (dataSource) => {
|
26
|
+
if (!dataSource || typeof dataSource === "string") {
|
27
|
+
return dataSource;
|
28
|
+
}
|
29
|
+
const { first_name, last_name, display_name, nickname } = dataSource;
|
30
|
+
let finalName = "";
|
31
|
+
if (display_name) {
|
32
|
+
finalName = display_name;
|
33
|
+
} else if (nickname) {
|
34
|
+
finalName = nickname;
|
35
|
+
} else if (first_name || last_name) {
|
36
|
+
finalName = `${first_name} ${last_name}`.trim();
|
37
|
+
}
|
38
|
+
return finalName;
|
39
|
+
};
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
41
|
+
0 && (module.exports = {
|
42
|
+
getClientName
|
43
|
+
});
|
@@ -0,0 +1,256 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
+
mod
|
26
|
+
));
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
+
|
29
|
+
// src/plus/clinetSearch/Add/BirthdayField/index.tsx
|
30
|
+
var BirthdayField_exports = {};
|
31
|
+
__export(BirthdayField_exports, {
|
32
|
+
default: () => BirthdayField_default
|
33
|
+
});
|
34
|
+
module.exports = __toCommonJS(BirthdayField_exports);
|
35
|
+
var import_react = __toESM(require("react"));
|
36
|
+
var import_antd = require("antd");
|
37
|
+
var import_debounce = __toESM(require("lodash/debounce"));
|
38
|
+
var import_dayjs = __toESM(require("dayjs"));
|
39
|
+
var import_utils = require("@pisell/utils");
|
40
|
+
var { Option } = import_antd.Select;
|
41
|
+
var getSelectInput = (id) => {
|
42
|
+
const input = document.getElementById(id);
|
43
|
+
if (input) {
|
44
|
+
return input;
|
45
|
+
}
|
46
|
+
};
|
47
|
+
var setSelectInputType = ({
|
48
|
+
input,
|
49
|
+
type
|
50
|
+
}) => {
|
51
|
+
if (input) {
|
52
|
+
input.type = type;
|
53
|
+
}
|
54
|
+
};
|
55
|
+
var DateSectionCom = ({
|
56
|
+
value,
|
57
|
+
onChange,
|
58
|
+
showTime,
|
59
|
+
className = "",
|
60
|
+
style = {},
|
61
|
+
useSpace = true,
|
62
|
+
format,
|
63
|
+
itemStyle = {
|
64
|
+
width: 100
|
65
|
+
}
|
66
|
+
}) => {
|
67
|
+
const currentYear = (0, import_dayjs.default)().year();
|
68
|
+
const locale = import_utils.locales.locale;
|
69
|
+
const dayRef = (0, import_react.useRef)(null);
|
70
|
+
const monthRef = (0, import_react.useRef)(null);
|
71
|
+
const yearRef = (0, import_react.useRef)(null);
|
72
|
+
const [date, setDate] = (0, import_react.useState)({
|
73
|
+
year: value ? (0, import_dayjs.default)(value).year() : null,
|
74
|
+
month: value ? (0, import_dayjs.default)(value).month() + 1 : null,
|
75
|
+
day: value ? (0, import_dayjs.default)(value).date() : null
|
76
|
+
});
|
77
|
+
const [dayOptions, setDayOptions] = (0, import_react.useState)([]);
|
78
|
+
const [monthOptions, setMonthOptions] = (0, import_react.useState)([]);
|
79
|
+
const [yearOptions, setYearOptions] = (0, import_react.useState)([]);
|
80
|
+
const localeMap = {
|
81
|
+
year: import_utils.locales.getText("pisell2.text.date-year-text"),
|
82
|
+
month: import_utils.locales.getText("pisell2.text.date-month-text"),
|
83
|
+
day: import_utils.locales.getText("pisell2.text.date-day-text")
|
84
|
+
};
|
85
|
+
(0, import_react.useEffect)(() => {
|
86
|
+
setDate({
|
87
|
+
year: value ? (0, import_dayjs.default)(value).year() : null,
|
88
|
+
month: value ? (0, import_dayjs.default)(value).month() + 1 : null,
|
89
|
+
day: value ? (0, import_dayjs.default)(value).date() : null
|
90
|
+
});
|
91
|
+
}, [value]);
|
92
|
+
(0, import_react.useEffect)(() => {
|
93
|
+
setMonthOptions(renderOptions("month", 1, 12));
|
94
|
+
setYearOptions(renderOptions("year", currentYear - 100, currentYear + 50));
|
95
|
+
}, []);
|
96
|
+
(0, import_react.useEffect)(() => {
|
97
|
+
setDayOptions(
|
98
|
+
renderOptions(
|
99
|
+
"day",
|
100
|
+
1,
|
101
|
+
date.month ? getDaysInMonth(date.year || currentYear, date.month) : 31
|
102
|
+
)
|
103
|
+
);
|
104
|
+
}, [date.month, date.year]);
|
105
|
+
const handleDateChange = (field, value2) => {
|
106
|
+
if (!value2) {
|
107
|
+
return;
|
108
|
+
}
|
109
|
+
let newDate = {
|
110
|
+
year: date.year,
|
111
|
+
month: date.month,
|
112
|
+
day: date.day,
|
113
|
+
[field]: value2
|
114
|
+
};
|
115
|
+
const foucsList = {
|
116
|
+
day: monthRef,
|
117
|
+
month: yearRef
|
118
|
+
};
|
119
|
+
if (field === "month" || field === "year") {
|
120
|
+
const daysInMonth = getDaysInMonth(
|
121
|
+
(newDate == null ? void 0 : newDate.year) || currentYear,
|
122
|
+
newDate == null ? void 0 : newDate.month
|
123
|
+
);
|
124
|
+
const newDay = (newDate == null ? void 0 : newDate.day) > daysInMonth ? daysInMonth : newDate.day;
|
125
|
+
newDate = {
|
126
|
+
...newDate,
|
127
|
+
day: newDay
|
128
|
+
};
|
129
|
+
}
|
130
|
+
setDate(newDate);
|
131
|
+
if (foucsList[field]) {
|
132
|
+
foucsList[field].current.focus();
|
133
|
+
} else {
|
134
|
+
yearRef.current.blur();
|
135
|
+
}
|
136
|
+
const _format = format || "YYYY-MM-DD";
|
137
|
+
if (newDate.year && newDate.month && newDate.day) {
|
138
|
+
const _date = `${newDate.year}-${newDate.month.toString().padStart(2, "0")}-${newDate.day.toString().padStart(2, "0")}`;
|
139
|
+
onChange((0, import_dayjs.default)(_date).format(_format));
|
140
|
+
}
|
141
|
+
};
|
142
|
+
const getDaysInMonth = (year, month) => {
|
143
|
+
return (0, import_dayjs.default)(`${year}-${month}`, "YYYY-MM").daysInMonth();
|
144
|
+
};
|
145
|
+
const renderOptions = (field, start, end) => {
|
146
|
+
const options = [];
|
147
|
+
const _text = locale !== "en-US" && locale !== "en" ? localeMap[field] : "";
|
148
|
+
for (let i = start; i <= end; i++) {
|
149
|
+
options.push({
|
150
|
+
label: `${i}${_text}`,
|
151
|
+
value: i
|
152
|
+
});
|
153
|
+
}
|
154
|
+
return options;
|
155
|
+
};
|
156
|
+
const selectId = (0, import_react.useMemo)(() => {
|
157
|
+
return {
|
158
|
+
dayId: (0, import_utils.getUniqueId)("day"),
|
159
|
+
monthId: (0, import_utils.getUniqueId)("month"),
|
160
|
+
yearId: (0, import_utils.getUniqueId)("year")
|
161
|
+
};
|
162
|
+
}, []);
|
163
|
+
(0, import_react.useLayoutEffect)(() => {
|
164
|
+
setSelectInputType({
|
165
|
+
input: getSelectInput(selectId.dayId),
|
166
|
+
type: "number"
|
167
|
+
});
|
168
|
+
setSelectInputType({
|
169
|
+
input: getSelectInput(selectId.monthId),
|
170
|
+
type: "number"
|
171
|
+
});
|
172
|
+
setSelectInputType({
|
173
|
+
input: getSelectInput(selectId.yearId),
|
174
|
+
type: "number"
|
175
|
+
});
|
176
|
+
}, [selectId]);
|
177
|
+
const handleDateSearch = (0, import_react.useCallback)(
|
178
|
+
(0, import_debounce.default)((field, value2) => {
|
179
|
+
const dateOption = {
|
180
|
+
day: dayOptions,
|
181
|
+
month: monthOptions,
|
182
|
+
year: yearOptions
|
183
|
+
};
|
184
|
+
const _value = Number(value2);
|
185
|
+
const index = dateOption[field].findIndex((item) => {
|
186
|
+
return item.value === _value;
|
187
|
+
});
|
188
|
+
if (index !== -1) {
|
189
|
+
handleDateChange(field, _value);
|
190
|
+
} else {
|
191
|
+
handleDateChange(field, null);
|
192
|
+
}
|
193
|
+
}, 300),
|
194
|
+
[dayOptions, monthOptions, yearOptions, date]
|
195
|
+
);
|
196
|
+
const content = /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
197
|
+
import_antd.Select,
|
198
|
+
{
|
199
|
+
id: selectId.dayId,
|
200
|
+
value: date.day,
|
201
|
+
placeholder: import_utils.locales.getText("pisell2.text.date-day-text"),
|
202
|
+
onChange: (value2) => handleDateChange("day", value2),
|
203
|
+
style: itemStyle,
|
204
|
+
showSearch: true,
|
205
|
+
onSearch: (value2) => {
|
206
|
+
handleDateSearch("day", value2);
|
207
|
+
},
|
208
|
+
ref: dayRef,
|
209
|
+
size: "large"
|
210
|
+
},
|
211
|
+
dayOptions.map((item) => {
|
212
|
+
return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
|
213
|
+
})
|
214
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
215
|
+
import_antd.Select,
|
216
|
+
{
|
217
|
+
id: selectId.monthId,
|
218
|
+
value: date.month,
|
219
|
+
placeholder: import_utils.locales.getText("pisell2.text.date-month-text"),
|
220
|
+
onChange: (value2) => handleDateChange("month", value2),
|
221
|
+
style: itemStyle,
|
222
|
+
showSearch: true,
|
223
|
+
onSearch: (value2) => {
|
224
|
+
handleDateSearch("month", value2);
|
225
|
+
},
|
226
|
+
ref: monthRef,
|
227
|
+
size: "large"
|
228
|
+
},
|
229
|
+
monthOptions.map((item) => {
|
230
|
+
return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
|
231
|
+
})
|
232
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
233
|
+
import_antd.Select,
|
234
|
+
{
|
235
|
+
id: selectId.yearId,
|
236
|
+
value: date.year,
|
237
|
+
placeholder: import_utils.locales.getText("pisell2.text.date-year-text"),
|
238
|
+
onChange: (value2) => handleDateChange("year", value2),
|
239
|
+
style: itemStyle,
|
240
|
+
showSearch: true,
|
241
|
+
onSearch: (value2) => {
|
242
|
+
handleDateSearch("year", value2);
|
243
|
+
},
|
244
|
+
ref: yearRef,
|
245
|
+
size: "large"
|
246
|
+
},
|
247
|
+
yearOptions.map((item) => {
|
248
|
+
return /* @__PURE__ */ import_react.default.createElement(Option, { key: item.value, value: item.value }, item.label);
|
249
|
+
})
|
250
|
+
));
|
251
|
+
if (useSpace) {
|
252
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { className: className || "", style: style || {} }, content);
|
253
|
+
}
|
254
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: className || "", style: style || {} }, content);
|
255
|
+
};
|
256
|
+
var BirthdayField_default = DateSectionCom;
|