@pisell/private-materials 6.7.7 → 6.7.9
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 +17 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/es/components/booking/addons/index.js +17 -25
- package/es/components/booking/addons/model.d.ts +10 -1
- package/es/components/booking/components/footer/amount.d.ts +0 -1
- package/es/components/booking/components/footer/amount.js +84 -548
- package/es/components/booking/components/footer/index.js +56 -77
- package/es/components/booking/components/footer/utils.d.ts +0 -19
- package/es/components/booking/components/footer/utils.js +73 -194
- package/es/components/booking/components/voucher/index.js +7 -23
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/es/components/booking/hooks/useQuotation.js +1 -4
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +0 -1
- package/es/components/booking/info2/cartClientCard/index.js +6 -30
- package/es/components/booking/info2/index.js +1 -1
- package/es/components/booking/info2/service/addService/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/editNormalService/index.js +0 -6
- package/es/components/booking/info2/service/editService/index.js +6 -16
- package/es/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/es/components/booking/info2/service/editService/utils.js +0 -66
- package/es/components/booking/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +0 -1
- package/es/components/booking/utils.js +3 -16
- package/es/components/checkout/PaymentModal.d.ts +5 -13
- package/es/components/checkout/PaymentModal.js +252 -304
- package/es/components/checkout/PaymentPlugin.d.ts +3 -0
- package/es/components/{systemSettings/registry/components/GroupModal.js → checkout/PaymentPlugin.js} +171 -132
- package/es/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/es/components/checkout/components/AdditionalModule/index.js +12 -52
- package/es/components/checkout/components/AmountSummary/index.js +76 -9
- package/es/components/checkout/components/AmountSummary/index.less +6 -5
- package/es/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/es/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -6
- package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -2
- package/es/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +8 -31
- package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
- package/es/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
- package/es/components/checkout/hooks/useWalletPass.js +1 -1
- package/es/components/checkout/index.less +1 -1
- package/es/components/checkout/locales.d.ts +0 -6
- package/es/components/checkout/locales.js +0 -6
- package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/es/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -14
- package/es/components/eftposPay/payo/config.js +32 -70
- package/es/components/eftposPay/store/index.d.ts +4 -4
- package/es/components/eftposPay/tyro/index.js +0 -12
- package/es/components/eventBooking/components/ErrorTip/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/index.d.ts +1 -2
- package/es/components/index.js +1 -2
- package/es/components/list/List.js +40 -56
- package/es/components/list/hooks/useListState.d.ts +3 -5
- package/es/components/list/hooks/useListState.js +2 -17
- package/es/components/list/styles/header.less +3 -3
- package/es/components/list/utils/index.d.ts +1 -13
- package/es/components/list/utils/index.js +1 -43
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +0 -2
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/es/components/pay/toC/index.js +4 -7
- package/es/components/pay/toC/locales.d.ts +0 -3
- package/es/components/pay/toC/locales.js +3 -6
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +0 -1
- package/es/components/pay/toC/status.js +0 -3
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.js +36 -139
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +86 -2
- package/es/components/ticketBooking/components/menuBar/index.js +12 -109
- package/es/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/es/components/ticketBooking/components/timeBar/index.js +7 -112
- package/es/components/ticketBooking/components/timeBar/index.less +0 -59
- package/es/components/ticketBooking/hooks/pisellos/useProducts.js +18 -29
- package/es/components/ticketBooking/locales.d.ts +0 -6
- package/es/components/ticketBooking/locales.js +3 -9
- package/es/components/ticketBooking/utils/index.d.ts +0 -3
- package/es/components/ticketBooking/utils/index.js +13 -36
- package/es/components/wallet/Detail/index.js +2 -34
- package/es/components/wallet/Detail/index.less +0 -11
- package/es/components/wallet/Detail/locales.d.ts +0 -6
- package/es/components/wallet/Detail/locales.js +2 -14
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/index.js +10 -11
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +1 -5
- package/es/components/wallet/index.js +2 -4
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/wallet/serve.d.ts +0 -7
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.js +1 -5
- package/es/plus/clientCard/locales.js +3 -3
- package/es/plus/clinetSearch/index.js +30 -28
- package/es/plus/clinetSearch/locales.d.ts +0 -3
- package/es/plus/clinetSearch/locales.js +4 -7
- package/es/plus/clinetSearch/types.d.ts +0 -12
- package/es/plus/walletPassGallery/components/footerButton/index.js +4 -2
- package/es/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/passDetail/index.js +31 -84
- package/es/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/es/plus/walletPassGallery/components/recharge/index.js +8 -19
- package/es/plus/walletPassGallery/index.js +3 -7
- package/es/plus/walletPassGallery/serve.d.ts +0 -3
- package/es/plus/walletPassGallery/serve.js +2 -4
- package/es/pro/Login2.0/index.less +8 -15
- 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 +36 -45
- package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/index.js +2 -4
- package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/es/pro/priceKeyboard/components/discountKeyboard/index.js +1 -10
- package/es/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/es/pro/priceKeyboard/components/shortcuts/index.js +2 -5
- package/es/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Voucher/index.js +1 -2
- package/lib/components/booking/addons/index.js +7 -15
- package/lib/components/booking/addons/model.d.ts +10 -1
- package/lib/components/booking/components/footer/amount.d.ts +0 -1
- package/lib/components/booking/components/footer/amount.js +41 -293
- package/lib/components/booking/components/footer/index.js +11 -30
- package/lib/components/booking/components/footer/utils.d.ts +0 -19
- package/lib/components/booking/components/footer/utils.js +41 -138
- package/lib/components/booking/components/voucher/index.js +9 -25
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -2
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +0 -1
- package/lib/components/booking/info2/cartClientCard/index.js +5 -25
- package/lib/components/booking/info2/index.js +2 -7
- package/lib/components/booking/info2/service/addService/index.js +2 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +0 -6
- package/lib/components/booking/info2/service/editService/index.js +3 -12
- package/lib/components/booking/info2/service/editService/utils.d.ts +0 -15
- package/lib/components/booking/info2/service/editService/utils.js +3 -40
- package/lib/components/booking/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +0 -1
- package/lib/components/booking/utils.js +0 -11
- package/lib/components/checkout/PaymentModal.d.ts +5 -13
- package/lib/components/checkout/PaymentModal.js +147 -190
- package/lib/components/checkout/PaymentPlugin.d.ts +3 -0
- package/lib/components/checkout/PaymentPlugin.js +181 -0
- package/lib/components/checkout/components/AdditionalModule/index.d.ts +1 -3
- package/lib/components/checkout/components/AdditionalModule/index.js +11 -52
- package/lib/components/checkout/components/AmountSummary/index.js +46 -5
- package/lib/components/checkout/components/AmountSummary/index.less +6 -5
- package/lib/components/checkout/components/CashPaymentModule/index.d.ts +1 -3
- package/lib/components/checkout/components/CashPaymentModule/index.js +2 -5
- package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +0 -2
- package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +1 -5
- package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +0 -1
- package/lib/components/checkout/components/PaymentOptionsModule/index.js +0 -6
- package/lib/components/checkout/components/PaymentOptionsModule/index.less +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +0 -4
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +5 -23
- package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
- package/lib/components/checkout/components/PaymentResultToast/index.less +33 -94
- package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
- package/lib/components/checkout/hooks/useWalletPass.js +1 -1
- package/lib/components/checkout/index.less +1 -1
- package/lib/components/checkout/locales.d.ts +0 -6
- package/lib/components/checkout/locales.js +0 -6
- package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +1 -0
- package/lib/components/checkout/utils/PaymentResultToastUtils.js +1 -11
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +6 -12
- package/lib/components/eftposPay/payo/config.js +73 -98
- package/lib/components/eftposPay/store/index.d.ts +4 -4
- package/lib/components/eftposPay/tyro/index.js +0 -12
- package/lib/components/eventBooking/components/ErrorTip/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/index.d.ts +1 -2
- package/lib/components/index.js +0 -3
- package/lib/components/list/List.js +16 -34
- package/lib/components/list/hooks/useListState.d.ts +3 -5
- package/lib/components/list/hooks/useListState.js +1 -14
- package/lib/components/list/styles/header.less +3 -3
- package/lib/components/list/utils/index.d.ts +1 -13
- package/lib/components/list/utils/index.js +0 -27
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +12 -14
- package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -4
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +3 -13
- package/lib/components/pay/toC/index.js +1 -4
- package/lib/components/pay/toC/locales.d.ts +0 -3
- package/lib/components/pay/toC/locales.js +3 -6
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +0 -1
- package/lib/components/pay/toC/status.js +0 -5
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/ProductDisplayAdapter.js +0 -1
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +2 -33
- package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.js +24 -84
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/lib/components/ticketBooking/components/menuBar/index.js +6 -42
- package/lib/components/ticketBooking/components/ticketBooking/index.js +2 -2
- package/lib/components/ticketBooking/components/timeBar/index.js +4 -105
- package/lib/components/ticketBooking/components/timeBar/index.less +0 -59
- package/lib/components/ticketBooking/hooks/pisellos/useProducts.js +13 -17
- package/lib/components/ticketBooking/locales.d.ts +0 -6
- package/lib/components/ticketBooking/locales.js +3 -9
- package/lib/components/ticketBooking/utils/index.d.ts +0 -3
- package/lib/components/ticketBooking/utils/index.js +6 -20
- package/lib/components/wallet/Detail/index.js +3 -31
- package/lib/components/wallet/Detail/index.less +0 -11
- package/lib/components/wallet/Detail/locales.d.ts +0 -6
- package/lib/components/wallet/Detail/locales.js +2 -14
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +0 -4
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/wallet/serve.d.ts +0 -7
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -12
- package/lib/plus/clientCard/locales.js +3 -3
- package/lib/plus/clinetSearch/index.js +8 -17
- package/lib/plus/clinetSearch/locales.d.ts +0 -3
- package/lib/plus/clinetSearch/locales.js +4 -7
- package/lib/plus/clinetSearch/types.d.ts +0 -12
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +59 -14
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.js +15 -54
- package/lib/plus/walletPassGallery/components/passDetail/index.less +0 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +1 -7
- package/lib/plus/walletPassGallery/index.js +3 -7
- package/lib/plus/walletPassGallery/serve.d.ts +0 -3
- package/lib/plus/walletPassGallery/serve.js +2 -3
- package/lib/pro/Login2.0/index.less +8 -15
- 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 +43 -42
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +2 -3
- package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +1 -8
- package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +0 -14
- package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/shortcuts/index.js +2 -3
- package/lib/pro/priceKeyboard/components/shortcuts/index.less +0 -4
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
- package/es/components/checkout/plugin.d.ts +0 -2
- package/es/components/checkout/plugin.js +0 -303
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/eftposPay/payo/payment.js +0 -579
- package/es/components/eftposPay/utils/log/index.d.ts +0 -110
- package/es/components/eftposPay/utils/log/index.js +0 -371
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ItemModal.js +0 -547
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/ModuleList.js +0 -54
- package/es/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SectionList.js +0 -174
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/es/components/systemSettings/registry/components/SettingsTable.js +0 -765
- package/es/components/systemSettings/registry/components/index.d.ts +0 -4
- package/es/components/systemSettings/registry/components/index.js +0 -4
- package/es/components/systemSettings/registry/index.d.ts +0 -5
- package/es/components/systemSettings/registry/index.js +0 -1059
- package/es/components/systemSettings/registry/index.less +0 -410
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/locales.js +0 -300
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/services.js +0 -472
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/types.js +0 -1
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/typeValidation.js +0 -284
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/systemSettings/registry/utils/validators.js +0 -44
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/wallet/utils.js +0 -342
- package/lib/components/checkout/plugin.d.ts +0 -2
- package/lib/components/checkout/plugin.js +0 -263
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/eftposPay/payo/payment.js +0 -357
- package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
- package/lib/components/eftposPay/utils/log/index.js +0 -294
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/GroupModal.js +0 -177
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ItemModal.js +0 -508
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/ModuleList.js +0 -71
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SectionList.js +0 -181
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/SettingsTable.js +0 -575
- package/lib/components/systemSettings/registry/components/index.d.ts +0 -4
- package/lib/components/systemSettings/registry/components/index.js +0 -48
- package/lib/components/systemSettings/registry/index.d.ts +0 -5
- package/lib/components/systemSettings/registry/index.js +0 -529
- package/lib/components/systemSettings/registry/index.less +0 -410
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/locales.js +0 -324
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/services.js +0 -290
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/types.js +0 -17
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/typeValidation.js +0 -228
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/systemSettings/registry/utils/validators.js +0 -54
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/wallet/utils.js +0 -287
- package/lowcode/payment-modal/meta.ts +0 -135
- package/lowcode/settings-registry/meta.ts +0 -29
- package/lowcode/wallet-pass-detail/meta.ts +0 -89
|
@@ -60,6 +60,7 @@ 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);
|
|
63
64
|
request.setRequest(context.appHelper.utils.request);
|
|
64
65
|
var isActive = useIsActive();
|
|
65
66
|
var Toast = useToast();
|
|
@@ -207,6 +208,90 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
207
208
|
setHandleSetService(scanAddService);
|
|
208
209
|
}
|
|
209
210
|
}, [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
|
+
|
|
210
295
|
var handleAddToast = function handleAddToast(title, quantity) {
|
|
211
296
|
var _Toast$success;
|
|
212
297
|
Toast === null || Toast === void 0 || (_Toast$success = Toast.success) === null || _Toast$success === void 0 || _Toast$success.call(Toast, /*#__PURE__*/React.createElement("div", {
|
|
@@ -763,7 +848,6 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
763
848
|
},
|
|
764
849
|
new: 1,
|
|
765
850
|
};
|
|
766
|
-
cacheItem._extend.price = getMainPrice(cacheItem,_detail.price);
|
|
767
851
|
let _total = getProductTotalPrice(cacheItem);
|
|
768
852
|
// 用于折扣 可修改
|
|
769
853
|
cacheItem._extend.total = _total;
|
|
@@ -792,7 +876,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
|
792
876
|
cacheItem._serviceKey = genServiceKey(cacheItem);
|
|
793
877
|
const val = getCurrentServiceValue();
|
|
794
878
|
let { list: _list, quantity } = addService(
|
|
795
|
-
[...
|
|
879
|
+
[...val],
|
|
796
880
|
cacheItem,
|
|
797
881
|
stateRef.current
|
|
798
882
|
);
|
|
@@ -1,75 +1,15 @@
|
|
|
1
|
-
|
|
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';
|
|
1
|
+
import React from 'react';
|
|
16
2
|
import { useNetworkStatus, NetworkStatus, NetworkStatusColor } from "../../hooks/useNetworkStatus";
|
|
17
3
|
import "./index.less";
|
|
18
4
|
import { Menu } from 'antd';
|
|
19
5
|
import { ReloadOutlined, SettingOutlined } from '@ant-design/icons';
|
|
20
6
|
import { locales } from '@pisell/utils';
|
|
21
7
|
import { ConfigProvider, Iconfont } from '@pisell/materials';
|
|
22
|
-
import { getBookingConfig } from "../../serve";
|
|
23
|
-
import { useEngineContext } from "../../../../hooks";
|
|
24
8
|
var index = function index(props) {
|
|
25
9
|
var _props$activeNavKey = props.activeNavKey,
|
|
26
10
|
activeNavKey = _props$activeNavKey === void 0 ? 'ticket' : _props$activeNavKey,
|
|
27
11
|
onNavChange = props.onNavChange;
|
|
28
12
|
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
|
-
}, []);
|
|
73
13
|
|
|
74
14
|
// 导航项配置
|
|
75
15
|
var navItems = [{
|
|
@@ -81,7 +21,7 @@ var index = function index(props) {
|
|
|
81
21
|
}
|
|
82
22
|
}),
|
|
83
23
|
label: ''
|
|
84
|
-
}
|
|
24
|
+
}, {
|
|
85
25
|
key: 'food',
|
|
86
26
|
label: '',
|
|
87
27
|
icon: /*#__PURE__*/React.createElement(Iconfont, {
|
|
@@ -90,7 +30,7 @@ var index = function index(props) {
|
|
|
90
30
|
fontSize: 32
|
|
91
31
|
}
|
|
92
32
|
})
|
|
93
|
-
}]
|
|
33
|
+
}];
|
|
94
34
|
var items = [{
|
|
95
35
|
key: 'reload',
|
|
96
36
|
label: locales.getText('pisell2.ticket-booking.reload'),
|
|
@@ -119,52 +59,15 @@ var index = function index(props) {
|
|
|
119
59
|
return 'Offline';
|
|
120
60
|
}
|
|
121
61
|
};
|
|
122
|
-
var handleClick =
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
}();
|
|
62
|
+
var handleClick = function handleClick(_ref) {
|
|
63
|
+
var key = _ref.key;
|
|
64
|
+
if (key === 'reload') {
|
|
65
|
+
window.location.reload();
|
|
66
|
+
}
|
|
67
|
+
if (key === 'logout') {
|
|
68
|
+
window.location.href = '/login';
|
|
69
|
+
}
|
|
70
|
+
};
|
|
168
71
|
|
|
169
72
|
// 处理导航项点击
|
|
170
73
|
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;
|
|
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
|
|
483
|
+
getProductsRef.current({
|
|
484
484
|
schedule_date: currentDate,
|
|
485
485
|
customer_id: customerId,
|
|
486
486
|
menu_list_ids: menuList,
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
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; }
|
|
5
5
|
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; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import React, { useMemo
|
|
7
|
+
import React, { useMemo } from 'react';
|
|
8
8
|
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
|
9
9
|
import { DatePicker, SelectTime } from '@pisell/materials';
|
|
10
10
|
import { useMemoizedFn } from 'ahooks';
|
|
@@ -13,66 +13,13 @@ import dayjs from 'dayjs';
|
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import { locales } from '@pisell/utils';
|
|
15
15
|
import "./index.less";
|
|
16
|
-
import { Iconfont } from '@pisell/materials';
|
|
17
16
|
var TimeBar = function TimeBar(props) {
|
|
18
|
-
var _state$
|
|
17
|
+
var _state$modalState6;
|
|
19
18
|
var state = props.globalState,
|
|
20
19
|
setGlobalState = props.setGlobalState,
|
|
21
20
|
locale = props.locale,
|
|
22
21
|
onCreateClick = props.onCreateClick,
|
|
23
22
|
setNowTime = props.setNowTime;
|
|
24
|
-
var _useState = useState(true),
|
|
25
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
-
collapsed = _useState2[0],
|
|
27
|
-
setCollapsed = _useState2[1];
|
|
28
|
-
var _useState3 = useState(1),
|
|
29
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
30
|
-
scaleCompensation = _useState4[0],
|
|
31
|
-
setScaleCompensation = _useState4[1];
|
|
32
|
-
|
|
33
|
-
// 获取 body 的 scale 值并计算补偿
|
|
34
|
-
useEffect(function () {
|
|
35
|
-
var getBodyScale = function getBodyScale() {
|
|
36
|
-
var body = document.body;
|
|
37
|
-
var computedStyle = window.getComputedStyle(body);
|
|
38
|
-
var transform = computedStyle.transform;
|
|
39
|
-
if (transform && transform !== 'none') {
|
|
40
|
-
// 解析 transform matrix 获取 scale 值
|
|
41
|
-
// matrix(scaleX, skewY, skewX, scaleY, translateX, translateY)
|
|
42
|
-
var matrix = transform.match(/matrix\(([^)]+)\)/);
|
|
43
|
-
if (matrix) {
|
|
44
|
-
var values = matrix[1].split(',').map(function (v) {
|
|
45
|
-
return parseFloat(v.trim());
|
|
46
|
-
});
|
|
47
|
-
// scaleX 通常是 matrix 的第一个值
|
|
48
|
-
var scale = values[0] || 1;
|
|
49
|
-
return scale;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return 1;
|
|
53
|
-
};
|
|
54
|
-
var updateScale = function updateScale() {
|
|
55
|
-
var scale = getBodyScale();
|
|
56
|
-
// 目标高度是 40px,需要补偿 scale 的影响
|
|
57
|
-
// 实际设置高度 = 目标高度 / scale
|
|
58
|
-
setScaleCompensation(scale);
|
|
59
|
-
};
|
|
60
|
-
updateScale();
|
|
61
|
-
|
|
62
|
-
// 监听 body 的 transform 变化(使用 MutationObserver)
|
|
63
|
-
var observer = new MutationObserver(updateScale);
|
|
64
|
-
observer.observe(document.body, {
|
|
65
|
-
attributes: true,
|
|
66
|
-
attributeFilter: ['style', 'class']
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// 也监听窗口大小变化(某些情况下 scale 可能随窗口变化)
|
|
70
|
-
window.addEventListener('resize', updateScale);
|
|
71
|
-
return function () {
|
|
72
|
-
observer.disconnect();
|
|
73
|
-
window.removeEventListener('resize', updateScale);
|
|
74
|
-
};
|
|
75
|
-
}, []);
|
|
76
23
|
var _onClickNext = useMemoizedFn(function () {
|
|
77
24
|
var _state$modalState, _props$onDateChange, _props$setIntervalTim;
|
|
78
25
|
var currentTime = (_state$modalState = state.modalState) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.date) === null || _state$modalState === void 0 ? void 0 : _state$modalState.value;
|
|
@@ -113,52 +60,8 @@ var TimeBar = function TimeBar(props) {
|
|
|
113
60
|
});
|
|
114
61
|
(_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, timeString === dayjs().format('HH:mm'));
|
|
115
62
|
});
|
|
116
|
-
var _onToggleCollapse = useMemoizedFn(function () {
|
|
117
|
-
setCollapsed(!collapsed);
|
|
118
|
-
});
|
|
119
63
|
return useMemo(function () {
|
|
120
|
-
var _state$
|
|
121
|
-
// 收起状态
|
|
122
|
-
if (collapsed) {
|
|
123
|
-
var _state$modalState4;
|
|
124
|
-
var currentDate = state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value;
|
|
125
|
-
var isToday = currentDate && currentDate.isSame(dayjs(), 'day');
|
|
126
|
-
var displayText = isToday ? locales.getText('pisell2.ticket-booking.today') : (currentDate === null || currentDate === void 0 ? void 0 : currentDate.format('YYYY-MM-DD')) || '';
|
|
127
|
-
|
|
128
|
-
// 计算补偿后的高度:目标高度 / scale
|
|
129
|
-
var targetHeight = 40;
|
|
130
|
-
var compensatedHeight = targetHeight / scaleCompensation;
|
|
131
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
132
|
-
className: classNames('pisell-ticket-booking-time-bar', 'collapsed'),
|
|
133
|
-
style: {
|
|
134
|
-
height: "".concat(compensatedHeight, "px"),
|
|
135
|
-
minHeight: "".concat(compensatedHeight, "px"),
|
|
136
|
-
maxHeight: "".concat(compensatedHeight, "px")
|
|
137
|
-
}
|
|
138
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
139
|
-
className: "pisell-ticket-booking-time-bar-collapsed-content",
|
|
140
|
-
style: {
|
|
141
|
-
height: "".concat(compensatedHeight, "px")
|
|
142
|
-
}
|
|
143
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
144
|
-
className: "pisell-ticket-booking-time-bar-collapsed-today",
|
|
145
|
-
style: {
|
|
146
|
-
lineHeight: "".concat(compensatedHeight, "px")
|
|
147
|
-
}
|
|
148
|
-
}, displayText), /*#__PURE__*/React.createElement(Button, {
|
|
149
|
-
type: "link",
|
|
150
|
-
size: "small",
|
|
151
|
-
className: "pisell-ticket-booking-time-bar-collapsed-expand",
|
|
152
|
-
onClick: _onToggleCollapse,
|
|
153
|
-
style: {
|
|
154
|
-
lineHeight: "".concat(compensatedHeight, "px")
|
|
155
|
-
}
|
|
156
|
-
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.ticket-booking.expand')), /*#__PURE__*/React.createElement(Iconfont, {
|
|
157
|
-
type: "pisell2-chevron-right-double"
|
|
158
|
-
}))));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// 展开状态
|
|
64
|
+
var _state$modalState4, _state$modalState5;
|
|
162
65
|
return /*#__PURE__*/React.createElement("div", {
|
|
163
66
|
className: "pisell-ticket-booking-time-bar",
|
|
164
67
|
style: {
|
|
@@ -185,7 +88,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
185
88
|
}
|
|
186
89
|
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
187
90
|
inputReadOnly: true,
|
|
188
|
-
value: state === null || state === void 0 || (_state$
|
|
91
|
+
value: state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value,
|
|
189
92
|
format: locale === 'en' ? 'dddd, DD MMM YYYY' : 'YYYY年MM月DD日',
|
|
190
93
|
onChange: props === null || props === void 0 ? void 0 : props.onDateChange,
|
|
191
94
|
size: "large",
|
|
@@ -201,7 +104,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
201
104
|
'booking-page-date-picker-select': state.isTimeChange
|
|
202
105
|
})
|
|
203
106
|
}, /*#__PURE__*/React.createElement(SelectTime, {
|
|
204
|
-
value: state === null || state === void 0 || (_state$
|
|
107
|
+
value: state === null || state === void 0 || (_state$modalState5 = state.modalState) === null || _state$modalState5 === void 0 || (_state$modalState5 = _state$modalState5.date) === null || _state$modalState5 === void 0 ? void 0 : _state$modalState5.value.format('HH:mm'),
|
|
205
108
|
onChange: _onDateTimeChange,
|
|
206
109
|
popoverProps: {
|
|
207
110
|
style: {
|
|
@@ -224,15 +127,7 @@ var TimeBar = function TimeBar(props) {
|
|
|
224
127
|
},
|
|
225
128
|
size: "large",
|
|
226
129
|
type: "primary"
|
|
227
|
-
}, locales.getText('pisell2.ticket-booking.create-new'))
|
|
228
|
-
|
|
229
|
-
style: {
|
|
230
|
-
marginLeft: 'auto'
|
|
231
|
-
},
|
|
232
|
-
onClick: _onToggleCollapse
|
|
233
|
-
}, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.ticket-booking.collapse')), /*#__PURE__*/React.createElement(Iconfont, {
|
|
234
|
-
type: "pisell2-chevron-left-double"
|
|
235
|
-
})));
|
|
236
|
-
}, [collapsed, (_state$modalState7 = state.modalState) === null || _state$modalState7 === void 0 || (_state$modalState7 = _state$modalState7.date) === null || _state$modalState7 === void 0 ? void 0 : _state$modalState7.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale, _onToggleCollapse, scaleCompensation]);
|
|
130
|
+
}, locales.getText('pisell2.ticket-booking.create-new')));
|
|
131
|
+
}, [(_state$modalState6 = state.modalState) === null || _state$modalState6 === void 0 || (_state$modalState6 = _state$modalState6.date) === null || _state$modalState6 === void 0 ? void 0 : _state$modalState6.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale]);
|
|
237
132
|
};
|
|
238
133
|
export default TimeBar;
|
|
@@ -20,63 +20,4 @@
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
// 收起状态
|
|
25
|
-
&.collapsed {
|
|
26
|
-
position: fixed;
|
|
27
|
-
bottom: 0;
|
|
28
|
-
left: 86px;
|
|
29
|
-
padding: 0;
|
|
30
|
-
background-color: transparent;
|
|
31
|
-
display: block;
|
|
32
|
-
// 高度通过内联样式动态设置以补偿 body 的 scale
|
|
33
|
-
|
|
34
|
-
.pisell-ticket-booking-time-bar-collapsed-content {
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: center;
|
|
37
|
-
justify-content: space-between;
|
|
38
|
-
width: 100%;
|
|
39
|
-
// 高度通过内联样式动态设置以补偿 body 的 scale
|
|
40
|
-
padding: 0 16px;
|
|
41
|
-
background-color: #fff;
|
|
42
|
-
border-radius: 0 8px 8px 0;
|
|
43
|
-
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
|
|
44
|
-
box-sizing: border-box;
|
|
45
|
-
overflow: hidden;
|
|
46
|
-
|
|
47
|
-
.pisell-ticket-booking-time-bar-collapsed-today {
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
font-size: 18px;
|
|
50
|
-
color: #000;
|
|
51
|
-
flex-shrink: 0;
|
|
52
|
-
margin-right: 16px;
|
|
53
|
-
// line-height 通过内联样式动态设置
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.pisell-ticket-booking-time-bar-collapsed-expand {
|
|
57
|
-
color: #7F56DA;
|
|
58
|
-
padding: 0;
|
|
59
|
-
margin: 0;
|
|
60
|
-
height: auto;
|
|
61
|
-
font-size: 18px;
|
|
62
|
-
font-weight: 500;
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
flex-shrink: 0;
|
|
66
|
-
// line-height 通过内联样式动态设置
|
|
67
|
-
|
|
68
|
-
&:hover {
|
|
69
|
-
color: #6941c6;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
span {
|
|
73
|
-
margin-right: 2px;
|
|
74
|
-
}
|
|
75
|
-
.anticon {
|
|
76
|
-
margin-left: 0px;
|
|
77
|
-
margin-right: 0px;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
23
|
}
|