@pisell/private-materials 6.7.8 → 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/addons/model.d.ts +10 -1
- 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/forms/model.d.ts +10 -1
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service2/utils.js +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/addService/utils.d.ts +1 -1
- 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/model.d.ts +9 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/booking/utils.d.ts +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/hooks/useWalletPass.js +1 -1
- 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/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/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/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/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/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/schedules/model.d.ts +9 -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/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/index.js +11 -10
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/components/WalletCard.js +5 -1
- package/es/components/wallet/index.js +4 -2
- package/es/components/wallet/model.d.ts +9 -1
- 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/addons/model.d.ts +10 -1
- 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/forms/model.d.ts +10 -1
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.js +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/addService/utils.d.ts +1 -1
- 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/model.d.ts +9 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/booking/utils.d.ts +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/hooks/useWalletPass.js +1 -1
- 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/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/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/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/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/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/schedules/model.d.ts +9 -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/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/index.js +8 -8
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/components/WalletCard.js +4 -0
- package/lib/components/wallet/index.js +2 -2
- package/lib/components/wallet/model.d.ts +9 -1
- 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 +3 -3
- 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,221 @@
|
|
|
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/components/NumericStepper/index.tsx
|
|
30
|
+
var NumericStepper_exports = {};
|
|
31
|
+
__export(NumericStepper_exports, {
|
|
32
|
+
default: () => NumericStepper_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(NumericStepper_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var NumericStepper = ({
|
|
40
|
+
value,
|
|
41
|
+
defaultValue = 0,
|
|
42
|
+
min = 0,
|
|
43
|
+
max = Infinity,
|
|
44
|
+
step = 1,
|
|
45
|
+
disabled = false,
|
|
46
|
+
onChange,
|
|
47
|
+
className,
|
|
48
|
+
style,
|
|
49
|
+
size = "middle",
|
|
50
|
+
shape = "round",
|
|
51
|
+
showInput = false,
|
|
52
|
+
minusIcon,
|
|
53
|
+
plusIcon
|
|
54
|
+
}) => {
|
|
55
|
+
const [internalValue, setInternalValue] = (0, import_react.useState)(
|
|
56
|
+
value !== void 0 ? value : defaultValue
|
|
57
|
+
);
|
|
58
|
+
const [inputDisplayValue, setInputDisplayValue] = (0, import_react.useState)("");
|
|
59
|
+
const currentValue = value !== void 0 ? value : internalValue;
|
|
60
|
+
(0, import_react.useEffect)(() => {
|
|
61
|
+
if (value !== void 0) {
|
|
62
|
+
setInternalValue(value);
|
|
63
|
+
}
|
|
64
|
+
}, [value]);
|
|
65
|
+
(0, import_react.useEffect)(() => {
|
|
66
|
+
setInputDisplayValue(currentValue.toString());
|
|
67
|
+
}, [currentValue]);
|
|
68
|
+
const handleValueChange = (0, import_react.useCallback)(
|
|
69
|
+
(newValue) => {
|
|
70
|
+
const clampedValue = Math.max(min, Math.min(max, newValue));
|
|
71
|
+
if (value === void 0) {
|
|
72
|
+
setInternalValue(clampedValue);
|
|
73
|
+
}
|
|
74
|
+
onChange == null ? void 0 : onChange(clampedValue);
|
|
75
|
+
},
|
|
76
|
+
[min, max, value, onChange]
|
|
77
|
+
);
|
|
78
|
+
const handleDecrease = (0, import_react.useCallback)(() => {
|
|
79
|
+
if (disabled) return;
|
|
80
|
+
const newValue = currentValue - step;
|
|
81
|
+
if (newValue >= min) {
|
|
82
|
+
handleValueChange(newValue);
|
|
83
|
+
}
|
|
84
|
+
}, [currentValue, step, min, disabled, handleValueChange]);
|
|
85
|
+
const handleIncrease = (0, import_react.useCallback)(() => {
|
|
86
|
+
if (disabled) return;
|
|
87
|
+
const newValue = currentValue + step;
|
|
88
|
+
if (newValue <= max) {
|
|
89
|
+
handleValueChange(newValue);
|
|
90
|
+
}
|
|
91
|
+
}, [currentValue, step, max, disabled, handleValueChange]);
|
|
92
|
+
const handleInputChange = (0, import_react.useCallback)(
|
|
93
|
+
(e) => {
|
|
94
|
+
const inputValue = e.target.value;
|
|
95
|
+
setInputDisplayValue(inputValue);
|
|
96
|
+
},
|
|
97
|
+
[]
|
|
98
|
+
);
|
|
99
|
+
const processInputValue = (0, import_react.useCallback)(
|
|
100
|
+
(inputValue) => {
|
|
101
|
+
const trimmedValue = inputValue.trim();
|
|
102
|
+
if (trimmedValue === "") {
|
|
103
|
+
setInputDisplayValue(currentValue.toString());
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const numValue = parseFloat(trimmedValue);
|
|
107
|
+
if (!isNaN(numValue)) {
|
|
108
|
+
const clampedValue = Math.max(min, Math.min(max, numValue));
|
|
109
|
+
handleValueChange(clampedValue);
|
|
110
|
+
setInputDisplayValue(clampedValue.toString());
|
|
111
|
+
} else {
|
|
112
|
+
setInputDisplayValue(currentValue.toString());
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
[min, max, currentValue, handleValueChange]
|
|
116
|
+
);
|
|
117
|
+
const handleInputBlur = (0, import_react.useCallback)(
|
|
118
|
+
(e) => {
|
|
119
|
+
processInputValue(e.target.value);
|
|
120
|
+
},
|
|
121
|
+
[processInputValue]
|
|
122
|
+
);
|
|
123
|
+
const handleInputKeyDown = (0, import_react.useCallback)(
|
|
124
|
+
(e) => {
|
|
125
|
+
if (e.key === "Enter") {
|
|
126
|
+
e.preventDefault();
|
|
127
|
+
processInputValue(e.currentTarget.value);
|
|
128
|
+
e.currentTarget.blur();
|
|
129
|
+
} else if (e.key === "Escape") {
|
|
130
|
+
e.preventDefault();
|
|
131
|
+
setInputDisplayValue(currentValue.toString());
|
|
132
|
+
e.currentTarget.blur();
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
[processInputValue, currentValue]
|
|
136
|
+
);
|
|
137
|
+
const isDecreaseDisabled = disabled || currentValue <= min;
|
|
138
|
+
const isIncreaseDisabled = disabled || currentValue >= max;
|
|
139
|
+
const stepperClasses = (0, import_classnames.default)(
|
|
140
|
+
"numeric-stepper",
|
|
141
|
+
`numeric-stepper-${size}`,
|
|
142
|
+
`numeric-stepper-${shape}`,
|
|
143
|
+
{
|
|
144
|
+
"numeric-stepper-disabled": disabled,
|
|
145
|
+
"numeric-stepper-with-input": showInput,
|
|
146
|
+
"numeric-stepper-simple": currentValue === 0 || currentValue === void 0
|
|
147
|
+
},
|
|
148
|
+
className
|
|
149
|
+
);
|
|
150
|
+
const isSimpleMode = currentValue === 0 || currentValue === void 0;
|
|
151
|
+
return /* @__PURE__ */ React.createElement(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
className: stepperClasses,
|
|
155
|
+
style,
|
|
156
|
+
onClick: (e) => e.stopPropagation()
|
|
157
|
+
},
|
|
158
|
+
!isSimpleMode && /* @__PURE__ */ React.createElement(
|
|
159
|
+
"button",
|
|
160
|
+
{
|
|
161
|
+
type: "button",
|
|
162
|
+
className: (0, import_classnames.default)(
|
|
163
|
+
"numeric-stepper-button",
|
|
164
|
+
"numeric-stepper-minus",
|
|
165
|
+
{
|
|
166
|
+
"numeric-stepper-button-disabled": isDecreaseDisabled
|
|
167
|
+
}
|
|
168
|
+
),
|
|
169
|
+
disabled: isDecreaseDisabled,
|
|
170
|
+
onClick: handleDecrease
|
|
171
|
+
},
|
|
172
|
+
minusIcon || /* @__PURE__ */ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React.createElement(
|
|
173
|
+
"path",
|
|
174
|
+
{
|
|
175
|
+
d: "M3 8h10",
|
|
176
|
+
stroke: "currentColor",
|
|
177
|
+
strokeWidth: "1.5",
|
|
178
|
+
strokeLinecap: "round"
|
|
179
|
+
}
|
|
180
|
+
))
|
|
181
|
+
),
|
|
182
|
+
!isSimpleMode && (showInput ? /* @__PURE__ */ React.createElement(
|
|
183
|
+
"input",
|
|
184
|
+
{
|
|
185
|
+
type: "text",
|
|
186
|
+
className: "numeric-stepper-input",
|
|
187
|
+
value: inputDisplayValue,
|
|
188
|
+
onChange: handleInputChange,
|
|
189
|
+
onBlur: handleInputBlur,
|
|
190
|
+
onKeyDown: handleInputKeyDown,
|
|
191
|
+
disabled,
|
|
192
|
+
placeholder: currentValue.toString()
|
|
193
|
+
}
|
|
194
|
+
) : /* @__PURE__ */ React.createElement("span", { className: "numeric-stepper-display" }, currentValue)),
|
|
195
|
+
/* @__PURE__ */ React.createElement(
|
|
196
|
+
"button",
|
|
197
|
+
{
|
|
198
|
+
type: "button",
|
|
199
|
+
className: (0, import_classnames.default)(
|
|
200
|
+
"numeric-stepper-button",
|
|
201
|
+
"numeric-stepper-plus",
|
|
202
|
+
{
|
|
203
|
+
"numeric-stepper-button-disabled": isIncreaseDisabled
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
disabled: isIncreaseDisabled,
|
|
207
|
+
onClick: handleIncrease
|
|
208
|
+
},
|
|
209
|
+
plusIcon || /* @__PURE__ */ React.createElement("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, /* @__PURE__ */ React.createElement(
|
|
210
|
+
"path",
|
|
211
|
+
{
|
|
212
|
+
d: "M8 3v10M3 8h10",
|
|
213
|
+
stroke: "currentColor",
|
|
214
|
+
strokeWidth: "1.5",
|
|
215
|
+
strokeLinecap: "round"
|
|
216
|
+
}
|
|
217
|
+
))
|
|
218
|
+
)
|
|
219
|
+
);
|
|
220
|
+
};
|
|
221
|
+
var NumericStepper_default = NumericStepper;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
.numeric-stepper {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
transition: all 0.2s ease-in-out;
|
|
6
|
+
|
|
7
|
+
&-disabled {
|
|
8
|
+
cursor: not-allowed;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// 简单模式样式(只显示加号按钮)
|
|
12
|
+
&-simple {
|
|
13
|
+
gap: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// 按钮样式
|
|
17
|
+
&-button {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
width: 32px;
|
|
22
|
+
height: 32px;
|
|
23
|
+
border: none;
|
|
24
|
+
background-color: #7f56d9;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
color: #ffffff;
|
|
27
|
+
transition: all 0.2s ease-in-out;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: #6b46c1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:active {
|
|
34
|
+
background-color: #553c9a;
|
|
35
|
+
transform: scale(0.95);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:focus {
|
|
39
|
+
outline: none;
|
|
40
|
+
box-shadow: 0 0 0 2px rgba(127, 86, 217, 0.3);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-disabled {
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
background-color: #d0d5dd !important;
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
background-color: #d0d5dd !important;
|
|
49
|
+
transform: none;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
svg {
|
|
54
|
+
width: 16px;
|
|
55
|
+
height: 16px;
|
|
56
|
+
stroke: currentColor;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 按钮形状样式
|
|
61
|
+
&-round {
|
|
62
|
+
.numeric-stepper-button {
|
|
63
|
+
border-radius: 50%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&-square {
|
|
68
|
+
.numeric-stepper-button {
|
|
69
|
+
border-radius: 12px;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// 输入框样式
|
|
74
|
+
&-input {
|
|
75
|
+
border: none;
|
|
76
|
+
outline: none;
|
|
77
|
+
text-align: center;
|
|
78
|
+
font-size: 16px;
|
|
79
|
+
font-weight: 600;
|
|
80
|
+
line-height: 1.5;
|
|
81
|
+
color: #101828;
|
|
82
|
+
background: transparent;
|
|
83
|
+
width: 30px;
|
|
84
|
+
height: 30px;
|
|
85
|
+
max-width: 56px;
|
|
86
|
+
padding: 0 4px;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
|
|
91
|
+
&::-webkit-outer-spin-button,
|
|
92
|
+
&::-webkit-inner-spin-button {
|
|
93
|
+
-webkit-appearance: none;
|
|
94
|
+
margin: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[type='number'] {
|
|
98
|
+
-moz-appearance: textfield;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&:disabled {
|
|
102
|
+
color: #9ca3af;
|
|
103
|
+
cursor: not-allowed;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// 显示区域样式(当不显示输入框时)
|
|
108
|
+
&-display {
|
|
109
|
+
display: flex;
|
|
110
|
+
align-items: center;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
width: 30px;
|
|
113
|
+
height: 30px;
|
|
114
|
+
max-width: 56px;
|
|
115
|
+
padding: 0 4px;
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
line-height: 1.5;
|
|
119
|
+
color: #101828;
|
|
120
|
+
text-align: center;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
text-overflow: ellipsis;
|
|
123
|
+
white-space: nowrap;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// 尺寸变体
|
|
127
|
+
&-small {
|
|
128
|
+
gap: 8px;
|
|
129
|
+
|
|
130
|
+
.numeric-stepper-button {
|
|
131
|
+
width: 24px;
|
|
132
|
+
height: 24px;
|
|
133
|
+
|
|
134
|
+
svg {
|
|
135
|
+
width: 12px;
|
|
136
|
+
height: 12px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.numeric-stepper-input,
|
|
141
|
+
.numeric-stepper-display {
|
|
142
|
+
width: 24px;
|
|
143
|
+
height: 24px;
|
|
144
|
+
max-width: 40px;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
color: #101828;
|
|
148
|
+
padding: 0 2px;
|
|
149
|
+
text-align: center;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
text-overflow: ellipsis;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&-middle {
|
|
157
|
+
gap: 8px;
|
|
158
|
+
|
|
159
|
+
.numeric-stepper-button {
|
|
160
|
+
width: 32px;
|
|
161
|
+
height: 32px;
|
|
162
|
+
|
|
163
|
+
svg {
|
|
164
|
+
width: 16px;
|
|
165
|
+
height: 16px;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.numeric-stepper-input,
|
|
170
|
+
.numeric-stepper-display {
|
|
171
|
+
width: 30px;
|
|
172
|
+
height: 30px;
|
|
173
|
+
max-width: 56px;
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
color: #101828;
|
|
177
|
+
padding: 0 4px;
|
|
178
|
+
text-align: center;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
text-overflow: ellipsis;
|
|
181
|
+
white-space: nowrap;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&-large {
|
|
186
|
+
gap: 10px;
|
|
187
|
+
|
|
188
|
+
.numeric-stepper-button {
|
|
189
|
+
width: 40px;
|
|
190
|
+
height: 40px;
|
|
191
|
+
|
|
192
|
+
svg {
|
|
193
|
+
width: 20px;
|
|
194
|
+
height: 20px;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.numeric-stepper-input,
|
|
199
|
+
.numeric-stepper-display {
|
|
200
|
+
width: 36px;
|
|
201
|
+
height: 36px;
|
|
202
|
+
max-width: 64px;
|
|
203
|
+
font-size: 18px;
|
|
204
|
+
font-weight: 600;
|
|
205
|
+
color: #101828;
|
|
206
|
+
padding: 0 6px;
|
|
207
|
+
text-align: center;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
text-overflow: ellipsis;
|
|
210
|
+
white-space: nowrap;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// 禁用状态下的特殊样式
|
|
215
|
+
&-disabled {
|
|
216
|
+
.numeric-stepper-input,
|
|
217
|
+
.numeric-stepper-display {
|
|
218
|
+
color: #9ca3af;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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/components/index.tsx
|
|
30
|
+
var components_exports = {};
|
|
31
|
+
__export(components_exports, {
|
|
32
|
+
CardItem: () => import_Card.default,
|
|
33
|
+
NumericStepper: () => import_NumericStepper.default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(components_exports);
|
|
36
|
+
var import_Card = __toESM(require("./Card"));
|
|
37
|
+
var import_NumericStepper = __toESM(require("./NumericStepper"));
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
CardItem,
|
|
41
|
+
NumericStepper
|
|
42
|
+
});
|
|
@@ -0,0 +1,102 @@
|
|
|
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/demo.tsx
|
|
30
|
+
var demo_exports = {};
|
|
31
|
+
__export(demo_exports, {
|
|
32
|
+
default: () => demo_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(demo_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_index = __toESM(require("./index"));
|
|
37
|
+
var SelectorDemo = () => {
|
|
38
|
+
const [value, setValue] = (0, import_react.useState)([
|
|
39
|
+
{
|
|
40
|
+
value: 1,
|
|
41
|
+
quantity: 2
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
const [mutexValue, setMutexValue] = (0, import_react.useState)([]);
|
|
45
|
+
const dataSource = [
|
|
46
|
+
{ id: 1, title: "选项1", price: 100, ruleConfig: { min: 1, max: 3 } },
|
|
47
|
+
{ id: 2, title: "选项2", price: 200, ruleConfig: { min: 1, max: 2 } },
|
|
48
|
+
{ id: 3, title: "选项3", price: 300, ruleConfig: { min: 1, max: 1 } },
|
|
49
|
+
{ id: 4, title: "选项4", price: 400, ruleConfig: { min: 1, max: 2 } },
|
|
50
|
+
{ id: 5, title: "选项5", price: 500, ruleConfig: { min: 1, max: 3 } },
|
|
51
|
+
{ id: 6, title: "选项6", price: 600, ruleConfig: { min: 1, max: 1 } }
|
|
52
|
+
];
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: 20 } }, /* @__PURE__ */ import_react.default.createElement("h2", null, "Selector 组件演示"), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "多选模式 - 卡片样式 + 网格布局"), /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
import_index.default,
|
|
55
|
+
{
|
|
56
|
+
dataSource,
|
|
57
|
+
mode: "multiple",
|
|
58
|
+
valueType: "object",
|
|
59
|
+
fieldNames: { value: "id", label: "title" },
|
|
60
|
+
value,
|
|
61
|
+
onChange: setValue,
|
|
62
|
+
appearance: {
|
|
63
|
+
itemVariant: "card",
|
|
64
|
+
layout: { mode: "grid", columns: 3 },
|
|
65
|
+
selectedProps: {
|
|
66
|
+
variant: "filled"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "当前选择值:"), /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(value, null, 2))), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "组内互斥示例(同组仅可选择一个)"), /* @__PURE__ */ import_react.default.createElement("p", { style: { color: "#667085", marginBottom: 8 } }, "规则:互斥组1(1、2、3 互斥),互斥组2(4、5 互斥)。当选择同组的一个选项时,会自动取消该组内其它已选项。"), /* @__PURE__ */ import_react.default.createElement(
|
|
71
|
+
import_index.default,
|
|
72
|
+
{
|
|
73
|
+
dataSource: [
|
|
74
|
+
{ id: 1, title: "选项1" },
|
|
75
|
+
{ id: 2, title: "选项2" },
|
|
76
|
+
{ id: 3, title: "选项3" },
|
|
77
|
+
{ id: 4, title: "选项4" },
|
|
78
|
+
{ id: 5, title: "选项5" },
|
|
79
|
+
{ id: 6, title: "选项6" }
|
|
80
|
+
],
|
|
81
|
+
mode: "multiple",
|
|
82
|
+
valueType: "primitive",
|
|
83
|
+
fieldNames: { value: "id", label: "title" },
|
|
84
|
+
value: mutexValue,
|
|
85
|
+
onChange: setMutexValue,
|
|
86
|
+
ruleConfig: {
|
|
87
|
+
mutex: [
|
|
88
|
+
[1, 2, 3],
|
|
89
|
+
[4, 5]
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
appearance: {
|
|
93
|
+
itemVariant: "card",
|
|
94
|
+
layout: { mode: "grid", columns: 3 },
|
|
95
|
+
selectedProps: {
|
|
96
|
+
variant: "filled"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
)), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 40 } }, /* @__PURE__ */ import_react.default.createElement("h3", null, "互斥组当前选择值:"), /* @__PURE__ */ import_react.default.createElement("pre", null, JSON.stringify(mutexValue, null, 2))));
|
|
101
|
+
};
|
|
102
|
+
var demo_default = SelectorDemo;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RuleConfig, OptionItem, SelectionValuePrimitive, SelectionValue, OptionKey } from '../types';
|
|
2
|
+
declare type ErrorItem = {
|
|
3
|
+
type: 'required' | 'max' | 'min' | 'requireOneOf' | 'mutex';
|
|
4
|
+
message: string;
|
|
5
|
+
_key?: OptionKey;
|
|
6
|
+
};
|
|
7
|
+
declare type InnerOptionItem = OptionItem & {
|
|
8
|
+
_key: OptionKey;
|
|
9
|
+
_label: string;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
quantity: number;
|
|
12
|
+
};
|
|
13
|
+
export default function useSelectionController(props: {
|
|
14
|
+
dataSource?: OptionItem[];
|
|
15
|
+
ruleConfig?: RuleConfig;
|
|
16
|
+
fieldNames?: {
|
|
17
|
+
label?: string;
|
|
18
|
+
value?: string;
|
|
19
|
+
};
|
|
20
|
+
mode?: 'single' | 'multiple';
|
|
21
|
+
valueType?: 'primitive' | 'object';
|
|
22
|
+
value?: SelectionValuePrimitive | SelectionValue;
|
|
23
|
+
defaultValue?: SelectionValuePrimitive | SelectionValue;
|
|
24
|
+
onChange?: (value: SelectionValuePrimitive | SelectionValue) => void;
|
|
25
|
+
}): {
|
|
26
|
+
state: {
|
|
27
|
+
options: InnerOptionItem[];
|
|
28
|
+
values: SelectionValue;
|
|
29
|
+
showQuantity: boolean;
|
|
30
|
+
errors: Array<ErrorItem>;
|
|
31
|
+
validated: boolean;
|
|
32
|
+
};
|
|
33
|
+
actions: {
|
|
34
|
+
toggle: (optionKey: OptionKey) => void;
|
|
35
|
+
update: (optionKey: OptionKey, data?: any) => void;
|
|
36
|
+
setValue: (value: SelectionValuePrimitive | SelectionValue) => void;
|
|
37
|
+
clear: () => void;
|
|
38
|
+
validate: () => Promise<void>;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export {};
|