@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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SelectionValue, GroupItem } from '../types';
|
|
2
|
+
export declare type OptionEffects = Record<string, {
|
|
3
|
+
allowOnly?: Set<any>;
|
|
4
|
+
requireOneOf?: {
|
|
5
|
+
values: Set<any>;
|
|
6
|
+
message?: string;
|
|
7
|
+
};
|
|
8
|
+
}>;
|
|
9
|
+
export interface Cond {
|
|
10
|
+
groupId: string;
|
|
11
|
+
in?: any[];
|
|
12
|
+
op?: 'in' | 'notIn' | 'eq' | 'neq' | 'contains' | 'range' | 'exists';
|
|
13
|
+
value?: any;
|
|
14
|
+
values?: any[];
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface Expr {
|
|
19
|
+
allOf?: Array<Cond | Expr>;
|
|
20
|
+
anyOf?: Array<Cond | Expr>;
|
|
21
|
+
noneOf?: Array<Cond | Expr>;
|
|
22
|
+
and?: Array<Cond | Expr>;
|
|
23
|
+
or?: Array<Cond | Expr>;
|
|
24
|
+
not?: Array<Cond | Expr>;
|
|
25
|
+
}
|
|
26
|
+
export interface Action {
|
|
27
|
+
type: 'show' | 'allowOnly' | 'requireOneOf';
|
|
28
|
+
groupId: string;
|
|
29
|
+
values?: any[];
|
|
30
|
+
message?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Rule {
|
|
33
|
+
type?: 'expr';
|
|
34
|
+
when?: Expr;
|
|
35
|
+
then?: Action[];
|
|
36
|
+
elseThen?: Action[];
|
|
37
|
+
priority?: number;
|
|
38
|
+
stopAfterApply?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare const normalizeRules: (linkageRules: any) => Rule[];
|
|
41
|
+
export declare const getSelectedSet: (val: SelectionValue) => Set<any>;
|
|
42
|
+
export declare const evaluateExpr: (expr: Expr | undefined, valuesMap: Record<string, SelectionValue>) => boolean;
|
|
43
|
+
export declare const computeAutoHiddenGroups: (rules: Rule[]) => Set<string>;
|
|
44
|
+
export declare const computeEffects: (dataSource?: GroupItem[], rawRules?: Rule[], valuesMap?: Record<string, SelectionValue>) => {
|
|
45
|
+
visibleGroups: Record<string, boolean>;
|
|
46
|
+
optionEffects: OptionEffects;
|
|
47
|
+
};
|
|
48
|
+
export declare const pruneValuesByAllowOnly: (valuesMap: Record<string, SelectionValue>, effects: OptionEffects) => Record<string, SelectionValue>;
|
|
49
|
+
export declare const generateSimpleUUID: () => string;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/pro/Selector/utils/index.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
computeAutoHiddenGroups: () => computeAutoHiddenGroups,
|
|
23
|
+
computeEffects: () => computeEffects,
|
|
24
|
+
evaluateExpr: () => evaluateExpr,
|
|
25
|
+
generateSimpleUUID: () => generateSimpleUUID,
|
|
26
|
+
getSelectedSet: () => getSelectedSet,
|
|
27
|
+
normalizeRules: () => normalizeRules,
|
|
28
|
+
pruneValuesByAllowOnly: () => pruneValuesByAllowOnly
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(utils_exports);
|
|
31
|
+
var normalizeRules = (linkageRules) => {
|
|
32
|
+
if (Array.isArray(linkageRules)) return [...linkageRules];
|
|
33
|
+
if (linkageRules && typeof linkageRules === "object")
|
|
34
|
+
return Object.values(linkageRules);
|
|
35
|
+
return [];
|
|
36
|
+
};
|
|
37
|
+
var getSelectedSet = (val) => {
|
|
38
|
+
const result = /* @__PURE__ */ new Set();
|
|
39
|
+
if (val == null) return result;
|
|
40
|
+
if (Array.isArray(val)) {
|
|
41
|
+
val.forEach((item) => {
|
|
42
|
+
if (item && typeof item === "object") {
|
|
43
|
+
if (item.value !== void 0) result.add(item.value);
|
|
44
|
+
} else {
|
|
45
|
+
result.add(item);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
} else if (typeof val === "object") {
|
|
49
|
+
if (val.value !== void 0) result.add(val.value);
|
|
50
|
+
} else {
|
|
51
|
+
result.add(val);
|
|
52
|
+
}
|
|
53
|
+
return result;
|
|
54
|
+
};
|
|
55
|
+
var evalCond = (cond, valuesMap) => {
|
|
56
|
+
const gid = String(cond.groupId ?? "");
|
|
57
|
+
const selSet = getSelectedSet(valuesMap[gid]);
|
|
58
|
+
const op = (() => {
|
|
59
|
+
if (cond.op) return cond.op;
|
|
60
|
+
if (Array.isArray(cond.in)) return "in";
|
|
61
|
+
return "in";
|
|
62
|
+
})();
|
|
63
|
+
if (op === "in") {
|
|
64
|
+
const arr = cond.values ?? cond.in ?? [];
|
|
65
|
+
return arr.some((v) => selSet.has(v));
|
|
66
|
+
}
|
|
67
|
+
if (op === "notIn") {
|
|
68
|
+
const arr = cond.values ?? cond.in ?? [];
|
|
69
|
+
return arr.every((v) => !selSet.has(v));
|
|
70
|
+
}
|
|
71
|
+
if (op === "eq" || op === "contains") {
|
|
72
|
+
return selSet.has(cond.value);
|
|
73
|
+
}
|
|
74
|
+
if (op === "neq") {
|
|
75
|
+
return !selSet.has(cond.value);
|
|
76
|
+
}
|
|
77
|
+
if (op === "range") {
|
|
78
|
+
const size = selSet.size;
|
|
79
|
+
const min = cond.min ?? Number.NEGATIVE_INFINITY;
|
|
80
|
+
const max = cond.max ?? Number.POSITIVE_INFINITY;
|
|
81
|
+
return size >= min && size <= max;
|
|
82
|
+
}
|
|
83
|
+
if (op === "exists") {
|
|
84
|
+
return selSet.size > 0;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
};
|
|
88
|
+
var isCond = (item) => {
|
|
89
|
+
return item.groupId !== void 0;
|
|
90
|
+
};
|
|
91
|
+
var evaluateExpr = (expr, valuesMap) => {
|
|
92
|
+
if (!expr) return true;
|
|
93
|
+
const allList = expr.allOf ?? expr.and;
|
|
94
|
+
const anyList = expr.anyOf ?? expr.or;
|
|
95
|
+
const noneList = expr.noneOf ?? expr.not;
|
|
96
|
+
const evalItem = (item) => {
|
|
97
|
+
if (isCond(item)) return evalCond(item, valuesMap);
|
|
98
|
+
return evaluateExpr(item, valuesMap);
|
|
99
|
+
};
|
|
100
|
+
const everyTrue = (list) => {
|
|
101
|
+
if (!Array.isArray(list) || list.length === 0) return true;
|
|
102
|
+
return list.every((it) => evalItem(it));
|
|
103
|
+
};
|
|
104
|
+
const someTrue = (list) => {
|
|
105
|
+
if (!Array.isArray(list) || list.length === 0) return true;
|
|
106
|
+
return list.some((it) => evalItem(it));
|
|
107
|
+
};
|
|
108
|
+
const noneTrue = (list) => {
|
|
109
|
+
if (!Array.isArray(list) || list.length === 0) return true;
|
|
110
|
+
return list.every((it) => !evalItem(it));
|
|
111
|
+
};
|
|
112
|
+
const okAll = everyTrue(allList);
|
|
113
|
+
const okAny = someTrue(anyList);
|
|
114
|
+
const okNone = noneTrue(noneList);
|
|
115
|
+
return okAll && okAny && okNone;
|
|
116
|
+
};
|
|
117
|
+
var computeAutoHiddenGroups = (rules) => {
|
|
118
|
+
const set = /* @__PURE__ */ new Set();
|
|
119
|
+
rules.forEach((rule) => {
|
|
120
|
+
const thenActions = Array.isArray(rule == null ? void 0 : rule.then) ? rule.then : [];
|
|
121
|
+
const elseActions = Array.isArray(rule == null ? void 0 : rule.elseThen) ? rule.elseThen : [];
|
|
122
|
+
const actions = [...thenActions, ...elseActions];
|
|
123
|
+
actions.forEach((act) => {
|
|
124
|
+
if ((act == null ? void 0 : act.type) === "show") {
|
|
125
|
+
const gid = String((act == null ? void 0 : act.groupId) ?? "");
|
|
126
|
+
if (gid) set.add(gid);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
return set;
|
|
131
|
+
};
|
|
132
|
+
var computeEffects = (dataSource = [], rawRules = [], valuesMap = {}) => {
|
|
133
|
+
const autoHiddenGroups = computeAutoHiddenGroups(rawRules);
|
|
134
|
+
const visibleGroups = {};
|
|
135
|
+
(dataSource || []).forEach((group) => {
|
|
136
|
+
const gid = String(group.id ?? "");
|
|
137
|
+
visibleGroups[gid] = autoHiddenGroups.has(gid) ? false : true;
|
|
138
|
+
});
|
|
139
|
+
const optionEffects = {};
|
|
140
|
+
const rules = [...rawRules].sort((a, b) => ((b == null ? void 0 : b.priority) || 0) - ((a == null ? void 0 : a.priority) || 0));
|
|
141
|
+
for (let i = 0; i < rules.length; i++) {
|
|
142
|
+
const rule = rules[i];
|
|
143
|
+
const hit = evaluateExpr(rule == null ? void 0 : rule.when, valuesMap);
|
|
144
|
+
const actions = hit ? Array.isArray(rule == null ? void 0 : rule.then) ? rule.then : [] : Array.isArray(rule == null ? void 0 : rule.elseThen) ? rule.elseThen : [];
|
|
145
|
+
actions.forEach((act) => {
|
|
146
|
+
var _a;
|
|
147
|
+
if ((act == null ? void 0 : act.type) === "show") {
|
|
148
|
+
const gid = String((act == null ? void 0 : act.groupId) ?? "");
|
|
149
|
+
if (gid) {
|
|
150
|
+
visibleGroups[gid] = true;
|
|
151
|
+
}
|
|
152
|
+
} else if ((act == null ? void 0 : act.type) === "allowOnly") {
|
|
153
|
+
const gid = String((act == null ? void 0 : act.groupId) ?? "");
|
|
154
|
+
if (!gid) return;
|
|
155
|
+
const prev = ((_a = optionEffects[gid]) == null ? void 0 : _a.allowOnly) || /* @__PURE__ */ new Set();
|
|
156
|
+
const values = (act == null ? void 0 : act.values) || [];
|
|
157
|
+
const merged = /* @__PURE__ */ new Set([...prev, ...values]);
|
|
158
|
+
optionEffects[gid] = { ...optionEffects[gid] || {}, allowOnly: merged };
|
|
159
|
+
} else if ((act == null ? void 0 : act.type) === "requireOneOf") {
|
|
160
|
+
const gid = String((act == null ? void 0 : act.groupId) ?? "");
|
|
161
|
+
if (!gid) return;
|
|
162
|
+
const values = new Set((act == null ? void 0 : act.values) || []);
|
|
163
|
+
optionEffects[gid] = {
|
|
164
|
+
...optionEffects[gid] || {},
|
|
165
|
+
requireOneOf: { values, message: act == null ? void 0 : act.message }
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
if (hit && (rule == null ? void 0 : rule.stopAfterApply)) break;
|
|
170
|
+
}
|
|
171
|
+
return { visibleGroups, optionEffects };
|
|
172
|
+
};
|
|
173
|
+
var pruneValuesByAllowOnly = (valuesMap, effects) => {
|
|
174
|
+
const next = { ...valuesMap };
|
|
175
|
+
Object.keys(effects).forEach((gid) => {
|
|
176
|
+
var _a;
|
|
177
|
+
const allowed = (_a = effects[gid]) == null ? void 0 : _a.allowOnly;
|
|
178
|
+
if (!allowed || allowed.size === 0) return;
|
|
179
|
+
const current = next[gid];
|
|
180
|
+
if (current == null) return;
|
|
181
|
+
const pruneArray = (arr) => {
|
|
182
|
+
return arr.filter((item) => {
|
|
183
|
+
if (item && typeof item === "object") {
|
|
184
|
+
return allowed.has(item.value);
|
|
185
|
+
}
|
|
186
|
+
return allowed.has(item);
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
if (Array.isArray(current)) {
|
|
190
|
+
const pruned = pruneArray(current);
|
|
191
|
+
next[gid] = pruned;
|
|
192
|
+
} else if (typeof current === "object") {
|
|
193
|
+
const hasVal = current.value !== void 0;
|
|
194
|
+
if (hasVal) {
|
|
195
|
+
next[gid] = allowed.has(current.value) ? current : void 0;
|
|
196
|
+
} else {
|
|
197
|
+
next[gid] = current;
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
next[gid] = allowed.has(current) ? current : void 0;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
return next;
|
|
204
|
+
};
|
|
205
|
+
var generateSimpleUUID = () => {
|
|
206
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
207
|
+
const r = Math.random() * 16 | 0;
|
|
208
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
209
|
+
return v.toString(16);
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
213
|
+
0 && (module.exports = {
|
|
214
|
+
computeAutoHiddenGroups,
|
|
215
|
+
computeEffects,
|
|
216
|
+
evaluateExpr,
|
|
217
|
+
generateSimpleUUID,
|
|
218
|
+
getSelectedSet,
|
|
219
|
+
normalizeRules,
|
|
220
|
+
pruneValuesByAllowOnly
|
|
221
|
+
});
|
|
@@ -24,15 +24,15 @@ __export(locales_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(locales_exports);
|
|
25
25
|
var locales_default = {
|
|
26
26
|
en: {
|
|
27
|
-
"pisell2.comprehensive-search.placeholder": "WalletPass Code / Name / Mobile / Email",
|
|
27
|
+
"pisell2.comprehensive-search.placeholder": "WalletPass Code / Name / Mobile / Email / Contact info",
|
|
28
28
|
"pisell2.text.search": "Search"
|
|
29
29
|
},
|
|
30
30
|
"zh-CN": {
|
|
31
|
-
"pisell2.comprehensive-search.placeholder": "钱包码 / 姓名 / 电话 / 电子邮箱",
|
|
31
|
+
"pisell2.comprehensive-search.placeholder": "钱包码 / 姓名 / 电话 / 电子邮箱 / 联系信息",
|
|
32
32
|
"pisell2.text.search": "搜索"
|
|
33
33
|
},
|
|
34
34
|
"zh-HK": {
|
|
35
|
-
"pisell2.comprehensive-search.placeholder": "錢包碼 / 姓名 / 電話 / 電子郵箱",
|
|
35
|
+
"pisell2.comprehensive-search.placeholder": "錢包碼 / 姓名 / 電話 / 電子郵箱 / 聯繫信息",
|
|
36
36
|
"pisell2.text.search": "搜索"
|
|
37
37
|
}
|
|
38
38
|
};
|
|
@@ -24,7 +24,7 @@ __export(locales_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(locales_exports);
|
|
25
25
|
var locales_default = {
|
|
26
26
|
en: {
|
|
27
|
-
"pisell2.text.new-client": "New
|
|
27
|
+
"pisell2.text.new-client": "New Customer",
|
|
28
28
|
"pisell2.comprehensive-search.empty": "No Data"
|
|
29
29
|
},
|
|
30
30
|
"zh-CN": {
|
|
@@ -37,14 +37,14 @@ var import_antd = require("antd");
|
|
|
37
37
|
var import_ahooks = require("ahooks");
|
|
38
38
|
var import_lodash = require("lodash");
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
|
-
var import_materials = require("@pisell/materials");
|
|
41
40
|
var import_shortcuts = __toESM(require("../shortcuts"));
|
|
42
41
|
var import_CashKeyboardSimple = __toESM(require("./CashKeyboardSimple"));
|
|
43
42
|
var import_utils2 = require("../../utils");
|
|
44
43
|
var import_index = require("./index.less");
|
|
45
44
|
var import_decimal = __toESM(require("decimal.js"));
|
|
46
|
-
var
|
|
45
|
+
var import_materials = require("@pisell/materials");
|
|
47
46
|
var import_utils3 = require("@pisell/utils");
|
|
47
|
+
var import_materials2 = require("@pisell/materials");
|
|
48
48
|
var CashKeyboardIntact = (props) => {
|
|
49
49
|
var _a, _b, _c;
|
|
50
50
|
const {
|
|
@@ -59,7 +59,8 @@ var CashKeyboardIntact = (props) => {
|
|
|
59
59
|
doneText,
|
|
60
60
|
resetText,
|
|
61
61
|
disabled,
|
|
62
|
-
hiddenChangeDue
|
|
62
|
+
hiddenChangeDue,
|
|
63
|
+
shortcutsSize
|
|
63
64
|
} = props;
|
|
64
65
|
const [internalValue, setInternalValue] = (0, import_ahooks.useControllableValue)(props);
|
|
65
66
|
const [isShowModal, setIsShowModal] = (0, import_react.useState)(false);
|
|
@@ -129,7 +130,8 @@ var CashKeyboardIntact = (props) => {
|
|
|
129
130
|
value: "pay",
|
|
130
131
|
style: {
|
|
131
132
|
color: "white",
|
|
132
|
-
backgroundColor: "#7F56DA"
|
|
133
|
+
backgroundColor: "#7F56DA",
|
|
134
|
+
gridColumn: "span 2"
|
|
133
135
|
},
|
|
134
136
|
onClick: () => {
|
|
135
137
|
var _a2;
|
|
@@ -138,7 +140,7 @@ var CashKeyboardIntact = (props) => {
|
|
|
138
140
|
}
|
|
139
141
|
];
|
|
140
142
|
const userPresets = presets || [];
|
|
141
|
-
const maxUserPresets =
|
|
143
|
+
const maxUserPresets = 7 - defaultEndPresets.length;
|
|
142
144
|
const limitedUserPresets = userPresets.slice(0, maxUserPresets);
|
|
143
145
|
return [...limitedUserPresets, ...defaultEndPresets];
|
|
144
146
|
};
|
|
@@ -248,7 +250,7 @@ var CashKeyboardIntact = (props) => {
|
|
|
248
250
|
)
|
|
249
251
|
},
|
|
250
252
|
/* @__PURE__ */ import_react.default.createElement(
|
|
251
|
-
|
|
253
|
+
import_materials.AutoResizeText,
|
|
252
254
|
{
|
|
253
255
|
minFontSizePx: 10,
|
|
254
256
|
maxFontSizePx: 18,
|
|
@@ -270,57 +272,53 @@ var CashKeyboardIntact = (props) => {
|
|
|
270
272
|
{
|
|
271
273
|
style: {
|
|
272
274
|
...getGridStyle(1),
|
|
273
|
-
padding: "
|
|
275
|
+
padding: "0px 16px",
|
|
274
276
|
borderRadius: "8px",
|
|
275
277
|
backgroundColor: "white",
|
|
276
|
-
boxShadow: "
|
|
278
|
+
boxShadow: "inset 0 2px 4px rgba(16, 24, 40, 0.08), inset 0 -2px 4px rgba(16, 24, 40, 0.08), inset 2px 0 4px rgba(16, 24, 40, 0.08), inset -2px 0 4px rgba(16, 24, 40, 0.08)",
|
|
277
279
|
overflow: "hidden",
|
|
278
280
|
maxWidth: 188,
|
|
279
|
-
cursor: "pointer"
|
|
281
|
+
cursor: "pointer",
|
|
282
|
+
border: "1px solid #7f56da",
|
|
283
|
+
borderBottom: "1px solid #7f56da"
|
|
280
284
|
},
|
|
281
285
|
onClick: () => {
|
|
282
286
|
setIsShowModal(true);
|
|
283
287
|
}
|
|
284
288
|
},
|
|
285
289
|
/* @__PURE__ */ import_react.default.createElement(
|
|
286
|
-
|
|
290
|
+
"div",
|
|
287
291
|
{
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
+
className: "pisell-cash-keyboard-intact-container-top",
|
|
293
|
+
style: { ...getGridStyle(0), overflow: "hidden", padding: "5px 0" }
|
|
294
|
+
},
|
|
295
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-cash-keyboard-intact-container-top-label" }, mergedDisplayField.cashReceived.label),
|
|
296
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
297
|
+
"div",
|
|
298
|
+
{
|
|
299
|
+
className: "pisell-cash-keyboard-intact-container-top-value"
|
|
292
300
|
},
|
|
293
|
-
|
|
294
|
-
|
|
301
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
302
|
+
import_materials.AutoResizeText,
|
|
295
303
|
{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
}
|
|
304
|
+
minFontSizePx: 10,
|
|
305
|
+
maxFontSizePx: 18,
|
|
306
|
+
fontSizePrecisionPx: 0.5,
|
|
307
|
+
style: { color: "#7f56da", textDecoration: "underline", textUnderlineOffset: "3px" }
|
|
300
308
|
},
|
|
301
|
-
|
|
309
|
+
internalValue ? (0, import_utils3.formatAmountWithOptions)(
|
|
310
|
+
internalValue || "",
|
|
311
|
+
amountSymbol,
|
|
312
|
+
{
|
|
313
|
+
value: internalValue,
|
|
314
|
+
hideDecimalForWholeNumbers: false,
|
|
315
|
+
precision: 2,
|
|
316
|
+
showCurrencySymbol: true
|
|
317
|
+
}
|
|
318
|
+
) : ""
|
|
302
319
|
),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
amountSymbol,
|
|
306
|
-
{
|
|
307
|
-
value: internalValue,
|
|
308
|
-
hideDecimalForWholeNumbers: false,
|
|
309
|
-
precision: 2,
|
|
310
|
-
showCurrencySymbol: true
|
|
311
|
-
}
|
|
312
|
-
) : "",
|
|
313
|
-
height: 30,
|
|
314
|
-
fontSize: 20,
|
|
315
|
-
placeholder,
|
|
316
|
-
style: {
|
|
317
|
-
fontSize: "24px",
|
|
318
|
-
fontWeight: "bold",
|
|
319
|
-
border: "none",
|
|
320
|
-
background: "transparent",
|
|
321
|
-
width: "100%"
|
|
322
|
-
}
|
|
323
|
-
}
|
|
320
|
+
/* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-edit-05", style: { color: "#7f56da", fontSize: "18px", marginLeft: "4px", marginTop: "4px" } })
|
|
321
|
+
)
|
|
324
322
|
)
|
|
325
323
|
), ((_c = mergedDisplayField.changeDue) == null ? void 0 : _c.visible) && /* @__PURE__ */ import_react.default.createElement(
|
|
326
324
|
"div",
|
|
@@ -344,7 +342,7 @@ var CashKeyboardIntact = (props) => {
|
|
|
344
342
|
)
|
|
345
343
|
},
|
|
346
344
|
/* @__PURE__ */ import_react.default.createElement(
|
|
347
|
-
|
|
345
|
+
import_materials.AutoResizeText,
|
|
348
346
|
{
|
|
349
347
|
minFontSizePx: 10,
|
|
350
348
|
maxFontSizePx: 18,
|
|
@@ -365,6 +363,7 @@ var CashKeyboardIntact = (props) => {
|
|
|
365
363
|
)), /* @__PURE__ */ import_react.default.createElement(
|
|
366
364
|
import_shortcuts.default,
|
|
367
365
|
{
|
|
366
|
+
size: shortcutsSize || "default",
|
|
368
367
|
presets: getDefaultPresets(),
|
|
369
368
|
onChange: setInternalValue,
|
|
370
369
|
disabled
|
|
@@ -7,6 +7,7 @@ export interface CashKeyboardProps extends CashKeyboardBaseProps {
|
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
};
|
|
9
9
|
variant?: 'intact' | 'simple';
|
|
10
|
+
shortcutsSize?: 'default' | 'large';
|
|
10
11
|
}
|
|
11
12
|
declare const CashKeyboard: (props: CashKeyboardProps) => React.JSX.Element;
|
|
12
13
|
export default CashKeyboard;
|
|
@@ -48,7 +48,7 @@ var CashKeyboard = (props) => {
|
|
|
48
48
|
);
|
|
49
49
|
const { getData } = context.appHelper.utils;
|
|
50
50
|
const amountSymbol = props.amountSymbol || (getData == null ? void 0 : getData("shop_symbol")) || "$";
|
|
51
|
-
const { variant = "intact", value, onChange, ...otherProps } = props;
|
|
51
|
+
const { variant = "intact", value, onChange, shortcutsSize, ...otherProps } = props;
|
|
52
52
|
const [internalValue, setInternalValue] = (0, import_ahooks.useControllableValue)(props);
|
|
53
53
|
if (variant === "intact") {
|
|
54
54
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -58,7 +58,8 @@ var CashKeyboard = (props) => {
|
|
|
58
58
|
amountSymbol,
|
|
59
59
|
value: internalValue,
|
|
60
60
|
placeholder: `${amountSymbol}0`,
|
|
61
|
-
onChange: setInternalValue
|
|
61
|
+
onChange: setInternalValue,
|
|
62
|
+
shortcutsSize
|
|
62
63
|
}
|
|
63
64
|
);
|
|
64
65
|
}
|
|
@@ -55,6 +55,7 @@ var DiscountKeyboardBase = (props) => {
|
|
|
55
55
|
defaultValue,
|
|
56
56
|
originalValue,
|
|
57
57
|
selectType = "light",
|
|
58
|
+
tips,
|
|
58
59
|
resetText,
|
|
59
60
|
doneText,
|
|
60
61
|
onEnter,
|
|
@@ -344,7 +345,13 @@ var DiscountKeyboardBase = (props) => {
|
|
|
344
345
|
)
|
|
345
346
|
);
|
|
346
347
|
};
|
|
347
|
-
|
|
348
|
+
const renderTipsContent = () => {
|
|
349
|
+
if (tips) {
|
|
350
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-pro-price-keyboard-tips" }, tips);
|
|
351
|
+
}
|
|
352
|
+
return null;
|
|
353
|
+
};
|
|
354
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-pro-price-keyboard-discount" }, renderTipsContent(), /* @__PURE__ */ import_react.default.createElement(
|
|
348
355
|
import_antd.Segmented,
|
|
349
356
|
{
|
|
350
357
|
size: "large",
|
|
@@ -7,6 +7,20 @@
|
|
|
7
7
|
gap: 10px;
|
|
8
8
|
background-color: var(--pisell-pro-price-keyboard-bg-color, #ffffff);
|
|
9
9
|
|
|
10
|
+
.pisell-pro-price-keyboard-tips {
|
|
11
|
+
background-color: var(
|
|
12
|
+
--pisell-pro-price-keyboard-bg-color-gray-200,
|
|
13
|
+
#eaecf0
|
|
14
|
+
);
|
|
15
|
+
color: #ffffff;
|
|
16
|
+
font-size: 14px;
|
|
17
|
+
font-weight: 600;
|
|
18
|
+
height: 36px;
|
|
19
|
+
line-height: 36px;
|
|
20
|
+
text-align: center;
|
|
21
|
+
border-radius: 8px;
|
|
22
|
+
}
|
|
23
|
+
|
|
10
24
|
.ellipsis {
|
|
11
25
|
overflow: hidden;
|
|
12
26
|
text-overflow: ellipsis;
|
|
@@ -12,6 +12,7 @@ export interface ShortcutsProps {
|
|
|
12
12
|
presets?: ShortcutsItem[];
|
|
13
13
|
onChange?: (val: string) => void;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
+
size?: 'default' | 'large';
|
|
15
16
|
}
|
|
16
17
|
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ShortcutsProps & React.RefAttributes<HTMLDivElement>>>;
|
|
17
18
|
export default _default;
|
|
@@ -36,7 +36,7 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_classnames = __toESM(require("classnames"));
|
|
37
37
|
var import_index = require("./index.less");
|
|
38
38
|
var Shortcuts = (0, import_react.forwardRef)((props, ref) => {
|
|
39
|
-
const { presets, onChange, disabled } = props;
|
|
39
|
+
const { presets, onChange, disabled, size = "default" } = props;
|
|
40
40
|
const handleItemClick = (item) => {
|
|
41
41
|
if (disabled || item.disabled) {
|
|
42
42
|
return;
|
|
@@ -65,7 +65,8 @@ var Shortcuts = (0, import_react.forwardRef)((props, ref) => {
|
|
|
65
65
|
const itemProps = {
|
|
66
66
|
key: index,
|
|
67
67
|
className: (0, import_classnames.default)("pisell-virtual-keyboard-shortcut", {
|
|
68
|
-
disabled: item.disabled
|
|
68
|
+
disabled: item.disabled,
|
|
69
|
+
large: size === "large"
|
|
69
70
|
}),
|
|
70
71
|
style: item.style,
|
|
71
72
|
onClick: () => handleItemClick(item)
|