@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,376 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/pro/Selector/BatchSelectorDemo.tsx
|
|
30
|
+
var BatchSelectorDemo_exports = {};
|
|
31
|
+
__export(BatchSelectorDemo_exports, {
|
|
32
|
+
BatchSelectorDemo: () => BatchSelectorDemo,
|
|
33
|
+
default: () => BatchSelectorDemo_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(BatchSelectorDemo_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_SelectorGroup = __toESM(require("./SelectorGroup"));
|
|
39
|
+
var import_icons = require("@ant-design/icons");
|
|
40
|
+
var { Title } = import_antd.Typography;
|
|
41
|
+
var dataSource = [
|
|
42
|
+
{
|
|
43
|
+
id: 1,
|
|
44
|
+
title: "主菜",
|
|
45
|
+
mode: "single",
|
|
46
|
+
valueType: "primitive",
|
|
47
|
+
fieldNames: { value: "value", label: "title" },
|
|
48
|
+
dataSource: [
|
|
49
|
+
{ id: 1, title: "汉堡", value: "burger" },
|
|
50
|
+
{ id: 2, title: "披萨", value: "pizza" }
|
|
51
|
+
],
|
|
52
|
+
grid: {
|
|
53
|
+
columns: 2,
|
|
54
|
+
gutter: 16,
|
|
55
|
+
colConfig: {
|
|
56
|
+
span: 3
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
ruleConfig: {
|
|
60
|
+
required: 1,
|
|
61
|
+
autoValidate: true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: 4,
|
|
66
|
+
title: "汉堡定制",
|
|
67
|
+
mode: "single",
|
|
68
|
+
valueType: "object",
|
|
69
|
+
fieldNames: { value: "value", label: "title" },
|
|
70
|
+
dataSource: [
|
|
71
|
+
{
|
|
72
|
+
id: 1,
|
|
73
|
+
title: "加倍牛肉",
|
|
74
|
+
value: "double-meat",
|
|
75
|
+
ruleConfig: { min: 1, max: 3 }
|
|
76
|
+
},
|
|
77
|
+
{ id: 2, title: "额外芝士", value: "extra-cheese" }
|
|
78
|
+
],
|
|
79
|
+
item: {
|
|
80
|
+
variant: "card",
|
|
81
|
+
selectedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null)
|
|
82
|
+
},
|
|
83
|
+
ruleConfig: {
|
|
84
|
+
required: 1,
|
|
85
|
+
autoValidate: true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 5,
|
|
90
|
+
title: "披萨定制",
|
|
91
|
+
mode: "multiple",
|
|
92
|
+
valueType: "object",
|
|
93
|
+
fieldNames: { value: "value", label: "title" },
|
|
94
|
+
dataSource: [
|
|
95
|
+
{
|
|
96
|
+
id: 1,
|
|
97
|
+
title: "额外芝士",
|
|
98
|
+
value: "extra-cheese",
|
|
99
|
+
cover: "https://file.mypisell-dev.com/pisel/image/9/52fe9ca4233877f2c06865d27b9fb7912022_12_01_13_32_47_147_00076174656__1080_1073__.jpeg",
|
|
100
|
+
ruleConfig: { min: 1, max: 3 }
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 2,
|
|
104
|
+
title: "薄底",
|
|
105
|
+
value: "thin-crust",
|
|
106
|
+
cover: "https://file.mypisell-dev.com/pisel/image/9/52fe9ca4233877f2c06865d27b9fb7912022_12_01_13_32_47_147_00076174656__1080_1073__.jpeg"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: 3,
|
|
110
|
+
title: "额外洋葱",
|
|
111
|
+
value: "extra-onion",
|
|
112
|
+
cover: "https://file.mypisell-dev.com/pisel/image/9/52fe9ca4233877f2c06865d27b9fb7912022_12_01_13_32_47_147_00076174656__1080_1073__.jpeg"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
grid: {
|
|
116
|
+
columns: 3,
|
|
117
|
+
gutter: 16
|
|
118
|
+
},
|
|
119
|
+
item: {
|
|
120
|
+
variant: "card",
|
|
121
|
+
layout: "vertical",
|
|
122
|
+
selectedTypeVariant: "cornered",
|
|
123
|
+
renderContent: (dataSource2) => /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
124
|
+
"img",
|
|
125
|
+
{
|
|
126
|
+
src: dataSource2.cover,
|
|
127
|
+
alt: dataSource2.title,
|
|
128
|
+
style: { width: "100%", height: "120px", objectFit: "cover" }
|
|
129
|
+
}
|
|
130
|
+
), /* @__PURE__ */ import_react.default.createElement("div", null, dataSource2.title))
|
|
131
|
+
},
|
|
132
|
+
ruleConfig: {
|
|
133
|
+
min: 1,
|
|
134
|
+
max: 2,
|
|
135
|
+
required: 1,
|
|
136
|
+
autoValidate: true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: 31,
|
|
141
|
+
title: "汉堡定制1",
|
|
142
|
+
mode: "single",
|
|
143
|
+
valueType: "object",
|
|
144
|
+
fieldNames: { value: "value", label: "title" },
|
|
145
|
+
dataSource: [
|
|
146
|
+
{
|
|
147
|
+
id: 1,
|
|
148
|
+
title: "加倍牛肉",
|
|
149
|
+
value: "double-meat",
|
|
150
|
+
ruleConfig: { min: 1, max: 3 }
|
|
151
|
+
},
|
|
152
|
+
{ id: 2, title: "额外芝士", value: "extra-cheese" }
|
|
153
|
+
],
|
|
154
|
+
item: {
|
|
155
|
+
variant: "card",
|
|
156
|
+
selectedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null)
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 32,
|
|
161
|
+
title: "汉堡定制2",
|
|
162
|
+
mode: "single",
|
|
163
|
+
valueType: "object",
|
|
164
|
+
fieldNames: { value: "value", label: "title" },
|
|
165
|
+
dataSource: [
|
|
166
|
+
{
|
|
167
|
+
id: 1,
|
|
168
|
+
title: "加倍牛肉",
|
|
169
|
+
value: "double-meat",
|
|
170
|
+
ruleConfig: { min: 1, max: 3 }
|
|
171
|
+
},
|
|
172
|
+
{ id: 2, title: "额外芝士", value: "extra-cheese" }
|
|
173
|
+
],
|
|
174
|
+
item: {
|
|
175
|
+
variant: "card",
|
|
176
|
+
selectedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null)
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 33,
|
|
181
|
+
title: "汉堡定制3",
|
|
182
|
+
mode: "single",
|
|
183
|
+
valueType: "object",
|
|
184
|
+
fieldNames: { value: "value", label: "title" },
|
|
185
|
+
dataSource: [
|
|
186
|
+
{
|
|
187
|
+
id: 1,
|
|
188
|
+
title: "加倍牛肉",
|
|
189
|
+
value: "double-meat",
|
|
190
|
+
ruleConfig: { min: 1, max: 3 }
|
|
191
|
+
},
|
|
192
|
+
{ id: 2, title: "额外芝士", value: "extra-cheese" }
|
|
193
|
+
],
|
|
194
|
+
item: {
|
|
195
|
+
variant: "card",
|
|
196
|
+
selectedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null)
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: 34,
|
|
201
|
+
title: "汉堡定制4",
|
|
202
|
+
mode: "single",
|
|
203
|
+
valueType: "object",
|
|
204
|
+
fieldNames: { value: "value", label: "title" },
|
|
205
|
+
dataSource: [
|
|
206
|
+
{
|
|
207
|
+
id: 1,
|
|
208
|
+
title: "加倍牛肉",
|
|
209
|
+
value: "double-meat",
|
|
210
|
+
ruleConfig: { min: 1, max: 3 }
|
|
211
|
+
},
|
|
212
|
+
{ id: 2, title: "额外芝士", value: "extra-cheese" }
|
|
213
|
+
],
|
|
214
|
+
item: {
|
|
215
|
+
variant: "card",
|
|
216
|
+
selectedIcon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckOutlined, null)
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
];
|
|
220
|
+
var linkageRules = [
|
|
221
|
+
{
|
|
222
|
+
type: "expr",
|
|
223
|
+
when: {
|
|
224
|
+
and: [{ groupId: "1", op: "eq", value: "burger" }]
|
|
225
|
+
},
|
|
226
|
+
then: [{ type: "show", groupId: "4" }],
|
|
227
|
+
stopAfterApply: true
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
type: "expr",
|
|
231
|
+
when: {
|
|
232
|
+
and: [{ groupId: "1", op: "eq", value: "pizza" }]
|
|
233
|
+
},
|
|
234
|
+
then: [{ type: "show", groupId: "5" }],
|
|
235
|
+
priority: 10
|
|
236
|
+
}
|
|
237
|
+
];
|
|
238
|
+
var BatchSelectorDemo = () => {
|
|
239
|
+
const [values1, setValues1] = (0, import_react.useState)({});
|
|
240
|
+
const [values2, setValues2] = (0, import_react.useState)({});
|
|
241
|
+
const ref = (0, import_react.useRef)(null);
|
|
242
|
+
const containerRef = (0, import_react.useRef)(null);
|
|
243
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "0", maxWidth: "900px", margin: "0 auto", height: "100vh", overflow: "auto" }, ref: containerRef }, /* @__PURE__ */ import_react.default.createElement(Title, { level: 2 }, "嵌套条件 + 分支控制(elseThen/stopAfterApply)演示"), /* @__PURE__ */ import_react.default.createElement(
|
|
244
|
+
import_antd.Alert,
|
|
245
|
+
{
|
|
246
|
+
message: "说明",
|
|
247
|
+
description: "当选择汉堡且不为多糖时显示“汉堡定制”(短路);未命中时显示“默认定制”(不短路,可继续评估后续规则);当选择披萨且满足(温度为热/烫 或 糖度为少糖)时显示“披萨定制”。未命中时,定制分组默认隐藏。",
|
|
248
|
+
type: "info",
|
|
249
|
+
showIcon: true,
|
|
250
|
+
style: { marginBottom: 16 }
|
|
251
|
+
}
|
|
252
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Card, { title: "BatchSelector" }, /* @__PURE__ */ import_react.default.createElement(
|
|
253
|
+
import_SelectorGroup.default,
|
|
254
|
+
{
|
|
255
|
+
dataSource,
|
|
256
|
+
linkageRules,
|
|
257
|
+
allowedValuesPolicy: "strict",
|
|
258
|
+
value: values1,
|
|
259
|
+
onChange: (v) => setValues1({ ...v || {} }),
|
|
260
|
+
customScrollParent: containerRef.current
|
|
261
|
+
}
|
|
262
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 12 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
263
|
+
import_antd.Alert,
|
|
264
|
+
{
|
|
265
|
+
message: "实时值",
|
|
266
|
+
description: /* @__PURE__ */ import_react.default.createElement("pre", { style: { margin: 0, whiteSpace: "pre-wrap" } }, JSON.stringify(values1, null, 2)),
|
|
267
|
+
type: "success",
|
|
268
|
+
showIcon: true
|
|
269
|
+
}
|
|
270
|
+
))), /* @__PURE__ */ import_react.default.createElement(Title, { level: 2, style: { marginTop: 32 } }, "联动演示:选项影响另一个分组的可选项"), /* @__PURE__ */ import_react.default.createElement(
|
|
271
|
+
import_antd.Alert,
|
|
272
|
+
{
|
|
273
|
+
message: "说明",
|
|
274
|
+
description: "当选择饮品为 Coffee 时,加料仅允许 Milk/Sugar;选择 Tea 时,加料仅允许 Lemon/Honey。未允许的选项会在 UI 中禁用(soft 模式演示)。",
|
|
275
|
+
type: "info",
|
|
276
|
+
showIcon: true,
|
|
277
|
+
style: { marginBottom: 16 }
|
|
278
|
+
}
|
|
279
|
+
), /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "1000px" } }), (() => {
|
|
280
|
+
const dataSource2 = [
|
|
281
|
+
{
|
|
282
|
+
id: 11,
|
|
283
|
+
title: "饮品",
|
|
284
|
+
mode: "single",
|
|
285
|
+
valueType: "primitive",
|
|
286
|
+
fieldNames: { value: "value", label: "title" },
|
|
287
|
+
dataSource: [
|
|
288
|
+
{ id: 1, title: "Coffee", value: "coffee" },
|
|
289
|
+
{ id: 2, title: "Tea", value: "tea" }
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
id: 12,
|
|
294
|
+
title: "加料",
|
|
295
|
+
mode: "single",
|
|
296
|
+
valueType: "primitive",
|
|
297
|
+
fieldNames: { value: "value", label: "title" },
|
|
298
|
+
dataSource: [
|
|
299
|
+
{ id: 1, title: "Milk", value: "milk" },
|
|
300
|
+
{ id: 2, title: "Sugar", value: "sugar" },
|
|
301
|
+
{ id: 3, title: "Lemon", value: "lemon" },
|
|
302
|
+
{ id: 4, title: "Honey", value: "honey" }
|
|
303
|
+
],
|
|
304
|
+
item: {
|
|
305
|
+
variant: "card"
|
|
306
|
+
},
|
|
307
|
+
titleProps: {
|
|
308
|
+
tip: {
|
|
309
|
+
visible: true,
|
|
310
|
+
text: "加料"
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
];
|
|
315
|
+
const linkageRules2 = [
|
|
316
|
+
// 当选择 Coffee 时,仅允许 milk/sugar;未选择或选择 Tea 时不受这条规则影响
|
|
317
|
+
{
|
|
318
|
+
type: "expr",
|
|
319
|
+
when: { and: [{ groupId: "11", op: "eq", value: "coffee" }] },
|
|
320
|
+
then: [
|
|
321
|
+
{
|
|
322
|
+
type: "allowOnly",
|
|
323
|
+
groupId: "12",
|
|
324
|
+
values: ["milk", "sugar"],
|
|
325
|
+
message: "请选择 Milk 或 Sugar",
|
|
326
|
+
tip: "加料仅允许 Milk/Sugar"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
priority: 30
|
|
330
|
+
},
|
|
331
|
+
// 当选择 Tea 时,仅允许 lemon/honey;未选择或选择 Coffee 时不受这条规则影响
|
|
332
|
+
{
|
|
333
|
+
type: "expr",
|
|
334
|
+
when: { and: [{ groupId: "11", op: "eq", value: "tea" }] },
|
|
335
|
+
then: [
|
|
336
|
+
{
|
|
337
|
+
type: "allowOnly",
|
|
338
|
+
groupId: "12",
|
|
339
|
+
values: ["lemon", "honey"],
|
|
340
|
+
message: "请选择 Lemon 或 Honey",
|
|
341
|
+
tip: "加料仅允许 Lemon/Honey"
|
|
342
|
+
}
|
|
343
|
+
],
|
|
344
|
+
priority: 30
|
|
345
|
+
}
|
|
346
|
+
];
|
|
347
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Card, { title: "BatchSelector(选项联动示例)" }, /* @__PURE__ */ import_react.default.createElement(
|
|
348
|
+
import_SelectorGroup.default,
|
|
349
|
+
{
|
|
350
|
+
ref,
|
|
351
|
+
dataSource: dataSource2,
|
|
352
|
+
linkageRules: linkageRules2,
|
|
353
|
+
allowedValuesPolicy: "relaxed",
|
|
354
|
+
value: values2,
|
|
355
|
+
onChange: (v) => setValues2({ ...v || {} }),
|
|
356
|
+
customScrollParent: containerRef.current
|
|
357
|
+
}
|
|
358
|
+
), /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { onClick: () => {
|
|
359
|
+
var _a;
|
|
360
|
+
return (_a = ref.current) == null ? void 0 : _a.validate();
|
|
361
|
+
} }, "validate")), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 12 } }, /* @__PURE__ */ import_react.default.createElement(
|
|
362
|
+
import_antd.Alert,
|
|
363
|
+
{
|
|
364
|
+
message: "实时值",
|
|
365
|
+
description: /* @__PURE__ */ import_react.default.createElement("pre", { style: { margin: 0, whiteSpace: "pre-wrap" } }, JSON.stringify(values2, null, 2)),
|
|
366
|
+
type: "success",
|
|
367
|
+
showIcon: true
|
|
368
|
+
}
|
|
369
|
+
)));
|
|
370
|
+
})());
|
|
371
|
+
};
|
|
372
|
+
var BatchSelectorDemo_default = BatchSelectorDemo;
|
|
373
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
374
|
+
0 && (module.exports = {
|
|
375
|
+
BatchSelectorDemo
|
|
376
|
+
});
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/pro/Selector/Selector.tsx
|
|
30
|
+
var Selector_exports = {};
|
|
31
|
+
__export(Selector_exports, {
|
|
32
|
+
default: () => Selector_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Selector_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_utils = require("@pisell/utils");
|
|
39
|
+
var import_locales = __toESM(require("./locales"));
|
|
40
|
+
var import_components = require("./components");
|
|
41
|
+
var import_useSelectionController = __toESM(require("./hooks/useSelectionController"));
|
|
42
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
43
|
+
var import_selector = require("./selector.less");
|
|
44
|
+
var ARow = import_antd.Row;
|
|
45
|
+
var ACol = import_antd.Col;
|
|
46
|
+
var ATag = import_antd.Tag;
|
|
47
|
+
var Selector = (0, import_react.forwardRef)((props, ref) => {
|
|
48
|
+
var _a, _b, _c;
|
|
49
|
+
const {
|
|
50
|
+
disabled,
|
|
51
|
+
titleProps,
|
|
52
|
+
mode = "single",
|
|
53
|
+
valueType = "primitive",
|
|
54
|
+
variant = "default",
|
|
55
|
+
grid,
|
|
56
|
+
renderItem,
|
|
57
|
+
item: itemConfig,
|
|
58
|
+
ruleConfig,
|
|
59
|
+
fieldNames
|
|
60
|
+
} = props;
|
|
61
|
+
const context = (0, import_useEngineContext.default)();
|
|
62
|
+
import_utils.locales.init(
|
|
63
|
+
import_locales.default,
|
|
64
|
+
((_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.storage) == null ? void 0 : _c.get("umi_locale")) || "en"
|
|
65
|
+
);
|
|
66
|
+
const { state, actions } = (0, import_useSelectionController.default)(props);
|
|
67
|
+
const { options, showQuantity, errors, validated } = state;
|
|
68
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
69
|
+
validate: () => {
|
|
70
|
+
return actions.validate();
|
|
71
|
+
},
|
|
72
|
+
getErrors: () => {
|
|
73
|
+
return errors || [];
|
|
74
|
+
},
|
|
75
|
+
reset: () => {
|
|
76
|
+
return actions.reset();
|
|
77
|
+
},
|
|
78
|
+
clear: () => {
|
|
79
|
+
return actions.clear();
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
(0, import_react.useEffect)(() => {
|
|
83
|
+
document.body.id = "body";
|
|
84
|
+
}, []);
|
|
85
|
+
const renderIndicator = (option, isDefault) => {
|
|
86
|
+
if (mode === "single") {
|
|
87
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
88
|
+
import_antd.Radio,
|
|
89
|
+
{
|
|
90
|
+
className: "pisell-selector_radio-trigger",
|
|
91
|
+
checked: option.selected,
|
|
92
|
+
disabled: disabled || option.disabled,
|
|
93
|
+
onChange: (e) => {
|
|
94
|
+
e.stopPropagation();
|
|
95
|
+
if (option.selected) {
|
|
96
|
+
actions.update(option._key, { quantity: 0 });
|
|
97
|
+
} else {
|
|
98
|
+
actions.update(option._key, {});
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
children: isDefault ? option._label : void 0
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
} else {
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
106
|
+
import_antd.Checkbox,
|
|
107
|
+
{
|
|
108
|
+
className: "pisell-selector_checkbox-trigger",
|
|
109
|
+
checked: option.selected,
|
|
110
|
+
disabled: disabled || option.disabled,
|
|
111
|
+
onChange: (e) => {
|
|
112
|
+
e.stopPropagation();
|
|
113
|
+
actions.toggle(option._key);
|
|
114
|
+
},
|
|
115
|
+
children: isDefault ? option._label : void 0
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const renderQuantitySelector = (option) => {
|
|
121
|
+
var _a2, _b2;
|
|
122
|
+
if (valueType === "primitive") return null;
|
|
123
|
+
if (!showQuantity) return null;
|
|
124
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
125
|
+
import_components.NumericStepper,
|
|
126
|
+
{
|
|
127
|
+
min: ((_a2 = option == null ? void 0 : option.ruleConfig) == null ? void 0 : _a2.min) ?? 0,
|
|
128
|
+
max: ((_b2 = option == null ? void 0 : option.ruleConfig) == null ? void 0 : _b2.max) ?? Number.MAX_SAFE_INTEGER,
|
|
129
|
+
value: option.quantity,
|
|
130
|
+
disabled: disabled || option.disabled,
|
|
131
|
+
onChange: (value) => actions.update(option._key, { quantity: value })
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
const renderOption = (option) => {
|
|
136
|
+
const { disabled: optionDisabled } = option;
|
|
137
|
+
const handleClick = () => {
|
|
138
|
+
if (disabled || optionDisabled) return;
|
|
139
|
+
actions.toggle(option._key);
|
|
140
|
+
};
|
|
141
|
+
if (renderItem) {
|
|
142
|
+
return renderItem({
|
|
143
|
+
dataSource: option,
|
|
144
|
+
actions,
|
|
145
|
+
trigger: renderIndicator(option),
|
|
146
|
+
numberSelector: renderQuantitySelector(option),
|
|
147
|
+
onClick: handleClick
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (!variant || variant === "default") {
|
|
151
|
+
return renderIndicator(option, true);
|
|
152
|
+
}
|
|
153
|
+
const numberSelector = renderQuantitySelector(option);
|
|
154
|
+
const trigger = renderIndicator(option);
|
|
155
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_components.CardItem,
|
|
157
|
+
{
|
|
158
|
+
...itemConfig,
|
|
159
|
+
key: option._key,
|
|
160
|
+
dataSource: option,
|
|
161
|
+
selected: option.selected,
|
|
162
|
+
disabled: disabled || option.disabled,
|
|
163
|
+
trigger,
|
|
164
|
+
numberSelector,
|
|
165
|
+
onClick: handleClick
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
};
|
|
169
|
+
const renderOptions = () => {
|
|
170
|
+
if (variant === "select" && valueType === "primitive") {
|
|
171
|
+
const _value = state.values;
|
|
172
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
import_antd.Select,
|
|
174
|
+
{
|
|
175
|
+
size: "large",
|
|
176
|
+
style: { width: "100%" },
|
|
177
|
+
mode: mode === "multiple" ? "multiple" : void 0,
|
|
178
|
+
options,
|
|
179
|
+
fieldNames,
|
|
180
|
+
value: _value,
|
|
181
|
+
onChange: (value) => actions.setValue(value),
|
|
182
|
+
disabled
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (grid) {
|
|
187
|
+
const {
|
|
188
|
+
columns = 1,
|
|
189
|
+
align,
|
|
190
|
+
gutter = 16,
|
|
191
|
+
justify,
|
|
192
|
+
wrap,
|
|
193
|
+
colConfig = {}
|
|
194
|
+
} = grid;
|
|
195
|
+
return /* @__PURE__ */ import_react.default.createElement(ARow, { gutter, justify, align, wrap }, options.map((option) => /* @__PURE__ */ import_react.default.createElement(ACol, { key: option._key, span: 24 / columns, ...colConfig }, renderOption(option))));
|
|
196
|
+
}
|
|
197
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", flexDirection: "column", gap: 16 } }, options.map(renderOption));
|
|
198
|
+
};
|
|
199
|
+
const renderErrorMsg = () => {
|
|
200
|
+
if (!(errors == null ? void 0 : errors.length)) return null;
|
|
201
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#D92D20" } }, errors[0].message);
|
|
202
|
+
};
|
|
203
|
+
const renderRequiredTag = () => {
|
|
204
|
+
const { required = false } = ruleConfig || {};
|
|
205
|
+
if (!required) return null;
|
|
206
|
+
const style = { borderRadius: 16 };
|
|
207
|
+
if (errors.find((item) => item.type === "required")) {
|
|
208
|
+
return /* @__PURE__ */ import_react.default.createElement(ATag, { icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ExclamationCircleOutlined, null), color: "error", style }, import_utils.locales.getText("pisell2.pro.selector.required-tag"));
|
|
209
|
+
}
|
|
210
|
+
if (validated) {
|
|
211
|
+
return /* @__PURE__ */ import_react.default.createElement(ATag, { icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleOutlined, null), color: "success", style }, import_utils.locales.getText("pisell2.pro.selector.required-tag"));
|
|
212
|
+
}
|
|
213
|
+
return /* @__PURE__ */ import_react.default.createElement(ATag, { style }, import_utils.locales.getText("pisell2.pro.selector.required-tag"));
|
|
214
|
+
};
|
|
215
|
+
const renderTip = () => {
|
|
216
|
+
var _a2, _b2, _c2;
|
|
217
|
+
if (((_a2 = titleProps == null ? void 0 : titleProps.tip) == null ? void 0 : _a2.visible) === false) return null;
|
|
218
|
+
let text = (_b2 = titleProps == null ? void 0 : titleProps.tip) == null ? void 0 : _b2.text;
|
|
219
|
+
if ((ruleConfig == null ? void 0 : ruleConfig.min) || (ruleConfig == null ? void 0 : ruleConfig.max)) {
|
|
220
|
+
text = import_utils.locales.getText("pisell2.pro.selector.validate.min-max-selection")(
|
|
221
|
+
ruleConfig == null ? void 0 : ruleConfig.min,
|
|
222
|
+
ruleConfig == null ? void 0 : ruleConfig.max
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
if (!text) {
|
|
226
|
+
if (mode === "multiple") {
|
|
227
|
+
text = import_utils.locales.getText("pisell2.pro.selector.mode.multiple");
|
|
228
|
+
} else {
|
|
229
|
+
text = import_utils.locales.getText("pisell2.pro.selector.mode.single");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (!text) return null;
|
|
233
|
+
return /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#475467", ...(_c2 = titleProps == null ? void 0 : titleProps.tip) == null ? void 0 : _c2.style } }, "(", text, ")");
|
|
234
|
+
};
|
|
235
|
+
const renderTitle = () => {
|
|
236
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h;
|
|
237
|
+
if ((titleProps == null ? void 0 : titleProps.visible) === false) return null;
|
|
238
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
style: {
|
|
242
|
+
marginBottom: 12,
|
|
243
|
+
display: "flex",
|
|
244
|
+
alignItems: "center",
|
|
245
|
+
...(titleProps == null ? void 0 : titleProps.style) || {}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 8, flex: 1 } }, ((_a2 = titleProps == null ? void 0 : titleProps.icon) == null ? void 0 : _a2.visible) === false || !((_b2 = titleProps == null ? void 0 : titleProps.icon) == null ? void 0 : _b2.icon) ? null : /* @__PURE__ */ import_react.default.createElement("span", { style: (_c2 = titleProps == null ? void 0 : titleProps.icon) == null ? void 0 : _c2.style }, (_d = titleProps == null ? void 0 : titleProps.icon) == null ? void 0 : _d.icon), ((_e = titleProps == null ? void 0 : titleProps.title) == null ? void 0 : _e.visible) === false || !((_f = titleProps == null ? void 0 : titleProps.title) == null ? void 0 : _f.text) && !props.title ? null : /* @__PURE__ */ import_react.default.createElement(
|
|
249
|
+
"span",
|
|
250
|
+
{
|
|
251
|
+
style: {
|
|
252
|
+
fontSize: 16,
|
|
253
|
+
fontWeight: 600,
|
|
254
|
+
...((_g = titleProps == null ? void 0 : titleProps.title) == null ? void 0 : _g.style) || {}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
((_h = titleProps == null ? void 0 : titleProps.title) == null ? void 0 : _h.text) ?? props.title
|
|
258
|
+
), renderTip(), renderErrorMsg()),
|
|
259
|
+
renderRequiredTag()
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { id: `pisell-pro-selector-${props.id}`, style: { width: "100%" } }, renderTitle(), renderOptions());
|
|
263
|
+
});
|
|
264
|
+
var Selector_default = Selector;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectionValue, SelectorGroupProps } from './types';
|
|
3
|
+
import './selectorGroup.less';
|
|
4
|
+
export declare type SelectorGroupRef = {
|
|
5
|
+
getValues: (includeHidden?: boolean) => Record<string, SelectionValue>;
|
|
6
|
+
setValues: (values: Record<string, SelectionValue>) => void;
|
|
7
|
+
validate: () => Promise<Record<string, never>>;
|
|
8
|
+
reset: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare const SelectorGroup: React.ForwardRefExoticComponent<Omit<SelectorGroupProps, "ref"> & React.RefAttributes<SelectorGroupRef>>;
|
|
11
|
+
export default SelectorGroup;
|