@pisell/private-materials 6.3.58 → 6.3.59
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.css +1 -1
- package/build/lowcode/preview.js +145 -145
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +18 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -11
- package/es/businessModel/SalesModel/index.d.ts +1 -2
- package/es/components/Sales/index.d.ts +1 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -2
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Content/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +2 -3
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Header/index.d.ts +1 -2
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +1 -2
- package/es/components/appointmentBooking/context.d.ts +2 -2
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -2
- package/es/components/appointmentBooking/deposit/index.d.ts +1 -2
- package/es/components/appointmentBooking/index.d.ts +1 -2
- package/es/components/booking/components/TabProduct/index.d.ts +1 -2
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -2
- package/es/components/booking/components/authWrap/index.d.ts +1 -1
- package/es/components/booking/components/browserSelect/index.d.ts +1 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -2
- package/es/components/booking/components/drawer/index.d.ts +1 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -2
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -2
- package/es/components/booking/components/footer/index.d.ts +1 -2
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -2
- package/es/components/booking/components/menuButton/index.d.ts +1 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -2
- package/es/components/booking/components/voucher/index.d.ts +1 -2
- package/es/components/booking/dashboard/index.d.ts +1 -1
- package/es/components/booking/deposit/ClientItem/index.d.ts +1 -1
- package/es/components/booking/deposit/DepositItem/index.d.ts +1 -1
- package/es/components/booking/deposit/index.d.ts +1 -2
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/forms/footer.d.ts +1 -2
- package/es/components/booking/forms/single/index.d.ts +1 -2
- package/es/components/booking/forms/table/index.d.ts +1 -2
- package/es/components/booking/hooks/useClearCart.d.ts +1 -2
- package/es/components/booking/hooks/useQuotation.d.ts +1 -2
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -2
- package/es/components/booking/info/client/index.d.ts +1 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -2
- package/es/components/booking/info/date/index.d.ts +1 -2
- package/es/components/booking/info/dateRange/index.d.ts +1 -2
- package/es/components/booking/info/header/index.d.ts +1 -2
- package/es/components/booking/info/hooks/useGetHolderList.d.ts +1 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +2 -2
- package/es/components/booking/info/index.d.ts +1 -2
- package/es/components/booking/info/notes/index.d.ts +1 -2
- package/es/components/booking/info/pet/index.d.ts +1 -1
- package/es/components/booking/info/service/Lists.d.ts +1 -2
- package/es/components/booking/info/service/actions/index.d.ts +1 -2
- package/es/components/booking/info/service/addService/index.d.ts +1 -2
- package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -2
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -2
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/index.d.ts +1 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -2
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -2
- package/es/components/booking/info/service/serviceList/index.d.ts +1 -2
- package/es/components/booking/info/service2/Lists.d.ts +1 -2
- package/es/components/booking/info/service2/index.d.ts +1 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -2
- package/es/components/booking/info2/service/addService/index.d.ts +1 -2
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -2
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -2
- package/es/components/booking/info2/service/index.d.ts +1 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -2
- package/es/components/booking/info2/service/serviceList/index.d.ts +1 -2
- package/es/components/booking/materiels/contacts/index.d.ts +1 -2
- package/es/components/booking/materiels/duration/index.d.ts +1 -2
- package/es/components/booking/materiels/holder/index.d.ts +1 -2
- package/es/components/booking/materiels/startTime/index.d.ts +1 -2
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -2
- package/es/components/booking/notes/NoteBlock/index.d.ts +1 -2
- package/es/components/booking/notes/addNote/index.d.ts +1 -2
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftpos/device.d.ts +1 -1
- package/es/components/eftpos/deviceList/index.d.ts +1 -2
- package/es/components/eftpos/form/index.d.ts +1 -2
- package/es/components/eftpos/group/index.d.ts +2 -3
- package/es/components/eftpos/icon/apiKey.d.ts +1 -2
- package/es/components/eftpos/icon/device.d.ts +1 -2
- package/es/components/eftpos/index.d.ts +1 -2
- package/es/components/eftpos/log.d.ts +2 -2
- package/es/components/eftpos/pos.d.ts +1 -2
- package/es/components/eftpos/receipt/index.d.ts +1 -2
- package/es/components/eftpos/surcharge/index.d.ts +1 -2
- package/es/components/eftposPay/amount.d.ts +2 -3
- package/es/components/eftposPay/app.d.ts +1 -2
- package/es/components/eftposPay/component/alert/index.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -2
- package/es/components/eftposPay/component/fail/index.d.ts +1 -2
- package/es/components/eftposPay/component/fail/network.d.ts +1 -2
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -2
- package/es/components/eftposPay/component/header/index.d.ts +1 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -2
- package/es/components/eftposPay/component/manual/index.d.ts +1 -2
- package/es/components/eftposPay/component/signature/index.d.ts +1 -2
- package/es/components/eftposPay/component/step/index.d.ts +1 -2
- package/es/components/eftposPay/component/step/step.d.ts +1 -2
- package/es/components/eftposPay/device.d.ts +2 -3
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/index.d.ts +1 -2
- package/es/components/eftposPay/linkly/index.d.ts +1 -2
- package/es/components/eftposPay/pay.d.ts +1 -2
- package/es/components/eftposPay/payo/config.d.ts +2 -3
- package/es/components/eftposPay/payo/index.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +7 -7
- package/es/components/eftposPay/tip.d.ts +1 -2
- package/es/components/eftposPay/tyro/index.d.ts +1 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +2 -3
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -2
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -2
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -2
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -2
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -2
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -2
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -2
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -2
- package/es/components/eventBooking/index.d.ts +1 -2
- package/es/components/login/index.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +1 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/CustomerCard/index.d.ts +1 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -2
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -2
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -2
- package/es/components/productExtension/index.d.ts +1 -2
- package/es/components/productSelect/components/TabProduct/index.d.ts +1 -2
- package/es/components/productSelect/components/pisellPriceText/index.d.ts +1 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +2 -3
- package/es/components/productSelect/index.d.ts +1 -1
- package/es/components/ruleSetting/index.d.ts +1 -2
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -2
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -2
- package/es/components/schedules/calendar/index.d.ts +1 -2
- package/es/components/schedules/components/Card/index.d.ts +1 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +1 -2
- package/es/components/schedules/components/ResourceList/index.d.ts +1 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -2
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -2
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -2
- package/es/components/schedules/components/Search/index.d.ts +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -2
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -2
- package/es/components/schedules/products/index.d.ts +1 -2
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -2
- package/es/components/schedules/products/list/index.d.ts +1 -2
- package/es/components/schedules/resources/index.d.ts +1 -2
- package/es/components/schedules/resources/list/index.d.ts +1 -2
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -2
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -2
- package/es/components/schedules/schedules/Schedules.d.ts +1 -1
- package/es/components/schedules/schedules/SchedulesForDay/index.d.ts +1 -1
- package/es/components/schedules/schedules/index.d.ts +1 -2
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/Provider.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -2
- package/es/components/shoppingCart/components/Cart/index.d.ts +1 -2
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -2
- package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -2
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -2
- package/es/components/shoppingCart/index.d.ts +1 -2
- package/es/components/subTotal/index.d.ts +1 -1
- package/es/components/tabProduct/index.d.ts +1 -1
- package/es/components/taxSelect/index.d.ts +1 -2
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -2
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -2
- package/es/components/ticketBooking/components/menuBar/index.d.ts +1 -2
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -2
- package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -2
- package/es/components/ticketBooking/index.d.ts +1 -2
- package/es/components/ticketBooking/miniRedux.d.ts +1 -1
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/walletList/index.d.ts +1 -2
- package/es/components/walletList/locales.d.ts +27 -0
- package/es/components/walletList/model.d.ts +1 -1
- package/es/components/walletList/tempHolderSelector/index.d.ts +2 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -2
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -2
- package/es/hooks/usePaymentLogger.d.ts +2 -2
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/es/plus/clientName/index.d.ts +1 -2
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +1 -2
- package/es/plus/productSelect/CategoryTabs/index.d.ts +1 -0
- package/es/plus/productSelect/CategoryTabs/index.js +2 -1
- package/es/plus/productSelect/ProductCard/index.d.ts +2 -2
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +6 -6
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.js +2 -7
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +6 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +1 -1
- package/es/plus/productSelect/index.d.ts +1 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -2
- package/es/plus/saasCreateOrganization/index.d.ts +1 -2
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -2
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -2
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -2
- package/es/plus/saasRegister/components/Header.d.ts +1 -2
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -2
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -2
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -2
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -1
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +5 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.js +131 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.js +108 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +9 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.js +234 -0
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.less +113 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.js +165 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.js +46 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.less +23 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +29 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.less +9 -0
- package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/hooks/index.js +3 -0
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useLanguage.js +7 -0
- package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useStore.js +3 -0
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useSymbol.js +8 -0
- package/es/plus/skuOptionsSelection/index.d.ts +5 -0
- package/es/plus/skuOptionsSelection/index.js +127 -0
- package/es/plus/skuOptionsSelection/index.less +4 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +30 -0
- package/es/plus/skuOptionsSelection/locales.js +29 -0
- package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/es/plus/skuOptionsSelection/store/actions.js +56 -0
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/es/plus/skuOptionsSelection/store/createStore.js +117 -0
- package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/es/plus/skuOptionsSelection/store/index.js +2 -0
- package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/es/plus/skuOptionsSelection/store/store.js +18 -0
- package/es/plus/skuOptionsSelection/types.d.ts +424 -0
- package/es/plus/skuOptionsSelection/types.js +69 -0
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/es/plus/skuOptionsSelection/utils/calculateOption.js +80 -0
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.js +147 -0
- package/es/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/es/plus/skuOptionsSelection/utils/index.js +7 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/es/plus/skuOptionsSelection/utils/transformBundleGroup.js +90 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/es/plus/skuOptionsSelection/utils/transformOptionGroup.js +79 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +160 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +223 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +90 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -2
- package/es/plus/walletEditor/locales.d.ts +135 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +1 -2
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -2
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -2
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +1 -1
- package/es/plus/walletPassGallery/index.d.ts +1 -2
- package/es/plus/walletPassGallery/locales.d.ts +285 -0
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/pro/Cards/components/SKUCard/index.d.ts +60 -0
- package/es/pro/Cards/components/SKUCard/index.js +192 -0
- package/es/pro/Cards/components/SKUCard/index.less +102 -0
- package/es/pro/Cards/index.d.ts +1 -0
- package/es/pro/Cards/index.js +1 -0
- package/es/pro/Login2.0/components/ForgotPasswordFlow.d.ts +2 -9
- package/es/pro/Login2.0/components/LoginCodeInput.d.ts +2 -6
- package/es/pro/Login2.0/components/PhoneInput.d.ts +1 -1
- package/es/pro/Login2.0/steps/CodeInput.d.ts +2 -6
- package/es/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +2 -6
- package/es/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +2 -5
- package/es/pro/Login2.0/steps/EmailLinkExpired.d.ts +2 -5
- package/es/pro/Login2.0/steps/SetPassword.d.ts +2 -5
- package/es/pro/Login2.0/steps/VerificationSuccess.d.ts +2 -5
- package/es/pro/Login2.0/steps/VerifyingEmailLink.d.ts +2 -5
- package/es/pro/Login2.0/steps/WaitEmailLink.d.ts +2 -5
- package/es/pro/NumericStepper/index.d.ts +43 -0
- package/es/pro/NumericStepper/index.js +225 -0
- package/es/pro/NumericStepper/index.less +220 -0
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/BatchSelectorDemo.js +884 -0
- package/es/pro/Selector/Item.d.ts +14 -0
- package/es/pro/Selector/Item.js +88 -0
- package/es/pro/Selector/Selector.d.ts +14 -0
- package/es/pro/Selector/Selector.js +329 -0
- package/es/pro/Selector/Selector.stories.d.ts +78 -0
- package/es/pro/Selector/Selector.stories.js +1105 -0
- package/es/pro/Selector/SelectorGroup.d.ts +11 -0
- package/es/pro/Selector/SelectorGroup.js +571 -0
- package/es/pro/Selector/components/Card/index.d.ts +57 -0
- package/es/pro/Selector/components/Card/index.js +113 -0
- package/es/pro/Selector/components/Card/index.less +162 -0
- package/es/pro/Selector/components/Card/types.d.ts +1 -0
- package/es/pro/Selector/components/Card/types.js +1 -0
- package/es/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/es/pro/Selector/components/Indicator/index.js +101 -0
- package/es/pro/Selector/components/Indicator/index.less +114 -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/LayoutContainer/index.d.ts +16 -0
- package/es/pro/Selector/components/LayoutContainer/index.js +60 -0
- package/es/pro/Selector/components/Media/index.d.ts +6 -0
- package/es/pro/Selector/components/Media/index.js +222 -0
- package/es/pro/Selector/components/Media/index.less +124 -0
- package/es/pro/Selector/components/Media/types.d.ts +47 -0
- package/es/pro/Selector/components/Media/types.js +1 -0
- package/es/pro/Selector/components/index.d.ts +4 -0
- package/es/pro/Selector/components/index.js +4 -0
- package/es/pro/Selector/demo.d.ts +2 -0
- package/es/pro/Selector/demo.js +1078 -0
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/es/pro/Selector/hooks/usePresetItemProps.js +185 -0
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/Selector/hooks/usePresetProps.js +132 -0
- package/es/pro/Selector/hooks/useSelectionController.d.ts +49 -0
- package/es/pro/Selector/hooks/useSelectionController.js +440 -0
- package/es/pro/Selector/index.d.ts +11 -0
- package/es/pro/Selector/index.js +8 -0
- package/es/pro/Selector/locales.d.ts +36 -0
- package/es/pro/Selector/locales.js +101 -0
- package/es/pro/Selector/selector.less +108 -0
- package/es/pro/Selector/selectorGroup.less +12 -0
- package/es/pro/Selector/types.d.ts +173 -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/pisellPaymentList/example.d.ts +10 -11
- package/es/test/setup.d.ts +1 -0
- package/es/test/setup.js +177 -0
- package/es/utils/index.d.ts +1 -1
- package/lib/businessModel/SalesModel/index.d.ts +1 -2
- package/lib/components/Sales/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +2 -3
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -2
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +1 -2
- package/lib/components/appointmentBooking/context.d.ts +2 -2
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +1 -2
- package/lib/components/appointmentBooking/deposit/index.d.ts +1 -2
- package/lib/components/appointmentBooking/index.d.ts +1 -2
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -2
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -2
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -2
- package/lib/components/booking/components/authWrap/index.d.ts +1 -1
- package/lib/components/booking/components/browserSelect/index.d.ts +1 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -2
- package/lib/components/booking/components/drawer/index.d.ts +1 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -2
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -2
- package/lib/components/booking/components/footer/index.d.ts +1 -2
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -2
- package/lib/components/booking/components/menuButton/index.d.ts +1 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -2
- package/lib/components/booking/components/voucher/index.d.ts +1 -2
- package/lib/components/booking/dashboard/index.d.ts +1 -1
- package/lib/components/booking/deposit/ClientItem/index.d.ts +1 -1
- package/lib/components/booking/deposit/DepositItem/index.d.ts +1 -1
- package/lib/components/booking/deposit/index.d.ts +1 -2
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/forms/footer.d.ts +1 -2
- package/lib/components/booking/forms/single/index.d.ts +1 -2
- package/lib/components/booking/forms/table/index.d.ts +1 -2
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -2
- package/lib/components/booking/hooks/useQuotation.d.ts +1 -2
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -2
- package/lib/components/booking/info/client/index.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -2
- package/lib/components/booking/info/date/index.d.ts +1 -2
- package/lib/components/booking/info/dateRange/index.d.ts +1 -2
- package/lib/components/booking/info/header/index.d.ts +1 -2
- package/lib/components/booking/info/hooks/useGetHolderList.d.ts +1 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +2 -2
- package/lib/components/booking/info/index.d.ts +1 -2
- package/lib/components/booking/info/notes/index.d.ts +1 -2
- package/lib/components/booking/info/pet/index.d.ts +1 -1
- package/lib/components/booking/info/service/Lists.d.ts +1 -2
- package/lib/components/booking/info/service/actions/index.d.ts +1 -2
- package/lib/components/booking/info/service/addService/index.d.ts +1 -2
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -2
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -2
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/index.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -2
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -2
- package/lib/components/booking/info/service/serviceList/index.d.ts +1 -2
- package/lib/components/booking/info/service2/Lists.d.ts +1 -2
- package/lib/components/booking/info/service2/index.d.ts +1 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -2
- package/lib/components/booking/info2/service/addService/index.d.ts +1 -2
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -2
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -2
- package/lib/components/booking/info2/service/index.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -2
- package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -2
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -2
- package/lib/components/booking/materiels/duration/index.d.ts +1 -2
- package/lib/components/booking/materiels/holder/index.d.ts +1 -2
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -2
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -2
- package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -2
- package/lib/components/booking/notes/addNote/index.d.ts +1 -2
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftpos/device.d.ts +1 -1
- package/lib/components/eftpos/deviceList/index.d.ts +1 -2
- package/lib/components/eftpos/form/index.d.ts +1 -2
- package/lib/components/eftpos/group/index.d.ts +2 -3
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -2
- package/lib/components/eftpos/icon/device.d.ts +1 -2
- package/lib/components/eftpos/index.d.ts +1 -2
- package/lib/components/eftpos/log.d.ts +2 -2
- package/lib/components/eftpos/pos.d.ts +1 -2
- package/lib/components/eftpos/receipt/index.d.ts +1 -2
- package/lib/components/eftpos/surcharge/index.d.ts +1 -2
- package/lib/components/eftposPay/amount.d.ts +2 -3
- package/lib/components/eftposPay/app.d.ts +1 -2
- package/lib/components/eftposPay/component/alert/index.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/index.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -2
- package/lib/components/eftposPay/component/header/index.d.ts +1 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -2
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -2
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -2
- package/lib/components/eftposPay/component/step/index.d.ts +1 -2
- package/lib/components/eftposPay/component/step/step.d.ts +1 -2
- package/lib/components/eftposPay/device.d.ts +2 -3
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/index.d.ts +1 -2
- package/lib/components/eftposPay/linkly/index.d.ts +1 -2
- package/lib/components/eftposPay/pay.d.ts +1 -2
- package/lib/components/eftposPay/payo/config.d.ts +2 -3
- package/lib/components/eftposPay/payo/index.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +7 -7
- package/lib/components/eftposPay/tip.d.ts +1 -2
- package/lib/components/eftposPay/tyro/index.d.ts +1 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +2 -3
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -2
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -2
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -2
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -2
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -2
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -2
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -2
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -2
- package/lib/components/eventBooking/index.d.ts +1 -2
- package/lib/components/login/index.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +1 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/CustomerCard/index.d.ts +1 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -2
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -2
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -2
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -2
- package/lib/components/productExtension/index.d.ts +1 -2
- package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -2
- package/lib/components/productSelect/components/pisellPriceText/index.d.ts +1 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +2 -3
- package/lib/components/productSelect/index.d.ts +1 -1
- package/lib/components/ruleSetting/index.d.ts +1 -2
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -2
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -2
- package/lib/components/schedules/calendar/index.d.ts +1 -2
- package/lib/components/schedules/components/Card/index.d.ts +1 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -2
- package/lib/components/schedules/components/ResourceList/index.d.ts +1 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -2
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -2
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -2
- package/lib/components/schedules/components/Search/index.d.ts +1 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -2
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -2
- package/lib/components/schedules/products/index.d.ts +1 -2
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -2
- package/lib/components/schedules/products/list/index.d.ts +1 -2
- package/lib/components/schedules/resources/index.d.ts +1 -2
- package/lib/components/schedules/resources/list/index.d.ts +1 -2
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -2
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -2
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -2
- package/lib/components/schedules/schedules/Schedules.d.ts +1 -1
- package/lib/components/schedules/schedules/SchedulesForDay/index.d.ts +1 -1
- package/lib/components/schedules/schedules/index.d.ts +1 -2
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/Provider.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -2
- package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -2
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -2
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -2
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -2
- package/lib/components/shoppingCart/index.d.ts +1 -2
- package/lib/components/subTotal/index.d.ts +1 -1
- package/lib/components/tabProduct/index.d.ts +1 -1
- package/lib/components/taxSelect/index.d.ts +1 -2
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +1 -2
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -2
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +1 -2
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -2
- package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -2
- package/lib/components/ticketBooking/index.d.ts +1 -2
- package/lib/components/ticketBooking/miniRedux.d.ts +1 -1
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/walletList/index.d.ts +1 -2
- package/lib/components/walletList/locales.d.ts +27 -0
- package/lib/components/walletList/model.d.ts +1 -1
- package/lib/components/walletList/tempHolderSelector/index.d.ts +2 -2
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -2
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -2
- package/lib/hooks/usePaymentLogger.d.ts +2 -2
- package/lib/index.d.ts +2 -0
- package/lib/index.js +6 -0
- package/lib/plus/clientName/index.d.ts +1 -2
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +1 -2
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +1 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +2 -1
- package/lib/plus/productSelect/ProductCard/index.d.ts +2 -2
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +6 -6
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.js +38 -29
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +6 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +1 -1
- package/lib/plus/productSelect/index.d.ts +1 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -2
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -2
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -2
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -2
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -2
- package/lib/plus/saasRegister/components/Header.d.ts +1 -2
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -2
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -2
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -2
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -1
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.js +142 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.js +153 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +9 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.js +233 -0
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.less +113 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.js +139 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.js +78 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.less +23 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +66 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.less +9 -0
- package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/hooks/index.js +45 -0
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.js +41 -0
- package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useStore.js +36 -0
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.js +42 -0
- package/lib/plus/skuOptionsSelection/index.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/index.js +143 -0
- package/lib/plus/skuOptionsSelection/index.less +4 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +30 -0
- package/lib/plus/skuOptionsSelection/locales.js +53 -0
- package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/lib/plus/skuOptionsSelection/store/actions.js +74 -0
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/store/createStore.js +87 -0
- package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/store/index.js +42 -0
- package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/store/store.js +57 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +424 -0
- package/lib/plus/skuOptionsSelection/types.js +44 -0
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/utils/calculateOption.js +106 -0
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.js +125 -0
- package/lib/plus/skuOptionsSelection/utils/index.d.ts +7 -0
- package/lib/plus/skuOptionsSelection/utils/index.js +35 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
- package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.js +115 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.js +104 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +174 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +207 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +118 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -2
- package/lib/plus/walletEditor/locales.d.ts +135 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +1 -2
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -2
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -2
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +1 -1
- package/lib/plus/walletPassGallery/index.d.ts +1 -2
- package/lib/plus/walletPassGallery/locales.d.ts +285 -0
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/pro/Cards/components/SKUCard/index.d.ts +60 -0
- package/lib/pro/Cards/components/SKUCard/index.js +191 -0
- package/lib/pro/Cards/components/SKUCard/index.less +102 -0
- package/lib/pro/Cards/index.d.ts +1 -0
- package/lib/pro/Cards/index.js +39 -0
- package/lib/pro/Login2.0/components/ForgotPasswordFlow.d.ts +2 -9
- package/lib/pro/Login2.0/components/LoginCodeInput.d.ts +2 -6
- package/lib/pro/Login2.0/components/PhoneInput.d.ts +1 -1
- package/lib/pro/Login2.0/steps/CodeInput.d.ts +2 -6
- package/lib/pro/Login2.0/steps/EmailAlreadyRegistered.d.ts +2 -6
- package/lib/pro/Login2.0/steps/EmailLinkAlreadyUsed.d.ts +2 -5
- package/lib/pro/Login2.0/steps/EmailLinkExpired.d.ts +2 -5
- package/lib/pro/Login2.0/steps/SetPassword.d.ts +2 -5
- package/lib/pro/Login2.0/steps/VerificationSuccess.d.ts +2 -5
- package/lib/pro/Login2.0/steps/VerifyingEmailLink.d.ts +2 -5
- package/lib/pro/Login2.0/steps/WaitEmailLink.d.ts +2 -5
- package/lib/pro/NumericStepper/index.d.ts +43 -0
- package/lib/pro/NumericStepper/index.js +239 -0
- package/lib/pro/NumericStepper/index.less +220 -0
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/BatchSelectorDemo.js +688 -0
- package/lib/pro/Selector/Item.d.ts +14 -0
- package/lib/pro/Selector/Item.js +109 -0
- package/lib/pro/Selector/Selector.d.ts +14 -0
- package/lib/pro/Selector/Selector.js +344 -0
- package/lib/pro/Selector/Selector.stories.d.ts +78 -0
- package/lib/pro/Selector/Selector.stories.js +740 -0
- package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
- package/lib/pro/Selector/SelectorGroup.js +534 -0
- package/lib/pro/Selector/components/Card/index.d.ts +57 -0
- package/lib/pro/Selector/components/Card/index.js +129 -0
- package/lib/pro/Selector/components/Card/index.less +162 -0
- package/lib/pro/Selector/components/Card/types.d.ts +1 -0
- package/lib/pro/Selector/components/Card/types.js +17 -0
- package/lib/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/lib/pro/Selector/components/Indicator/index.js +129 -0
- package/lib/pro/Selector/components/Indicator/index.less +114 -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/LayoutContainer/index.d.ts +16 -0
- package/lib/pro/Selector/components/LayoutContainer/index.js +64 -0
- package/lib/pro/Selector/components/Media/index.d.ts +6 -0
- package/lib/pro/Selector/components/Media/index.js +238 -0
- package/lib/pro/Selector/components/Media/index.less +124 -0
- package/lib/pro/Selector/components/Media/types.d.ts +47 -0
- package/lib/pro/Selector/components/Media/types.js +17 -0
- package/lib/pro/Selector/components/index.d.ts +4 -0
- package/lib/pro/Selector/components/index.js +42 -0
- package/lib/pro/Selector/demo.d.ts +2 -0
- package/lib/pro/Selector/demo.js +854 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.js +156 -0
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/Selector/hooks/usePresetProps.js +133 -0
- package/lib/pro/Selector/hooks/useSelectionController.d.ts +49 -0
- package/lib/pro/Selector/hooks/useSelectionController.js +379 -0
- package/lib/pro/Selector/index.d.ts +11 -0
- package/lib/pro/Selector/index.js +47 -0
- package/lib/pro/Selector/locales.d.ts +36 -0
- package/lib/pro/Selector/locales.js +101 -0
- package/lib/pro/Selector/selector.less +108 -0
- package/lib/pro/Selector/selectorGroup.less +12 -0
- package/lib/pro/Selector/types.d.ts +173 -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/pisellPaymentList/example.d.ts +10 -11
- package/lib/test/setup.d.ts +1 -0
- package/lib/test/setup.js +94 -0
- package/lib/utils/index.d.ts +1 -1
- package/lowcode/selector/meta.ts +387 -0
- package/lowcode/selector/utils.ts +118 -0
- package/lowcode/selector.group/meta.ts +285 -0
- package/lowcode/selector.item/meta.ts +31 -0
- package/lowcode/sku-options-selection/default.ts +1215 -0
- package/lowcode/sku-options-selection/meta.ts +509 -0
- package/package.json +49 -28
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
4
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
5
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
6
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
7
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
18
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
19
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
20
|
+
import { useCallback, useMemo, useState, useRef } from 'react';
|
|
21
|
+
import { useControllableValue } from 'ahooks';
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
import { locales } from '@pisell/utils';
|
|
24
|
+
export default function useSelectionController(props) {
|
|
25
|
+
var _ref = props || {},
|
|
26
|
+
_ref$dataSource = _ref.dataSource,
|
|
27
|
+
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
28
|
+
ruleConfig = _ref.ruleConfig,
|
|
29
|
+
fieldNames = _ref.fieldNames,
|
|
30
|
+
_ref$mode = _ref.mode,
|
|
31
|
+
mode = _ref$mode === void 0 ? 'single' : _ref$mode,
|
|
32
|
+
_ref$valueType = _ref.valueType,
|
|
33
|
+
valueType = _ref$valueType === void 0 ? 'primitive' : _ref$valueType;
|
|
34
|
+
var _useControllableValue = useControllableValue(props),
|
|
35
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
36
|
+
values = _useControllableValue2[0],
|
|
37
|
+
setValues = _useControllableValue2[1];
|
|
38
|
+
var valuesRef = useRef(values);
|
|
39
|
+
valuesRef.current = values;
|
|
40
|
+
var _useState = useState([]),
|
|
41
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
42
|
+
errors = _useState2[0],
|
|
43
|
+
setErrors = _useState2[1];
|
|
44
|
+
var _useState3 = useState(false),
|
|
45
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
46
|
+
validated = _useState4[0],
|
|
47
|
+
setValidated = _useState4[1];
|
|
48
|
+
|
|
49
|
+
// 标准化选项
|
|
50
|
+
var normalizedOptions = useMemo(function () {
|
|
51
|
+
return dataSource.map(function (option) {
|
|
52
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
53
|
+
_key: option[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || 'value'],
|
|
54
|
+
_label: option[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || 'label'],
|
|
55
|
+
_cover: option[(fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.cover) || 'cover']
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
}, [dataSource, fieldNames]);
|
|
59
|
+
|
|
60
|
+
// 提取互斥组(从分组级 ruleConfig.mutex 收集)
|
|
61
|
+
var mutexGroups = useMemo(function () {
|
|
62
|
+
var groups = [];
|
|
63
|
+
var m = ruleConfig === null || ruleConfig === void 0 ? void 0 : ruleConfig.mutex;
|
|
64
|
+
if (Array.isArray(m)) {
|
|
65
|
+
m.forEach(function (g) {
|
|
66
|
+
if (Array.isArray(g) && g.length > 0) {
|
|
67
|
+
groups.push(g);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return groups;
|
|
72
|
+
}, [ruleConfig]);
|
|
73
|
+
|
|
74
|
+
// 建立 key -> 所属互斥组索引 的映射
|
|
75
|
+
var mutexIndex = useMemo(function () {
|
|
76
|
+
var map = new Map();
|
|
77
|
+
mutexGroups.forEach(function (group, idx) {
|
|
78
|
+
group.forEach(function (k) {
|
|
79
|
+
var arr = map.get(k) || [];
|
|
80
|
+
arr.push(idx);
|
|
81
|
+
map.set(k, arr);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
return map;
|
|
85
|
+
}, [mutexGroups]);
|
|
86
|
+
|
|
87
|
+
// 标准化当前值为统一格式
|
|
88
|
+
var normalizedValues = useMemo(function () {
|
|
89
|
+
if (!values) return [];
|
|
90
|
+
|
|
91
|
+
// 如果是数组,说明是多选
|
|
92
|
+
if (Array.isArray(values)) {
|
|
93
|
+
return values.map(function (item) {
|
|
94
|
+
if (_typeof(item) === 'object' && item !== null) {
|
|
95
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
96
|
+
// 保留原有的所有字段
|
|
97
|
+
value: item.value,
|
|
98
|
+
quantity: item.quantity || 1
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
value: item,
|
|
103
|
+
quantity: 1
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// 单选情况
|
|
109
|
+
if (_typeof(values) === 'object' && values !== null) {
|
|
110
|
+
var objValue = values;
|
|
111
|
+
return [_objectSpread(_objectSpread({}, objValue), {}, {
|
|
112
|
+
// 保留原有的所有字段
|
|
113
|
+
value: objValue.value,
|
|
114
|
+
quantity: objValue.quantity || 1
|
|
115
|
+
})];
|
|
116
|
+
}
|
|
117
|
+
return [{
|
|
118
|
+
value: values,
|
|
119
|
+
quantity: 1
|
|
120
|
+
}];
|
|
121
|
+
}, [values]);
|
|
122
|
+
|
|
123
|
+
// 计算选择状态信息(maxReached、showQuantity、剩余可选数量)
|
|
124
|
+
var quantityInfo = useMemo(function () {
|
|
125
|
+
// 计算当前已选数量(将所有选项的 quantity 相加)
|
|
126
|
+
var selectedCount = normalizedValues.reduce(function (sum, item) {
|
|
127
|
+
return sum + (item.quantity || 0);
|
|
128
|
+
}, 0);
|
|
129
|
+
|
|
130
|
+
// 判断是否启用数量模式
|
|
131
|
+
var list = Array.isArray(dataSource) ? dataSource : dataSource || [];
|
|
132
|
+
var showQuantity = list.some(function (opt) {
|
|
133
|
+
var _opt$ruleConfig, _opt$ruleConfig2;
|
|
134
|
+
return typeof (opt === null || opt === void 0 || (_opt$ruleConfig = opt.ruleConfig) === null || _opt$ruleConfig === void 0 ? void 0 : _opt$ruleConfig.max) === 'number' && opt.ruleConfig.max > 1 || typeof (opt === null || opt === void 0 || (_opt$ruleConfig2 = opt.ruleConfig) === null || _opt$ruleConfig2 === void 0 ? void 0 : _opt$ruleConfig2.min) === 'number' && opt.ruleConfig.min > 1;
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// 判断是否达到最大值(max为0视为无效配置)
|
|
138
|
+
var maxReached = typeof (ruleConfig === null || ruleConfig === void 0 ? void 0 : ruleConfig.max) === 'number' && ruleConfig.max > 0 && selectedCount >= ruleConfig.max;
|
|
139
|
+
|
|
140
|
+
// 计算剩余可选数量
|
|
141
|
+
var remainingCount = typeof (ruleConfig === null || ruleConfig === void 0 ? void 0 : ruleConfig.max) === 'number' && ruleConfig.max > 0 ? Math.max(0, ruleConfig.max - selectedCount) : Infinity;
|
|
142
|
+
return {
|
|
143
|
+
maxReached: maxReached,
|
|
144
|
+
showQuantity: showQuantity,
|
|
145
|
+
remainingCount: remainingCount,
|
|
146
|
+
selectedCount: selectedCount
|
|
147
|
+
};
|
|
148
|
+
}, [normalizedValues, dataSource, ruleConfig === null || ruleConfig === void 0 ? void 0 : ruleConfig.max]);
|
|
149
|
+
|
|
150
|
+
// 获取选项的选中状态和数量
|
|
151
|
+
var getOptionState = useCallback(function (optionKey) {
|
|
152
|
+
var found = normalizedValues.find(function (item) {
|
|
153
|
+
return item.value === optionKey;
|
|
154
|
+
});
|
|
155
|
+
return {
|
|
156
|
+
selected: !!found,
|
|
157
|
+
quantity: (found === null || found === void 0 ? void 0 : found.quantity) || 0
|
|
158
|
+
};
|
|
159
|
+
}, [normalizedValues]);
|
|
160
|
+
|
|
161
|
+
// 带状态的选项列表
|
|
162
|
+
var options = useMemo(function () {
|
|
163
|
+
return normalizedOptions.map(function (option) {
|
|
164
|
+
var state = getOptionState(option._key);
|
|
165
|
+
// 如果已达到最大值,未选的选项应该被禁用
|
|
166
|
+
var disabled = quantityInfo.maxReached && !state.selected;
|
|
167
|
+
return _objectSpread(_objectSpread({}, option), {}, {
|
|
168
|
+
selected: state.selected,
|
|
169
|
+
quantity: state.quantity,
|
|
170
|
+
disabled: option.disabled || disabled
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
}, [normalizedOptions, getOptionState, quantityInfo.maxReached]);
|
|
174
|
+
var validate = /*#__PURE__*/function () {
|
|
175
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
176
|
+
var errors, _ref3, required, min, max, customValidator, values, currentNormalizedValues, objValue, totalQuantity, selectedValues, selectedKeys, type, message;
|
|
177
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
178
|
+
while (1) switch (_context.prev = _context.next) {
|
|
179
|
+
case 0:
|
|
180
|
+
errors = [];
|
|
181
|
+
_ref3 = ruleConfig || {}, required = _ref3.required, min = _ref3.min, max = _ref3.max, customValidator = _ref3.customValidator;
|
|
182
|
+
values = valuesRef.current; // 计算当前已选的总数量(quantity 的总和)
|
|
183
|
+
currentNormalizedValues = [];
|
|
184
|
+
if (values) {
|
|
185
|
+
if (Array.isArray(values)) {
|
|
186
|
+
currentNormalizedValues = values.map(function (item) {
|
|
187
|
+
if (_typeof(item) === 'object' && item !== null) {
|
|
188
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
189
|
+
value: item.value,
|
|
190
|
+
quantity: item.quantity || 1
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
value: item,
|
|
195
|
+
quantity: 1
|
|
196
|
+
};
|
|
197
|
+
});
|
|
198
|
+
} else if (_typeof(values) === 'object' && values !== null) {
|
|
199
|
+
objValue = values;
|
|
200
|
+
currentNormalizedValues = [_objectSpread(_objectSpread({}, objValue), {}, {
|
|
201
|
+
value: objValue.value,
|
|
202
|
+
quantity: objValue.quantity || 1
|
|
203
|
+
})];
|
|
204
|
+
} else {
|
|
205
|
+
currentNormalizedValues = [{
|
|
206
|
+
value: values,
|
|
207
|
+
quantity: 1
|
|
208
|
+
}];
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
totalQuantity = currentNormalizedValues.reduce(function (sum, item) {
|
|
212
|
+
return sum + (item.quantity || 0);
|
|
213
|
+
}, 0); // 基础校验与同步规则
|
|
214
|
+
if (required && totalQuantity < 1) {
|
|
215
|
+
errors.push({
|
|
216
|
+
type: 'required',
|
|
217
|
+
message: locales.getText('pisell2.pro.selector.validate.required-msg')
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// 根据总数量(quantity 总和)判断,而不是 values.length
|
|
222
|
+
if (typeof min === 'number' && totalQuantity < min) {
|
|
223
|
+
errors.push({
|
|
224
|
+
type: 'min',
|
|
225
|
+
message: locales.getText('pisell2.pro.selector.validate.min-selection')(min)
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
if (typeof max === 'number' && totalQuantity > max) {
|
|
229
|
+
errors.push({
|
|
230
|
+
type: 'max',
|
|
231
|
+
message: locales.getText('pisell2.pro.selector.validate.max-selection')(max)
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// options 数量级别
|
|
236
|
+
options.forEach(function (option) {
|
|
237
|
+
var _option$ruleConfig, _option$ruleConfig2;
|
|
238
|
+
var _optionVal = currentNormalizedValues.find(function (item) {
|
|
239
|
+
return item.value === option._key;
|
|
240
|
+
});
|
|
241
|
+
var quantity = (_optionVal === null || _optionVal === void 0 ? void 0 : _optionVal.quantity) || 0;
|
|
242
|
+
var _label = option._label;
|
|
243
|
+
var _min = option === null || option === void 0 || (_option$ruleConfig = option.ruleConfig) === null || _option$ruleConfig === void 0 ? void 0 : _option$ruleConfig.min;
|
|
244
|
+
var _max = option === null || option === void 0 || (_option$ruleConfig2 = option.ruleConfig) === null || _option$ruleConfig2 === void 0 ? void 0 : _option$ruleConfig2.max;
|
|
245
|
+
if (typeof _min === 'number' && quantity < _min) {
|
|
246
|
+
errors.push({
|
|
247
|
+
type: 'optionMin',
|
|
248
|
+
message: locales.getText('pisell2.pro.selector.validate.min-selection')(_min, _label),
|
|
249
|
+
_key: option._key
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (typeof _max === 'number' && quantity > _max) {
|
|
253
|
+
errors.push({
|
|
254
|
+
type: 'optionMax',
|
|
255
|
+
message: locales.getText('pisell2.pro.selector.validate.max-selection')(_max, _label),
|
|
256
|
+
_key: option._key
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// 互斥组校验:同一组内只能选择一个
|
|
262
|
+
if (mutexGroups.length > 0) {
|
|
263
|
+
selectedValues = Array.isArray(values) ? values : values ? [values] : [];
|
|
264
|
+
selectedKeys = selectedValues.map(function (v) {
|
|
265
|
+
return _typeof(v) === 'object' && v !== null ? v.value : v;
|
|
266
|
+
});
|
|
267
|
+
mutexGroups.forEach(function (group) {
|
|
268
|
+
var count = selectedKeys.filter(function (k) {
|
|
269
|
+
return group.includes(k);
|
|
270
|
+
}).length;
|
|
271
|
+
if (count > 1) {
|
|
272
|
+
errors.push({
|
|
273
|
+
type: 'mutex',
|
|
274
|
+
message: 'Only one option can be selected in the same mutex group'
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
// 异步自定义校验(reject 视为不通过,resolve 视为通过)
|
|
281
|
+
if (!(typeof customValidator === 'function')) {
|
|
282
|
+
_context.next = 22;
|
|
283
|
+
break;
|
|
284
|
+
}
|
|
285
|
+
_context.prev = 12;
|
|
286
|
+
_context.next = 15;
|
|
287
|
+
return customValidator(values);
|
|
288
|
+
case 15:
|
|
289
|
+
_context.next = 22;
|
|
290
|
+
break;
|
|
291
|
+
case 17:
|
|
292
|
+
_context.prev = 17;
|
|
293
|
+
_context.t0 = _context["catch"](12);
|
|
294
|
+
type = (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.type) || 'custom';
|
|
295
|
+
message = (_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || 'Validation failed';
|
|
296
|
+
errors.push({
|
|
297
|
+
type: type,
|
|
298
|
+
message: message
|
|
299
|
+
});
|
|
300
|
+
case 22:
|
|
301
|
+
setErrors(errors);
|
|
302
|
+
setValidated(true);
|
|
303
|
+
return _context.abrupt("return", errors.length === 0 ? Promise.resolve() : Promise.reject(errors));
|
|
304
|
+
case 25:
|
|
305
|
+
case "end":
|
|
306
|
+
return _context.stop();
|
|
307
|
+
}
|
|
308
|
+
}, _callee, null, [[12, 17]]);
|
|
309
|
+
}));
|
|
310
|
+
return function validate() {
|
|
311
|
+
return _ref2.apply(this, arguments);
|
|
312
|
+
};
|
|
313
|
+
}();
|
|
314
|
+
|
|
315
|
+
// 构建输出值
|
|
316
|
+
var buildOutputValue = useCallback(function (newNormalizedValues) {
|
|
317
|
+
if (newNormalizedValues.length === 0) {
|
|
318
|
+
return mode === 'single' ? undefined : [];
|
|
319
|
+
}
|
|
320
|
+
if (mode === 'single') {
|
|
321
|
+
var item = newNormalizedValues[0];
|
|
322
|
+
if (valueType === 'primitive') {
|
|
323
|
+
return item.value;
|
|
324
|
+
}
|
|
325
|
+
return _objectSpread({}, item);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// 多选模式
|
|
329
|
+
if (valueType === 'primitive') {
|
|
330
|
+
return newNormalizedValues.map(function (item) {
|
|
331
|
+
return item.value;
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
return newNormalizedValues.map(function (item) {
|
|
335
|
+
return _objectSpread({}, item);
|
|
336
|
+
});
|
|
337
|
+
}, [mode, valueType, quantityInfo.showQuantity]);
|
|
338
|
+
var _onChange = useCallback(function (optionKey, data) {
|
|
339
|
+
var newNormalizedValues = _toConsumableArray(normalizedValues);
|
|
340
|
+
var existingIndex = newNormalizedValues.findIndex(function (item) {
|
|
341
|
+
return item.value === optionKey;
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
// 如果传入的数据包含quantity且为0或负数,移除选项
|
|
345
|
+
if ((data === null || data === void 0 ? void 0 : data.quantity) !== undefined && data.quantity <= 0) {
|
|
346
|
+
if (existingIndex >= 0) {
|
|
347
|
+
newNormalizedValues.splice(existingIndex, 1);
|
|
348
|
+
}
|
|
349
|
+
} else {
|
|
350
|
+
if (existingIndex >= 0) {
|
|
351
|
+
// 更新现有选项,合并新数据
|
|
352
|
+
newNormalizedValues[existingIndex] = _objectSpread(_objectSpread({}, newNormalizedValues[existingIndex]), data);
|
|
353
|
+
} else {
|
|
354
|
+
// 添加新选项,包含传入的数据
|
|
355
|
+
var newItem = _objectSpread({
|
|
356
|
+
value: optionKey,
|
|
357
|
+
quantity: data.quantity || 1
|
|
358
|
+
}, data);
|
|
359
|
+
if (mode === 'single') {
|
|
360
|
+
newNormalizedValues = [newItem];
|
|
361
|
+
} else {
|
|
362
|
+
newNormalizedValues.push(newItem);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
// 应用互斥规则:若当前选项属于某些互斥组,则移除同组的其他已选项
|
|
367
|
+
var groupIdxList = mutexIndex.get(optionKey) || [];
|
|
368
|
+
if (groupIdxList.length > 0) {
|
|
369
|
+
var keepKey = optionKey;
|
|
370
|
+
var toRemove = new Set();
|
|
371
|
+
groupIdxList.forEach(function (gi) {
|
|
372
|
+
var group = mutexGroups[gi] || [];
|
|
373
|
+
group.forEach(function (k) {
|
|
374
|
+
if (k !== keepKey) {
|
|
375
|
+
toRemove.add(k);
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
});
|
|
379
|
+
if (toRemove.size > 0) {
|
|
380
|
+
newNormalizedValues = newNormalizedValues.filter(function (item) {
|
|
381
|
+
return !toRemove.has(item.value);
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
var outputValue = buildOutputValue(newNormalizedValues);
|
|
387
|
+
setValues(outputValue);
|
|
388
|
+
valuesRef.current = outputValue;
|
|
389
|
+
if (ruleConfig !== null && ruleConfig !== void 0 && ruleConfig.autoValidate) {
|
|
390
|
+
try {
|
|
391
|
+
validate();
|
|
392
|
+
} catch (error) {}
|
|
393
|
+
}
|
|
394
|
+
}, [normalizedValues, mode, buildOutputValue, setValues, mutexIndex, mutexGroups, ruleConfig === null || ruleConfig === void 0 ? void 0 : ruleConfig.autoValidate]);
|
|
395
|
+
|
|
396
|
+
// 清空选择
|
|
397
|
+
var clear = useCallback(function () {
|
|
398
|
+
setValues(mode === 'single' ? undefined : []);
|
|
399
|
+
setErrors([]);
|
|
400
|
+
}, [mode, setValues, setErrors]);
|
|
401
|
+
|
|
402
|
+
// 重置到默认值(如果提供),否则清空
|
|
403
|
+
var reset = useCallback(function () {
|
|
404
|
+
// 仅当提供了非 undefined 的 defaultValue 时才使用它,否则执行清空
|
|
405
|
+
var hasDefinedDefault = props && props.defaultValue !== undefined;
|
|
406
|
+
if (hasDefinedDefault) {
|
|
407
|
+
setValues(props.defaultValue);
|
|
408
|
+
} else {
|
|
409
|
+
clear();
|
|
410
|
+
}
|
|
411
|
+
setErrors([]);
|
|
412
|
+
}, [props, clear, setValues, setErrors]);
|
|
413
|
+
var actions = {
|
|
414
|
+
toggle: function toggle(optionKey) {
|
|
415
|
+
var currentState = getOptionState(optionKey);
|
|
416
|
+
_onChange(optionKey, {
|
|
417
|
+
quantity: currentState.selected ? 0 : 1
|
|
418
|
+
});
|
|
419
|
+
},
|
|
420
|
+
update: function update(optionKey, payload) {
|
|
421
|
+
return _onChange(optionKey, payload);
|
|
422
|
+
},
|
|
423
|
+
setValue: function setValue(value) {
|
|
424
|
+
return setValues(value);
|
|
425
|
+
},
|
|
426
|
+
clear: clear,
|
|
427
|
+
validate: validate,
|
|
428
|
+
reset: reset
|
|
429
|
+
};
|
|
430
|
+
return {
|
|
431
|
+
state: {
|
|
432
|
+
errors: errors,
|
|
433
|
+
validated: validated,
|
|
434
|
+
values: values,
|
|
435
|
+
options: options,
|
|
436
|
+
quantityInfo: quantityInfo
|
|
437
|
+
},
|
|
438
|
+
actions: actions
|
|
439
|
+
};
|
|
440
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectorProps, OptionKey } from './types';
|
|
3
|
+
import Item from './Item';
|
|
4
|
+
import SelectorGroup from './SelectorGroup';
|
|
5
|
+
declare type SelectorComponentType = React.ForwardRefExoticComponent<SelectorProps<OptionKey> & React.RefAttributes<any>> & {
|
|
6
|
+
Group: typeof SelectorGroup;
|
|
7
|
+
Item: typeof Item;
|
|
8
|
+
};
|
|
9
|
+
declare const Selector: SelectorComponentType;
|
|
10
|
+
export * from './types';
|
|
11
|
+
export default Selector;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.pro.selector.mode.single': string;
|
|
4
|
+
'pisell2.pro.selector.mode.multiple': string;
|
|
5
|
+
'pisell2.pro.selector.validate.required-msg': string;
|
|
6
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': string;
|
|
7
|
+
'pisell2.pro.selector.required-tag': string;
|
|
8
|
+
'pisell2.pro.selector.validate.min-selection': (min: number, label?: string) => string;
|
|
9
|
+
'pisell2.pro.selector.validate.max-selection': (max: number, label?: string) => string;
|
|
10
|
+
'pisell2.pro.selector.tip.require-one-option': string;
|
|
11
|
+
'pisell2.pro.selector.tip.min-max-selection': (min: number, max: number) => string;
|
|
12
|
+
};
|
|
13
|
+
'zh-CN': {
|
|
14
|
+
'pisell2.pro.selector.mode.single': string;
|
|
15
|
+
'pisell2.pro.selector.mode.multiple': string;
|
|
16
|
+
'pisell2.pro.selector.validate.required-msg': string;
|
|
17
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': string;
|
|
18
|
+
'pisell2.pro.selector.required-tag': string;
|
|
19
|
+
'pisell2.pro.selector.validate.min-selection': (min: number, label?: string) => string;
|
|
20
|
+
'pisell2.pro.selector.validate.max-selection': (max: number, label?: string) => string;
|
|
21
|
+
'pisell2.pro.selector.tip.require-one-option': string;
|
|
22
|
+
'pisell2.pro.selector.tip.min-max-selection': (min: number, max: number) => string;
|
|
23
|
+
};
|
|
24
|
+
'zh-HK': {
|
|
25
|
+
'pisell2.pro.selector.mode.single': string;
|
|
26
|
+
'pisell2.pro.selector.mode.multiple': string;
|
|
27
|
+
'pisell2.pro.selector.validate.required-msg': string;
|
|
28
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': string;
|
|
29
|
+
'pisell2.pro.selector.required-tag': string;
|
|
30
|
+
'pisell2.pro.selector.validate.min-selection': (min: number, label?: string) => string;
|
|
31
|
+
'pisell2.pro.selector.validate.max-selection': (max: number, label?: string) => string;
|
|
32
|
+
'pisell2.pro.selector.tip.require-one-option': string;
|
|
33
|
+
'pisell2.pro.selector.tip.min-max-selection': (min: number, max: number) => string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
en: {
|
|
3
|
+
'pisell2.pro.selector.mode.single': 'Single choice',
|
|
4
|
+
'pisell2.pro.selector.mode.multiple': 'Multiple choice',
|
|
5
|
+
'pisell2.pro.selector.validate.required-msg': 'Please select',
|
|
6
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': 'This group must select one of the specified collections',
|
|
7
|
+
'pisell2.pro.selector.required-tag': 'Required',
|
|
8
|
+
'pisell2.pro.selector.validate.min-selection': function pisell2ProSelectorValidateMinSelection(min, label) {
|
|
9
|
+
return "Select at least ".concat(min).concat(label ? ' ' + label : '');
|
|
10
|
+
},
|
|
11
|
+
'pisell2.pro.selector.validate.max-selection': function pisell2ProSelectorValidateMaxSelection(max, label) {
|
|
12
|
+
return "Select at most ".concat(max).concat(label ? ' ' + label : '');
|
|
13
|
+
},
|
|
14
|
+
'pisell2.pro.selector.tip.require-one-option': 'Choose 1',
|
|
15
|
+
'pisell2.pro.selector.tip.min-max-selection': function pisell2ProSelectorTipMinMaxSelection(min, max) {
|
|
16
|
+
// 固定数量:min=max
|
|
17
|
+
if (min === max && min > 0) {
|
|
18
|
+
return "Choose ".concat(min);
|
|
19
|
+
}
|
|
20
|
+
// 仅max:min=0或undefined
|
|
21
|
+
if ((!min || min === 0) && max > 0) {
|
|
22
|
+
return "Choose up to ".concat(max);
|
|
23
|
+
}
|
|
24
|
+
// 范围:min>0, max>min
|
|
25
|
+
if (min > 0 && max > min) {
|
|
26
|
+
return "Choose ".concat(min, "-").concat(max);
|
|
27
|
+
}
|
|
28
|
+
// 仅min:min>0, max=0或undefined
|
|
29
|
+
if (min > 0 && (!max || max === 0)) {
|
|
30
|
+
return "Choose at least ".concat(min);
|
|
31
|
+
}
|
|
32
|
+
return '';
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
'zh-CN': {
|
|
36
|
+
'pisell2.pro.selector.mode.single': '单选',
|
|
37
|
+
'pisell2.pro.selector.mode.multiple': '多选',
|
|
38
|
+
'pisell2.pro.selector.validate.required-msg': '请选择',
|
|
39
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': '该组必须选择指定集合之一',
|
|
40
|
+
'pisell2.pro.selector.required-tag': '必选',
|
|
41
|
+
'pisell2.pro.selector.validate.min-selection': function pisell2ProSelectorValidateMinSelection(min, label) {
|
|
42
|
+
return "\u81F3\u5C11\u9009 ".concat(min, " \u4E2A").concat(label ? ' ' + label : '');
|
|
43
|
+
},
|
|
44
|
+
'pisell2.pro.selector.validate.max-selection': function pisell2ProSelectorValidateMaxSelection(max, label) {
|
|
45
|
+
return "\u6700\u591A\u9009 ".concat(max, " \u4E2A").concat(label ? ' ' + label : '');
|
|
46
|
+
},
|
|
47
|
+
'pisell2.pro.selector.tip.require-one-option': '需选 1 项',
|
|
48
|
+
'pisell2.pro.selector.tip.min-max-selection': function pisell2ProSelectorTipMinMaxSelection(min, max) {
|
|
49
|
+
// 固定数量:min=max
|
|
50
|
+
if (min === max && min > 0) {
|
|
51
|
+
return "\u9700\u9009 ".concat(min, " \u4E2A");
|
|
52
|
+
}
|
|
53
|
+
// 仅max:min=0或undefined
|
|
54
|
+
if ((!min || min === 0) && max > 0) {
|
|
55
|
+
return "\u6700\u591A\u9009 ".concat(max, " \u4E2A");
|
|
56
|
+
}
|
|
57
|
+
// 范围:min>0, max>min
|
|
58
|
+
if (min > 0 && max > min) {
|
|
59
|
+
return "\u9009 ".concat(min, "-").concat(max, " \u4E2A");
|
|
60
|
+
}
|
|
61
|
+
// 仅min:min>0, max=0或undefined
|
|
62
|
+
if (min > 0 && (!max || max === 0)) {
|
|
63
|
+
return "\u81F3\u5C11\u9009 ".concat(min, " \u4E2A");
|
|
64
|
+
}
|
|
65
|
+
return '';
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
'zh-HK': {
|
|
69
|
+
'pisell2.pro.selector.mode.single': '單選',
|
|
70
|
+
'pisell2.pro.selector.mode.multiple': '多選',
|
|
71
|
+
'pisell2.pro.selector.validate.required-msg': '請選擇',
|
|
72
|
+
'pisell2.pro.selector.validate.requireOneOf-msg': '該組必須選擇指定集合之一',
|
|
73
|
+
'pisell2.pro.selector.required-tag': '必選',
|
|
74
|
+
'pisell2.pro.selector.validate.min-selection': function pisell2ProSelectorValidateMinSelection(min, label) {
|
|
75
|
+
return "\u81F3\u5C11\u9078 ".concat(min, " \u500B").concat(label ? ' ' + label : '');
|
|
76
|
+
},
|
|
77
|
+
'pisell2.pro.selector.validate.max-selection': function pisell2ProSelectorValidateMaxSelection(max, label) {
|
|
78
|
+
return "\u6700\u591A\u9078 ".concat(max, " \u500B").concat(label ? ' ' + label : '');
|
|
79
|
+
},
|
|
80
|
+
'pisell2.pro.selector.tip.require-one-option': '需選 1 項',
|
|
81
|
+
'pisell2.pro.selector.tip.min-max-selection': function pisell2ProSelectorTipMinMaxSelection(min, max) {
|
|
82
|
+
// 固定數量:min=max
|
|
83
|
+
if (min === max && min > 0) {
|
|
84
|
+
return "\u9700\u9078 ".concat(min, " \u500B");
|
|
85
|
+
}
|
|
86
|
+
// 僅max:min=0或undefined
|
|
87
|
+
if ((!min || min === 0) && max > 0) {
|
|
88
|
+
return "\u6700\u591A\u9078 ".concat(max, " \u500B");
|
|
89
|
+
}
|
|
90
|
+
// 範圍:min>0, max>min
|
|
91
|
+
if (min > 0 && max > min) {
|
|
92
|
+
return "\u9078 ".concat(min, "-").concat(max, " \u500B");
|
|
93
|
+
}
|
|
94
|
+
// 僅min:min>0, max=0或undefined
|
|
95
|
+
if (min > 0 && (!max || max === 0)) {
|
|
96
|
+
return "\u81F3\u5C11\u9078 ".concat(min, " \u500B");
|
|
97
|
+
}
|
|
98
|
+
return '';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|