@pisell/private-materials 6.3.70 → 6.3.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +3 -3
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +3 -3
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/booking/addons/model.d.ts +1 -10
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +8 -7
- package/es/components/booking/forms/model.d.ts +1 -10
- package/es/components/booking/forms/single/index.d.ts +0 -1
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/model.d.ts +1 -10
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +0 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/es/components/booking/materiels/contacts/index.d.ts +0 -1
- package/es/components/booking/materiels/duration/index.d.ts +0 -1
- package/es/components/booking/materiels/holder/index.d.ts +0 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/model.d.ts +1 -9
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +1 -10
- package/es/components/booking/payments/model.d.ts +1 -10
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +1 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +0 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/es/components/eftposPay/component/manual/index.d.ts +0 -1
- package/es/components/eftposPay/component/signature/index.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/pay.d.ts +0 -1
- package/es/components/eftposPay/payo/config.d.ts +0 -1
- package/es/components/eftposPay/tip.d.ts +0 -1
- package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/kioskSkuDetail/index.d.ts +39 -0
- package/es/components/kioskSkuDetail/index.js +531 -0
- package/es/components/kioskSkuDetail/index.less +196 -0
- package/es/components/kioskSkuDetail/locales.d.ts +27 -0
- package/es/components/kioskSkuDetail/locales.js +26 -0
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +5 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pay/toC/model.d.ts +1 -9
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/calendar/index.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +1 -9
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/es/components/schedules/products/list/index.d.ts +0 -1
- package/es/components/schedules/resources/index.d.ts +0 -1
- package/es/components/schedules/resources/list/index.d.ts +0 -1
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/es/components/schedules/schedules/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/walletList/index.js +7 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/es/plus/saasRegister/components/Header.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/VariantCard/index.js +30 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.less +10 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/es/plus/skuOptionsSelection/locales.js +3 -0
- package/es/plus/skuOptionsSelection/store/actions.js +17 -2
- package/es/plus/skuOptionsSelection/types.d.ts +5 -0
- package/es/plus/skuOptionsSelection/types.js +2 -1
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.js +70 -3
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/es/plus/walletPassGallery/index.js +2 -2
- package/es/pro/numberKeyboard/index.d.ts +28 -0
- package/es/pro/numberKeyboard/index.js +155 -0
- package/es/pro/numberKeyboard/index.less +25 -0
- package/es/pro/numberKeyboard/locales.d.ts +12 -0
- package/es/pro/numberKeyboard/locales.js +11 -0
- package/es/pro/pisellNumberSelector/example.d.ts +3 -0
- package/es/pro/pisellNumberSelector/example.js +68 -0
- package/es/pro/pisellNumberSelector/index.d.ts +29 -0
- package/es/pro/pisellNumberSelector/index.js +257 -0
- package/es/pro/pisellNumberSelector/index.less +235 -0
- package/es/pro/skuDetailModal/index.d.ts +4 -0
- package/es/pro/skuDetailModal/index.js +1031 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/booking/addons/model.d.ts +1 -10
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +0 -1
- package/lib/components/booking/forms/model.d.ts +1 -10
- package/lib/components/booking/forms/single/index.d.ts +0 -1
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/model.d.ts +1 -10
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
- package/lib/components/booking/materiels/duration/index.d.ts +0 -1
- package/lib/components/booking/materiels/holder/index.d.ts +0 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/model.d.ts +1 -9
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
- package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +1 -10
- package/lib/components/booking/payments/model.d.ts +1 -10
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +1 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
- package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
- package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/pay.d.ts +0 -1
- package/lib/components/eftposPay/payo/config.d.ts +0 -1
- package/lib/components/eftposPay/tip.d.ts +0 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
- package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/kioskSkuDetail/index.d.ts +39 -0
- package/lib/components/kioskSkuDetail/index.js +393 -0
- package/lib/components/kioskSkuDetail/index.less +196 -0
- package/lib/components/kioskSkuDetail/locales.d.ts +27 -0
- package/lib/components/kioskSkuDetail/locales.js +50 -0
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +5 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pay/toC/model.d.ts +1 -9
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +0 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/calendar/index.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +1 -9
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
- package/lib/components/schedules/products/list/index.d.ts +0 -1
- package/lib/components/schedules/resources/index.d.ts +0 -1
- package/lib/components/schedules/resources/list/index.d.ts +0 -1
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
- package/lib/components/schedules/schedules/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/walletList/index.js +5 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
- package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
- package/lib/plus/saasRegister/components/Header.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +32 -3
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.less +10 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/locales.js +3 -0
- package/lib/plus/skuOptionsSelection/store/actions.js +25 -1
- package/lib/plus/skuOptionsSelection/types.d.ts +5 -0
- package/lib/plus/skuOptionsSelection/types.js +2 -1
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.js +51 -5
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +1 -1
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/index.js +2 -2
- package/lib/pro/numberKeyboard/index.d.ts +28 -0
- package/lib/pro/numberKeyboard/index.js +182 -0
- package/lib/pro/numberKeyboard/index.less +25 -0
- package/lib/pro/numberKeyboard/locales.d.ts +12 -0
- package/lib/pro/numberKeyboard/locales.js +35 -0
- package/lib/pro/pisellNumberSelector/example.d.ts +3 -0
- package/lib/pro/pisellNumberSelector/example.js +93 -0
- package/lib/pro/pisellNumberSelector/index.d.ts +29 -0
- package/lib/pro/pisellNumberSelector/index.js +275 -0
- package/lib/pro/pisellNumberSelector/index.less +235 -0
- package/lib/pro/skuDetailModal/index.d.ts +4 -0
- package/lib/pro/skuDetailModal/index.js +736 -0
- package/lowcode/kiosk-sku-detail/meta.ts +264 -0
- package/package.json +4 -4
- package/es/components/Sales/Cart/utils.d.ts +0 -63
- package/es/components/Sales/Summary/utils.d.ts +0 -51
- package/es/components/appointmentBooking/locales.d.ts +0 -363
- package/es/components/booking/components/tabPane/index.d.ts +0 -4
- package/es/components/booking/dashboard/serve.d.ts +0 -1
- package/es/components/booking/editBookingModal/utils.d.ts +0 -12
- package/es/components/booking/forms/serve.d.ts +0 -18
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/es/components/booking/info/client/serve.d.ts +0 -2
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
- package/es/components/booking/info/pet/serve.d.ts +0 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/es/components/booking/info/service/editService/constants.d.ts +0 -1
- package/es/components/booking/info/service/serve.d.ts +0 -20
- package/es/components/booking/info2/serve.d.ts +0 -6
- package/es/components/booking/locales.d.ts +0 -843
- package/es/components/eftposPay/const.d.ts +0 -184
- package/es/components/eftposPay/locales.d.ts +0 -330
- package/es/components/eftposPay/manufacturer.d.ts +0 -7
- package/es/components/eftposPay/payo/payment.d.ts +0 -66
- package/es/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
- package/es/components/pay/toC/locales.d.ts +0 -307
- package/es/components/pay/toC/status.d.ts +0 -13
- package/es/components/ruleSetting/locales.d.ts +0 -48
- package/es/components/shoppingCart/locales.d.ts +0 -33
- package/es/components/shoppingCart/type.d.ts +0 -48
- package/es/components/subTotal/locales.d.ts +0 -42
- package/es/components/systemSettings/registry/locales.d.ts +0 -272
- package/es/components/systemSettings/registry/services.d.ts +0 -77
- package/es/components/systemSettings/registry/types.d.ts +0 -126
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/es/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/es/components/ticketBooking/locales.d.ts +0 -174
- package/es/components/wallet/utils.d.ts +0 -48
- package/es/components/walletList/locales.d.ts +0 -27
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/es/hooks/useEngineContext.d.ts +0 -10
- package/es/hooks/useWindowSize.d.ts +0 -5
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/es/plus/selectHolder/locales.d.ts +0 -21
- package/es/plus/selectHolder/types.d.ts +0 -104
- package/es/plus/selectHolder/utils.d.ts +0 -9
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/es/plus/walletEditor/locales.d.ts +0 -135
- package/es/plus/walletPassGallery/locales.d.ts +0 -285
- package/es/plus/walletPassGallery/utils.d.ts +0 -48
- package/es/pro/Login2.0/shared/types.d.ts +0 -232
- package/es/pro/NumericStepper/index.d.ts +0 -43
- package/es/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/es/pro/Selector/Item.d.ts +0 -14
- package/es/pro/Selector/Selector.stories.d.ts +0 -78
- package/es/pro/Selector/components/Card/index.d.ts +0 -57
- package/es/pro/Selector/components/Card/types.d.ts +0 -1
- package/es/pro/Selector/components/Indicator/index.d.ts +0 -19
- package/es/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
- package/es/pro/Selector/components/Media/index.d.ts +0 -6
- package/es/pro/Selector/components/Media/types.d.ts +0 -47
- package/es/pro/Selector/components/index.d.ts +0 -4
- package/es/pro/Selector/demo.d.ts +0 -2
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/es/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/es/pro/Selector/index.d.ts +0 -11
- package/es/pro/Selector/locales.d.ts +0 -36
- package/es/pro/Selector/types.d.ts +0 -173
- package/es/pro/Selector/utils/index.d.ts +0 -49
- package/es/test/setup.d.ts +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +0 -63
- package/lib/components/Sales/Summary/utils.d.ts +0 -51
- package/lib/components/appointmentBooking/locales.d.ts +0 -363
- package/lib/components/booking/components/tabPane/index.d.ts +0 -4
- package/lib/components/booking/dashboard/serve.d.ts +0 -1
- package/lib/components/booking/editBookingModal/utils.d.ts +0 -12
- package/lib/components/booking/forms/serve.d.ts +0 -18
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +0 -1
- package/lib/components/booking/info/client/serve.d.ts +0 -2
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +0 -9
- package/lib/components/booking/info/pet/serve.d.ts +0 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +0 -5
- package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
- package/lib/components/booking/info/service/serve.d.ts +0 -20
- package/lib/components/booking/info2/serve.d.ts +0 -6
- package/lib/components/booking/locales.d.ts +0 -843
- package/lib/components/eftposPay/const.d.ts +0 -184
- package/lib/components/eftposPay/locales.d.ts +0 -330
- package/lib/components/eftposPay/manufacturer.d.ts +0 -7
- package/lib/components/eftposPay/payo/payment.d.ts +0 -66
- package/lib/components/pay/toC/PaymentList/utils.d.ts +0 -36
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +0 -6
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -2
- package/lib/components/pay/toC/locales.d.ts +0 -307
- package/lib/components/pay/toC/status.d.ts +0 -13
- package/lib/components/ruleSetting/locales.d.ts +0 -48
- package/lib/components/shoppingCart/locales.d.ts +0 -33
- package/lib/components/shoppingCart/type.d.ts +0 -48
- package/lib/components/subTotal/locales.d.ts +0 -42
- package/lib/components/systemSettings/registry/locales.d.ts +0 -272
- package/lib/components/systemSettings/registry/services.d.ts +0 -77
- package/lib/components/systemSettings/registry/types.d.ts +0 -126
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +0 -16
- package/lib/components/systemSettings/registry/utils/validators.d.ts +0 -8
- package/lib/components/ticketBooking/locales.d.ts +0 -174
- package/lib/components/wallet/utils.d.ts +0 -48
- package/lib/components/walletList/locales.d.ts +0 -27
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
- package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
- package/lib/hooks/useEngineContext.d.ts +0 -10
- package/lib/hooks/useWindowSize.d.ts +0 -5
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +0 -30
- package/lib/plus/selectHolder/locales.d.ts +0 -21
- package/lib/plus/selectHolder/types.d.ts +0 -104
- package/lib/plus/selectHolder/utils.d.ts +0 -9
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +0 -2
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +0 -15
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +0 -6
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
- package/lib/plus/walletEditor/locales.d.ts +0 -135
- package/lib/plus/walletPassGallery/locales.d.ts +0 -285
- package/lib/plus/walletPassGallery/utils.d.ts +0 -48
- package/lib/pro/Login2.0/shared/types.d.ts +0 -232
- package/lib/pro/NumericStepper/index.d.ts +0 -43
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +0 -3
- package/lib/pro/Selector/Item.d.ts +0 -14
- package/lib/pro/Selector/Selector.stories.d.ts +0 -78
- package/lib/pro/Selector/components/Card/index.d.ts +0 -57
- package/lib/pro/Selector/components/Card/types.d.ts +0 -1
- package/lib/pro/Selector/components/Indicator/index.d.ts +0 -19
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +0 -105
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +0 -16
- package/lib/pro/Selector/components/Media/index.d.ts +0 -6
- package/lib/pro/Selector/components/Media/types.d.ts +0 -47
- package/lib/pro/Selector/components/index.d.ts +0 -4
- package/lib/pro/Selector/demo.d.ts +0 -2
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +0 -43
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +0 -24
- package/lib/pro/Selector/index.d.ts +0 -11
- package/lib/pro/Selector/locales.d.ts +0 -36
- package/lib/pro/Selector/types.d.ts +0 -173
- package/lib/pro/Selector/utils/index.d.ts +0 -49
- package/lib/test/setup.d.ts +0 -1
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { locales } from '@pisell/utils';
|
|
3
3
|
import Selector from "../../../../pro/Selector";
|
|
4
|
+
import useStore from "../../hooks/useStore";
|
|
4
5
|
import "./index.less";
|
|
5
6
|
var VariantCard = function VariantCard(props) {
|
|
6
7
|
var _props$dataSource, _props$dataSource2;
|
|
7
8
|
var _ref = props || {},
|
|
8
9
|
dataSource = _ref.dataSource,
|
|
9
10
|
actions = _ref.actions;
|
|
11
|
+
var symbol = useStore(function (s) {
|
|
12
|
+
return s.symbol;
|
|
13
|
+
});
|
|
14
|
+
var skuCardConfig = useStore(function (s) {
|
|
15
|
+
return s.skuCardConfig;
|
|
16
|
+
});
|
|
17
|
+
var isVariantPriceVisible = (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.variantPriceVisible) === true;
|
|
18
|
+
var priceConfig = skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.price;
|
|
19
|
+
var priceText = formatPriceText({
|
|
20
|
+
symbol: symbol,
|
|
21
|
+
price: dataSource === null || dataSource === void 0 ? void 0 : dataSource.price
|
|
22
|
+
});
|
|
10
23
|
var handleClick = function handleClick(e) {
|
|
11
24
|
e.stopPropagation();
|
|
12
25
|
if (dataSource !== null && dataSource !== void 0 && dataSource.disabled) return;
|
|
@@ -24,6 +37,22 @@ var VariantCard = function VariantCard(props) {
|
|
|
24
37
|
return /*#__PURE__*/React.createElement(Selector.Item, props || {}, /*#__PURE__*/React.createElement("div", {
|
|
25
38
|
className: "pisell-sku-options-selection-variant-card",
|
|
26
39
|
onClick: handleClick
|
|
27
|
-
},
|
|
40
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
className: "pisell-sku-options-selection-variant-card__title"
|
|
42
|
+
}, ((_props$dataSource = props.dataSource) === null || _props$dataSource === void 0 ? void 0 : _props$dataSource.title) || '', ((_props$dataSource2 = props.dataSource) === null || _props$dataSource2 === void 0 || (_props$dataSource2 = _props$dataSource2._extra) === null || _props$dataSource2 === void 0 ? void 0 : _props$dataSource2.hasStock) === false ? " (".concat(locales.getText('pisell2.skuOptionsSelection.variantItemCard.soldOut'), ")") : null), isVariantPriceVisible && (priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.visible) !== false && !!priceText ? /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "pisell-sku-options-selection-variant-card__price",
|
|
44
|
+
style: {
|
|
45
|
+
fontSize: priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.fontSize,
|
|
46
|
+
fontWeight: priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.fontWeight,
|
|
47
|
+
color: priceConfig === null || priceConfig === void 0 ? void 0 : priceConfig.color
|
|
48
|
+
}
|
|
49
|
+
}, locales.getText('pisell2.skuOptionsSelection.variantItemCard.price'), ":", priceText) : null));
|
|
28
50
|
};
|
|
51
|
+
function formatPriceText(params) {
|
|
52
|
+
var symbol = params.symbol || '$';
|
|
53
|
+
var price = Number(params.price);
|
|
54
|
+
if (!params.price && params.price !== 0) return '';
|
|
55
|
+
if (Number.isNaN(price)) return '';
|
|
56
|
+
return "".concat(symbol).concat(price.toFixed(2));
|
|
57
|
+
}
|
|
29
58
|
export default VariantCard;
|
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
height: 100%;
|
|
4
4
|
padding: 12px 16px;
|
|
5
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 4px;
|
|
6
8
|
align-items: center;
|
|
7
9
|
justify-content: center;
|
|
8
10
|
text-align: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.pisell-sku-options-selection-variant-card__title {
|
|
14
|
+
line-height: 1.2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-sku-options-selection-variant-card__price {
|
|
18
|
+
line-height: 1.2;
|
|
9
19
|
}
|
|
@@ -5,6 +5,7 @@ declare const _default: {
|
|
|
5
5
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
6
6
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
7
7
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
8
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
8
9
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
9
10
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
10
11
|
};
|
|
@@ -14,6 +15,7 @@ declare const _default: {
|
|
|
14
15
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
15
16
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
16
17
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
18
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
17
19
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
18
20
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
19
21
|
};
|
|
@@ -23,6 +25,7 @@ declare const _default: {
|
|
|
23
25
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': string;
|
|
24
26
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': string;
|
|
25
27
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': string;
|
|
28
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': string;
|
|
26
29
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': string;
|
|
27
30
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': string;
|
|
28
31
|
};
|
|
@@ -5,6 +5,7 @@ export default {
|
|
|
5
5
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': 'Subtotal: {{price}}',
|
|
6
6
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': 'Edit selections',
|
|
7
7
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': 'Out of stock',
|
|
8
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': 'Price',
|
|
8
9
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': 'Type',
|
|
9
10
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': 'Over selected'
|
|
10
11
|
},
|
|
@@ -14,6 +15,7 @@ export default {
|
|
|
14
15
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': '小计:{{price}}',
|
|
15
16
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': '编辑选择',
|
|
16
17
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': '库存不足',
|
|
18
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': '价格',
|
|
17
19
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': '类型',
|
|
18
20
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': '已达上限'
|
|
19
21
|
},
|
|
@@ -23,6 +25,7 @@ export default {
|
|
|
23
25
|
'pisell2.skuOptionsSelection.titleExtra.totalPrice': '小計:{{price}}',
|
|
24
26
|
'pisell2.skuOptionsSelection.optionItemCard.editSelections': '編輯選擇',
|
|
25
27
|
'pisell2.skuOptionsSelection.variantItemCard.soldOut': '庫存不足',
|
|
28
|
+
'pisell2.skuOptionsSelection.variantItemCard.price': '價格',
|
|
26
29
|
'pisell2.skuOptionsSelection.optionItemCard.typeText': '類型',
|
|
27
30
|
'pisell2.skuOptionsSelection.optionItemCard.overSelected': '已達上限'
|
|
28
31
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
1
7
|
import store, { initialState } from "./store";
|
|
2
8
|
var actions = {
|
|
3
9
|
/** 更新数据源 */
|
|
@@ -38,8 +44,17 @@ var actions = {
|
|
|
38
44
|
},
|
|
39
45
|
/** 更新 SKU Card 配置 */
|
|
40
46
|
updateSkuCardConfig: function updateSkuCardConfig(skuCardConfig) {
|
|
41
|
-
|
|
42
|
-
|
|
47
|
+
// 支持局部更新:避免调用方只传一个字段时覆盖默认配置
|
|
48
|
+
store.setState(function (prev) {
|
|
49
|
+
var _prev$skuCardConfig, _prev$skuCardConfig2, _prev$skuCardConfig3, _prev$skuCardConfig4;
|
|
50
|
+
return {
|
|
51
|
+
skuCardConfig: _objectSpread(_objectSpread(_objectSpread({}, prev.skuCardConfig || {}), skuCardConfig || {}), {}, {
|
|
52
|
+
title: _objectSpread(_objectSpread({}, ((_prev$skuCardConfig = prev.skuCardConfig) === null || _prev$skuCardConfig === void 0 ? void 0 : _prev$skuCardConfig.title) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.title) || {}),
|
|
53
|
+
subTitle: _objectSpread(_objectSpread({}, ((_prev$skuCardConfig2 = prev.skuCardConfig) === null || _prev$skuCardConfig2 === void 0 ? void 0 : _prev$skuCardConfig2.subTitle) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.subTitle) || {}),
|
|
54
|
+
price: _objectSpread(_objectSpread({}, ((_prev$skuCardConfig3 = prev.skuCardConfig) === null || _prev$skuCardConfig3 === void 0 ? void 0 : _prev$skuCardConfig3.price) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.price) || {}),
|
|
55
|
+
image: _objectSpread(_objectSpread({}, ((_prev$skuCardConfig4 = prev.skuCardConfig) === null || _prev$skuCardConfig4 === void 0 ? void 0 : _prev$skuCardConfig4.image) || {}), (skuCardConfig === null || skuCardConfig === void 0 ? void 0 : skuCardConfig.image) || {})
|
|
56
|
+
})
|
|
57
|
+
};
|
|
43
58
|
});
|
|
44
59
|
},
|
|
45
60
|
/** 更新自定义配置 */
|
|
@@ -41,6 +41,11 @@ export interface SkuCardConfig {
|
|
|
41
41
|
price?: Omit<SkuCardTextConfig, 'lineClamp'>;
|
|
42
42
|
/** 图片配置 */
|
|
43
43
|
image?: SkuCardImageConfig;
|
|
44
|
+
/**
|
|
45
|
+
* @description 是否在「组合规格选项卡片(VariantCard)」展示价格
|
|
46
|
+
* - 默认不展示,避免影响现有业务 UI
|
|
47
|
+
*/
|
|
48
|
+
variantPriceVisible?: boolean;
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
51
|
* SKU store状态类型
|
|
@@ -6,10 +6,13 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
7
|
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); }
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import store from "../store/store";
|
|
9
10
|
import VariantCard from "../components/VariantCard";
|
|
10
11
|
import { checkVariantStockCanSell, checkSkuDisabled, checkVariantStockByValue } from "./checkSkuStatus";
|
|
11
12
|
export var transformVariantGroup = function transformVariantGroup(variantGroup) {
|
|
13
|
+
var _store$getState$dataS;
|
|
12
14
|
if (!Array.isArray(variantGroup)) return [];
|
|
15
|
+
var variantProducts = ((_store$getState$dataS = store.getState().dataSource) === null || _store$getState$dataS === void 0 ? void 0 : _store$getState$dataS.variant) || [];
|
|
13
16
|
var formattedGroup = variantGroup.map(function (item) {
|
|
14
17
|
var _item$variant_item;
|
|
15
18
|
// Selector中选项数据源
|
|
@@ -18,12 +21,18 @@ export var transformVariantGroup = function transformVariantGroup(variantGroup)
|
|
|
18
21
|
canSell = _checkVariantStockCan.canSell,
|
|
19
22
|
hasStock = _checkVariantStockCan.hasStock;
|
|
20
23
|
var disabled = checkSkuDisabled(variantItem, canSell);
|
|
24
|
+
var price = getVariantItemFixedPrice({
|
|
25
|
+
selectedVariantIds: ["".concat(variantItem === null || variantItem === void 0 ? void 0 : variantItem.variant_group_id, ":").concat(variantItem === null || variantItem === void 0 ? void 0 : variantItem.id)],
|
|
26
|
+
variantProducts: variantProducts
|
|
27
|
+
});
|
|
21
28
|
return {
|
|
22
29
|
_original: _objectSpread({}, variantItem || {}),
|
|
23
30
|
id: variantItem === null || variantItem === void 0 ? void 0 : variantItem.id,
|
|
24
31
|
title: variantItem === null || variantItem === void 0 ? void 0 : variantItem.name,
|
|
25
32
|
value: variantItem === null || variantItem === void 0 ? void 0 : variantItem.id,
|
|
26
33
|
disabled: disabled,
|
|
34
|
+
// 组合规格选项对应的固定价格(若存在多价则返回 null,不展示)
|
|
35
|
+
price: price,
|
|
27
36
|
ruleConfig: {
|
|
28
37
|
autoValidate: true
|
|
29
38
|
},
|
|
@@ -68,12 +77,18 @@ export var transformVariantGroup = function transformVariantGroup(variantGroup)
|
|
|
68
77
|
|
|
69
78
|
// 渲染选项卡片
|
|
70
79
|
selectorDataSource.renderItem = function (itemProps) {
|
|
71
|
-
var _itemProps$dataSource, _itemProps$dataSource2;
|
|
80
|
+
var _itemProps$dataSource, _itemProps$dataSource2, _itemProps$dataSource3;
|
|
72
81
|
var _checkVariantStockByV = checkVariantStockByValue(itemProps === null || itemProps === void 0 || (_itemProps$dataSource = itemProps.dataSource) === null || _itemProps$dataSource === void 0 ? void 0 : _itemProps$dataSource._original),
|
|
73
82
|
canSell = _checkVariantStockByV.canSell,
|
|
74
83
|
hasStock = _checkVariantStockByV.hasStock;
|
|
84
|
+
var price = getVariantItemFixedPriceByValue({
|
|
85
|
+
variantItem: itemProps === null || itemProps === void 0 || (_itemProps$dataSource2 = itemProps.dataSource) === null || _itemProps$dataSource2 === void 0 ? void 0 : _itemProps$dataSource2._original,
|
|
86
|
+
variantProducts: variantProducts
|
|
87
|
+
});
|
|
75
88
|
var _dataSource = _objectSpread(_objectSpread({}, (itemProps === null || itemProps === void 0 ? void 0 : itemProps.dataSource) || {}), {}, {
|
|
76
|
-
disabled: checkSkuDisabled(itemProps === null || itemProps === void 0 || (_itemProps$
|
|
89
|
+
disabled: checkSkuDisabled(itemProps === null || itemProps === void 0 || (_itemProps$dataSource3 = itemProps.dataSource) === null || _itemProps$dataSource3 === void 0 ? void 0 : _itemProps$dataSource3._original, canSell),
|
|
90
|
+
// 组合规格选项对应的固定价格(若存在多价则返回 null,不展示)
|
|
91
|
+
price: price,
|
|
77
92
|
_extra: {
|
|
78
93
|
canSell: canSell,
|
|
79
94
|
hasStock: hasStock
|
|
@@ -87,4 +102,56 @@ export var transformVariantGroup = function transformVariantGroup(variantGroup)
|
|
|
87
102
|
return selectorDataSource;
|
|
88
103
|
});
|
|
89
104
|
return formattedGroup;
|
|
90
|
-
};
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @description 在给定匹配范围内计算“固定价格”
|
|
109
|
+
* - 若匹配到多个不同价格,则认为不是固定价格,返回 null(不展示)
|
|
110
|
+
*/
|
|
111
|
+
function getVariantItemFixedPrice(params) {
|
|
112
|
+
var selectedVariantIds = params.selectedVariantIds;
|
|
113
|
+
var variantProducts = params.variantProducts;
|
|
114
|
+
var matchedVariants = Array.isArray(variantProducts) ? variantProducts.filter(function (item) {
|
|
115
|
+
var _item$sku_ids;
|
|
116
|
+
var ids = (item === null || item === void 0 || (_item$sku_ids = item.sku_ids) === null || _item$sku_ids === void 0 ? void 0 : _item$sku_ids.split('_')) || [];
|
|
117
|
+
return selectedVariantIds.every(function (selectedId) {
|
|
118
|
+
return ids.includes(selectedId);
|
|
119
|
+
});
|
|
120
|
+
}) : [];
|
|
121
|
+
var prices = matchedVariants.map(function (item) {
|
|
122
|
+
var _ref, _item$price;
|
|
123
|
+
return Number((_ref = (_item$price = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price !== void 0 ? _item$price : item === null || item === void 0 ? void 0 : item.base_price) !== null && _ref !== void 0 ? _ref : 0);
|
|
124
|
+
}).filter(function (n) {
|
|
125
|
+
return !Number.isNaN(n);
|
|
126
|
+
});
|
|
127
|
+
if (prices.length === 0) return null;
|
|
128
|
+
var uniquePrices = Array.from(new Set(prices));
|
|
129
|
+
if (uniquePrices.length !== 1) return null;
|
|
130
|
+
return uniquePrices[0];
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @description 基于当前 selectorValue(已选项)计算某个 variantItem 的固定价格
|
|
135
|
+
* - 用当前选项 + 其它规格组已选项筛选组合 SKU
|
|
136
|
+
* - 若筛出来是多价,则不展示
|
|
137
|
+
*/
|
|
138
|
+
function getVariantItemFixedPriceByValue(params) {
|
|
139
|
+
var _dataSource$variant_g;
|
|
140
|
+
var variantItem = params.variantItem;
|
|
141
|
+
var variantProducts = params.variantProducts;
|
|
142
|
+
var dataSource = store.getState().dataSource;
|
|
143
|
+
var selectorValue = store.getState().selectorValue;
|
|
144
|
+
var currentSkuId = "".concat(variantItem === null || variantItem === void 0 ? void 0 : variantItem.variant_group_id, ":").concat(variantItem === null || variantItem === void 0 ? void 0 : variantItem.id);
|
|
145
|
+
var selectedVariantIds = [currentSkuId];
|
|
146
|
+
dataSource === null || dataSource === void 0 || (_dataSource$variant_g = dataSource.variant_group) === null || _dataSource$variant_g === void 0 || _dataSource$variant_g.forEach(function (group) {
|
|
147
|
+
var _selectorValue$group$;
|
|
148
|
+
var selectedData = selectorValue === null || selectorValue === void 0 || (_selectorValue$group$ = selectorValue[group.id]) === null || _selectorValue$group$ === void 0 ? void 0 : _selectorValue$group$.data;
|
|
149
|
+
if (selectedData && group.id !== (variantItem === null || variantItem === void 0 ? void 0 : variantItem.variant_group_id)) {
|
|
150
|
+
selectedVariantIds.push("".concat(selectedData === null || selectedData === void 0 ? void 0 : selectedData.variant_group_id, ":").concat(selectedData === null || selectedData === void 0 ? void 0 : selectedData.id));
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
return getVariantItemFixedPrice({
|
|
154
|
+
selectedVariantIds: selectedVariantIds,
|
|
155
|
+
variantProducts: variantProducts
|
|
156
|
+
});
|
|
157
|
+
}
|
|
@@ -3,6 +3,6 @@ export interface ImageUploadProps {
|
|
|
3
3
|
value?: string;
|
|
4
4
|
onChange?: (val: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare const getBaseTime: (size: number) =>
|
|
6
|
+
export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
|
|
7
7
|
declare const ImageUpload: React.FC<ImageUploadProps>;
|
|
8
8
|
export default ImageUpload;
|
|
@@ -106,7 +106,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
106
106
|
tags: TAGS,
|
|
107
107
|
filter_wallet_id: walletId || undefined,
|
|
108
108
|
filter_holder_id: holderId || undefined,
|
|
109
|
-
with: ['holder.detail']
|
|
109
|
+
with: ['customScheduleSnapshot', 'holder.detail']
|
|
110
110
|
});
|
|
111
111
|
case 5:
|
|
112
112
|
res = _context.sent;
|
|
@@ -149,7 +149,7 @@ var WalletPassGallery = function WalletPassGallery(props) {
|
|
|
149
149
|
tags: TAGS,
|
|
150
150
|
filter_wallet_id: walletId || undefined,
|
|
151
151
|
filter_holder_id: holderId || undefined,
|
|
152
|
-
with: ['holder.detail']
|
|
152
|
+
with: ['customScheduleSnapshot', 'holder.detail']
|
|
153
153
|
});
|
|
154
154
|
case 5:
|
|
155
155
|
res = _context2.sent;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface NumberKeyboardProps {
|
|
4
|
+
/** 输入框的值 */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** 输入框的placeholder */
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
/** 输入框的最大长度 */
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
/** 最大值 */
|
|
11
|
+
max?: number;
|
|
12
|
+
/** 确认按钮的文本 */
|
|
13
|
+
okText?: string;
|
|
14
|
+
/** 删除按钮的文本 */
|
|
15
|
+
deleteText?: string | React.ReactNode;
|
|
16
|
+
/** 输入框的值发生变化时回调 */
|
|
17
|
+
onChange?: (num: string) => void;
|
|
18
|
+
/** 确认按钮点击时回调 */
|
|
19
|
+
onOk?: () => void;
|
|
20
|
+
/** 删除按钮点击时回调 */
|
|
21
|
+
onDelete?: (num: string) => void;
|
|
22
|
+
/** 键盘整体样式 */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/** 输入框的样式 */
|
|
25
|
+
inputStyle?: React.CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
declare const NumberKeyboard: (props: NumberKeyboardProps) => JSX.Element;
|
|
28
|
+
export default NumberKeyboard;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
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; }
|
|
3
|
+
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; }
|
|
4
|
+
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; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
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); }
|
|
7
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
+
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."); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; } }
|
|
12
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
+
import React, { useState, useMemo } from 'react';
|
|
14
|
+
import { VirtualKeyboard } from '@pisell/materials';
|
|
15
|
+
import Delete from '@pisell/icon/es/Delete';
|
|
16
|
+
import { locales } from '@pisell/utils';
|
|
17
|
+
import useEngineContext from "../../hooks/useEngineContext";
|
|
18
|
+
import localeTexts from "./locales";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
var NumberKeyboard = function NumberKeyboard(props) {
|
|
21
|
+
var _context$engine;
|
|
22
|
+
var context = useEngineContext();
|
|
23
|
+
locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
|
|
24
|
+
var _useState = useState((props === null || props === void 0 ? void 0 : props.value) || ''),
|
|
25
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
26
|
+
num = _useState2[0],
|
|
27
|
+
setNum = _useState2[1];
|
|
28
|
+
var KeyboardItems = useMemo(function () {
|
|
29
|
+
return [{
|
|
30
|
+
value: 1,
|
|
31
|
+
label: '1',
|
|
32
|
+
disabled: false,
|
|
33
|
+
type: 'text'
|
|
34
|
+
}, {
|
|
35
|
+
value: 2,
|
|
36
|
+
label: '2',
|
|
37
|
+
disabled: false,
|
|
38
|
+
type: 'text'
|
|
39
|
+
}, {
|
|
40
|
+
value: 3,
|
|
41
|
+
label: '3',
|
|
42
|
+
disabled: false,
|
|
43
|
+
type: 'text'
|
|
44
|
+
}, {
|
|
45
|
+
value: 4,
|
|
46
|
+
label: '4',
|
|
47
|
+
disabled: false,
|
|
48
|
+
type: 'text'
|
|
49
|
+
}, {
|
|
50
|
+
value: 5,
|
|
51
|
+
label: '5',
|
|
52
|
+
disabled: false,
|
|
53
|
+
type: 'text'
|
|
54
|
+
}, {
|
|
55
|
+
value: 6,
|
|
56
|
+
label: '6',
|
|
57
|
+
disabled: false,
|
|
58
|
+
type: 'text'
|
|
59
|
+
}, {
|
|
60
|
+
value: 7,
|
|
61
|
+
label: '7',
|
|
62
|
+
disabled: false,
|
|
63
|
+
type: 'text'
|
|
64
|
+
}, {
|
|
65
|
+
value: 8,
|
|
66
|
+
label: '8',
|
|
67
|
+
disabled: false,
|
|
68
|
+
type: 'text'
|
|
69
|
+
}, {
|
|
70
|
+
value: 9,
|
|
71
|
+
label: '9',
|
|
72
|
+
disabled: false,
|
|
73
|
+
type: 'text'
|
|
74
|
+
}, {
|
|
75
|
+
value: 'delete',
|
|
76
|
+
label: (props === null || props === void 0 ? void 0 : props.deleteText) || /*#__PURE__*/React.createElement(Delete, {
|
|
77
|
+
className: "virtual-keyboard-input-delete-icon-num"
|
|
78
|
+
}),
|
|
79
|
+
disabled: false,
|
|
80
|
+
type: 'text'
|
|
81
|
+
}, {
|
|
82
|
+
value: 0,
|
|
83
|
+
label: '0',
|
|
84
|
+
disabled: false,
|
|
85
|
+
type: 'text'
|
|
86
|
+
}, {
|
|
87
|
+
value: 'ok',
|
|
88
|
+
label: (props === null || props === void 0 ? void 0 : props.okText) || locales.getText('pisell2.number.keyboard.ok'),
|
|
89
|
+
disabled: false,
|
|
90
|
+
type: 'primary'
|
|
91
|
+
}];
|
|
92
|
+
}, [locales, props === null || props === void 0 ? void 0 : props.okText, props === null || props === void 0 ? void 0 : props.deleteText]);
|
|
93
|
+
var handleKeyboardChange = function handleKeyboardChange(e) {
|
|
94
|
+
if (e === 'ok') {
|
|
95
|
+
var _props$onOk;
|
|
96
|
+
props === null || props === void 0 || (_props$onOk = props.onOk) === null || _props$onOk === void 0 || _props$onOk.call(props);
|
|
97
|
+
} else if (e === 'delete') {
|
|
98
|
+
var _props$onDelete;
|
|
99
|
+
if (num.length === 0) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
var newNum = num.slice(0, -1);
|
|
103
|
+
setNum(newNum);
|
|
104
|
+
props === null || props === void 0 || (_props$onDelete = props.onDelete) === null || _props$onDelete === void 0 || _props$onDelete.call(props, newNum);
|
|
105
|
+
} else {
|
|
106
|
+
var _props$onChange;
|
|
107
|
+
// 如果输入框的最大长度大于0,则限制输入框的长度
|
|
108
|
+
if (props !== null && props !== void 0 && props.maxLength && num.length >= (props === null || props === void 0 ? void 0 : props.maxLength)) {
|
|
109
|
+
console.log('input_maxLength_over', props === null || props === void 0 ? void 0 : props.maxLength, num);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
var _newNum = num + e;
|
|
113
|
+
|
|
114
|
+
// 检查最大值限制
|
|
115
|
+
if (props !== null && props !== void 0 && props.max && parseInt(_newNum) > props.max) {
|
|
116
|
+
console.log('input_maxValue_over', props === null || props === void 0 ? void 0 : props.max, _newNum);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
setNum(_newNum);
|
|
120
|
+
props === null || props === void 0 || (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, _newNum);
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
var handleInputChange = function handleInputChange(e) {
|
|
124
|
+
var _props$onChange2;
|
|
125
|
+
var newNum = e.target.value;
|
|
126
|
+
|
|
127
|
+
// 检查最大值限制
|
|
128
|
+
if (props !== null && props !== void 0 && props.max && parseInt(newNum) > props.max) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
setNum(newNum);
|
|
132
|
+
props === null || props === void 0 || (_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 || _props$onChange2.call(props, newNum);
|
|
133
|
+
};
|
|
134
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
135
|
+
className: "pisell-pro-number-keyboard"
|
|
136
|
+
}, /*#__PURE__*/React.createElement(VirtualKeyboard, {
|
|
137
|
+
style: _objectSpread({}, (props === null || props === void 0 ? void 0 : props.style) || {}),
|
|
138
|
+
selectType: "dark",
|
|
139
|
+
keyboardProps: {
|
|
140
|
+
keydown: false,
|
|
141
|
+
items: KeyboardItems,
|
|
142
|
+
onChange: handleKeyboardChange
|
|
143
|
+
},
|
|
144
|
+
virtualKeyInputProps: {
|
|
145
|
+
value: num,
|
|
146
|
+
onChange: handleInputChange,
|
|
147
|
+
placeholder: (props === null || props === void 0 ? void 0 : props.placeholder) || '',
|
|
148
|
+
style: _objectSpread({
|
|
149
|
+
height: '65px',
|
|
150
|
+
fontSize: '36px'
|
|
151
|
+
}, (props === null || props === void 0 ? void 0 : props.inputStyle) || {})
|
|
152
|
+
}
|
|
153
|
+
}));
|
|
154
|
+
};
|
|
155
|
+
export default NumberKeyboard;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.pisell-pro-number-keyboard {
|
|
2
|
+
zoom: 0.8;
|
|
3
|
+
|
|
4
|
+
.virtual-keyboard-wrap
|
|
5
|
+
.virtual-keyboard-content
|
|
6
|
+
.virtual-keyboard-item
|
|
7
|
+
.virtual-keyboard-item-button {
|
|
8
|
+
padding: 0 !important;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.virtual-keyboard-input-delete {
|
|
12
|
+
font-size: 30px !important;
|
|
13
|
+
color: #000 !important;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.virtual-keyboard-input-delete-icon-num {
|
|
17
|
+
padding-top: 6px;
|
|
18
|
+
font-size: 30px !important;
|
|
19
|
+
color: #000 !important;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.virtual-keyboard-component-left {
|
|
23
|
+
// background-color: rgba(29, 41, 57, 0.80) !important;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
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."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useState } from 'react';
|
|
8
|
+
import PisellNumberSelector from "./index";
|
|
9
|
+
var Example = function Example() {
|
|
10
|
+
var _useState = useState(1),
|
|
11
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
12
|
+
value1 = _useState2[0],
|
|
13
|
+
setValue1 = _useState2[1];
|
|
14
|
+
var _useState3 = useState(50),
|
|
15
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
16
|
+
value2 = _useState4[0],
|
|
17
|
+
setValue2 = _useState4[1];
|
|
18
|
+
var _useState5 = useState(99),
|
|
19
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
20
|
+
value3 = _useState6[0],
|
|
21
|
+
setValue3 = _useState6[1];
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
style: {
|
|
24
|
+
padding: '20px',
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
gap: '20px'
|
|
28
|
+
}
|
|
29
|
+
}, /*#__PURE__*/React.createElement("h3", null, "PisellNumberSelector \u4F7F\u7528\u793A\u4F8B"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u57FA\u7840\u7528\u6CD5"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
30
|
+
value: value1,
|
|
31
|
+
onChange: setValue1,
|
|
32
|
+
min: 0,
|
|
33
|
+
max: 10,
|
|
34
|
+
size: "middle"
|
|
35
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C: ", value1)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u4E0D\u540C\u5C3A\u5BF8"), /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
style: {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
gap: '10px',
|
|
39
|
+
alignItems: 'center'
|
|
40
|
+
}
|
|
41
|
+
}, /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
42
|
+
value: value2,
|
|
43
|
+
onChange: setValue2,
|
|
44
|
+
size: "small"
|
|
45
|
+
}), /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
46
|
+
value: value2,
|
|
47
|
+
onChange: setValue2,
|
|
48
|
+
size: "middle"
|
|
49
|
+
}), /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
50
|
+
value: value2,
|
|
51
|
+
onChange: setValue2,
|
|
52
|
+
size: "large"
|
|
53
|
+
}))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u542F\u7528\u4EF7\u683C\u8C03\u6574\u529F\u80FD"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
54
|
+
value: value3,
|
|
55
|
+
onChange: setValue3,
|
|
56
|
+
min: 0,
|
|
57
|
+
max: 999,
|
|
58
|
+
size: "large",
|
|
59
|
+
enablePriceAdjust: true,
|
|
60
|
+
originValue: 100
|
|
61
|
+
}), /*#__PURE__*/React.createElement("p", null, "\u70B9\u51FB\u6570\u5B57\u53EF\u4EE5\u6253\u5F00\u4EF7\u683C\u8C03\u6574\u9762\u677F"), /*#__PURE__*/React.createElement("p", null, "\u5F53\u524D\u503C: ", value3)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h4", null, "\u7981\u7528\u72B6\u6001"), /*#__PURE__*/React.createElement(PisellNumberSelector, {
|
|
62
|
+
value: 50,
|
|
63
|
+
onChange: function onChange() {},
|
|
64
|
+
disabled: true,
|
|
65
|
+
size: "middle"
|
|
66
|
+
})));
|
|
67
|
+
};
|
|
68
|
+
export default Example;
|