@pisell/private-materials 6.7.9 → 6.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/es/components/booking/addons/index.js +25 -17
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +548 -84
- package/es/components/booking/components/footer/index.js +77 -56
- package/es/components/booking/components/footer/utils.d.ts +19 -0
- package/es/components/booking/components/footer/utils.js +194 -73
- package/es/components/booking/components/voucher/index.js +23 -7
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +30 -6
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +2 -3
- package/es/components/booking/info2/service/editNormalService/index.js +6 -0
- package/es/components/booking/info2/service/editService/index.js +16 -6
- package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/es/components/booking/info2/service/editService/utils.js +66 -0
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +16 -3
- package/es/components/checkout/PaymentModal.d.ts +13 -5
- package/es/components/checkout/PaymentModal.js +304 -252
- package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/es/components/checkout/components/AdditionalModule/index.js +52 -12
- package/es/components/checkout/components/AmountSummary/index.js +9 -76
- package/es/components/checkout/components/AmountSummary/index.less +5 -6
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/es/components/checkout/components/SearchAndClientModule/index.js +39 -40
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +6 -0
- package/es/components/checkout/locales.js +6 -0
- package/es/components/checkout/plugin.d.ts +2 -0
- package/es/components/checkout/plugin.js +303 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- package/es/components/eftposPay/payo/config.js +70 -32
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/payo/payment.js +579 -0
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/tyro/index.js +12 -0
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +2 -1
- package/es/components/list/List.js +99 -56
- package/es/components/list/hooks/useListState.d.ts +5 -3
- package/es/components/list/hooks/useListState.js +10 -2
- package/es/components/list/styles/base.less +4 -0
- package/es/components/list/styles/content.less +1 -1
- package/es/components/list/styles/header.less +4 -4
- package/es/components/list/types.d.ts +1 -0
- package/es/components/list/utils/index.d.ts +13 -1
- package/es/components/list/utils/index.js +43 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/es/components/pay/toC/index.js +7 -4
- package/es/components/pay/toC/locales.d.ts +3 -0
- package/es/components/pay/toC/locales.js +6 -3
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/es/components/{checkout/PaymentPlugin.js → systemSettings/registry/components/GroupModal.js} +132 -171
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
- package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SectionList.js +174 -0
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
- package/es/components/systemSettings/registry/components/index.d.ts +4 -0
- package/es/components/systemSettings/registry/components/index.js +4 -0
- package/es/components/systemSettings/registry/index.d.ts +5 -0
- package/es/components/systemSettings/registry/index.js +1059 -0
- package/es/components/systemSettings/registry/index.less +410 -0
- package/es/components/systemSettings/registry/locales.d.ts +272 -0
- package/es/components/systemSettings/registry/locales.js +300 -0
- package/es/components/systemSettings/registry/services.d.ts +77 -0
- package/es/components/systemSettings/registry/services.js +472 -0
- package/es/components/systemSettings/registry/types.d.ts +126 -0
- package/es/components/systemSettings/registry/types.js +1 -0
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
- package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/es/components/systemSettings/registry/utils/validators.js +44 -0
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +58 -11
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +149 -36
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +2 -86
- package/es/components/ticketBooking/components/menuBar/index.js +109 -12
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +112 -7
- package/es/components/ticketBooking/components/timeBar/index.less +59 -0
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +29 -18
- package/es/components/ticketBooking/locales.d.ts +9 -0
- package/es/components/ticketBooking/locales.js +12 -3
- package/es/components/ticketBooking/utils/index.d.ts +3 -0
- package/es/components/ticketBooking/utils/index.js +36 -13
- package/es/components/wallet/Detail/index.js +34 -2
- package/es/components/wallet/Detail/index.less +11 -0
- package/es/components/wallet/Detail/locales.d.ts +6 -0
- package/es/components/wallet/Detail/locales.js +14 -2
- package/es/components/wallet/Voucher/index.js +11 -10
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/serve.d.ts +7 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/wallet/utils.js +342 -0
- package/es/index.d.ts +5 -0
- package/es/index.js +6 -1
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +28 -30
- package/es/plus/clinetSearch/locales.d.ts +3 -0
- package/es/plus/clinetSearch/locales.js +7 -4
- package/es/plus/clinetSearch/types.d.ts +12 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +1 -0
- package/es/plus/productSelect/CategoryTabs/index.js +2 -1
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +84 -31
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +7 -3
- package/es/plus/walletPassGallery/serve.d.ts +3 -0
- package/es/plus/walletPassGallery/serve.js +4 -2
- package/es/pro/Login2.0/index.less +15 -8
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/BatchSelectorDemo.js +470 -0
- package/es/pro/Selector/Selector.d.ts +5 -0
- package/es/pro/Selector/Selector.js +283 -0
- package/es/pro/Selector/SelectorGroup.d.ts +11 -0
- package/es/pro/Selector/SelectorGroup.js +537 -0
- package/es/pro/Selector/components/Card/index.d.ts +27 -0
- package/es/pro/Selector/components/Card/index.js +96 -0
- package/es/pro/Selector/components/Card/index.less +132 -0
- package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/es/pro/Selector/components/IntersectionObserver.js +384 -0
- package/es/pro/Selector/components/NumericStepper/index.d.ts +41 -0
- package/es/pro/Selector/components/NumericStepper/index.js +198 -0
- package/es/pro/Selector/components/NumericStepper/index.less +221 -0
- package/es/pro/Selector/components/index.d.ts +2 -0
- package/es/pro/Selector/components/index.js +2 -0
- package/es/pro/Selector/demo.d.ts +3 -0
- package/es/pro/Selector/demo.js +158 -0
- package/es/pro/Selector/hooks/useSelectionController.d.ts +42 -0
- package/es/pro/Selector/hooks/useSelectionController.js +414 -0
- package/es/pro/Selector/index.d.ts +8 -0
- package/es/pro/Selector/index.js +5 -0
- package/es/pro/Selector/locales.d.ts +42 -0
- package/es/pro/Selector/locales.js +80 -0
- package/es/pro/Selector/selector.less +3 -0
- package/es/pro/Selector/selectorGroup.less +8 -0
- package/es/pro/Selector/types.d.ts +114 -0
- package/es/pro/Selector/types.js +1 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/Selector/utils/index.js +229 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/es/pro/comprehensiveSearch/locales.js +1 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +45 -36
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
- package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lib/components/appointmentBooking/components/Voucher/index.js +2 -1
- package/lib/components/booking/addons/index.js +15 -7
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +293 -41
- package/lib/components/booking/components/footer/index.js +30 -11
- package/lib/components/booking/components/footer/utils.d.ts +19 -0
- package/lib/components/booking/components/footer/utils.js +138 -41
- package/lib/components/booking/components/voucher/index.js +25 -9
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +25 -5
- package/lib/components/booking/info2/index.js +7 -2
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
- package/lib/components/booking/info2/service/editService/index.js +12 -3
- package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/lib/components/booking/info2/service/editService/utils.js +40 -3
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/checkout/PaymentModal.d.ts +13 -5
- package/lib/components/checkout/PaymentModal.js +190 -147
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
- package/lib/components/checkout/components/AdditionalModule/index.js +52 -11
- package/lib/components/checkout/components/AmountSummary/index.js +5 -46
- package/lib/components/checkout/components/AmountSummary/index.less +5 -6
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
- package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
- package/lib/components/checkout/components/SearchAndClientModule/index.js +29 -3
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +6 -0
- package/lib/components/checkout/locales.js +6 -0
- package/lib/components/checkout/plugin.d.ts +2 -0
- package/lib/components/checkout/plugin.js +263 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +0 -1
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- package/lib/components/eftposPay/payo/config.js +98 -73
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/payo/payment.js +357 -0
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/tyro/index.js +12 -0
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +2 -1
- package/lib/components/index.js +3 -0
- package/lib/components/list/List.js +58 -36
- package/lib/components/list/hooks/useListState.d.ts +5 -3
- package/lib/components/list/hooks/useListState.js +9 -1
- package/lib/components/list/styles/base.less +4 -0
- package/lib/components/list/styles/content.less +1 -1
- package/lib/components/list/styles/header.less +4 -4
- package/lib/components/list/types.d.ts +1 -0
- package/lib/components/list/utils/index.d.ts +13 -1
- package/lib/components/list/utils/index.js +27 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +14 -12
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +4 -2
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/lib/components/pay/toC/index.js +4 -1
- package/lib/components/pay/toC/locales.d.ts +3 -0
- package/lib/components/pay/toC/locales.js +6 -3
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
- package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/index.js +48 -0
- package/lib/components/systemSettings/registry/index.d.ts +5 -0
- package/lib/components/systemSettings/registry/index.js +529 -0
- package/lib/components/systemSettings/registry/index.less +410 -0
- package/lib/components/systemSettings/registry/locales.d.ts +272 -0
- package/lib/components/systemSettings/registry/locales.js +324 -0
- package/lib/components/systemSettings/registry/services.d.ts +77 -0
- package/lib/components/systemSettings/registry/services.js +290 -0
- package/lib/components/systemSettings/registry/types.d.ts +126 -0
- package/lib/components/systemSettings/registry/types.js +17 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
- package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/lib/components/systemSettings/registry/utils/validators.js +54 -0
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +40 -5
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/index.less +28 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +35 -2
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +93 -24
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.js +42 -6
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
- package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +17 -13
- package/lib/components/ticketBooking/locales.d.ts +9 -0
- package/lib/components/ticketBooking/locales.js +12 -3
- package/lib/components/ticketBooking/utils/index.d.ts +3 -0
- package/lib/components/ticketBooking/utils/index.js +20 -6
- package/lib/components/wallet/Detail/index.js +31 -3
- package/lib/components/wallet/Detail/index.less +11 -0
- package/lib/components/wallet/Detail/locales.d.ts +6 -0
- package/lib/components/wallet/Detail/locales.js +14 -2
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/serve.d.ts +7 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/wallet/utils.js +287 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +15 -0
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +17 -8
- package/lib/plus/clinetSearch/locales.d.ts +3 -0
- package/lib/plus/clinetSearch/locales.js +7 -4
- package/lib/plus/clinetSearch/types.d.ts +12 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +1 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +54 -15
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +7 -3
- package/lib/plus/walletPassGallery/serve.d.ts +3 -0
- package/lib/plus/walletPassGallery/serve.js +3 -2
- package/lib/pro/Login2.0/index.less +15 -8
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/BatchSelectorDemo.js +376 -0
- package/lib/pro/Selector/Selector.d.ts +5 -0
- package/lib/pro/Selector/Selector.js +264 -0
- package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
- package/lib/pro/Selector/SelectorGroup.js +463 -0
- package/lib/pro/Selector/components/Card/index.d.ts +27 -0
- package/lib/pro/Selector/components/Card/index.js +114 -0
- package/lib/pro/Selector/components/Card/index.less +132 -0
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/lib/pro/Selector/components/IntersectionObserver.js +281 -0
- package/lib/pro/Selector/components/NumericStepper/index.d.ts +41 -0
- package/lib/pro/Selector/components/NumericStepper/index.js +221 -0
- package/lib/pro/Selector/components/NumericStepper/index.less +221 -0
- package/lib/pro/Selector/components/index.d.ts +2 -0
- package/lib/pro/Selector/components/index.js +42 -0
- package/lib/pro/Selector/demo.d.ts +3 -0
- package/lib/pro/Selector/demo.js +102 -0
- package/lib/pro/Selector/hooks/useSelectionController.d.ts +42 -0
- package/lib/pro/Selector/hooks/useSelectionController.js +338 -0
- package/lib/pro/Selector/index.d.ts +8 -0
- package/lib/pro/Selector/index.js +39 -0
- package/lib/pro/Selector/locales.d.ts +42 -0
- package/lib/pro/Selector/locales.js +80 -0
- package/lib/pro/Selector/selector.less +3 -0
- package/lib/pro/Selector/selectorGroup.less +8 -0
- package/lib/pro/Selector/types.d.ts +114 -0
- package/lib/pro/Selector/types.js +17 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/Selector/utils/index.js +221 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +3 -3
- package/lib/pro/comprehensiveSearch/locales.js +1 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +42 -43
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
- package/lowcode/payment-modal/meta.ts +135 -0
- package/lowcode/selector/meta.ts +352 -0
- package/lowcode/selector.group/meta.ts +200 -0
- package/lowcode/settings-registry/meta.ts +29 -0
- package/lowcode/wallet-pass-detail/meta.ts +89 -0
- package/package.json +4 -4
- package/es/components/checkout/PaymentPlugin.d.ts +0 -3
- package/lib/components/checkout/PaymentPlugin.d.ts +0 -3
- package/lib/components/checkout/PaymentPlugin.js +0 -181
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
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."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
1
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
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."); }
|
|
3
7
|
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); }
|
|
@@ -34,55 +38,32 @@ export var formatSkuDataSource = function formatSkuDataSource(dataSource) {
|
|
|
34
38
|
* 产品项接口
|
|
35
39
|
*/
|
|
36
40
|
|
|
41
|
+
/**
|
|
42
|
+
* 分类树节点接口(Switch 模式返回值)
|
|
43
|
+
*/
|
|
44
|
+
|
|
37
45
|
/**
|
|
38
46
|
* 根据产品数据生成分类 Tabs(Switch 模式)
|
|
39
47
|
* 参考 TestResponsiveWrapper 的 generateSimpleTabItems 函数
|
|
40
48
|
*
|
|
41
49
|
* @param products 产品列表
|
|
42
50
|
* @param tabStyle tab 样式类型
|
|
43
|
-
* @returns TabItem
|
|
51
|
+
* @returns Switch 模式返回 CategoryTreeNode[],Anchor 模式返回 TabItem[]
|
|
44
52
|
*/
|
|
45
53
|
export var generateProductTabs = function generateProductTabs(products) {
|
|
46
54
|
var tabStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'switch';
|
|
47
55
|
if (!products || products.length === 0) {
|
|
56
|
+
if (tabStyle === 'switch') {
|
|
57
|
+
return [];
|
|
58
|
+
}
|
|
48
59
|
return [{
|
|
49
60
|
key: 'all',
|
|
50
61
|
label: locales.getText('pisell2.ticket-booking.all')
|
|
51
62
|
}];
|
|
52
63
|
}
|
|
53
64
|
if (tabStyle === 'switch') {
|
|
54
|
-
//
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
// 收集所有分类
|
|
58
|
-
products.forEach(function (product) {
|
|
59
|
-
if (product.category && Array.isArray(product.category)) {
|
|
60
|
-
product.category.forEach(function (cat) {
|
|
61
|
-
if (!categoryMap.has(cat.id)) {
|
|
62
|
-
categoryMap.set(cat.id, cat);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// 按 sort 字段排序(降序,sort 越大越靠前)
|
|
69
|
-
var sortedCategories = Array.from(categoryMap.values()).sort(function (a, b) {
|
|
70
|
-
return (b.sort || 0) - (a.sort || 0);
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
// 生成 tabs
|
|
74
|
-
var tabs = [{
|
|
75
|
-
key: 'all',
|
|
76
|
-
label: locales.getText('pisell2.ticket-booking.all')
|
|
77
|
-
}];
|
|
78
|
-
sortedCategories.forEach(function (category) {
|
|
79
|
-
tabs.push({
|
|
80
|
-
key: String(category.id),
|
|
81
|
-
label: category.name,
|
|
82
|
-
group: String(category.id)
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
return tabs;
|
|
65
|
+
// 切换模式:构建多级分类树形结构
|
|
66
|
+
return buildCategoryTree(products);
|
|
86
67
|
} else {
|
|
87
68
|
// 锚点模式:基于实际数据统计数量
|
|
88
69
|
var categoryCount = products.reduce(function (acc, product) {
|
|
@@ -102,7 +83,7 @@ export var generateProductTabs = function generateProductTabs(products) {
|
|
|
102
83
|
}, {});
|
|
103
84
|
|
|
104
85
|
// 生成 tabs
|
|
105
|
-
var
|
|
86
|
+
var tabs = [{
|
|
106
87
|
key: 'all',
|
|
107
88
|
label: "".concat(locales.getText('pisell2.ticket-booking.all'), " (").concat(products.length, ")")
|
|
108
89
|
}];
|
|
@@ -121,12 +102,144 @@ export var generateProductTabs = function generateProductTabs(products) {
|
|
|
121
102
|
_ref6$ = _ref6[1],
|
|
122
103
|
count = _ref6$.count,
|
|
123
104
|
category = _ref6$.category;
|
|
124
|
-
|
|
105
|
+
tabs.push({
|
|
125
106
|
key: key,
|
|
126
107
|
label: "".concat(category.name, " (").concat(count, ")"),
|
|
127
108
|
group: key
|
|
128
109
|
});
|
|
129
110
|
});
|
|
130
|
-
return
|
|
111
|
+
return tabs;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 构建分类树形结构(Switch 模式专用)
|
|
117
|
+
*
|
|
118
|
+
* @param products 产品列表
|
|
119
|
+
* @returns CategoryTreeNode[] 树形分类结构
|
|
120
|
+
*/
|
|
121
|
+
var buildCategoryTree = function buildCategoryTree(products) {
|
|
122
|
+
// 1. 收集所有分类及其对应的商品 ID
|
|
123
|
+
var categoryMap = new Map();
|
|
124
|
+
var categoryProductMap = new Map();
|
|
125
|
+
products.forEach(function (product) {
|
|
126
|
+
if (product.category && Array.isArray(product.category)) {
|
|
127
|
+
product.category.forEach(function (cat) {
|
|
128
|
+
// 收集分类信息
|
|
129
|
+
if (!categoryMap.has(cat.id)) {
|
|
130
|
+
categoryMap.set(cat.id, cat);
|
|
131
|
+
}
|
|
132
|
+
// 收集分类对应的商品 ID
|
|
133
|
+
if (!categoryProductMap.has(cat.id)) {
|
|
134
|
+
categoryProductMap.set(cat.id, new Set());
|
|
135
|
+
}
|
|
136
|
+
categoryProductMap.get(cat.id).add(product.id);
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
// 2. 构建父子关系映射
|
|
142
|
+
var childrenMap = new Map();
|
|
143
|
+
var rootCategories = [];
|
|
144
|
+
categoryMap.forEach(function (category, id) {
|
|
145
|
+
var parentId = category.parent_id;
|
|
146
|
+
// parent_id 为 0、null 或 undefined 表示一级分类
|
|
147
|
+
if (!parentId || parentId === 0) {
|
|
148
|
+
rootCategories.push(id);
|
|
149
|
+
} else {
|
|
150
|
+
if (!childrenMap.has(parentId)) {
|
|
151
|
+
childrenMap.set(parentId, []);
|
|
152
|
+
}
|
|
153
|
+
childrenMap.get(parentId).push(id);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// 3. 按 sort 字段排序
|
|
158
|
+
var sortBySort = function sortBySort(ids) {
|
|
159
|
+
return ids.sort(function (a, b) {
|
|
160
|
+
var catA = categoryMap.get(a);
|
|
161
|
+
var catB = categoryMap.get(b);
|
|
162
|
+
return ((catB === null || catB === void 0 ? void 0 : catB.sort) || 0) - ((catA === null || catA === void 0 ? void 0 : catA.sort) || 0);
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 递归构建分类节点
|
|
168
|
+
*
|
|
169
|
+
* @param categoryId 分类 ID
|
|
170
|
+
* @param parentPath 父级路径(用于生成 pid)
|
|
171
|
+
* @returns CategoryTreeNode 分类节点
|
|
172
|
+
*/
|
|
173
|
+
var buildNode = function buildNode(categoryId, parentPath) {
|
|
174
|
+
var category = categoryMap.get(categoryId);
|
|
175
|
+
var childIds = childrenMap.get(categoryId) || [];
|
|
176
|
+
var sortedChildIds = sortBySort(_toConsumableArray(childIds));
|
|
177
|
+
|
|
178
|
+
// 当前分类直接关联的商品 ID
|
|
179
|
+
var directProductIds = Array.from(categoryProductMap.get(categoryId) || []);
|
|
180
|
+
|
|
181
|
+
// 计算当前节点的 pid
|
|
182
|
+
var currentPath = parentPath ? "".concat(parentPath, "_").concat(categoryId) : String(categoryId);
|
|
183
|
+
var pid = parentPath || undefined;
|
|
184
|
+
|
|
185
|
+
// 基础节点
|
|
186
|
+
var node = {
|
|
187
|
+
id: categoryId,
|
|
188
|
+
key: categoryId,
|
|
189
|
+
group: categoryId,
|
|
190
|
+
label: category.name,
|
|
191
|
+
name: category.name,
|
|
192
|
+
icon: category.icon,
|
|
193
|
+
productIds: directProductIds,
|
|
194
|
+
childrenMaxLevel: 0 // 默认无子分类时为 0
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
// 添加 pid(一级分类没有 pid)
|
|
198
|
+
if (pid) {
|
|
199
|
+
node.pid = pid;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// 如果有子分类,递归构建
|
|
203
|
+
if (sortedChildIds.length > 0) {
|
|
204
|
+
var childNodes = sortedChildIds.map(function (childId) {
|
|
205
|
+
return buildNode(childId, currentPath);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// 递归汇总所有子分类的商品 ID
|
|
209
|
+
var allChildProductIds = childNodes.reduce(function (acc, child) {
|
|
210
|
+
return acc.concat(child.productIds);
|
|
211
|
+
}, []);
|
|
212
|
+
|
|
213
|
+
// 合并当前分类和所有子分类的商品 ID(去重)
|
|
214
|
+
var mergedProductIds = Array.from(new Set([].concat(directProductIds, _toConsumableArray(allChildProductIds))));
|
|
215
|
+
node.productIds = mergedProductIds;
|
|
216
|
+
node.children = _toConsumableArray(childNodes);
|
|
217
|
+
|
|
218
|
+
// 计算 childrenMaxLevel:取所有子节点中最大的 childrenMaxLevel + 1
|
|
219
|
+
var maxChildLevel = 0;
|
|
220
|
+
for (var i = 0; i < childNodes.length; i++) {
|
|
221
|
+
if (childNodes[i].childrenMaxLevel > maxChildLevel) {
|
|
222
|
+
maxChildLevel = childNodes[i].childrenMaxLevel;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
node.childrenMaxLevel = maxChildLevel + 1;
|
|
226
|
+
}
|
|
227
|
+
return node;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// 4. 从根分类开始构建树
|
|
231
|
+
var sortedRootIds = sortBySort([].concat(rootCategories));
|
|
232
|
+
var rootNodes = sortedRootIds.map(function (rootId) {
|
|
233
|
+
return buildNode(rootId, '');
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// 5. 如果有根分类,在根级别追加 All 节点
|
|
237
|
+
if (rootNodes.length > 0) {
|
|
238
|
+
// 汇总所有根分类的商品 ID
|
|
239
|
+
var allProductIds = Array.from(new Set(rootNodes.flatMap(function (node) {
|
|
240
|
+
return node.productIds;
|
|
241
|
+
})));
|
|
242
|
+
return _toConsumableArray(rootNodes);
|
|
131
243
|
}
|
|
244
|
+
return rootNodes;
|
|
132
245
|
};
|
|
@@ -60,7 +60,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
60
60
|
var context = useEngineContext();
|
|
61
61
|
var platform = usePlatform();
|
|
62
62
|
var notAvailableRef = useRef(null);
|
|
63
|
-
var isLoadedServiceRef = useRef(false);
|
|
64
63
|
request.setRequest(context.appHelper.utils.request);
|
|
65
64
|
var isActive = useIsActive();
|
|
66
65
|
var Toast = useToast();
|
|
@@ -208,90 +207,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
208
207
|
setHandleSetService(scanAddService);
|
|
209
208
|
}
|
|
210
209
|
}, [isActive]);
|
|
211
|
-
|
|
212
|
-
/*
|
|
213
|
-
const removeNotAvailableService = (list: any) => {
|
|
214
|
-
if (!stateRef.current?.service?.value?.length) return;
|
|
215
|
-
const listMap = list.reduce((acc: any, cur: any) => {
|
|
216
|
-
acc[cur.id] = cur;
|
|
217
|
-
return acc;
|
|
218
|
-
}, {});
|
|
219
|
-
const newValue = (stateRef.current?.service?.value || []).filter(
|
|
220
|
-
(item: any) => listMap[item.product_id]
|
|
221
|
-
);
|
|
222
|
-
dispatch({
|
|
223
|
-
type: 'setService',
|
|
224
|
-
payload: {
|
|
225
|
-
value: newValue,
|
|
226
|
-
edit: true,
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
};
|
|
230
|
-
const getServices = async (params?: any) => {
|
|
231
|
-
setLoading(true);
|
|
232
|
-
// 活动预约如果没有绑定商品id不查询
|
|
233
|
-
if (
|
|
234
|
-
state.renderType === 'eventBooking' &&
|
|
235
|
-
!state.eventOtherParams?.productIds?.length
|
|
236
|
-
) {
|
|
237
|
-
dispatch({
|
|
238
|
-
type: 'setService',
|
|
239
|
-
payload: {
|
|
240
|
-
services: [],
|
|
241
|
-
},
|
|
242
|
-
});
|
|
243
|
-
setLoading(false);
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
|
-
let data = await getProductList({
|
|
247
|
-
skip: 1,
|
|
248
|
-
num: 500,
|
|
249
|
-
// extension_type: state.productExtensionType,
|
|
250
|
-
exclude_extension_type: [
|
|
251
|
-
'product_party',
|
|
252
|
-
'product_event',
|
|
253
|
-
'product_series_event',
|
|
254
|
-
'product_package_ticket',
|
|
255
|
-
'ticket',
|
|
256
|
-
'event_item',
|
|
257
|
-
],
|
|
258
|
-
with: ['category'],
|
|
259
|
-
open_quotation: 1,
|
|
260
|
-
with_schedule: 1,
|
|
261
|
-
with_count: ['bundleGroup', 'optionGroup'],
|
|
262
|
-
order_by_string: 'sort:desc',
|
|
263
|
-
status: 'published',
|
|
264
|
-
schedule_date: params?.schedule_date,
|
|
265
|
-
schedule_datetime: params?.schedule_datetime,
|
|
266
|
-
customer_id: params?.customer_id,
|
|
267
|
-
menu_list_ids: params?.menu_list_ids,
|
|
268
|
-
_config: {
|
|
269
|
-
fullResult: true,
|
|
270
|
-
customResponse: true,
|
|
271
|
-
},
|
|
272
|
-
});
|
|
273
|
-
setLoading(false);
|
|
274
|
-
if (data?.code === 607100) {
|
|
275
|
-
// 第一次加载时,或者之前有数据
|
|
276
|
-
if (!isLoadedServiceRef.current || state.service?.services?.length) {
|
|
277
|
-
notAvailableRef.current?.open();
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
// 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
|
|
281
|
-
if (!state.service.addModal) {
|
|
282
|
-
setDefaultService(data?.data?.list);
|
|
283
|
-
}
|
|
284
|
-
removeNotAvailableService(data?.data?.list);
|
|
285
|
-
isLoadedServiceRef.current = true;
|
|
286
|
-
dispatch({
|
|
287
|
-
type: 'setService',
|
|
288
|
-
payload: {
|
|
289
|
-
services: data?.data?.list || [],
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
*/
|
|
294
|
-
|
|
295
210
|
var handleAddToast = function handleAddToast(title, quantity) {
|
|
296
211
|
var _Toast$success;
|
|
297
212
|
Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
|
|
@@ -848,6 +763,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
848
763
|
},
|
|
849
764
|
new: 1,
|
|
850
765
|
};
|
|
766
|
+
cacheItem._extend.price = getMainPrice(cacheItem,_detail.price);
|
|
851
767
|
let _total = getProductTotalPrice(cacheItem);
|
|
852
768
|
// 用于折扣 可修改
|
|
853
769
|
cacheItem._extend.total = _total;
|
|
@@ -876,7 +792,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
876
792
|
cacheItem._serviceKey = genServiceKey(cacheItem);
|
|
877
793
|
const val = getCurrentServiceValue();
|
|
878
794
|
let { list: _list, quantity } = addService(
|
|
879
|
-
[...
|
|
795
|
+
[...stateRef.current.service.value],
|
|
880
796
|
cacheItem,
|
|
881
797
|
stateRef.current
|
|
882
798
|
);
|
|
@@ -1,15 +1,75 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
|
+
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."); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
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); } }
|
|
8
|
+
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); }); }; }
|
|
9
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
import React, { useState, useEffect } from 'react';
|
|
2
16
|
import { useNetworkStatus, NetworkStatus, NetworkStatusColor } from "../../hooks/useNetworkStatus";
|
|
3
17
|
import "./index.less";
|
|
4
18
|
import { Menu } from 'antd';
|
|
5
19
|
import { ReloadOutlined, SettingOutlined } from '@ant-design/icons';
|
|
6
20
|
import { locales } from '@pisell/utils';
|
|
7
21
|
import { ConfigProvider, Iconfont } from '@pisell/materials';
|
|
22
|
+
import { getBookingConfig } from "../../serve";
|
|
23
|
+
import { useEngineContext } from "../../../../hooks";
|
|
8
24
|
var index = function index(props) {
|
|
9
25
|
var _props$activeNavKey = props.activeNavKey,
|
|
10
26
|
activeNavKey = _props$activeNavKey === void 0 ? 'ticket' : _props$activeNavKey,
|
|
11
27
|
onNavChange = props.onNavChange;
|
|
12
28
|
var status = useNetworkStatus();
|
|
29
|
+
var _useState = useState(false),
|
|
30
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
31
|
+
showFoodMenu = _useState2[0],
|
|
32
|
+
setShowFoodMenu = _useState2[1];
|
|
33
|
+
var context = useEngineContext();
|
|
34
|
+
|
|
35
|
+
// 检查是否显示 food 菜单
|
|
36
|
+
useEffect(function () {
|
|
37
|
+
var checkFoodConfig = /*#__PURE__*/function () {
|
|
38
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
39
|
+
var data;
|
|
40
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
41
|
+
while (1) switch (_context.prev = _context.next) {
|
|
42
|
+
case 0:
|
|
43
|
+
_context.prev = 0;
|
|
44
|
+
_context.next = 3;
|
|
45
|
+
return getBookingConfig({
|
|
46
|
+
item_type: 'appointment_booking',
|
|
47
|
+
sub_type: 'food',
|
|
48
|
+
source_type: 'pos'
|
|
49
|
+
});
|
|
50
|
+
case 3:
|
|
51
|
+
data = _context.sent;
|
|
52
|
+
if (data) {
|
|
53
|
+
setShowFoodMenu(true);
|
|
54
|
+
}
|
|
55
|
+
_context.next = 10;
|
|
56
|
+
break;
|
|
57
|
+
case 7:
|
|
58
|
+
_context.prev = 7;
|
|
59
|
+
_context.t0 = _context["catch"](0);
|
|
60
|
+
console.error('获取 food 配置失败:', _context.t0);
|
|
61
|
+
case 10:
|
|
62
|
+
case "end":
|
|
63
|
+
return _context.stop();
|
|
64
|
+
}
|
|
65
|
+
}, _callee, null, [[0, 7]]);
|
|
66
|
+
}));
|
|
67
|
+
return function checkFoodConfig() {
|
|
68
|
+
return _ref.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
}();
|
|
71
|
+
checkFoodConfig();
|
|
72
|
+
}, []);
|
|
13
73
|
|
|
14
74
|
// 导航项配置
|
|
15
75
|
var navItems = [{
|
|
@@ -21,7 +81,7 @@ var index = function index(props) {
|
|
|
21
81
|
}
|
|
22
82
|
}),
|
|
23
83
|
label: ''
|
|
24
|
-
}
|
|
84
|
+
}].concat(_toConsumableArray(showFoodMenu ? [{
|
|
25
85
|
key: 'food',
|
|
26
86
|
label: '',
|
|
27
87
|
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
@@ -30,7 +90,7 @@ var index = function index(props) {
|
|
|
30
90
|
fontSize: 32
|
|
31
91
|
}
|
|
32
92
|
})
|
|
33
|
-
}];
|
|
93
|
+
}] : []));
|
|
34
94
|
var items = [{
|
|
35
95
|
key: 'reload',
|
|
36
96
|
label: locales.getText('pisell2.ticket-booking.reload'),
|
|
@@ -59,15 +119,52 @@ var index = function index(props) {
|
|
|
59
119
|
return 'Offline';
|
|
60
120
|
}
|
|
61
121
|
};
|
|
62
|
-
var handleClick = function
|
|
63
|
-
var
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
122
|
+
var handleClick = /*#__PURE__*/function () {
|
|
123
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) {
|
|
124
|
+
var key, _context$appHelper, _ref4, getApp, app, _app$logger;
|
|
125
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
126
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
127
|
+
case 0:
|
|
128
|
+
key = _ref2.key;
|
|
129
|
+
if (!(key === 'reload')) {
|
|
130
|
+
_context2.next = 14;
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
_context2.prev = 2;
|
|
134
|
+
_ref4 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {}, getApp = _ref4.getApp;
|
|
135
|
+
app = getApp();
|
|
136
|
+
if (!app) {
|
|
137
|
+
_context2.next = 9;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
app.logger.addLog({
|
|
141
|
+
type: 'info',
|
|
142
|
+
title: 'Reload App'
|
|
143
|
+
});
|
|
144
|
+
_context2.next = 9;
|
|
145
|
+
return app === null || app === void 0 || (_app$logger = app.logger) === null || _app$logger === void 0 ? void 0 : _app$logger.storeLog();
|
|
146
|
+
case 9:
|
|
147
|
+
_context2.next = 13;
|
|
148
|
+
break;
|
|
149
|
+
case 11:
|
|
150
|
+
_context2.prev = 11;
|
|
151
|
+
_context2.t0 = _context2["catch"](2);
|
|
152
|
+
case 13:
|
|
153
|
+
window.location.reload();
|
|
154
|
+
case 14:
|
|
155
|
+
if (key === 'logout') {
|
|
156
|
+
window.location.href = '/login';
|
|
157
|
+
}
|
|
158
|
+
case 15:
|
|
159
|
+
case "end":
|
|
160
|
+
return _context2.stop();
|
|
161
|
+
}
|
|
162
|
+
}, _callee2, null, [[2, 11]]);
|
|
163
|
+
}));
|
|
164
|
+
return function handleClick(_x) {
|
|
165
|
+
return _ref3.apply(this, arguments);
|
|
166
|
+
};
|
|
167
|
+
}();
|
|
71
168
|
|
|
72
169
|
// 处理导航项点击
|
|
73
170
|
var handleNavClick = function handleNavClick(key) {
|
|
@@ -475,12 +475,12 @@ var TicketBooking = function TicketBooking(props) {
|
|
|
475
475
|
};
|
|
476
476
|
}, []);
|
|
477
477
|
var _getProducts = function _getProducts(date) {
|
|
478
|
-
var _state$modalState, _state$bookingConfig;
|
|
478
|
+
var _state$modalState, _state$bookingConfig, _getProductsRef$curre;
|
|
479
479
|
var currentDate = date.format('YYYY-MM-DD');
|
|
480
480
|
var currentDatetime = date.format('YYYY-MM-DD HH:mm:ss');
|
|
481
481
|
var customerId = (_state$modalState = state.modalState) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.client) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.value) === null || _state$modalState === void 0 ? void 0 : _state$modalState.id;
|
|
482
482
|
var menuList = ((_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.menu_list_tab) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.menu_list) || [];
|
|
483
|
-
getProductsRef.current({
|
|
483
|
+
getProductsRef === null || getProductsRef === void 0 || (_getProductsRef$curre = getProductsRef.current) === null || _getProductsRef$curre === void 0 || _getProductsRef$curre.call(getProductsRef, {
|
|
484
484
|
schedule_date: currentDate,
|
|
485
485
|
customer_id: customerId,
|
|
486
486
|
menu_list_ids: menuList,
|