@pisell/private-materials 6.11.125 → 6.11.127
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/Sales/Summary/utils.d.ts +58 -0
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/es/components/appointmentBooking/index.d.ts +1 -0
- package/es/components/appointmentBooking/locales.d.ts +606 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- 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/footer/index.d.ts +1 -0
- package/es/components/booking/components/reloadResourceModal/index.d.ts +9 -0
- package/es/components/booking/components/voucher/index.d.ts +1 -0
- package/es/components/booking/components/voucher/utils.d.ts +4 -0
- package/es/components/booking/deposit/index.d.ts +1 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/forms/footer.d.ts +1 -0
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/hooks/useClearCart.d.ts +1 -0
- package/es/components/booking/hooks/useQuotation.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/utils.d.ts +3 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/header/index.d.ts +4 -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/Lists.d.ts +1 -0
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/addService/index.d.ts +1 -0
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/es/components/booking/info/service2/Lists.d.ts +1 -0
- package/es/components/booking/info2/cartClientCard/locales.d.ts +33 -0
- package/es/components/booking/info2/cartClientCard/types.d.ts +19 -0
- package/es/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/es/components/booking/info2/model/index.d.ts +1 -0
- package/es/components/booking/info2/model/strategy/adapter/index.d.ts +7 -0
- package/es/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +185 -0
- package/es/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +420 -0
- package/es/components/booking/info2/model/strategy/adapter/type.d.ts +28 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +84 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +4 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +32 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +1 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +165 -0
- package/es/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +50 -0
- package/es/components/booking/info2/model/strategy/index.d.ts +107 -0
- package/es/components/booking/info2/model/strategy/strategy-example.d.ts +5 -0
- package/es/components/booking/info2/model/strategy/type.d.ts +228 -0
- 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/contactInfoMode/index.d.ts +1 -0
- package/es/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/es/components/booking/info2/service/openNormalService.d.ts +37 -0
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/es/components/booking/locales.d.ts +1581 -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/model.d.ts +113 -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/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/checkout/components/AdditionalModule/locales.d.ts +58 -0
- package/es/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/es/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
- package/es/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
- package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/es/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/es/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/es/components/checkout/components/WalletPassModule/types.d.ts +134 -0
- package/es/components/checkout/constants.d.ts +2 -0
- package/es/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/es/components/checkout/locales.d.ts +856 -0
- package/es/components/checkout/styles.d.ts +67 -0
- package/es/components/checkout/types.d.ts +130 -0
- package/es/components/checkout/utils.d.ts +3 -0
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/es/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/es/components/ecocup/cupList/const.d.ts +144 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/es/components/ecocup/cupList/index.d.ts +1 -0
- package/es/components/ecocup/utils/download.d.ts +7 -0
- package/es/components/ecocup/utils/index.d.ts +2 -0
- package/es/components/eftpos/const.d.ts +64 -0
- package/es/components/eftpos/device.d.ts +9 -0
- package/es/components/eftpos/hooks.d.ts +34 -0
- package/es/components/eftpos/index.d.ts +47 -0
- package/es/components/eftpos/locales.d.ts +163 -0
- package/es/components/eftpos/table.d.ts +21 -0
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +2 -1
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/es/components/eftposPay/component/fail/index.d.ts +1 -0
- package/es/components/eftposPay/component/fail/network.d.ts +9 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +10 -0
- package/es/components/eftposPay/component/manual/index.d.ts +10 -0
- package/es/components/eftposPay/component/signature/index.d.ts +9 -0
- package/es/components/eftposPay/const.d.ts +195 -0
- package/es/components/eftposPay/hooks.d.ts +36 -0
- package/es/components/eftposPay/huifu/const.d.ts +5 -0
- package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/es/components/eftposPay/huifu/types.d.ts +14 -0
- package/es/components/eftposPay/index.d.ts +1 -0
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/es/components/eftposPay/linkly/index.d.ts +1 -0
- package/es/components/eftposPay/locales.d.ts +608 -0
- package/es/components/eftposPay/pay.d.ts +1 -0
- package/es/components/eftposPay/payo/config.d.ts +13 -0
- package/es/components/eftposPay/payo/hooks.d.ts +10 -0
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/store/index.d.ts +358 -0
- package/es/components/eftposPay/tip.d.ts +10 -0
- package/es/components/eftposPay/tyro/index.d.ts +9 -0
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/windcave/helper.d.ts +23 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +23 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +7 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/Voucher/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/es/components/eventBooking/index.d.ts +1 -0
- package/es/components/kioskSkuDetail/locales.d.ts +43 -0
- package/es/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/es/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/es/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/es/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/es/components/list/components/Tab/Tab.d.ts +5 -0
- package/es/components/list/components/Tab/index.d.ts +2 -0
- package/es/components/list/components/Tab/types.d.ts +14 -0
- package/es/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/es/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/es/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/es/components/list/components/WaterfallList/index.d.ts +2 -0
- package/es/components/list/hooks/useDevice.d.ts +24 -0
- package/es/components/list/hooks/useWaterfall.d.ts +34 -0
- package/es/components/list/locales.d.ts +108 -0
- package/es/components/list/types.d.ts +181 -0
- package/es/components/list/utils/getText.d.ts +53 -0
- package/es/components/list/utils/index.d.ts +19 -0
- package/es/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/es/components/pay/toB/components/Card/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/es/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/es/components/pay/toB/components/Content/Header.d.ts +5 -0
- package/es/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/es/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/es/components/pay/toB/hooks.d.ts +12 -0
- package/es/components/pay/toB/locales.d.ts +88 -0
- package/es/components/pay/toB/store/context.d.ts +3 -0
- package/es/components/pay/toB/store/hooks.d.ts +15 -0
- package/es/components/pay/toB/store/index.d.ts +3 -0
- package/es/components/pay/toB/store/provider.d.ts +4 -0
- package/es/components/pay/toB/store/utils.d.ts +13 -0
- package/es/components/pay/toB/types/index.d.ts +81 -0
- package/es/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +4 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/locales.d.ts +511 -0
- package/es/components/pay/toC/model.d.ts +33 -0
- package/es/components/pay/toC/payGroup.d.ts +48 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/locales.d.ts +133 -0
- package/es/components/productExtension/fields/Actor/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/index.d.ts +1 -0
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/es/components/productExtension/index.d.ts +1 -0
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/es/components/ruleSetting/index.d.ts +1 -0
- package/es/components/ruleSetting/locales.d.ts +78 -0
- package/es/components/schedules/locales.d.ts +143 -0
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/es/components/shoppingCart/hooks/usePromotionModal.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useSkuModal.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +1 -0
- package/es/components/shoppingCart/locales.d.ts +93 -0
- package/es/components/shoppingCart/mock.d.ts +54 -0
- package/es/components/shoppingCart/type.d.ts +61 -0
- package/es/components/subTotal/locales.d.ts +71 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/es/components/systemSettings/registry/locales.d.ts +534 -0
- package/es/components/systemSettings/registry/services.d.ts +97 -0
- package/es/components/systemSettings/registry/types.d.ts +140 -0
- package/es/components/taxSelect/locales.d.ts +38 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +94 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/es/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/es/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/es/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/es/components/ticketBooking/context/OsKeyContext.d.ts +29 -0
- package/es/components/ticketBooking/context/PlatformContext.d.ts +22 -0
- package/es/components/ticketBooking/context/index.d.ts +3 -0
- package/es/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/es/components/ticketBooking/hooks/useRuntime.d.ts +4 -0
- package/es/components/ticketBooking/hooks/useSync.d.ts +21 -0
- package/es/components/ticketBooking/locales.d.ts +388 -0
- package/es/components/ticketBooking/miniRedux.d.ts +22 -0
- package/es/components/ticketBooking/sync.d.ts +8 -0
- package/es/components/ticketBooking/utils/edit.d.ts +1 -0
- package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/es/components/walletList/index.d.ts +1 -0
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/es/components/workSpaceList/components/Card/constants.d.ts +2 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/printer.d.ts +4 -0
- package/es/hooks/useEngineContext.d.ts +4 -0
- package/es/hooks/useLogger.d.ts +2 -0
- package/es/hooks/useToast.d.ts +2 -0
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/es/plus/noteModal/AddTempModal.d.ts +1 -0
- package/es/plus/noteModal/locales.d.ts +53 -0
- package/es/plus/noteModal/types.d.ts +19 -0
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/orderList/config.d.ts +1 -0
- package/es/plus/orderList/locales.d.ts +618 -0
- package/es/plus/pisellFinancialSummary/components/Collapse/Collapse.d.ts +8 -0
- package/es/plus/pisellFinancialSummary/components/Collapse/Collapse.stories.d.ts +7 -0
- package/es/plus/pisellFinancialSummary/components/Collapse/index.d.ts +2 -0
- package/es/plus/pisellFinancialSummary/components/Collapse/types.d.ts +48 -0
- package/es/plus/pisellFinancialSummary/locales.d.ts +28 -0
- package/es/plus/pisellFinancialSummary/types.d.ts +139 -0
- package/es/plus/pisellFinancialSummary/utils/buildSummaryItems.d.ts +44 -0
- package/es/plus/pisellFinancialSummary/utils/index.d.ts +2 -0
- package/es/plus/pisellReservation/PisellReservation.js +99 -14
- package/es/plus/pisellReservation/components/bookingChangeModal/demo.d.ts +3 -0
- package/es/plus/pisellReservation/components/bookingChangeModal/demo.js +433 -0
- package/es/plus/pisellReservation/components/bookingChangeModal/index.d.ts +154 -0
- package/es/plus/pisellReservation/components/bookingChangeModal/index.js +685 -0
- package/es/plus/pisellReservation/components/bookingChangeModal/index.less +320 -0
- package/es/plus/pisellReservation/components/bookingDetailModal/bookingProductToProductCard.d.ts +10 -0
- package/es/plus/pisellReservation/data/filterBookingsAtTimeCursor.d.ts +9 -0
- package/es/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
- package/es/plus/pisellReservation/floorRoomCard/floorRoomCardDom.d.ts +3 -0
- package/es/plus/pisellReservation/floorRoomCard/floorRoomCardHeaderFormat.d.ts +3 -0
- package/es/plus/pisellReservation/floorRoomCard/floorRoomCardModel.d.ts +59 -0
- package/es/plus/pisellReservation/floorRoomCard/floorRoomCardPaymentUi.d.ts +9 -0
- package/es/plus/pisellReservation/floorRoomCard/mapFloorRoomCardViewProps.d.ts +10 -0
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardHeaderView.d.ts +12 -0
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +5 -0
- package/es/plus/pisellReservation/floorRoomCard/views/RoomCardShellView.d.ts +9 -0
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
- package/es/plus/pisellReservation/locales/locales-ja.d.ts +143 -0
- package/es/plus/pisellReservation/locales/locales-pt.d.ts +143 -0
- package/es/plus/pisellReservation/locales/locales.d.ts +708 -0
- package/es/plus/pisellSalesGrid/types.d.ts +197 -0
- package/es/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/es/plus/pisellSalesManagement/config/booking.d.ts +1 -0
- package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/es/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/es/plus/productSelect/ProductCard/SkuCard/locales.d.ts +68 -0
- package/es/plus/productSelect/ProductCard/SkuCard/status.d.ts +173 -0
- package/es/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/es/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/es/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/es/plus/saasTeamMembers/locales.d.ts +546 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/selectHolder/locales.d.ts +38 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +53 -0
- package/es/plus/skuOptionsSelection/types.d.ts +445 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/es/plus/walletPassGallery/index.d.ts +1 -0
- package/es/plus/walletPassGallery/locales.d.ts +473 -0
- package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/es/plus/webPosLogin/locales.d.ts +92 -0
- package/es/plus/webPosLogin/types.d.ts +288 -0
- package/es/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/es/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/es/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/es/pro/Login2.0/shared/types.d.ts +234 -0
- package/es/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/es/pro/Selector/demo.d.ts +1 -0
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/es/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/es/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +63 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +68 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +73 -0
- package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
- package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/es/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/es/pro/priceKeyboard/utils.d.ts +31 -0
- package/es/pro/skuDetailModal/locales.d.ts +129 -0
- package/es/pro/skuDetailModal/types.d.ts +395 -0
- package/es/pro/skuDetailModal/utils.d.ts +56 -0
- package/es/shared/locales/stock.d.ts +57 -0
- package/es/test/setup.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/Sales/Summary/utils.d.ts +58 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
- package/lib/components/appointmentBooking/index.d.ts +1 -0
- package/lib/components/appointmentBooking/locales.d.ts +606 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- 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/footer/index.d.ts +1 -0
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +9 -0
- package/lib/components/booking/components/voucher/index.d.ts +1 -0
- package/lib/components/booking/components/voucher/utils.d.ts +4 -0
- package/lib/components/booking/deposit/index.d.ts +1 -0
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/forms/footer.d.ts +1 -0
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
- package/lib/components/booking/hooks/useQuotation.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/utils.d.ts +3 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/header/index.d.ts +4 -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/Lists.d.ts +1 -0
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/addService/index.d.ts +1 -0
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/info/service/serviceManager/distributeDiscount.d.ts +11 -0
- package/lib/components/booking/info/service2/Lists.d.ts +1 -0
- package/lib/components/booking/info2/cartClientCard/locales.d.ts +33 -0
- package/lib/components/booking/info2/cartClientCard/types.d.ts +19 -0
- package/lib/components/booking/info2/cartClientCard/utils.d.ts +3 -0
- package/lib/components/booking/info2/model/index.d.ts +1 -0
- package/lib/components/booking/info2/model/strategy/adapter/index.d.ts +7 -0
- package/lib/components/booking/info2/model/strategy/adapter/promotion/evaluator.d.ts +185 -0
- package/lib/components/booking/info2/model/strategy/adapter/promotion/type.d.ts +420 -0
- package/lib/components/booking/info2/model/strategy/adapter/type.d.ts +28 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/evaluator.d.ts +84 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/example.d.ts +4 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/index.d.ts +32 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/locales.d.ts +1 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/type.d.ts +165 -0
- package/lib/components/booking/info2/model/strategy/adapter/walletPass/utils.d.ts +50 -0
- package/lib/components/booking/info2/model/strategy/index.d.ts +107 -0
- package/lib/components/booking/info2/model/strategy/strategy-example.d.ts +5 -0
- package/lib/components/booking/info2/model/strategy/type.d.ts +228 -0
- 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/contactInfoMode/index.d.ts +1 -0
- package/lib/components/booking/info2/service/editService/utils.d.ts +28 -0
- package/lib/components/booking/info2/service/openNormalService.d.ts +37 -0
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
- package/lib/components/booking/locales.d.ts +1581 -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/model.d.ts +113 -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/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/checkout/components/AdditionalModule/locales.d.ts +58 -0
- package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
- package/lib/components/checkout/components/PaymentResultToast/types.d.ts +59 -0
- package/lib/components/checkout/components/PaymentResultToast/utils.d.ts +44 -0
- package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
- package/lib/components/checkout/components/ScrollableList/types.d.ts +53 -0
- package/lib/components/checkout/components/SearchAndClientModule/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/components/DiscountWallet/index.d.ts +1 -0
- package/lib/components/checkout/components/WalletPassModule/types.d.ts +134 -0
- package/lib/components/checkout/constants.d.ts +2 -0
- package/lib/components/checkout/hooks/usePaymentLogger.d.ts +2 -0
- package/lib/components/checkout/locales.d.ts +856 -0
- package/lib/components/checkout/styles.d.ts +67 -0
- package/lib/components/checkout/types.d.ts +130 -0
- package/lib/components/checkout/utils.d.ts +3 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
- package/lib/components/ecocup/components/SettingModal/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/const.d.ts +144 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/lib/components/ecocup/cupList/index.d.ts +1 -0
- package/lib/components/ecocup/utils/download.d.ts +7 -0
- package/lib/components/ecocup/utils/index.d.ts +2 -0
- package/lib/components/eftpos/const.d.ts +64 -0
- package/lib/components/eftpos/device.d.ts +9 -0
- package/lib/components/eftpos/hooks.d.ts +34 -0
- package/lib/components/eftpos/index.d.ts +47 -0
- package/lib/components/eftpos/locales.d.ts +163 -0
- package/lib/components/eftpos/table.d.ts +21 -0
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +2 -1
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/network.d.ts +9 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +10 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +10 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +9 -0
- package/lib/components/eftposPay/const.d.ts +195 -0
- package/lib/components/eftposPay/hooks.d.ts +36 -0
- package/lib/components/eftposPay/huifu/const.d.ts +5 -0
- package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
- package/lib/components/eftposPay/huifu/types.d.ts +14 -0
- package/lib/components/eftposPay/index.d.ts +1 -0
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
- package/lib/components/eftposPay/linkly/index.d.ts +1 -0
- package/lib/components/eftposPay/locales.d.ts +608 -0
- package/lib/components/eftposPay/pay.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.d.ts +13 -0
- package/lib/components/eftposPay/payo/hooks.d.ts +10 -0
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/store/index.d.ts +358 -0
- package/lib/components/eftposPay/tip.d.ts +10 -0
- package/lib/components/eftposPay/tyro/index.d.ts +9 -0
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/windcave/helper.d.ts +23 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +23 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +7 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/Voucher/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
- package/lib/components/eventBooking/index.d.ts +1 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +43 -0
- package/lib/components/list/components/ListItemSkeleton/ListItemSkeleton.d.ts +13 -0
- package/lib/components/list/components/ListItemSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/ScrollLoader/ScrollLoader.d.ts +18 -0
- package/lib/components/list/components/ScrollLoader/index.d.ts +2 -0
- package/lib/components/list/components/Tab/Tab.d.ts +5 -0
- package/lib/components/list/components/Tab/index.d.ts +2 -0
- package/lib/components/list/components/Tab/types.d.ts +14 -0
- package/lib/components/list/components/TabSkeleton/TabSkeleton.d.ts +11 -0
- package/lib/components/list/components/TabSkeleton/index.d.ts +2 -0
- package/lib/components/list/components/WaterfallList/WaterfallList.d.ts +33 -0
- package/lib/components/list/components/WaterfallList/index.d.ts +2 -0
- package/lib/components/list/hooks/useDevice.d.ts +24 -0
- package/lib/components/list/hooks/useWaterfall.d.ts +34 -0
- package/lib/components/list/locales.d.ts +108 -0
- package/lib/components/list/types.d.ts +181 -0
- package/lib/components/list/utils/getText.d.ts +53 -0
- package/lib/components/list/utils/index.d.ts +19 -0
- package/lib/components/pay/toB/components/Cache/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Card/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
- package/lib/components/pay/toB/components/ConfirmedPayment/index.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Footer.d.ts +1 -0
- package/lib/components/pay/toB/components/Content/Header.d.ts +5 -0
- package/lib/components/pay/toB/components/Content/utils.d.ts +16 -0
- package/lib/components/pay/toB/components/MX51/index.d.ts +3 -0
- package/lib/components/pay/toB/hooks.d.ts +12 -0
- package/lib/components/pay/toB/locales.d.ts +88 -0
- package/lib/components/pay/toB/store/context.d.ts +3 -0
- package/lib/components/pay/toB/store/hooks.d.ts +15 -0
- package/lib/components/pay/toB/store/index.d.ts +3 -0
- package/lib/components/pay/toB/store/provider.d.ts +4 -0
- package/lib/components/pay/toB/store/utils.d.ts +13 -0
- package/lib/components/pay/toB/types/index.d.ts +81 -0
- package/lib/components/pay/toB/types/storeTypes.d.ts +143 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +7 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +4 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/locales.d.ts +511 -0
- package/lib/components/pay/toC/model.d.ts +33 -0
- package/lib/components/pay/toC/payGroup.d.ts +48 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/locales.d.ts +133 -0
- package/lib/components/productExtension/fields/Actor/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/index.d.ts +1 -0
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
- package/lib/components/productExtension/index.d.ts +1 -0
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
- package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
- package/lib/components/ruleSetting/index.d.ts +1 -0
- package/lib/components/ruleSetting/locales.d.ts +78 -0
- package/lib/components/schedules/locales.d.ts +143 -0
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/usePromotionModal.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useSkuModal.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +1 -0
- package/lib/components/shoppingCart/locales.d.ts +93 -0
- package/lib/components/shoppingCart/mock.d.ts +54 -0
- package/lib/components/shoppingCart/type.d.ts +61 -0
- package/lib/components/subTotal/locales.d.ts +71 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/locales.d.ts +534 -0
- package/lib/components/systemSettings/registry/services.d.ts +97 -0
- package/lib/components/systemSettings/registry/types.d.ts +140 -0
- package/lib/components/taxSelect/locales.d.ts +38 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +94 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/bookingList/utils.d.ts +6 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/constants.d.ts +22 -0
- package/lib/components/ticketBooking/components/bookingDataPanel/serve.d.ts +0 -0
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
- package/lib/components/ticketBooking/context/IsActiveContext.d.ts +26 -0
- package/lib/components/ticketBooking/context/OsKeyContext.d.ts +29 -0
- package/lib/components/ticketBooking/context/PlatformContext.d.ts +22 -0
- package/lib/components/ticketBooking/context/index.d.ts +3 -0
- package/lib/components/ticketBooking/hooks/pisellos/useActiveExecute.d.ts +21 -0
- package/lib/components/ticketBooking/hooks/useRuntime.d.ts +4 -0
- package/lib/components/ticketBooking/hooks/useSync.d.ts +21 -0
- package/lib/components/ticketBooking/locales.d.ts +388 -0
- package/lib/components/ticketBooking/miniRedux.d.ts +22 -0
- package/lib/components/ticketBooking/sync.d.ts +8 -0
- package/lib/components/ticketBooking/utils/edit.d.ts +1 -0
- package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/ticketBooking/utils/productCache.d.ts +75 -0
- package/lib/components/walletList/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/lib/components/workSpaceList/components/Card/constants.d.ts +2 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/printer.d.ts +4 -0
- package/lib/hooks/useEngineContext.d.ts +4 -0
- package/lib/hooks/useLogger.d.ts +2 -0
- package/lib/hooks/useToast.d.ts +2 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +1 -0
- package/lib/plus/noteModal/AddTempModal.d.ts +1 -0
- package/lib/plus/noteModal/locales.d.ts +53 -0
- package/lib/plus/noteModal/types.d.ts +19 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/orderList/config.d.ts +1 -0
- package/lib/plus/orderList/locales.d.ts +618 -0
- package/lib/plus/pisellFinancialSummary/components/Collapse/Collapse.d.ts +8 -0
- package/lib/plus/pisellFinancialSummary/components/Collapse/Collapse.stories.d.ts +7 -0
- package/lib/plus/pisellFinancialSummary/components/Collapse/index.d.ts +2 -0
- package/lib/plus/pisellFinancialSummary/components/Collapse/types.d.ts +48 -0
- package/lib/plus/pisellFinancialSummary/locales.d.ts +28 -0
- package/lib/plus/pisellFinancialSummary/types.d.ts +139 -0
- package/lib/plus/pisellFinancialSummary/utils/buildSummaryItems.d.ts +44 -0
- package/lib/plus/pisellFinancialSummary/utils/index.d.ts +2 -0
- package/lib/plus/pisellReservation/PisellReservation.js +79 -1
- package/lib/plus/pisellReservation/components/bookingChangeModal/demo.d.ts +3 -0
- package/lib/plus/pisellReservation/components/bookingChangeModal/demo.js +388 -0
- package/lib/plus/pisellReservation/components/bookingChangeModal/index.d.ts +154 -0
- package/lib/plus/pisellReservation/components/bookingChangeModal/index.js +632 -0
- package/lib/plus/pisellReservation/components/bookingChangeModal/index.less +320 -0
- package/lib/plus/pisellReservation/components/bookingDetailModal/bookingProductToProductCard.d.ts +10 -0
- package/lib/plus/pisellReservation/data/filterBookingsAtTimeCursor.d.ts +9 -0
- package/lib/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
- package/lib/plus/pisellReservation/floorRoomCard/floorRoomCardDom.d.ts +3 -0
- package/lib/plus/pisellReservation/floorRoomCard/floorRoomCardHeaderFormat.d.ts +3 -0
- package/lib/plus/pisellReservation/floorRoomCard/floorRoomCardModel.d.ts +59 -0
- package/lib/plus/pisellReservation/floorRoomCard/floorRoomCardPaymentUi.d.ts +9 -0
- package/lib/plus/pisellReservation/floorRoomCard/mapFloorRoomCardViewProps.d.ts +10 -0
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardHeaderView.d.ts +12 -0
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +5 -0
- package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardShellView.d.ts +9 -0
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
- package/lib/plus/pisellReservation/locales/locales-ja.d.ts +143 -0
- package/lib/plus/pisellReservation/locales/locales-pt.d.ts +143 -0
- package/lib/plus/pisellReservation/locales/locales.d.ts +708 -0
- package/lib/plus/pisellSalesGrid/types.d.ts +197 -0
- package/lib/plus/pisellSalesManagement/components/BookingFormsPreview.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/config/booking.d.ts +1 -0
- package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Action/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Capacity/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMask/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardMoreText/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/CardWrapper/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Countdown/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Cover/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Duration/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Favorite/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Promotions/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Resource/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Stock/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/SubTitle/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Tags/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Time/index.d.ts +6 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/Title/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/TooltipTags/index.d.ts +7 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/components/WarningLists/index.d.ts +4 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/locales.d.ts +68 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/status.d.ts +173 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/type.d.ts +298 -0
- package/lib/plus/productSelect/ProductCard/SkuCard/utils.d.ts +9 -0
- package/lib/plus/productSelect/ProductCard/utils.d.ts +1 -1
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
- package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
- package/lib/plus/saasTeamMembers/locales.d.ts +546 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/selectHolder/locales.d.ts +38 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +53 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +445 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/locales.d.ts +473 -0
- package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
- package/lib/plus/webPosLogin/locales.d.ts +92 -0
- package/lib/plus/webPosLogin/types.d.ts +288 -0
- package/lib/pro/Cards/components/SKUCard/types.d.ts +73 -0
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +53 -0
- package/lib/pro/Login2.0/components/phoneValidation.d.ts +17 -0
- package/lib/pro/Login2.0/shared/types.d.ts +234 -0
- package/lib/pro/NumberKeyboardPopover/types.d.ts +31 -0
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/multiDayTimeSelect/types.d.ts +28 -0
- package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
- package/lib/pro/pisellPriceKeyboardModal/types.d.ts +25 -0
- package/lib/pro/pisellPriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +63 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +98 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +68 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +73 -0
- package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +18 -0
- package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
- package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +1 -0
- package/lib/pro/priceKeyboard/utils.d.ts +31 -0
- package/lib/pro/skuDetailModal/locales.d.ts +129 -0
- package/lib/pro/skuDetailModal/types.d.ts +395 -0
- package/lib/pro/skuDetailModal/utils.d.ts +56 -0
- package/lib/shared/locales/stock.d.ts +57 -0
- package/lib/test/setup.d.ts +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,685 @@
|
|
|
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 _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
|
+
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
|
+
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); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
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); }
|
|
14
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
15
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
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); }
|
|
17
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
18
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
+
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; }
|
|
20
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
21
|
+
import ReactDOM from 'react-dom';
|
|
22
|
+
import "./index.less";
|
|
23
|
+
var CLOSE_ANIMATION_MS = 180;
|
|
24
|
+
var activeInstance = null;
|
|
25
|
+
|
|
26
|
+
/** Format float hours like 9.5 into 09:30. */
|
|
27
|
+
function defaultFormatHourLabel(hour) {
|
|
28
|
+
var normalizedMinutes = Math.round(hour * 60);
|
|
29
|
+
var wholeHours = Math.floor(normalizedMinutes / 60);
|
|
30
|
+
var minutes = normalizedMinutes % 60;
|
|
31
|
+
return "".concat(String(wholeHours).padStart(2, '0'), ":").concat(String(minutes).padStart(2, '0'));
|
|
32
|
+
}
|
|
33
|
+
function getHourStep(hourSlots) {
|
|
34
|
+
if (hourSlots.length < 2) {
|
|
35
|
+
return 1;
|
|
36
|
+
}
|
|
37
|
+
var sorted = _toConsumableArray(hourSlots).sort(function (a, b) {
|
|
38
|
+
return a - b;
|
|
39
|
+
});
|
|
40
|
+
var minStep = Number.POSITIVE_INFINITY;
|
|
41
|
+
for (var index = 1; index < sorted.length; index += 1) {
|
|
42
|
+
var step = sorted[index] - sorted[index - 1];
|
|
43
|
+
if (step > 0 && step < minStep) {
|
|
44
|
+
minStep = step;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return Number.isFinite(minStep) ? minStep : 1;
|
|
48
|
+
}
|
|
49
|
+
function getFallbackHourSlots() {
|
|
50
|
+
return Array.from({
|
|
51
|
+
length: 24
|
|
52
|
+
}, function (_, index) {
|
|
53
|
+
return index;
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
function getCourtName(courts, courtId) {
|
|
57
|
+
var _courts$find;
|
|
58
|
+
if (!courtId) {
|
|
59
|
+
return 'Court';
|
|
60
|
+
}
|
|
61
|
+
return ((_courts$find = courts.find(function (court) {
|
|
62
|
+
return court.id === courtId;
|
|
63
|
+
})) === null || _courts$find === void 0 ? void 0 : _courts$find.name) || 'Court';
|
|
64
|
+
}
|
|
65
|
+
function pickFirstDefined() {
|
|
66
|
+
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
67
|
+
values[_key] = arguments[_key];
|
|
68
|
+
}
|
|
69
|
+
return values.find(function (value) {
|
|
70
|
+
return value !== undefined && value !== null && value !== '';
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function asNumber(value) {
|
|
74
|
+
var fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
75
|
+
var next = Number(value);
|
|
76
|
+
return Number.isFinite(next) ? next : fallback;
|
|
77
|
+
}
|
|
78
|
+
function formatDateKey(date) {
|
|
79
|
+
var year = date.getFullYear();
|
|
80
|
+
var month = "".concat(date.getMonth() + 1).padStart(2, '0');
|
|
81
|
+
var day = "".concat(date.getDate()).padStart(2, '0');
|
|
82
|
+
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
83
|
+
}
|
|
84
|
+
function getNormalizedDateTime(dateKey, hour) {
|
|
85
|
+
var date = new Date("".concat(dateKey, "T00:00:00"));
|
|
86
|
+
if (Number.isNaN(date.getTime())) {
|
|
87
|
+
return {
|
|
88
|
+
date: dateKey,
|
|
89
|
+
time: defaultFormatHourLabel(hour)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
var minutes = Math.round(hour * 60);
|
|
93
|
+
date.setMinutes(date.getMinutes() + minutes);
|
|
94
|
+
return {
|
|
95
|
+
date: formatDateKey(date),
|
|
96
|
+
time: "".concat(String(date.getHours()).padStart(2, '0'), ":").concat(String(date.getMinutes()).padStart(2, '0'))
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function buildSubmitPayload(args) {
|
|
100
|
+
var _itemRaw$metadata, _pickFirstDefined, _itemRaw$metadata2, _itemRaw$metadata3;
|
|
101
|
+
var item = args.item,
|
|
102
|
+
draft = args.draft,
|
|
103
|
+
duration = args.duration,
|
|
104
|
+
nextEndHour = args.nextEndHour,
|
|
105
|
+
targetCourt = args.targetCourt;
|
|
106
|
+
var itemRaw = item.raw || {};
|
|
107
|
+
var itemMetadata = item.metadata || {};
|
|
108
|
+
var targetCourtMetadata = (targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.metadata) || {};
|
|
109
|
+
var firstResource = Array.isArray(item.resources) && item.resources[0] || {};
|
|
110
|
+
var firstResourceMetadata = firstResource.metadata || {};
|
|
111
|
+
var start = getNormalizedDateTime(draft.targetDate, draft.targetHour);
|
|
112
|
+
var end = getNormalizedDateTime(draft.targetDate, nextEndHour);
|
|
113
|
+
var resourceRelationId = pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.relation_id, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.relationId, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resource_id, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resourceId, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.id, firstResource.relation_id, item.courtId) || item.courtId;
|
|
114
|
+
return {
|
|
115
|
+
id: pickFirstDefined(item.id, itemRaw.id) || '',
|
|
116
|
+
relation_id: pickFirstDefined(item.relation_id, itemRaw.relation_id, 0) || 0,
|
|
117
|
+
like_status: pickFirstDefined(item.like_status, itemRaw.like_status, 'common') || 'common',
|
|
118
|
+
relation_type: pickFirstDefined(item.relation_type, itemRaw.relation_type, '') || '',
|
|
119
|
+
is_all: asNumber(pickFirstDefined(item.is_all, itemRaw.is_all, 0), 0),
|
|
120
|
+
schedule_id: pickFirstDefined(item.schedule_id, itemRaw.schedule_id, 0) || 0,
|
|
121
|
+
sub_type: pickFirstDefined(item.sub_type, itemRaw.sub_type, 'minutes') || 'minutes',
|
|
122
|
+
select_date: draft.targetDate,
|
|
123
|
+
number: Math.max(1, asNumber(pickFirstDefined(item.number, itemRaw.number, 1), 1)),
|
|
124
|
+
metadata: _objectSpread(_objectSpread(_objectSpread({}, itemRaw.metadata), itemMetadata), {}, {
|
|
125
|
+
slot_count: Math.max(1, asNumber(pickFirstDefined(itemMetadata.slot_count, (_itemRaw$metadata = itemRaw.metadata) === null || _itemRaw$metadata === void 0 ? void 0 : _itemRaw$metadata.slot_count, Math.ceil(Math.max(0, duration * 60) / 30)), 1)),
|
|
126
|
+
resource_id: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resource_id, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resourceId, resourceRelationId, item.courtId),
|
|
127
|
+
venue_booking: (_pickFirstDefined = pickFirstDefined(itemMetadata.venue_booking, (_itemRaw$metadata2 = itemRaw.metadata) === null || _itemRaw$metadata2 === void 0 ? void 0 : _itemRaw$metadata2.venue_booking, true)) !== null && _pickFirstDefined !== void 0 ? _pickFirstDefined : true,
|
|
128
|
+
unique_identification_number: pickFirstDefined(itemMetadata.unique_identification_number, (_itemRaw$metadata3 = itemRaw.metadata) === null || _itemRaw$metadata3 === void 0 ? void 0 : _itemRaw$metadata3.unique_identification_number)
|
|
129
|
+
}),
|
|
130
|
+
resources: [{
|
|
131
|
+
form_id: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.form_id, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.formId, firstResource.form_id, 0) || 0,
|
|
132
|
+
relation_type: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.relation_type, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.relationType, firstResource.relation_type, 'form') || 'form',
|
|
133
|
+
relation_id: resourceRelationId,
|
|
134
|
+
capacity: asNumber(pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.capacity, firstResource.capacity, 0), 0),
|
|
135
|
+
like_status: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.like_status, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.likeStatus, firstResource.like_status, 'common') || 'common',
|
|
136
|
+
metadata: _objectSpread(_objectSpread(_objectSpread({}, firstResourceMetadata), targetCourtMetadata), {}, {
|
|
137
|
+
form_name: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.form_name, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.formName, targetCourtMetadata.form_name, firstResourceMetadata.form_name) || '',
|
|
138
|
+
resource_name: pickFirstDefined(targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resource_name, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.resourceName, targetCourtMetadata.resource_name, firstResourceMetadata.resource_name, targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.name) || (targetCourt === null || targetCourt === void 0 ? void 0 : targetCourt.name) || ''
|
|
139
|
+
})
|
|
140
|
+
}],
|
|
141
|
+
start_date: start.date,
|
|
142
|
+
start_time: start.time,
|
|
143
|
+
end_date: end.date,
|
|
144
|
+
end_time: end.time,
|
|
145
|
+
duration: Math.max(0, Math.round(duration * 60))
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function resolveDetail(options, courts) {
|
|
149
|
+
try {
|
|
150
|
+
var _options$getBookingDe;
|
|
151
|
+
return ((_options$getBookingDe = options.getBookingDetailData) === null || _options$getBookingDe === void 0 ? void 0 : _options$getBookingDe.call(options, options.item, courts)) || {};
|
|
152
|
+
} catch (error) {
|
|
153
|
+
return {};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function buildCustomer(options, detail, selectedCustomer) {
|
|
157
|
+
var _detail$customer, _detail$headerSummary, _detail$customer2, _detail$customer3;
|
|
158
|
+
if (selectedCustomer) {
|
|
159
|
+
return selectedCustomer;
|
|
160
|
+
}
|
|
161
|
+
return {
|
|
162
|
+
name: ((_detail$customer = detail.customer) === null || _detail$customer === void 0 ? void 0 : _detail$customer.name) || ((_detail$headerSummary = detail.headerSummary) === null || _detail$headerSummary === void 0 ? void 0 : _detail$headerSummary.customerName) || options.item.name || 'Customer',
|
|
163
|
+
phone: ((_detail$customer2 = detail.customer) === null || _detail$customer2 === void 0 ? void 0 : _detail$customer2.phone) || options.item.phone || '',
|
|
164
|
+
email: ((_detail$customer3 = detail.customer) === null || _detail$customer3 === void 0 ? void 0 : _detail$customer3.email) || ''
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function destroyActiveInstance() {
|
|
168
|
+
if (!activeInstance) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
var _activeInstance = activeInstance,
|
|
172
|
+
container = _activeInstance.container;
|
|
173
|
+
activeInstance = null;
|
|
174
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
175
|
+
if (document.body.contains(container)) {
|
|
176
|
+
document.body.removeChild(container);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
function closeActiveInstance(reason) {
|
|
180
|
+
if (!activeInstance) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
var _activeInstance2 = activeInstance,
|
|
184
|
+
reject = _activeInstance2.reject;
|
|
185
|
+
destroyActiveInstance();
|
|
186
|
+
reject(reason);
|
|
187
|
+
}
|
|
188
|
+
var BookingChangeModalRenderer = function BookingChangeModalRenderer(_ref) {
|
|
189
|
+
var _ref2, _options$firstTimelin, _options$endTimelineE, _detail$headerSummary2, _detail$headerSummary3;
|
|
190
|
+
var options = _ref.options,
|
|
191
|
+
onResolve = _ref.onResolve,
|
|
192
|
+
onReject = _ref.onReject;
|
|
193
|
+
var item = options.item,
|
|
194
|
+
_options$courts = options.courts,
|
|
195
|
+
courts = _options$courts === void 0 ? [] : _options$courts,
|
|
196
|
+
visibleCourts = options.visibleCourts,
|
|
197
|
+
_options$bookings = options.bookings,
|
|
198
|
+
bookings = _options$bookings === void 0 ? [] : _options$bookings,
|
|
199
|
+
_options$selectedCust = options.selectedCustomer,
|
|
200
|
+
initialCustomer = _options$selectedCust === void 0 ? null : _options$selectedCust,
|
|
201
|
+
_options$title = options.title,
|
|
202
|
+
title = _options$title === void 0 ? 'Booking information' : _options$title,
|
|
203
|
+
_options$description = options.description,
|
|
204
|
+
description = _options$description === void 0 ? 'Update customer, court, date and time for this booking.' : _options$description,
|
|
205
|
+
_options$confirmText = options.confirmText,
|
|
206
|
+
confirmText = _options$confirmText === void 0 ? 'Confirm' : _options$confirmText,
|
|
207
|
+
_options$cancelText = options.cancelText,
|
|
208
|
+
cancelText = _options$cancelText === void 0 ? 'Cancel' : _options$cancelText,
|
|
209
|
+
_options$closeOnBackd = options.closeOnBackdrop,
|
|
210
|
+
closeOnBackdrop = _options$closeOnBackd === void 0 ? true : _options$closeOnBackd,
|
|
211
|
+
_options$zIndex = options.zIndex,
|
|
212
|
+
zIndex = _options$zIndex === void 0 ? 1072 : _options$zIndex,
|
|
213
|
+
_options$theme = options.theme,
|
|
214
|
+
theme = _options$theme === void 0 ? 'dark' : _options$theme;
|
|
215
|
+
var panelRef = useRef(null);
|
|
216
|
+
var closedRef = useRef(false);
|
|
217
|
+
var timerRef = useRef(null);
|
|
218
|
+
var _useState = useState(false),
|
|
219
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
220
|
+
visible = _useState2[0],
|
|
221
|
+
setVisible = _useState2[1];
|
|
222
|
+
var _useState3 = useState(false),
|
|
223
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
224
|
+
customerLoading = _useState4[0],
|
|
225
|
+
setCustomerLoading = _useState4[1];
|
|
226
|
+
var _useState5 = useState(false),
|
|
227
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
228
|
+
submitLoading = _useState6[0],
|
|
229
|
+
setSubmitLoading = _useState6[1];
|
|
230
|
+
var _useState7 = useState(''),
|
|
231
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
232
|
+
submitError = _useState8[0],
|
|
233
|
+
setSubmitError = _useState8[1];
|
|
234
|
+
var _useState9 = useState(initialCustomer),
|
|
235
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
236
|
+
selectedCustomer = _useState10[0],
|
|
237
|
+
setSelectedCustomer = _useState10[1];
|
|
238
|
+
var _useState11 = useState({
|
|
239
|
+
targetCourtId: options.targetCourtId,
|
|
240
|
+
targetDate: options.targetDate,
|
|
241
|
+
targetHour: options.targetHour
|
|
242
|
+
}),
|
|
243
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
244
|
+
draft = _useState12[0],
|
|
245
|
+
setDraft = _useState12[1];
|
|
246
|
+
var mergedCourts = useMemo(function () {
|
|
247
|
+
var source = (visibleCourts && visibleCourts.length > 0 ? visibleCourts : courts) || [];
|
|
248
|
+
if (source.length > 0) {
|
|
249
|
+
return source;
|
|
250
|
+
}
|
|
251
|
+
var fallbackIds = [item.courtId, draft.targetCourtId].filter(Boolean);
|
|
252
|
+
var uniqueIds = Array.from(new Set(fallbackIds));
|
|
253
|
+
return uniqueIds.map(function (courtId) {
|
|
254
|
+
return {
|
|
255
|
+
id: courtId,
|
|
256
|
+
name: courtId
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
}, [courts, draft.targetCourtId, item.courtId, visibleCourts]);
|
|
260
|
+
var allCourts = useMemo(function () {
|
|
261
|
+
if (courts.length > 0) {
|
|
262
|
+
return courts;
|
|
263
|
+
}
|
|
264
|
+
return mergedCourts;
|
|
265
|
+
}, [courts, mergedCourts]);
|
|
266
|
+
var targetCourt = useMemo(function () {
|
|
267
|
+
return allCourts.find(function (court) {
|
|
268
|
+
return court.id === draft.targetCourtId;
|
|
269
|
+
});
|
|
270
|
+
}, [allCourts, draft.targetCourtId]);
|
|
271
|
+
var detail = useMemo(function () {
|
|
272
|
+
return resolveDetail(options, allCourts);
|
|
273
|
+
}, [allCourts, options]);
|
|
274
|
+
var currentCustomer = useMemo(function () {
|
|
275
|
+
return buildCustomer(options, detail, selectedCustomer);
|
|
276
|
+
}, [detail, options, selectedCustomer]);
|
|
277
|
+
var hourSlots = useMemo(function () {
|
|
278
|
+
return options.hourSlots && options.hourSlots.length > 0 ? options.hourSlots : getFallbackHourSlots();
|
|
279
|
+
}, [options.hourSlots]);
|
|
280
|
+
var formatHourLabel = options.formatHourLabel || defaultFormatHourLabel;
|
|
281
|
+
var isBusinessHour = options.isBusinessHour || function () {
|
|
282
|
+
return true;
|
|
283
|
+
};
|
|
284
|
+
var availableHours = useMemo(function () {
|
|
285
|
+
var filtered = hourSlots.filter(function (hour) {
|
|
286
|
+
return isBusinessHour(hour);
|
|
287
|
+
});
|
|
288
|
+
return filtered.length > 0 ? filtered : hourSlots;
|
|
289
|
+
}, [hourSlots, isBusinessHour]);
|
|
290
|
+
var hourStep = useMemo(function () {
|
|
291
|
+
return getHourStep(hourSlots);
|
|
292
|
+
}, [hourSlots]);
|
|
293
|
+
var firstTimelineHour = (_ref2 = (_options$firstTimelin = options.firstTimelineHour) !== null && _options$firstTimelin !== void 0 ? _options$firstTimelin : Math.min.apply(Math, _toConsumableArray(hourSlots))) !== null && _ref2 !== void 0 ? _ref2 : 0;
|
|
294
|
+
var endTimelineExclusive = (_options$endTimelineE = options.endTimelineExclusive) !== null && _options$endTimelineE !== void 0 ? _options$endTimelineE : Math.max.apply(Math, _toConsumableArray(hourSlots)) + hourStep;
|
|
295
|
+
var duration = item.endHour - item.startHour;
|
|
296
|
+
var nextStartHour = draft.targetHour;
|
|
297
|
+
var nextEndHour = nextStartHour + duration;
|
|
298
|
+
var originalDate = item.date;
|
|
299
|
+
var originalStart = formatHourLabel(item.startHour);
|
|
300
|
+
var originalEnd = formatHourLabel(item.endHour);
|
|
301
|
+
var originalCourtName = getCourtName(allCourts, item.courtId) || ((_detail$headerSummary2 = detail.headerSummary) === null || _detail$headerSummary2 === void 0 ? void 0 : _detail$headerSummary2.resourceLabel) || 'Court';
|
|
302
|
+
var nextCourtName = getCourtName(allCourts, draft.targetCourtId) || ((_detail$headerSummary3 = detail.headerSummary) === null || _detail$headerSummary3 === void 0 ? void 0 : _detail$headerSummary3.resourceLabel) || 'Court';
|
|
303
|
+
var changed = originalDate !== draft.targetDate || item.courtId !== draft.targetCourtId || item.startHour !== nextStartHour;
|
|
304
|
+
var isDragScenario = item.date !== options.targetDate || item.startHour !== options.targetHour || item.courtId !== options.targetCourtId;
|
|
305
|
+
var hasConflict = options.hasConflict || function () {
|
|
306
|
+
return false;
|
|
307
|
+
};
|
|
308
|
+
var conflict = hasConflict(bookings, draft.targetCourtId, draft.targetDate, nextStartHour, nextEndHour, item.id);
|
|
309
|
+
var isLight = theme === 'light';
|
|
310
|
+
var finishClose = function finishClose(type, payload) {
|
|
311
|
+
if (closedRef.current) {
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
closedRef.current = true;
|
|
315
|
+
setVisible(false);
|
|
316
|
+
timerRef.current = window.setTimeout(function () {
|
|
317
|
+
if (type === 'resolve') {
|
|
318
|
+
onResolve(payload);
|
|
319
|
+
} else {
|
|
320
|
+
onReject(payload);
|
|
321
|
+
}
|
|
322
|
+
}, CLOSE_ANIMATION_MS);
|
|
323
|
+
};
|
|
324
|
+
var handleCancel = function handleCancel(reasonType) {
|
|
325
|
+
if (submitLoading) {
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
finishClose('reject', {
|
|
329
|
+
type: reasonType
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
useEffect(function () {
|
|
333
|
+
var rafId = window.requestAnimationFrame(function () {
|
|
334
|
+
setVisible(true);
|
|
335
|
+
});
|
|
336
|
+
var previousOverflow = document.body.style.overflow;
|
|
337
|
+
document.body.style.overflow = 'hidden';
|
|
338
|
+
var onKeyDown = function onKeyDown(event) {
|
|
339
|
+
if (event.key === 'Escape') {
|
|
340
|
+
handleCancel('escape');
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
window.addEventListener('keydown', onKeyDown);
|
|
344
|
+
return function () {
|
|
345
|
+
window.cancelAnimationFrame(rafId);
|
|
346
|
+
window.removeEventListener('keydown', onKeyDown);
|
|
347
|
+
document.body.style.overflow = previousOverflow;
|
|
348
|
+
if (timerRef.current) {
|
|
349
|
+
window.clearTimeout(timerRef.current);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
}, []);
|
|
353
|
+
|
|
354
|
+
/** Keep customer picking delegated to the caller. */
|
|
355
|
+
var handleCustomerChange = /*#__PURE__*/function () {
|
|
356
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
357
|
+
var _result;
|
|
358
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
359
|
+
while (1) switch (_context.prev = _context.next) {
|
|
360
|
+
case 0:
|
|
361
|
+
if (!(!options.onCustomerChange || customerLoading)) {
|
|
362
|
+
_context.next = 2;
|
|
363
|
+
break;
|
|
364
|
+
}
|
|
365
|
+
return _context.abrupt("return");
|
|
366
|
+
case 2:
|
|
367
|
+
setCustomerLoading(true);
|
|
368
|
+
_context.prev = 3;
|
|
369
|
+
_context.next = 6;
|
|
370
|
+
return options.onCustomerChange({
|
|
371
|
+
item: item,
|
|
372
|
+
customer: currentCustomer,
|
|
373
|
+
draft: draft,
|
|
374
|
+
options: options
|
|
375
|
+
});
|
|
376
|
+
case 6:
|
|
377
|
+
_result = _context.sent;
|
|
378
|
+
if (_result) {
|
|
379
|
+
setSelectedCustomer(_result);
|
|
380
|
+
}
|
|
381
|
+
case 8:
|
|
382
|
+
_context.prev = 8;
|
|
383
|
+
setCustomerLoading(false);
|
|
384
|
+
return _context.finish(8);
|
|
385
|
+
case 11:
|
|
386
|
+
case "end":
|
|
387
|
+
return _context.stop();
|
|
388
|
+
}
|
|
389
|
+
}, _callee, null, [[3,, 8, 11]]);
|
|
390
|
+
}));
|
|
391
|
+
return function handleCustomerChange() {
|
|
392
|
+
return _ref3.apply(this, arguments);
|
|
393
|
+
};
|
|
394
|
+
}();
|
|
395
|
+
var handleConfirm = /*#__PURE__*/function () {
|
|
396
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
397
|
+
var resultBase, submitResult, message;
|
|
398
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
399
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
400
|
+
case 0:
|
|
401
|
+
if (!(conflict || submitLoading)) {
|
|
402
|
+
_context2.next = 2;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
return _context2.abrupt("return");
|
|
406
|
+
case 2:
|
|
407
|
+
setSubmitError('');
|
|
408
|
+
resultBase = {
|
|
409
|
+
item: item,
|
|
410
|
+
original: {
|
|
411
|
+
targetCourtId: options.targetCourtId,
|
|
412
|
+
targetDate: options.targetDate,
|
|
413
|
+
targetHour: options.targetHour
|
|
414
|
+
},
|
|
415
|
+
draft: draft,
|
|
416
|
+
customer: currentCustomer,
|
|
417
|
+
duration: duration,
|
|
418
|
+
nextEndHour: nextEndHour,
|
|
419
|
+
changed: changed,
|
|
420
|
+
submitPayload: buildSubmitPayload({
|
|
421
|
+
item: item,
|
|
422
|
+
draft: draft,
|
|
423
|
+
duration: duration,
|
|
424
|
+
nextEndHour: nextEndHour,
|
|
425
|
+
targetCourt: targetCourt
|
|
426
|
+
})
|
|
427
|
+
};
|
|
428
|
+
if (options.onSubmit) {
|
|
429
|
+
_context2.next = 7;
|
|
430
|
+
break;
|
|
431
|
+
}
|
|
432
|
+
finishClose('resolve', resultBase);
|
|
433
|
+
return _context2.abrupt("return");
|
|
434
|
+
case 7:
|
|
435
|
+
setSubmitLoading(true);
|
|
436
|
+
_context2.prev = 8;
|
|
437
|
+
_context2.next = 11;
|
|
438
|
+
return options.onSubmit(_objectSpread(_objectSpread({}, resultBase), {}, {
|
|
439
|
+
options: options
|
|
440
|
+
}));
|
|
441
|
+
case 11:
|
|
442
|
+
submitResult = _context2.sent;
|
|
443
|
+
finishClose('resolve', _objectSpread(_objectSpread({}, resultBase), {}, {
|
|
444
|
+
submitResult: submitResult
|
|
445
|
+
}));
|
|
446
|
+
_context2.next = 19;
|
|
447
|
+
break;
|
|
448
|
+
case 15:
|
|
449
|
+
_context2.prev = 15;
|
|
450
|
+
_context2.t0 = _context2["catch"](8);
|
|
451
|
+
message = (_context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message) || options.submitErrorMessage || 'Submit failed. Please try again.';
|
|
452
|
+
setSubmitError(message);
|
|
453
|
+
case 19:
|
|
454
|
+
_context2.prev = 19;
|
|
455
|
+
setSubmitLoading(false);
|
|
456
|
+
return _context2.finish(19);
|
|
457
|
+
case 22:
|
|
458
|
+
case "end":
|
|
459
|
+
return _context2.stop();
|
|
460
|
+
}
|
|
461
|
+
}, _callee2, null, [[8, 15, 19, 22]]);
|
|
462
|
+
}));
|
|
463
|
+
return function handleConfirm() {
|
|
464
|
+
return _ref4.apply(this, arguments);
|
|
465
|
+
};
|
|
466
|
+
}();
|
|
467
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
468
|
+
className: ['pisell-booking-change-modal', visible ? 'is-visible' : '', isLight ? 'is-light' : 'is-dark'].filter(Boolean).join(' '),
|
|
469
|
+
style: {
|
|
470
|
+
zIndex: zIndex
|
|
471
|
+
},
|
|
472
|
+
onMouseDown: function onMouseDown(event) {
|
|
473
|
+
if (event.target === event.currentTarget && closeOnBackdrop) {
|
|
474
|
+
handleCancel('backdrop');
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
478
|
+
ref: panelRef,
|
|
479
|
+
className: "pisell-booking-change-modal__panel",
|
|
480
|
+
onMouseDown: function onMouseDown(event) {
|
|
481
|
+
return event.stopPropagation();
|
|
482
|
+
}
|
|
483
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
484
|
+
className: "pisell-booking-change-modal__title"
|
|
485
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
486
|
+
className: "pisell-booking-change-modal__description"
|
|
487
|
+
}, description), /*#__PURE__*/React.createElement("div", {
|
|
488
|
+
className: "pisell-booking-change-modal__body"
|
|
489
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
490
|
+
className: "pisell-booking-change-modal__card"
|
|
491
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
492
|
+
className: "pisell-booking-change-modal__customer"
|
|
493
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
494
|
+
className: "pisell-booking-change-modal__customer-info"
|
|
495
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
496
|
+
className: "pisell-booking-change-modal__section-label"
|
|
497
|
+
}, "Customer"), /*#__PURE__*/React.createElement("div", {
|
|
498
|
+
className: "pisell-booking-change-modal__customer-name"
|
|
499
|
+
}, currentCustomer.name), /*#__PURE__*/React.createElement("div", {
|
|
500
|
+
className: "pisell-booking-change-modal__customer-meta"
|
|
501
|
+
}, currentCustomer.phone || 'No phone'), /*#__PURE__*/React.createElement("div", {
|
|
502
|
+
className: "pisell-booking-change-modal__customer-meta"
|
|
503
|
+
}, currentCustomer.email || 'No email')), /*#__PURE__*/React.createElement("button", {
|
|
504
|
+
type: "button",
|
|
505
|
+
onClick: handleCustomerChange,
|
|
506
|
+
disabled: !options.onCustomerChange || customerLoading,
|
|
507
|
+
className: "pisell-booking-change-modal__ghost-button"
|
|
508
|
+
}, customerLoading ? 'Loading...' : 'Change'))), /*#__PURE__*/React.createElement("div", {
|
|
509
|
+
className: "pisell-booking-change-modal__grid"
|
|
510
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
511
|
+
className: "pisell-booking-change-modal__field"
|
|
512
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
513
|
+
className: "pisell-booking-change-modal__field-label"
|
|
514
|
+
}, "Court"), /*#__PURE__*/React.createElement("select", {
|
|
515
|
+
value: draft.targetCourtId,
|
|
516
|
+
onChange: function onChange(event) {
|
|
517
|
+
return setDraft(function (prev) {
|
|
518
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
519
|
+
targetCourtId: event.target.value
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
},
|
|
523
|
+
className: "pisell-booking-change-modal__control"
|
|
524
|
+
}, mergedCourts.map(function (court) {
|
|
525
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
526
|
+
key: court.id,
|
|
527
|
+
value: court.id
|
|
528
|
+
}, court.name);
|
|
529
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
530
|
+
className: "pisell-booking-change-modal__field"
|
|
531
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
532
|
+
className: "pisell-booking-change-modal__field-label"
|
|
533
|
+
}, "New date"), /*#__PURE__*/React.createElement("input", {
|
|
534
|
+
type: "date",
|
|
535
|
+
value: draft.targetDate,
|
|
536
|
+
onChange: function onChange(event) {
|
|
537
|
+
return setDraft(function (prev) {
|
|
538
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
539
|
+
targetDate: event.target.value
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
},
|
|
543
|
+
className: "pisell-booking-change-modal__control"
|
|
544
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
545
|
+
className: "pisell-booking-change-modal__grid"
|
|
546
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
547
|
+
className: "pisell-booking-change-modal__field"
|
|
548
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
549
|
+
className: "pisell-booking-change-modal__field-label"
|
|
550
|
+
}, "New start time"), /*#__PURE__*/React.createElement("select", {
|
|
551
|
+
value: nextStartHour,
|
|
552
|
+
onChange: function onChange(event) {
|
|
553
|
+
return setDraft(function (prev) {
|
|
554
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
555
|
+
targetHour: Number(event.target.value)
|
|
556
|
+
});
|
|
557
|
+
});
|
|
558
|
+
},
|
|
559
|
+
className: "pisell-booking-change-modal__control"
|
|
560
|
+
}, availableHours.map(function (hour) {
|
|
561
|
+
var disabled = hour + duration > endTimelineExclusive || hasConflict(bookings, draft.targetCourtId, draft.targetDate, hour, hour + duration, item.id);
|
|
562
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
563
|
+
key: hour,
|
|
564
|
+
value: hour,
|
|
565
|
+
disabled: disabled
|
|
566
|
+
}, disabled ? "Unavailable ".concat(formatHourLabel(hour)) : formatHourLabel(hour));
|
|
567
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
568
|
+
className: "pisell-booking-change-modal__field"
|
|
569
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
570
|
+
className: "pisell-booking-change-modal__field-label"
|
|
571
|
+
}, "New end time"), /*#__PURE__*/React.createElement("select", {
|
|
572
|
+
value: nextEndHour,
|
|
573
|
+
onChange: function onChange(event) {
|
|
574
|
+
var targetEndHour = Number(event.target.value);
|
|
575
|
+
setDraft(function (prev) {
|
|
576
|
+
return _objectSpread(_objectSpread({}, prev), {}, {
|
|
577
|
+
targetHour: targetEndHour - duration
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
},
|
|
581
|
+
className: "pisell-booking-change-modal__control"
|
|
582
|
+
}, availableHours.map(function (hour) {
|
|
583
|
+
var startHour = hour - duration;
|
|
584
|
+
var disabled = startHour < firstTimelineHour || hasConflict(bookings, draft.targetCourtId, draft.targetDate, startHour, hour, item.id);
|
|
585
|
+
return /*#__PURE__*/React.createElement("option", {
|
|
586
|
+
key: "end-".concat(hour),
|
|
587
|
+
value: hour,
|
|
588
|
+
disabled: disabled
|
|
589
|
+
}, disabled ? "Unavailable ".concat(formatHourLabel(hour)) : formatHourLabel(hour));
|
|
590
|
+
})))), changed && /*#__PURE__*/React.createElement("div", {
|
|
591
|
+
className: "pisell-booking-change-modal__card"
|
|
592
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
593
|
+
className: "pisell-booking-change-modal__section-label"
|
|
594
|
+
}, "Previous booking info"), /*#__PURE__*/React.createElement("div", {
|
|
595
|
+
className: "pisell-booking-change-modal__compare-grid"
|
|
596
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
597
|
+
className: "pisell-booking-change-modal__compare-card"
|
|
598
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
599
|
+
className: "pisell-booking-change-modal__compare-title"
|
|
600
|
+
}, "Original"), /*#__PURE__*/React.createElement("div", {
|
|
601
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
602
|
+
}, originalCourtName), /*#__PURE__*/React.createElement("div", {
|
|
603
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
604
|
+
}, originalDate), /*#__PURE__*/React.createElement("div", {
|
|
605
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
606
|
+
}, originalStart, " - ", originalEnd)), /*#__PURE__*/React.createElement("div", {
|
|
607
|
+
className: "pisell-booking-change-modal__compare-card is-highlighted"
|
|
608
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
609
|
+
className: "pisell-booking-change-modal__compare-title"
|
|
610
|
+
}, isDragScenario ? 'Drop target' : 'Updated'), /*#__PURE__*/React.createElement("div", {
|
|
611
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
612
|
+
}, nextCourtName), /*#__PURE__*/React.createElement("div", {
|
|
613
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
614
|
+
}, draft.targetDate), /*#__PURE__*/React.createElement("div", {
|
|
615
|
+
className: "pisell-booking-change-modal__compare-value"
|
|
616
|
+
}, formatHourLabel(nextStartHour), " - ", formatHourLabel(nextEndHour)))))), conflict && /*#__PURE__*/React.createElement("div", {
|
|
617
|
+
className: "pisell-booking-change-modal__error"
|
|
618
|
+
}, "The selected date, court, or time range is unavailable. Please choose an available option."), !conflict && submitError && /*#__PURE__*/React.createElement("div", {
|
|
619
|
+
className: "pisell-booking-change-modal__error"
|
|
620
|
+
}, submitError), /*#__PURE__*/React.createElement("div", {
|
|
621
|
+
className: "pisell-booking-change-modal__footer"
|
|
622
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
623
|
+
type: "button",
|
|
624
|
+
onClick: function onClick() {
|
|
625
|
+
return handleCancel('cancel');
|
|
626
|
+
},
|
|
627
|
+
disabled: submitLoading,
|
|
628
|
+
className: "pisell-booking-change-modal__ghost-button"
|
|
629
|
+
}, cancelText), /*#__PURE__*/React.createElement("button", {
|
|
630
|
+
type: "button",
|
|
631
|
+
disabled: conflict || submitLoading,
|
|
632
|
+
onClick: handleConfirm,
|
|
633
|
+
className: "pisell-booking-change-modal__primary-button"
|
|
634
|
+
}, submitLoading ? 'Submitting...' : confirmText))));
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
/**
|
|
638
|
+
* Open the booking change modal as a Promise-based singleton.
|
|
639
|
+
*/
|
|
640
|
+
function open(options) {
|
|
641
|
+
if (typeof window === 'undefined' || typeof document === 'undefined') {
|
|
642
|
+
return Promise.reject({
|
|
643
|
+
type: 'programmatic-close',
|
|
644
|
+
message: 'bookingChangeModal can only open in a browser environment.'
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (activeInstance) {
|
|
648
|
+
closeActiveInstance({
|
|
649
|
+
type: 'replaced',
|
|
650
|
+
message: 'A new booking change modal replaced the current one.'
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
var container = document.createElement('div');
|
|
654
|
+
document.body.appendChild(container);
|
|
655
|
+
return new Promise(function (resolve, reject) {
|
|
656
|
+
activeInstance = {
|
|
657
|
+
container: container,
|
|
658
|
+
reject: reject
|
|
659
|
+
};
|
|
660
|
+
var handleResolve = function handleResolve(result) {
|
|
661
|
+
destroyActiveInstance();
|
|
662
|
+
resolve(result);
|
|
663
|
+
};
|
|
664
|
+
var handleReject = function handleReject(reason) {
|
|
665
|
+
destroyActiveInstance();
|
|
666
|
+
reject(reason);
|
|
667
|
+
};
|
|
668
|
+
ReactDOM.render( /*#__PURE__*/React.createElement(BookingChangeModalRenderer, {
|
|
669
|
+
options: options,
|
|
670
|
+
onResolve: handleResolve,
|
|
671
|
+
onReject: handleReject
|
|
672
|
+
}), container);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
function close(reason) {
|
|
676
|
+
closeActiveInstance(reason || {
|
|
677
|
+
type: 'programmatic-close'
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
var bookingChangeModal = {
|
|
681
|
+
open: open,
|
|
682
|
+
close: close
|
|
683
|
+
};
|
|
684
|
+
export { open as openBookingChangeModal, close as closeBookingChangeModal };
|
|
685
|
+
export default bookingChangeModal;
|