@pisell/private-materials 6.5.13 → 6.5.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/actionButtons/index.js +15 -9
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +7 -2
- package/es/components/booking/components/footer/index.js +2 -2
- package/es/components/booking/components/footer/utils.js +8 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/components/voucher/index.js +23 -19
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/forms/footer.js +4 -13
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/notes/index.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/cartClientCard/index.js +7 -3
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/materiels/holder/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/es/components/booking/notes/addNote/index.d.ts +1 -0
- package/es/components/booking/utils.js +1 -1
- package/es/components/checkout/PaymentModal.js +42 -30
- package/es/components/checkout/PaymentPlugin.d.ts +1 -0
- package/es/components/checkout/components/CashPaymentModule/index.js +9 -9
- package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/es/components/checkout/hooks/useWalletPass.js +40 -22
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +2 -1
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +5 -5
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/list/List.d.ts +5 -0
- package/es/components/list/List.js +957 -0
- package/es/components/list/List.less +2 -0
- package/es/components/list/ResponsiveWrapper.d.ts +16 -0
- package/es/components/list/ResponsiveWrapper.js +130 -0
- package/es/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/es/components/list/TestResponsiveWrapper.js +816 -0
- package/es/components/list/TestResponsiveWrapper.less +968 -0
- package/es/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/es/components/list/components/EmptyState/EmptyState.js +75 -0
- package/es/components/list/components/EmptyState/EmptyState.less +121 -0
- package/es/components/list/components/EmptyState/index.d.ts +2 -0
- package/es/components/list/components/EmptyState/index.js +1 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.js +39 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ListItemSkeleton/index.js +2 -0
- package/es/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/es/components/list/components/Pagination/Pagination.js +240 -0
- package/es/components/list/components/Pagination/Pagination.less +439 -0
- package/es/components/list/components/Pagination/index.d.ts +1 -0
- package/es/components/list/components/Pagination/index.js +1 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.js +18 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/index.js +1 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/Tab.js +43 -0
- package/es/components/list/components/Tab/Tab.less +139 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/index.js +1 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/Tab/types.js +1 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.js +28 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/TabSkeleton/index.js +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/WaterfallList.js +191 -0
- package/es/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/index.js +1 -0
- package/es/components/list/examples/GroupedListExample.d.ts +3 -0
- package/es/components/list/examples/GroupedListExample.js +207 -0
- package/es/components/list/hooks/index.d.ts +5 -0
- package/es/components/list/hooks/index.js +3 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useDevice.js +102 -0
- package/es/components/list/hooks/useListState.d.ts +43 -0
- package/es/components/list/hooks/useListState.js +176 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/hooks/useWaterfall.js +161 -0
- package/es/components/list/index.d.ts +10 -0
- package/es/components/list/index.js +7 -0
- package/es/components/list/locales.d.ts +66 -0
- package/es/components/list/locales.js +107 -0
- package/es/components/list/styles/base.less +39 -0
- package/es/components/list/styles/content.less +416 -0
- package/es/components/list/styles/floatButton.less +107 -0
- package/es/components/list/styles/footer.less +49 -0
- package/es/components/list/styles/header.less +69 -0
- package/es/components/list/styles/responsive.less +166 -0
- package/es/components/list/types.d.ts +177 -0
- package/es/components/list/types.js +1 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/getText.js +150 -0
- package/es/components/list/utils/index.d.ts +4 -0
- package/es/components/list/utils/index.js +5 -0
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toB/store/hooks.js +19 -5
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +143 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +7 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.js +273 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +130 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +21 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +665 -217
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.js +6 -2
- package/es/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/es/components/ticketBooking/components/menuBar/index.js +40 -17
- package/es/components/ticketBooking/components/menuBar/index.less +27 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +105 -32
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.js +4 -1
- package/es/components/ticketBooking/components/timeBar/index.less +1 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/IsActiveContext.js +37 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.js +37 -0
- package/es/components/ticketBooking/context/index.d.ts +2 -0
- package/es/components/ticketBooking/context/index.js +2 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/es/components/ticketBooking/hooks/pisellos/bookingTicket.js +13 -1
- package/es/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/es/components/ticketBooking/hooks/pisellos/index.js +2 -1
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.js +50 -0
- package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +12 -4
- package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +4 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +141 -4
- package/es/components/ticketBooking/hooks/pisellos/useScanCustomer.js +5 -2
- package/es/components/ticketBooking/hooks/pisellos/useScanGlobal.js +7 -2
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/es/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +17 -0
- package/es/components/ticketBooking/index.d.ts +6 -0
- package/es/components/ticketBooking/index.js +86 -12
- package/es/components/ticketBooking/utils/index.d.ts +30 -2
- package/es/components/ticketBooking/utils/index.js +73 -8
- package/es/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/es/components/ticketBooking/utils/productCache.js +184 -0
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +100 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +32 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +8 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +239 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +33 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +75 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +53 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +58 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +85 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +121 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +47 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +95 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +31 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +34 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +39 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +55 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.js +38 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.js +41 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.js +481 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.js +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.js +21 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +7 -5
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +20 -10
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/actionButtons/index.js +22 -17
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +5 -2
- package/lib/components/booking/components/footer/index.js +2 -2
- package/lib/components/booking/components/footer/utils.js +8 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/index.js +33 -40
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.js +7 -13
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/notes/index.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/cartClientCard/index.js +7 -3
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/materiels/holder/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
- package/lib/components/booking/notes/addNote/index.d.ts +1 -0
- package/lib/components/booking/utils.js +1 -1
- package/lib/components/checkout/PaymentModal.js +26 -19
- package/lib/components/checkout/PaymentPlugin.d.ts +1 -0
- package/lib/components/checkout/components/CashPaymentModule/index.js +0 -1
- package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
- package/lib/components/checkout/hooks/useWalletPass.js +61 -46
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +2 -1
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +5 -5
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/list/List.d.ts +5 -0
- package/lib/components/list/List.js +771 -0
- package/lib/components/list/List.less +2 -0
- package/lib/components/list/ResponsiveWrapper.d.ts +16 -0
- package/lib/components/list/ResponsiveWrapper.js +145 -0
- package/lib/components/list/TestResponsiveWrapper.d.ts +8 -0
- package/lib/components/list/TestResponsiveWrapper.js +493 -0
- package/lib/components/list/TestResponsiveWrapper.less +968 -0
- package/lib/components/list/components/EmptyState/EmptyState.d.ts +20 -0
- package/lib/components/list/components/EmptyState/EmptyState.js +75 -0
- package/lib/components/list/components/EmptyState/EmptyState.less +121 -0
- package/lib/components/list/components/EmptyState/index.d.ts +2 -0
- package/lib/components/list/components/EmptyState/index.js +35 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.js +75 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.less +29 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ListItemSkeleton/index.js +41 -0
- package/lib/components/list/components/Pagination/Pagination.d.ts +30 -0
- package/lib/components/list/components/Pagination/Pagination.js +205 -0
- package/lib/components/list/components/Pagination/Pagination.less +439 -0
- package/lib/components/list/components/Pagination/index.d.ts +1 -0
- package/lib/components/list/components/Pagination/index.js +35 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.js +37 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.less +3 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/index.js +35 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/Tab.js +72 -0
- package/lib/components/list/components/Tab/Tab.less +139 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/index.js +35 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/Tab/types.js +17 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.js +61 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.less +38 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/TabSkeleton/index.js +41 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.js +178 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.less +201 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/index.js +35 -0
- package/lib/components/list/examples/GroupedListExample.d.ts +3 -0
- package/lib/components/list/examples/GroupedListExample.js +210 -0
- package/lib/components/list/hooks/index.d.ts +5 -0
- package/lib/components/list/hooks/index.js +47 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useDevice.js +96 -0
- package/lib/components/list/hooks/useListState.d.ts +43 -0
- package/lib/components/list/hooks/useListState.js +149 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/hooks/useWaterfall.js +124 -0
- package/lib/components/list/index.d.ts +10 -0
- package/lib/components/list/index.js +60 -0
- package/lib/components/list/locales.d.ts +66 -0
- package/lib/components/list/locales.js +113 -0
- package/lib/components/list/styles/base.less +39 -0
- package/lib/components/list/styles/content.less +416 -0
- package/lib/components/list/styles/floatButton.less +107 -0
- package/lib/components/list/styles/footer.less +49 -0
- package/lib/components/list/styles/header.less +69 -0
- package/lib/components/list/styles/responsive.less +166 -0
- package/lib/components/list/types.d.ts +177 -0
- package/lib/components/list/types.js +17 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/getText.js +95 -0
- package/lib/components/list/utils/index.d.ts +4 -0
- package/lib/components/list/utils/index.js +43 -0
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toB/store/hooks.js +16 -8
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.d.ts +27 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +165 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.d.ts +7 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.js +45 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +41 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.js +247 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +50 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +100 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +21 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +322 -223
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +3 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.js +4 -2
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +5 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +24 -18
- package/lib/components/ticketBooking/components/menuBar/index.less +27 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +71 -17
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.js +3 -1
- package/lib/components/ticketBooking/components/timeBar/index.less +1 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/IsActiveContext.js +56 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.js +56 -0
- package/lib/components/ticketBooking/context/index.d.ts +2 -0
- package/lib/components/ticketBooking/context/index.js +44 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.d.ts +5 -0
- package/lib/components/ticketBooking/hooks/pisellos/bookingTicket.js +5 -1
- package/lib/components/ticketBooking/hooks/pisellos/index.d.ts +1 -0
- package/lib/components/ticketBooking/hooks/pisellos/index.js +3 -1
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.js +47 -0
- package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +17 -10
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +4 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +83 -0
- package/lib/components/ticketBooking/hooks/pisellos/useScanCustomer.js +4 -2
- package/lib/components/ticketBooking/hooks/pisellos/useScanGlobal.js +6 -2
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.d.ts +6 -0
- package/lib/components/ticketBooking/hooks/pisellos/useShopDiscountModule.js +37 -0
- package/lib/components/ticketBooking/index.d.ts +6 -0
- package/lib/components/ticketBooking/index.js +69 -7
- package/lib/components/ticketBooking/utils/index.d.ts +30 -2
- package/lib/components/ticketBooking/utils/index.js +91 -6
- package/lib/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/lib/components/ticketBooking/utils/productCache.js +144 -0
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.less +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.js +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.less +2 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.js +129 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.less +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +8 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.js +178 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.less +44 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.js +52 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.less +14 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.js +63 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.less +30 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.js +131 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.less +46 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.js +62 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.less +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.js +78 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.less +31 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.js +94 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.less +11 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.js +115 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.less +24 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.js +139 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.less +57 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.js +97 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.less +18 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.js +51 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.less +3 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.js +56 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.less +13 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.js +58 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.less +22 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.js +49 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.less +20 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.js +83 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.js +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +42 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.js +65 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +162 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.js +501 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.js +17 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.js +37 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +2 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +6 -5
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +61 -27
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +1 -2
- package/lowcode/sku-card/meta.ts +1812 -0
- package/lowcode/sku-card/snippets.ts +372 -0
- package/lowcode/sku-list/meta.ts +410 -0
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useActiveExecute Hook
|
|
3
|
+
* 返回一个函数,该函数接收一个回调函数,并返回一个包装后的函数
|
|
4
|
+
* 包装后的函数只在 isActive 为 true 时执行原始回调
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const { executeIfActive } = useActiveExecute();
|
|
9
|
+
*
|
|
10
|
+
* // 创建一个包装函数用于事件监听
|
|
11
|
+
* const handleChange = (data) => {
|
|
12
|
+
* console.log('data:', data);
|
|
13
|
+
* };
|
|
14
|
+
*
|
|
15
|
+
* // 返回的函数会在被调用时检查 isActive
|
|
16
|
+
* pisellos.effects.on('event', executeIfActive(handleChange));
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const useActiveExecute: () => {
|
|
20
|
+
executeIfActive: <T extends (...args: any[]) => any>(fn: T) => T;
|
|
21
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useMemoizedFn } from 'ahooks';
|
|
2
|
+
import { useRef, useEffect } from 'react';
|
|
3
|
+
import { useIsActive } from "../../context/IsActiveContext";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* useActiveExecute Hook
|
|
7
|
+
* 返回一个函数,该函数接收一个回调函数,并返回一个包装后的函数
|
|
8
|
+
* 包装后的函数只在 isActive 为 true 时执行原始回调
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* const { executeIfActive } = useActiveExecute();
|
|
13
|
+
*
|
|
14
|
+
* // 创建一个包装函数用于事件监听
|
|
15
|
+
* const handleChange = (data) => {
|
|
16
|
+
* console.log('data:', data);
|
|
17
|
+
* };
|
|
18
|
+
*
|
|
19
|
+
* // 返回的函数会在被调用时检查 isActive
|
|
20
|
+
* pisellos.effects.on('event', executeIfActive(handleChange));
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export var useActiveExecute = function useActiveExecute() {
|
|
24
|
+
var isActive = useIsActive();
|
|
25
|
+
// 使用 ref 存储最新的 isActive 值,避免闭包陷阱
|
|
26
|
+
var isActiveRef = useRef(isActive);
|
|
27
|
+
|
|
28
|
+
// 每次 isActive 变化时更新 ref
|
|
29
|
+
useEffect(function () {
|
|
30
|
+
isActiveRef.current = isActive;
|
|
31
|
+
}, [isActive]);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* executeIfActive 接收一个函数,返回一个包装后的函数
|
|
35
|
+
* 包装后的函数会接收所有参数,并在 isActive 为 true 时调用原始函数
|
|
36
|
+
*/
|
|
37
|
+
var executeIfActive = useMemoizedFn(function (fn) {
|
|
38
|
+
return function () {
|
|
39
|
+
// 使用 ref.current 获取最新的 isActive 值
|
|
40
|
+
if (!isActiveRef.current) return;
|
|
41
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
42
|
+
args[_key] = arguments[_key];
|
|
43
|
+
}
|
|
44
|
+
return fn === null || fn === void 0 ? void 0 : fn.apply(void 0, args);
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
executeIfActive: executeIfActive
|
|
49
|
+
};
|
|
50
|
+
};
|
|
@@ -17,9 +17,12 @@ import { useState, useEffect } from 'react';
|
|
|
17
17
|
import { useBookingTicket } from "./bookingTicket";
|
|
18
18
|
import { usePisellOS } from "../../../../hooks/useEngineContext";
|
|
19
19
|
import { useMemoizedFn } from 'ahooks';
|
|
20
|
+
import { useActiveExecute } from "./useActiveExecute";
|
|
20
21
|
export var useCustomer = function useCustomer(props) {
|
|
21
22
|
var bookingTicket = useBookingTicket();
|
|
22
23
|
var pisellos = usePisellOS();
|
|
24
|
+
var _useActiveExecute = useActiveExecute(),
|
|
25
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
23
26
|
|
|
24
27
|
// 客户列表
|
|
25
28
|
var _useState = useState([]),
|
|
@@ -59,10 +62,12 @@ export var useCustomer = function useCustomer(props) {
|
|
|
59
62
|
|
|
60
63
|
// 监听事件
|
|
61
64
|
useEffect(function () {
|
|
62
|
-
|
|
65
|
+
var _bookingTicket$store;
|
|
66
|
+
if (!bookingTicket) {
|
|
63
67
|
return;
|
|
64
68
|
}
|
|
65
|
-
var
|
|
69
|
+
var customerModule = bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$store = bookingTicket.store) === null || _bookingTicket$store === void 0 ? void 0 : _bookingTicket$store.customer;
|
|
70
|
+
var wrappedOnCustomerListUpdate = executeIfActive(function (state) {
|
|
66
71
|
setCustomers(state.customerList);
|
|
67
72
|
setHasMore(state.hasMore);
|
|
68
73
|
setPagination(function (prev) {
|
|
@@ -73,14 +78,17 @@ export var useCustomer = function useCustomer(props) {
|
|
|
73
78
|
});
|
|
74
79
|
});
|
|
75
80
|
});
|
|
76
|
-
var
|
|
81
|
+
var wrappedOnCustomerSelected = executeIfActive(function (customer) {
|
|
77
82
|
var _props$changeCustomer;
|
|
78
83
|
setSelectedCustomer(customer);
|
|
79
84
|
(_props$changeCustomer = props.changeCustomerToGlobalState) === null || _props$changeCustomer === void 0 || _props$changeCustomer.call(props, customer);
|
|
80
85
|
});
|
|
81
|
-
var
|
|
86
|
+
var wrappedOnPaginationChange = executeIfActive(function (paginationInfo) {
|
|
82
87
|
setPagination(paginationInfo);
|
|
83
88
|
});
|
|
89
|
+
var unlisten1 = customerModule.effectsOn('onCustomerListUpdate', wrappedOnCustomerListUpdate);
|
|
90
|
+
var unlisten2 = customerModule.effectsOn('onCustomerSelected', wrappedOnCustomerSelected);
|
|
91
|
+
var unlisten3 = customerModule.effectsOn('onPaginationChange', wrappedOnPaginationChange);
|
|
84
92
|
return function () {
|
|
85
93
|
unlisten1();
|
|
86
94
|
unlisten2();
|
|
@@ -4,7 +4,11 @@ interface IGetProductsParams {
|
|
|
4
4
|
menu_list_ids?: number[];
|
|
5
5
|
schedule_datetime?: string;
|
|
6
6
|
}
|
|
7
|
+
interface IGetScheduleTimePointsParams {
|
|
8
|
+
menu_list_ids?: number[];
|
|
9
|
+
}
|
|
7
10
|
export declare const useProducts: () => {
|
|
11
|
+
getScheduleTimePoints: (params?: IGetScheduleTimePointsParams) => Promise<void>;
|
|
8
12
|
getProducts: (params?: IGetProductsParams) => Promise<void>;
|
|
9
13
|
products: any[];
|
|
10
14
|
loading: boolean;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
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); }
|
|
2
|
+
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; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
2
7
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
8
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
9
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -10,9 +15,12 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
10
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
16
|
import { useMemoizedFn } from 'ahooks';
|
|
12
17
|
import { useBookingTicket } from "./bookingTicket";
|
|
13
|
-
import { useState } from 'react';
|
|
18
|
+
import { useState, useEffect, useRef } from 'react';
|
|
19
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
20
|
+
import dayjs from 'dayjs';
|
|
14
21
|
export var useProducts = function useProducts() {
|
|
15
22
|
var bookingTicket = useBookingTicket();
|
|
23
|
+
var context = useEngineContext();
|
|
16
24
|
var _useState = useState([]),
|
|
17
25
|
_useState2 = _slicedToArray(_useState, 2),
|
|
18
26
|
products = _useState2[0],
|
|
@@ -21,6 +29,14 @@ export var useProducts = function useProducts() {
|
|
|
21
29
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
22
30
|
loading = _useState4[0],
|
|
23
31
|
setLoading = _useState4[1];
|
|
32
|
+
|
|
33
|
+
// 日程时间段列表 HH:mm格式
|
|
34
|
+
var _useState5 = useState([]),
|
|
35
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
36
|
+
scheduleTimePoints = _useState6[0],
|
|
37
|
+
setScheduleTimePoints = _useState6[1];
|
|
38
|
+
var scheduledTaskQueueIdRef = useRef('booking-schedule-products');
|
|
39
|
+
var paramsRef = useRef(undefined);
|
|
24
40
|
var getProducts = useMemoizedFn( /*#__PURE__*/function () {
|
|
25
41
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
26
42
|
var products;
|
|
@@ -28,13 +44,14 @@ export var useProducts = function useProducts() {
|
|
|
28
44
|
while (1) switch (_context.prev = _context.next) {
|
|
29
45
|
case 0:
|
|
30
46
|
setLoading(true);
|
|
31
|
-
|
|
47
|
+
paramsRef.current = params;
|
|
48
|
+
_context.next = 4;
|
|
32
49
|
return bookingTicket.loadProducts(params);
|
|
33
|
-
case
|
|
50
|
+
case 4:
|
|
34
51
|
products = _context.sent;
|
|
35
52
|
setProducts(products);
|
|
36
53
|
setLoading(false);
|
|
37
|
-
case
|
|
54
|
+
case 7:
|
|
38
55
|
case "end":
|
|
39
56
|
return _context.stop();
|
|
40
57
|
}
|
|
@@ -44,7 +61,127 @@ export var useProducts = function useProducts() {
|
|
|
44
61
|
return _ref.apply(this, arguments);
|
|
45
62
|
};
|
|
46
63
|
}());
|
|
64
|
+
|
|
65
|
+
// 注册任务函数并在 scheduleTimePoints 改变时添加定时任务
|
|
66
|
+
useEffect(function () {
|
|
67
|
+
try {
|
|
68
|
+
var _context$appHelper, _context$appHelper$ge;
|
|
69
|
+
var app = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getApp) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper);
|
|
70
|
+
if (!app || !app.tasksManager) {
|
|
71
|
+
console.warn('App 或 tasksManager 不可用');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// 注册 getProducts 任务函数
|
|
76
|
+
app.tasksManager.addTaskFunction('getProducts', /*#__PURE__*/function () {
|
|
77
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
|
78
|
+
var task;
|
|
79
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
80
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
81
|
+
case 0:
|
|
82
|
+
task = _ref2.task;
|
|
83
|
+
console.log('定时执行 getProducts,参数:', task.payload);
|
|
84
|
+
_context2.next = 4;
|
|
85
|
+
return getProducts(task.payload);
|
|
86
|
+
case 4:
|
|
87
|
+
return _context2.abrupt("return", {
|
|
88
|
+
status: 'success'
|
|
89
|
+
});
|
|
90
|
+
case 5:
|
|
91
|
+
case "end":
|
|
92
|
+
return _context2.stop();
|
|
93
|
+
}
|
|
94
|
+
}, _callee2);
|
|
95
|
+
}));
|
|
96
|
+
return function (_x2) {
|
|
97
|
+
return _ref3.apply(this, arguments);
|
|
98
|
+
};
|
|
99
|
+
}());
|
|
100
|
+
|
|
101
|
+
// 如果有 scheduleTimePoints,创建定时任务
|
|
102
|
+
if (scheduleTimePoints && scheduleTimePoints.length > 0) {
|
|
103
|
+
// 先清除之前的定时任务
|
|
104
|
+
app.tasksManager.clearTasks({
|
|
105
|
+
module: 'scheduledTasks',
|
|
106
|
+
queueId: scheduledTaskQueueIdRef.current
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// 为每个时间点创建定时任务
|
|
110
|
+
var tasks = scheduleTimePoints.map(function (timePoint) {
|
|
111
|
+
// 将 HH:mm 格式转换为今天的完整时间格式
|
|
112
|
+
var _timePoint$split = timePoint.split(':'),
|
|
113
|
+
_timePoint$split2 = _slicedToArray(_timePoint$split, 2),
|
|
114
|
+
hours = _timePoint$split2[0],
|
|
115
|
+
minutes = _timePoint$split2[1];
|
|
116
|
+
var executeAt = dayjs().hour(parseInt(hours, 10)).minute(parseInt(minutes, 10)).second(4).format('YYYY-MM-DD HH:mm:ss');
|
|
117
|
+
return {
|
|
118
|
+
action: 'getProducts',
|
|
119
|
+
payload: _objectSpread(_objectSpread({}, paramsRef.current), {}, {
|
|
120
|
+
schedule_datetime: executeAt
|
|
121
|
+
}),
|
|
122
|
+
scheduled: {
|
|
123
|
+
executeAt: executeAt
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
// 添加定时任务到 scheduledTasks 模块
|
|
129
|
+
app.tasksManager.addTask({
|
|
130
|
+
module: 'scheduledTasks',
|
|
131
|
+
queueId: scheduledTaskQueueIdRef.current,
|
|
132
|
+
tasks: tasks
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// 开始执行定时任务队列
|
|
136
|
+
app.tasksManager.run({
|
|
137
|
+
module: 'scheduledTasks',
|
|
138
|
+
queueId: scheduledTaskQueueIdRef.current
|
|
139
|
+
});
|
|
140
|
+
console.log("\u5DF2\u4E3A ".concat(tasks.length, " \u4E2A\u65F6\u95F4\u70B9\u521B\u5EFA\u5B9A\u65F6\u4EFB\u52A1"));
|
|
141
|
+
}
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.error('创建定时任务失败:', error);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// 清理函数:组件卸载时清除定时任务
|
|
147
|
+
return function () {
|
|
148
|
+
try {
|
|
149
|
+
var _context$appHelper2, _context$appHelper2$g;
|
|
150
|
+
var _app = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 || (_context$appHelper2$g = _context$appHelper2.getApp) === null || _context$appHelper2$g === void 0 ? void 0 : _context$appHelper2$g.call(_context$appHelper2);
|
|
151
|
+
if (_app && _app.tasksManager) {
|
|
152
|
+
_app.tasksManager.clearTasks({
|
|
153
|
+
module: 'scheduledTasks',
|
|
154
|
+
queueId: scheduledTaskQueueIdRef.current
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
} catch (error) {
|
|
158
|
+
console.error('清理定时任务失败:', error);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}, [scheduleTimePoints]);
|
|
162
|
+
var getScheduleTimePoints = useMemoizedFn( /*#__PURE__*/function () {
|
|
163
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
|
|
164
|
+
var scheduleTimePoints;
|
|
165
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
166
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
167
|
+
case 0:
|
|
168
|
+
_context3.next = 2;
|
|
169
|
+
return bookingTicket.getScheduleTimePoints(params);
|
|
170
|
+
case 2:
|
|
171
|
+
scheduleTimePoints = _context3.sent;
|
|
172
|
+
setScheduleTimePoints(scheduleTimePoints);
|
|
173
|
+
case 4:
|
|
174
|
+
case "end":
|
|
175
|
+
return _context3.stop();
|
|
176
|
+
}
|
|
177
|
+
}, _callee3);
|
|
178
|
+
}));
|
|
179
|
+
return function (_x3) {
|
|
180
|
+
return _ref4.apply(this, arguments);
|
|
181
|
+
};
|
|
182
|
+
}());
|
|
47
183
|
return {
|
|
184
|
+
getScheduleTimePoints: getScheduleTimePoints,
|
|
48
185
|
getProducts: getProducts,
|
|
49
186
|
products: products,
|
|
50
187
|
loading: loading
|
|
@@ -3,13 +3,16 @@ import { locales } from "@pisell/utils";
|
|
|
3
3
|
import { useBookingTicket } from "./bookingTicket";
|
|
4
4
|
import { formatScanCustomer } from "../../utils";
|
|
5
5
|
import { useToast } from '@pisell/materials';
|
|
6
|
+
import { useActiveExecute } from "./useActiveExecute";
|
|
6
7
|
var useScanCustomer = function useScanCustomer() {
|
|
7
8
|
var bookingTicket = useBookingTicket();
|
|
8
9
|
var scanRef = useRef(null);
|
|
9
10
|
var Toast = useToast();
|
|
11
|
+
var _useActiveExecute = useActiveExecute(),
|
|
12
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
10
13
|
var handleScanCustomer = function handleScanCustomer(callback) {
|
|
11
14
|
console.log('handleScanCustomer>>>>>>>', callback);
|
|
12
|
-
scanRef.current = bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.scanCustomerListener(function (data) {
|
|
15
|
+
scanRef.current = bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.scanCustomerListener(executeIfActive(function (data) {
|
|
13
16
|
console.log('scanCustomerListener>>>>>>>', data);
|
|
14
17
|
if (data.status === 'failed') {
|
|
15
18
|
Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
|
|
@@ -17,7 +20,7 @@ var useScanCustomer = function useScanCustomer() {
|
|
|
17
20
|
}
|
|
18
21
|
var customer = formatScanCustomer(data);
|
|
19
22
|
callback(customer);
|
|
20
|
-
});
|
|
23
|
+
}));
|
|
21
24
|
};
|
|
22
25
|
return {
|
|
23
26
|
openScan: handleScanCustomer,
|
|
@@ -3,12 +3,17 @@ import { useBookingTicket } from "./bookingTicket";
|
|
|
3
3
|
import { formatScanGlobal } from "../../utils";
|
|
4
4
|
import { useToast } from '@pisell/materials';
|
|
5
5
|
import { locales } from '@pisell/utils';
|
|
6
|
+
import { useActiveExecute } from "./useActiveExecute";
|
|
6
7
|
var useScanGlobal = function useScanGlobal() {
|
|
7
8
|
var bookingTicket = useBookingTicket();
|
|
8
9
|
var scanRef = useRef(null);
|
|
9
10
|
var Toast = useToast();
|
|
11
|
+
var _useActiveExecute = useActiveExecute(),
|
|
12
|
+
executeIfActive = _useActiveExecute.executeIfActive;
|
|
10
13
|
var handleScanGlobal = function handleScanGlobal(callback) {
|
|
11
|
-
|
|
14
|
+
var _bookingTicket$initPe;
|
|
15
|
+
bookingTicket === null || bookingTicket === void 0 || (_bookingTicket$initPe = bookingTicket.initPeripheralsListener) === null || _bookingTicket$initPe === void 0 || _bookingTicket$initPe.call(bookingTicket);
|
|
16
|
+
scanRef.current = bookingTicket === null || bookingTicket === void 0 ? void 0 : bookingTicket.scanGlobalListener(executeIfActive(function (data) {
|
|
12
17
|
console.log('scanGlobalListener>>>>>>>', data);
|
|
13
18
|
if (data.status === 'failed') {
|
|
14
19
|
Toast.fail(locales.getText('pisell2.text.scan-global-failed'));
|
|
@@ -16,7 +21,7 @@ var useScanGlobal = function useScanGlobal() {
|
|
|
16
21
|
}
|
|
17
22
|
var result = formatScanGlobal(data);
|
|
18
23
|
callback(result);
|
|
19
|
-
});
|
|
24
|
+
}));
|
|
20
25
|
};
|
|
21
26
|
return {
|
|
22
27
|
openScan: handleScanGlobal,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { usePisellOS } from "../../../../hooks/useEngineContext";
|
|
2
|
+
import { useOsKey } from "../../context/OsKeyContext";
|
|
3
|
+
import { getShopDiscountKey } from "../../utils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* useShopDiscountModule Hook
|
|
7
|
+
* 获取当前 ShopDiscount 模块
|
|
8
|
+
* 通过 osKey 区分不同页面的模块实例
|
|
9
|
+
*/
|
|
10
|
+
export var useShopDiscountModule = function useShopDiscountModule() {
|
|
11
|
+
var pisellOS = usePisellOS();
|
|
12
|
+
var osKey = useOsKey();
|
|
13
|
+
|
|
14
|
+
// 根据 osKey 生成模块名称
|
|
15
|
+
var moduleKey = getShopDiscountKey(osKey || 'ticket');
|
|
16
|
+
return pisellOS.getModule(moduleKey);
|
|
17
|
+
};
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import { ProductDisplayConfig, ProductDisplayPresetKey } from './components/ProductDisplayAdapter/types';
|
|
1
2
|
import './index.less';
|
|
2
3
|
interface TicketBookingProps {
|
|
3
4
|
productExtensionType: string[];
|
|
4
5
|
bookingConfigParams: Record<string, any>;
|
|
5
6
|
isShowMenuBar?: boolean;
|
|
6
7
|
onPrerenderComplete?: () => void;
|
|
8
|
+
isShowTimeBar?: boolean;
|
|
9
|
+
isShowFloatButtons?: boolean;
|
|
10
|
+
productDisplayConfig?: ProductDisplayPresetKey | ProductDisplayConfig;
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
rulesHooks?: any;
|
|
7
13
|
}
|
|
8
14
|
declare const _default: (props: TicketBookingProps) => JSX.Element;
|
|
9
15
|
export default _default;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
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); }
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
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."); }
|
|
6
|
+
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); }
|
|
7
|
+
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; }
|
|
8
|
+
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; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
4
10
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
12
|
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); }
|
|
@@ -12,9 +18,12 @@ import { cloneDeep } from 'lodash';
|
|
|
12
18
|
import TicketBooking from "./components/ticketBooking/index";
|
|
13
19
|
import { request } from "../../utils";
|
|
14
20
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
15
|
-
import { getDefaultStartParam } from "./utils";
|
|
21
|
+
import { getBookingTicketKey, getDefaultStartParam, getShopDiscountKey, rulesHooks } from "./utils";
|
|
16
22
|
import localeTexts from "./locales";
|
|
17
23
|
import MenuBar from "./components/menuBar";
|
|
24
|
+
import { useLocalStorageState } from 'ahooks';
|
|
25
|
+
import { OsKeyProvider } from "./context/OsKeyContext";
|
|
26
|
+
import { IsActiveProvider } from "./context/IsActiveContext";
|
|
18
27
|
import "./index.less";
|
|
19
28
|
var initialState = {
|
|
20
29
|
amountSymbol: '$',
|
|
@@ -137,17 +146,61 @@ var initialState = {
|
|
|
137
146
|
export default (function (props) {
|
|
138
147
|
var _context$appHelper, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _context$appHelper$ut5;
|
|
139
148
|
var productExtensionType = props.productExtensionType,
|
|
140
|
-
|
|
149
|
+
propsBookingConfigParams = props.bookingConfigParams,
|
|
141
150
|
_props$isShowMenuBar = props.isShowMenuBar,
|
|
142
151
|
isShowMenuBar = _props$isShowMenuBar === void 0 ? true : _props$isShowMenuBar,
|
|
143
|
-
onPrerenderComplete = props.onPrerenderComplete
|
|
152
|
+
onPrerenderComplete = props.onPrerenderComplete,
|
|
153
|
+
_props$isShowTimeBar = props.isShowTimeBar,
|
|
154
|
+
propsIsShowTimeBar = _props$isShowTimeBar === void 0 ? true : _props$isShowTimeBar,
|
|
155
|
+
_props$isShowFloatBut = props.isShowFloatButtons,
|
|
156
|
+
propsIsShowFloatButtons = _props$isShowFloatBut === void 0 ? true : _props$isShowFloatBut,
|
|
157
|
+
propsProductDisplayConfig = props.productDisplayConfig,
|
|
158
|
+
_props$isActive = props.isActive,
|
|
159
|
+
isActive = _props$isActive === void 0 ? true : _props$isActive,
|
|
160
|
+
propsRulesHooks = props.rulesHooks;
|
|
161
|
+
var _useLocalStorageState = useLocalStorageState('pisell-ticket-booking-nav-key', {
|
|
162
|
+
defaultValue: 'ticket'
|
|
163
|
+
}),
|
|
164
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
|
|
165
|
+
activeNavKey = _useLocalStorageState2[0],
|
|
166
|
+
setActiveNavKey = _useLocalStorageState2[1];
|
|
167
|
+
|
|
168
|
+
// 根据 activeNavKey 动态配置(仅在显示菜单栏时生效)
|
|
169
|
+
var bookingConfigParams = useMemo(function () {
|
|
170
|
+
if (isShowMenuBar && activeNavKey === 'food') {
|
|
171
|
+
return _objectSpread(_objectSpread({}, propsBookingConfigParams), {}, {
|
|
172
|
+
sub_type: 'food',
|
|
173
|
+
source_type: 'pos'
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return propsBookingConfigParams;
|
|
177
|
+
}, [isShowMenuBar, activeNavKey, propsBookingConfigParams]);
|
|
178
|
+
var isShowTimeBar = useMemo(function () {
|
|
179
|
+
return isShowMenuBar && activeNavKey === 'food' ? false : propsIsShowTimeBar;
|
|
180
|
+
}, [isShowMenuBar, activeNavKey, propsIsShowTimeBar]);
|
|
181
|
+
var isShowFloatButtons = useMemo(function () {
|
|
182
|
+
return isShowMenuBar && activeNavKey === 'food' ? false : propsIsShowFloatButtons;
|
|
183
|
+
}, [isShowMenuBar, activeNavKey, propsIsShowFloatButtons]);
|
|
184
|
+
|
|
185
|
+
// 根据bookingConfigParams?.sub_type 动态配置osKey
|
|
186
|
+
// 多页面使用同一个组件时,需要根据不同的osKey来区分不同的页面
|
|
187
|
+
var osKey = useMemo(function () {
|
|
188
|
+
return bookingConfigParams === null || bookingConfigParams === void 0 ? void 0 : bookingConfigParams.sub_type;
|
|
189
|
+
}, [bookingConfigParams]);
|
|
190
|
+
var productDisplayConfig = useMemo(function () {
|
|
191
|
+
if (isShowMenuBar && activeNavKey === 'food') {
|
|
192
|
+
return 'sku-list-a5';
|
|
193
|
+
}
|
|
194
|
+
return propsProductDisplayConfig;
|
|
195
|
+
}, [isShowMenuBar, activeNavKey, propsProductDisplayConfig]);
|
|
144
196
|
var storeRef = useRef(null);
|
|
145
197
|
var context = useEngineContext();
|
|
146
198
|
var _context$appHelper$ut = (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils,
|
|
147
199
|
pisellos = _context$appHelper$ut.pisellos,
|
|
148
200
|
pisellosAllModule = _context$appHelper$ut.pisellosAllModule;
|
|
149
201
|
var _ref = pisellosAllModule || {},
|
|
150
|
-
BookingTicket = _ref.BookingTicket
|
|
202
|
+
BookingTicket = _ref.BookingTicket,
|
|
203
|
+
ShopDiscountImpl = _ref.ShopDiscountImpl;
|
|
151
204
|
locales.init(localeTexts, ((_context$appHelper$ut2 = context.appHelper.utils) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getApp) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut3.call(_context$appHelper$ut2)) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut3.locales) === null || _context$appHelper$ut3 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut3.getLocale) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.call(_context$appHelper$ut3)) || ((_context$appHelper$ut5 = context.appHelper.utils) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.storage) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.get('umi_locale')) || 'en');
|
|
152
205
|
useLayoutEffect(function () {
|
|
153
206
|
request.setRequest(context.appHelper.utils.request);
|
|
@@ -158,23 +211,44 @@ export default (function (props) {
|
|
|
158
211
|
productExtensionType: productExtensionType
|
|
159
212
|
}));
|
|
160
213
|
storeRef.current = store;
|
|
161
|
-
}, []);
|
|
214
|
+
}, [bookingConfigParams, productExtensionType]);
|
|
162
215
|
useMemo(function () {
|
|
163
216
|
if (BookingTicket) {
|
|
164
|
-
pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(
|
|
217
|
+
pisellos === null || pisellos === void 0 || pisellos.registerModule(new BookingTicket(getBookingTicketKey(osKey)), {
|
|
165
218
|
initialState: {},
|
|
166
219
|
otherParams: {
|
|
167
|
-
cacheId:
|
|
220
|
+
cacheId: getBookingTicketKey(osKey),
|
|
168
221
|
platform: 'shop'
|
|
169
222
|
}
|
|
170
223
|
});
|
|
171
224
|
}
|
|
172
|
-
|
|
225
|
+
if (ShopDiscountImpl) {
|
|
226
|
+
pisellos === null || pisellos === void 0 || pisellos.registerModule(new ShopDiscountImpl(getShopDiscountKey(osKey)), {
|
|
227
|
+
otherParams: {
|
|
228
|
+
platform: "shop",
|
|
229
|
+
rules: {
|
|
230
|
+
hooks: propsRulesHooks || rulesHooks
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
}, [osKey]);
|
|
173
236
|
return /*#__PURE__*/React.createElement("div", {
|
|
174
237
|
className: "pisell-ticket-booking-wrapper"
|
|
175
|
-
}, isShowMenuBar && /*#__PURE__*/React.createElement(MenuBar,
|
|
176
|
-
|
|
238
|
+
}, isShowMenuBar && /*#__PURE__*/React.createElement(MenuBar, {
|
|
239
|
+
activeNavKey: activeNavKey,
|
|
240
|
+
onNavChange: setActiveNavKey
|
|
241
|
+
}), /*#__PURE__*/React.createElement(IsActiveProvider, {
|
|
242
|
+
isActive: isActive
|
|
243
|
+
}, /*#__PURE__*/React.createElement(OsKeyProvider, {
|
|
244
|
+
osKey: osKey
|
|
245
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
246
|
+
store: storeRef.current,
|
|
247
|
+
key: activeNavKey
|
|
177
248
|
}, /*#__PURE__*/React.createElement(TicketBooking, {
|
|
178
|
-
onPrerenderComplete: onPrerenderComplete
|
|
179
|
-
|
|
249
|
+
onPrerenderComplete: onPrerenderComplete,
|
|
250
|
+
productDisplayConfig: productDisplayConfig,
|
|
251
|
+
isShowTimeBar: isShowTimeBar,
|
|
252
|
+
isShowFloatButtons: isShowFloatButtons
|
|
253
|
+
})))));
|
|
180
254
|
});
|
|
@@ -41,7 +41,7 @@ declare type ScanData = {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
export declare const formatScanCustomer: (data: ScanData) => {
|
|
44
|
-
searchType: "
|
|
44
|
+
searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
|
|
45
45
|
data: any;
|
|
46
46
|
scanCode: string;
|
|
47
47
|
} | null;
|
|
@@ -59,4 +59,32 @@ export declare const formatScanGlobal: (data: ScanData) => {
|
|
|
59
59
|
scanCode: string;
|
|
60
60
|
} | null | undefined;
|
|
61
61
|
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
|
62
|
-
export
|
|
62
|
+
export declare const getBookingTicketKey: (osKey: string) => string;
|
|
63
|
+
export declare const getShopDiscountKey: (osKey: string) => string;
|
|
64
|
+
export declare const rulesHooks: {
|
|
65
|
+
getProduct(product: Record<string, any>): {
|
|
66
|
+
booking_id: any;
|
|
67
|
+
id: any;
|
|
68
|
+
_id: any;
|
|
69
|
+
price: any;
|
|
70
|
+
total: any;
|
|
71
|
+
discount_list: any;
|
|
72
|
+
origin_total: any;
|
|
73
|
+
num: any;
|
|
74
|
+
quantity: any;
|
|
75
|
+
vouchersApplicable: any;
|
|
76
|
+
};
|
|
77
|
+
setProduct(product: Record<string, any>, values: {
|
|
78
|
+
total: number;
|
|
79
|
+
discount_list: any[];
|
|
80
|
+
price: number;
|
|
81
|
+
quantity: number;
|
|
82
|
+
_id?: string;
|
|
83
|
+
}): {
|
|
84
|
+
_id: any;
|
|
85
|
+
discount_list: any[];
|
|
86
|
+
_extend: any;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export { getCache, setCache, clearCache, clearAllCache, clearAllCacheByOsKey, getProductCache, setProductCache, clearProductCache, clearAllProductCache, getBoardConfigCache, setBoardConfigCache, clearBoardConfigCache, } from './productCache';
|
|
90
|
+
export type { CacheType } from './productCache';
|