@pisell/private-materials 3.4.48 → 3.4.49
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 +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +23 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +23 -8
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/es/components/appointmentBooking/hooks.js +5 -0
- package/es/components/appointmentBooking/index.d.ts +0 -1
- package/es/components/booking/addons/model.d.ts +10 -1
- 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/customSelect/index.js +22 -3
- 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/footer/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/deposit/index.d.ts +0 -1
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- 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/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.d.ts +0 -1
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/date/index.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/header/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +0 -1
- package/es/components/booking/info/model.d.ts +10 -1
- package/es/components/booking/info/notes/index.d.ts +0 -1
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/index.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -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/addTimeModal/index.d.ts +0 -1
- package/es/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/es/components/booking/info2/service/serviceList/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 +9 -1
- 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/addNote/index.d.ts +0 -1
- package/es/components/booking/notes/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +0 -1
- package/es/components/eftpos/pos.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftpos/surcharge/index.d.ts +0 -1
- package/es/components/eftposPay/amount.d.ts +0 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- 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/header/titlebar.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/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/device.d.ts +0 -1
- package/es/components/eftposPay/index.d.ts +0 -1
- package/es/components/eftposPay/linkly/index.d.ts +0 -1
- 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/tyro/hooks.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 +0 -1
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- 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 +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.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 +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/eventBooking/index.d.ts +0 -1
- package/es/components/index.d.ts +1 -1
- package/es/components/index.js +1 -1
- package/es/components/login/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/model.d.ts +9 -1
- 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 +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/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/productExtension/index.d.ts +0 -1
- package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/es/components/ruleSetting/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/RenderScheduleItem/index.d.ts +0 -1
- package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/es/components/schedules/model.d.ts +9 -1
- 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/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/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/resources/relationProduct/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 +0 -1
- package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/components/shoppingCart/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +0 -1
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/es/components/wallet/Detail/model.d.ts +13 -1
- package/es/components/wallet/DiscountCard/model.d.ts +14 -1
- package/es/components/wallet/PointCard/model.d.ts +13 -1
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/es/components/wallet/Voucher/model.d.ts +13 -1
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/es/components/wallet/model.d.ts +9 -1
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +93 -61
- package/es/components/walletList/serve.d.ts +4 -0
- package/es/components/walletList/serve.js +46 -13
- package/es/components/walletList/types/index.d.ts +12 -12
- package/es/components/walletList/types/index.js +2 -2
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +0 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -2
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/contactInfoModal/ContactInfoContent.d.ts +0 -1
- package/es/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/es/plus/productSelect/CategoryTabs/index.js +6 -3
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/es/plus/productSelect/utils.js +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/es/plus/saasCreateOrganization/index.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/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/es/plus/walletEditor/WalletEditor.js +316 -0
- package/es/plus/walletEditor/WalletEditor.less +129 -0
- package/es/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/es/plus/walletEditor/components/ImageUpload/index.js +223 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/components/JsonEditor/index.js +68 -0
- package/es/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.js +222 -0
- package/es/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/es/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/es/plus/walletEditor/components/relationProduct/index.js +49 -0
- package/es/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.js +193 -0
- package/es/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/es/plus/walletEditor/index.d.ts +3 -0
- package/es/plus/walletEditor/index.js +3 -0
- package/es/plus/walletEditor/locales.d.ts +126 -0
- package/es/plus/walletEditor/locales.js +143 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletEditor/types.js +1 -0
- package/es/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/es/plus/walletPassGallery/components/footerButton/index.js +247 -0
- package/es/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/es/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/passDetail/index.js +274 -0
- package/es/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/passList/index.js +115 -0
- package/es/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/es/plus/walletPassGallery/components/recharge/index.js +134 -0
- package/es/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.js +176 -0
- package/es/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/es/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/es/plus/walletPassGallery/components/usageRule/index.js +248 -0
- package/es/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/es/plus/walletPassGallery/index.d.ts +6 -0
- package/es/plus/walletPassGallery/index.js +602 -0
- package/es/plus/walletPassGallery/index.less +115 -0
- package/es/plus/walletPassGallery/locales.d.ts +270 -0
- package/es/plus/walletPassGallery/locales.js +279 -0
- package/es/plus/walletPassGallery/serve.d.ts +218 -0
- package/es/plus/walletPassGallery/serve.js +289 -0
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
- package/lib/components/appointmentBooking/hooks.js +3 -0
- package/lib/components/appointmentBooking/index.d.ts +0 -1
- package/lib/components/booking/addons/model.d.ts +10 -1
- 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/customSelect/index.js +26 -3
- 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/footer/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/deposit/index.d.ts +0 -1
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- 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/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.d.ts +0 -1
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/date/index.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/header/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +0 -1
- package/lib/components/booking/info/model.d.ts +10 -1
- package/lib/components/booking/info/notes/index.d.ts +0 -1
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/index.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -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/addTimeModal/index.d.ts +0 -1
- package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
- package/lib/components/booking/info2/service/serviceList/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 +9 -1
- 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/addNote/index.d.ts +0 -1
- package/lib/components/booking/notes/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +0 -1
- package/lib/components/eftpos/pos.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftpos/surcharge/index.d.ts +0 -1
- package/lib/components/eftposPay/amount.d.ts +0 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- 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/header/titlebar.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/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/device.d.ts +0 -1
- package/lib/components/eftposPay/index.d.ts +0 -1
- package/lib/components/eftposPay/linkly/index.d.ts +0 -1
- 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/tyro/hooks.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 +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +0 -1
- 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 +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.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 +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/eventBooking/index.d.ts +0 -1
- package/lib/components/index.d.ts +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/login/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/model.d.ts +9 -1
- 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 +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/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/productExtension/index.d.ts +0 -1
- package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
- package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
- package/lib/components/ruleSetting/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/RenderScheduleItem/index.d.ts +0 -1
- package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
- package/lib/components/schedules/model.d.ts +9 -1
- 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/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/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/resources/relationProduct/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 +0 -1
- package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/components/shoppingCart/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
- package/lib/components/wallet/Detail/model.d.ts +13 -1
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
- package/lib/components/wallet/PointCard/model.d.ts +13 -1
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
- package/lib/components/wallet/Voucher/model.d.ts +13 -1
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -1
- package/lib/components/wallet/model.d.ts +9 -1
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +88 -47
- package/lib/components/walletList/serve.d.ts +4 -0
- package/lib/components/walletList/serve.js +12 -0
- package/lib/components/walletList/types/index.d.ts +12 -12
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +0 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +6 -3
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/contactInfoModal/ContactInfoContent.d.ts +0 -1
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +2 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +84 -69
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +0 -11
- package/lib/plus/productSelect/utils.js +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/index.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/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/walletEditor/WalletEditor.d.ts +5 -0
- package/lib/plus/walletEditor/WalletEditor.js +354 -0
- package/lib/plus/walletEditor/WalletEditor.less +129 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.d.ts +8 -0
- package/lib/plus/walletEditor/components/ImageUpload/index.js +201 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.js +89 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.less +4 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.d.ts +20 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.js +176 -0
- package/lib/plus/walletEditor/components/ValidityPeriodSelector/index.less +4 -0
- package/lib/plus/walletEditor/components/relationProduct/index.d.ts +6 -0
- package/lib/plus/walletEditor/components/relationProduct/index.js +73 -0
- package/lib/plus/walletEditor/components/relationProduct/index.less +15 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.d.ts +37 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.js +211 -0
- package/lib/plus/walletEditor/components/sortableWalletPassTypes/index.less +110 -0
- package/lib/plus/walletEditor/index.d.ts +3 -0
- package/lib/plus/walletEditor/index.js +42 -0
- package/lib/plus/walletEditor/locales.d.ts +126 -0
- package/lib/plus/walletEditor/locales.js +167 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletEditor/types.js +17 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.d.ts +14 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.js +187 -0
- package/lib/plus/walletPassGallery/components/footerButton/index.less +93 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.js +287 -0
- package/lib/plus/walletPassGallery/components/passDetail/index.less +57 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +136 -0
- package/lib/plus/walletPassGallery/components/recharge/index.d.ts +11 -0
- package/lib/plus/walletPassGallery/components/recharge/index.js +146 -0
- package/lib/plus/walletPassGallery/components/recharge/index.less +16 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +8 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.js +212 -0
- package/lib/plus/walletPassGallery/components/timelineSection/index.less +67 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.d.ts +9 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.js +209 -0
- package/lib/plus/walletPassGallery/components/usageRule/index.less +157 -0
- package/lib/plus/walletPassGallery/index.d.ts +6 -0
- package/lib/plus/walletPassGallery/index.js +498 -0
- package/lib/plus/walletPassGallery/index.less +115 -0
- package/lib/plus/walletPassGallery/locales.d.ts +270 -0
- package/lib/plus/walletPassGallery/locales.js +299 -0
- package/lib/plus/walletPassGallery/serve.d.ts +218 -0
- package/lib/plus/walletPassGallery/serve.js +98 -0
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lowcode/sortable-wallet-pass-types/meta.ts +267 -0
- package/lowcode/wallet-editor/meta.ts +57 -0
- package/lowcode/wallet-editor/snippets.ts +13 -0
- package/lowcode/wallet-pass-gallery/meta.ts +35 -0
- package/package.json +4 -4
- package/lowcode/wallet/meta.ts +0 -79
|
@@ -0,0 +1,222 @@
|
|
|
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, useEffect, useMemo } from 'react';
|
|
8
|
+
import { Select, DatePicker, Form } from 'antd';
|
|
9
|
+
import dayjs from 'dayjs';
|
|
10
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
11
|
+
import localeTexts from "../../locales";
|
|
12
|
+
import { locales } from '@pisell/utils';
|
|
13
|
+
var Option = Select.Option;
|
|
14
|
+
|
|
15
|
+
// 有效期配置类型 - 扩展原有的ValidForConfig
|
|
16
|
+
|
|
17
|
+
// 预定义的有效期选项值
|
|
18
|
+
var DEFAULT_VALIDITY_OPTIONS = [{
|
|
19
|
+
unit: '1',
|
|
20
|
+
unit_type: 'day',
|
|
21
|
+
type: 'normal'
|
|
22
|
+
}, {
|
|
23
|
+
unit: '14',
|
|
24
|
+
unit_type: 'day',
|
|
25
|
+
type: 'normal'
|
|
26
|
+
}, {
|
|
27
|
+
unit: '1',
|
|
28
|
+
unit_type: 'month',
|
|
29
|
+
type: 'normal'
|
|
30
|
+
}, {
|
|
31
|
+
unit: '2',
|
|
32
|
+
unit_type: 'month',
|
|
33
|
+
type: 'normal'
|
|
34
|
+
}, {
|
|
35
|
+
unit: '3',
|
|
36
|
+
unit_type: 'month',
|
|
37
|
+
type: 'normal'
|
|
38
|
+
}, {
|
|
39
|
+
unit: '4',
|
|
40
|
+
unit_type: 'month',
|
|
41
|
+
type: 'normal'
|
|
42
|
+
}, {
|
|
43
|
+
unit: '5',
|
|
44
|
+
unit_type: 'month',
|
|
45
|
+
type: 'normal'
|
|
46
|
+
}, {
|
|
47
|
+
unit: '6',
|
|
48
|
+
unit_type: 'month',
|
|
49
|
+
type: 'normal'
|
|
50
|
+
}, {
|
|
51
|
+
unit: '1',
|
|
52
|
+
unit_type: 'year',
|
|
53
|
+
type: 'normal'
|
|
54
|
+
}, {
|
|
55
|
+
unit: '3',
|
|
56
|
+
unit_type: 'year',
|
|
57
|
+
type: 'normal'
|
|
58
|
+
}, {
|
|
59
|
+
type: 'forever'
|
|
60
|
+
}, {
|
|
61
|
+
custom_date: '',
|
|
62
|
+
type: 'custom'
|
|
63
|
+
}];
|
|
64
|
+
|
|
65
|
+
// 将选项值转换为显示标签的函数
|
|
66
|
+
var getOptionLabel = function getOptionLabel(option) {
|
|
67
|
+
if (option.type === 'forever') {
|
|
68
|
+
return locales.getText('forever');
|
|
69
|
+
}
|
|
70
|
+
if (option.type === 'custom') {
|
|
71
|
+
return locales.getText('custom');
|
|
72
|
+
}
|
|
73
|
+
var unitMap = {
|
|
74
|
+
day: locales.getText('day'),
|
|
75
|
+
month: locales.getText('month'),
|
|
76
|
+
year: locales.getText('year'),
|
|
77
|
+
days: locales.getText('days'),
|
|
78
|
+
months: locales.getText('months'),
|
|
79
|
+
years: locales.getText('years')
|
|
80
|
+
};
|
|
81
|
+
var unit = option.unit,
|
|
82
|
+
unit_type = option.unit_type;
|
|
83
|
+
if (Number(unit) > 1) {
|
|
84
|
+
return "".concat(unit, " ").concat(unitMap[unit_type + 's']);
|
|
85
|
+
}
|
|
86
|
+
return "".concat(unit, " ").concat(unitMap[unit_type]);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// 将ValidityPeriodValue对象转换为字符串值
|
|
90
|
+
var transformValueToString = function transformValueToString(option) {
|
|
91
|
+
if (option.type === 'forever') {
|
|
92
|
+
return 'forever';
|
|
93
|
+
}
|
|
94
|
+
if (option.type === 'custom') {
|
|
95
|
+
return 'custom';
|
|
96
|
+
}
|
|
97
|
+
// normal类型:unit值 + unit_type的形式
|
|
98
|
+
return "".concat(option.unit).concat(option.unit_type);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// 将字符串值转换回ValidityPeriodValue对象
|
|
102
|
+
var transformStringToValue = function transformStringToValue(stringValue) {
|
|
103
|
+
if (stringValue === 'forever') {
|
|
104
|
+
return {
|
|
105
|
+
type: 'forever'
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
if (stringValue === 'custom') {
|
|
109
|
+
return {
|
|
110
|
+
type: 'custom',
|
|
111
|
+
custom_date: ''
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 解析normal类型的值,例如 "1day", "2month", "3year"
|
|
116
|
+
var match = stringValue.match(/^(\d+)(day|month|year)$/);
|
|
117
|
+
if (match) {
|
|
118
|
+
var _match = _slicedToArray(match, 3),
|
|
119
|
+
unit = _match[1],
|
|
120
|
+
unit_type = _match[2];
|
|
121
|
+
return {
|
|
122
|
+
type: 'normal',
|
|
123
|
+
unit: unit,
|
|
124
|
+
unit_type: unit_type
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// 默认返回值
|
|
129
|
+
return {
|
|
130
|
+
type: 'normal',
|
|
131
|
+
unit: '1',
|
|
132
|
+
unit_type: 'day'
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
var ValidityPeriodSelector = function ValidityPeriodSelector(_ref) {
|
|
136
|
+
var _context$appHelper$ut;
|
|
137
|
+
var value = _ref.value,
|
|
138
|
+
onChange = _ref.onChange,
|
|
139
|
+
_ref$disabled = _ref.disabled,
|
|
140
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
141
|
+
placeholder = _ref.placeholder,
|
|
142
|
+
_ref$options = _ref.options,
|
|
143
|
+
options = _ref$options === void 0 ? DEFAULT_VALIDITY_OPTIONS : _ref$options;
|
|
144
|
+
var context = useEngineContext();
|
|
145
|
+
locales.init(localeTexts, ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en');
|
|
146
|
+
var defaultPlaceholder = placeholder || locales.getText('selectValidityPeriod');
|
|
147
|
+
var _useState = useState(false),
|
|
148
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
149
|
+
showCustomDate = _useState2[0],
|
|
150
|
+
setShowCustomDate = _useState2[1];
|
|
151
|
+
var _useState3 = useState(value),
|
|
152
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
153
|
+
currentValue = _useState4[0],
|
|
154
|
+
setCurrentValue = _useState4[1];
|
|
155
|
+
|
|
156
|
+
// 使用useMemo转换选项值为带标签的选项
|
|
157
|
+
var validityOptions = useMemo(function () {
|
|
158
|
+
return options.map(function (option) {
|
|
159
|
+
return {
|
|
160
|
+
label: getOptionLabel(option),
|
|
161
|
+
value: transformValueToString(option)
|
|
162
|
+
};
|
|
163
|
+
});
|
|
164
|
+
}, [options]);
|
|
165
|
+
useEffect(function () {
|
|
166
|
+
setCurrentValue(value);
|
|
167
|
+
setShowCustomDate((value === null || value === void 0 ? void 0 : value.type) === 'custom');
|
|
168
|
+
}, [value]);
|
|
169
|
+
var handleSelectChange = function handleSelectChange(selectedValue) {
|
|
170
|
+
var parsedValue = transformStringToValue(selectedValue);
|
|
171
|
+
setCurrentValue(parsedValue);
|
|
172
|
+
setShowCustomDate(parsedValue.type === 'custom');
|
|
173
|
+
if (parsedValue.type !== 'custom') {
|
|
174
|
+
onChange === null || onChange === void 0 || onChange(parsedValue);
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
var handleDateChange = function handleDateChange(date, dateString) {
|
|
178
|
+
if (date && (currentValue === null || currentValue === void 0 ? void 0 : currentValue.type) === 'custom') {
|
|
179
|
+
var newValue = {
|
|
180
|
+
type: 'custom',
|
|
181
|
+
custom_date: date.format('YYYY-MM-DD')
|
|
182
|
+
};
|
|
183
|
+
setCurrentValue(newValue);
|
|
184
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
var getSelectValue = function getSelectValue() {
|
|
188
|
+
if (!currentValue) return undefined;
|
|
189
|
+
return transformValueToString(currentValue);
|
|
190
|
+
};
|
|
191
|
+
var renderOptions = function renderOptions() {
|
|
192
|
+
return validityOptions.map(function (option) {
|
|
193
|
+
return /*#__PURE__*/React.createElement(Option, {
|
|
194
|
+
key: option.label,
|
|
195
|
+
value: option.value
|
|
196
|
+
}, option.label);
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Select, {
|
|
200
|
+
placeholder: defaultPlaceholder,
|
|
201
|
+
onChange: handleSelectChange,
|
|
202
|
+
value: getSelectValue(),
|
|
203
|
+
disabled: disabled,
|
|
204
|
+
style: {
|
|
205
|
+
width: '100%'
|
|
206
|
+
}
|
|
207
|
+
}, renderOptions()), showCustomDate && /*#__PURE__*/React.createElement(Form.Item, {
|
|
208
|
+
label: locales.getText('custom'),
|
|
209
|
+
style: {
|
|
210
|
+
marginBottom: 0
|
|
211
|
+
}
|
|
212
|
+
}, /*#__PURE__*/React.createElement(DatePicker, {
|
|
213
|
+
placeholder: locales.getText('selectCustomDate'),
|
|
214
|
+
onChange: handleDateChange,
|
|
215
|
+
value: (currentValue === null || currentValue === void 0 ? void 0 : currentValue.type) === 'custom' && currentValue.custom_date ? dayjs(currentValue.custom_date) : undefined,
|
|
216
|
+
disabled: disabled,
|
|
217
|
+
style: {
|
|
218
|
+
width: '100%'
|
|
219
|
+
}
|
|
220
|
+
})));
|
|
221
|
+
};
|
|
222
|
+
export default ValidityPeriodSelector;
|
|
@@ -0,0 +1,49 @@
|
|
|
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, { useRef } from 'react';
|
|
8
|
+
import { Button } from 'antd';
|
|
9
|
+
import { locales } from '@pisell/utils';
|
|
10
|
+
import useComponents from "../../../../hooks/useComponents";
|
|
11
|
+
import "./index.less";
|
|
12
|
+
var RelationProduct = function RelationProduct(_ref) {
|
|
13
|
+
var value = _ref.value,
|
|
14
|
+
onChange = _ref.onChange;
|
|
15
|
+
var linkerRef = useRef(null);
|
|
16
|
+
var _useComponents = useComponents({
|
|
17
|
+
components: ['RelationProduct']
|
|
18
|
+
}),
|
|
19
|
+
_useComponents2 = _slicedToArray(_useComponents, 1),
|
|
20
|
+
RelationProduct = _useComponents2[0];
|
|
21
|
+
if (!(RelationProduct !== null && RelationProduct !== void 0 && RelationProduct.PassLinker)) return null;
|
|
22
|
+
var onShow = function onShow() {
|
|
23
|
+
if (linkerRef.current) {
|
|
24
|
+
var _linkerRef$current$op, _linkerRef$current;
|
|
25
|
+
(_linkerRef$current$op = (_linkerRef$current = linkerRef.current).openModal) === null || _linkerRef$current$op === void 0 || _linkerRef$current$op.call(_linkerRef$current);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "product-detail-card-module"
|
|
30
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "linked-passes-empty-state"
|
|
32
|
+
}, /*#__PURE__*/React.createElement("p", {
|
|
33
|
+
className: "linked-passes-description"
|
|
34
|
+
}, locales.getText('linkedPassesDesc')), /*#__PURE__*/React.createElement(Button, {
|
|
35
|
+
type: "primary",
|
|
36
|
+
size: "large",
|
|
37
|
+
onClick: onShow,
|
|
38
|
+
className: "select-passes-button"
|
|
39
|
+
}, locales.getText('selectPasses')), value && value.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
style: {
|
|
41
|
+
padding: 8
|
|
42
|
+
}
|
|
43
|
+
}) : null, /*#__PURE__*/React.createElement(RelationProduct.PassLinker, {
|
|
44
|
+
ref: linkerRef,
|
|
45
|
+
value: value,
|
|
46
|
+
onChange: onChange
|
|
47
|
+
})));
|
|
48
|
+
};
|
|
49
|
+
export default RelationProduct;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.linked-passes-empty-state {
|
|
2
|
+
.linked-passes-description {
|
|
3
|
+
font-size: 16px;
|
|
4
|
+
color: #6b7280;
|
|
5
|
+
margin: 0 0 16px 0;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.select-passes-button {
|
|
10
|
+
min-width: 200px;
|
|
11
|
+
height: 40px;
|
|
12
|
+
border-radius: 8px;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type WalletPassType = 'rechargeable' | 'point' | 'voucher' | 'discount';
|
|
4
|
+
export interface MultiLanguageTitle {
|
|
5
|
+
original?: string;
|
|
6
|
+
en?: string;
|
|
7
|
+
'zh-CN'?: string;
|
|
8
|
+
'zh-HK'?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface WalletPassItem {
|
|
11
|
+
/** 钱包通行证类型 */
|
|
12
|
+
type: WalletPassType;
|
|
13
|
+
/** 是否显示,1表示显示,0表示隐藏 */
|
|
14
|
+
display: 0 | 1;
|
|
15
|
+
/** 自定义标题,支持多语言 */
|
|
16
|
+
custom_title?: MultiLanguageTitle;
|
|
17
|
+
}
|
|
18
|
+
export interface SortableWalletPassTypesProps {
|
|
19
|
+
/** 当前值,包含各种钱包通行证类型的配置 */
|
|
20
|
+
value?: WalletPassItem[];
|
|
21
|
+
/** 值变化时的回调函数 */
|
|
22
|
+
onChange?: (value: WalletPassItem[]) => void;
|
|
23
|
+
/** 是否禁用编辑 */
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/** 组件类名 */
|
|
26
|
+
className?: string;
|
|
27
|
+
/** 组件样式 */
|
|
28
|
+
style?: React.CSSProperties;
|
|
29
|
+
}
|
|
30
|
+
/** 默认的钱包通行证类型配置 */
|
|
31
|
+
export interface WalletPassTypeInfo {
|
|
32
|
+
type: WalletPassType;
|
|
33
|
+
custom_title: MultiLanguageTitle;
|
|
34
|
+
}
|
|
35
|
+
export declare const DEFAULT_WALLET_PASS_TYPES_CONFIG: WalletPassTypeInfo[];
|
|
36
|
+
declare const SortableWalletPassTypes: React.FC<SortableWalletPassTypesProps>;
|
|
37
|
+
export default SortableWalletPassTypes;
|
|
@@ -0,0 +1,193 @@
|
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
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."); }
|
|
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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
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; }
|
|
13
|
+
import React, { useMemo, useCallback } from 'react';
|
|
14
|
+
import { EyeOutlined, EyeInvisibleOutlined, HolderOutlined } from '@ant-design/icons';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
import { PisellText, SortableList } from '@pisell/materials';
|
|
17
|
+
import "./index.less";
|
|
18
|
+
var Editable = PisellText.Editable;
|
|
19
|
+
// import Editable from '@pisell/materials/src/components/pisellText/components/Editable';
|
|
20
|
+
|
|
21
|
+
// Types
|
|
22
|
+
|
|
23
|
+
/** 默认的钱包通行证类型配置 */
|
|
24
|
+
|
|
25
|
+
var WALLET_PASS_TYPES = ['rechargeable', 'point', 'voucher', 'discount'];
|
|
26
|
+
|
|
27
|
+
// 默认的钱包通行证类型配置
|
|
28
|
+
export var DEFAULT_WALLET_PASS_TYPES_CONFIG = [{
|
|
29
|
+
type: 'rechargeable',
|
|
30
|
+
custom_title: {
|
|
31
|
+
original: 'Balance',
|
|
32
|
+
en: 'Balance',
|
|
33
|
+
'zh-CN': '余额',
|
|
34
|
+
'zh-HK': '餘額'
|
|
35
|
+
}
|
|
36
|
+
}, {
|
|
37
|
+
type: 'point',
|
|
38
|
+
custom_title: {
|
|
39
|
+
original: 'Points',
|
|
40
|
+
en: 'Points',
|
|
41
|
+
'zh-CN': '积分',
|
|
42
|
+
'zh-HK': '積分'
|
|
43
|
+
}
|
|
44
|
+
}, {
|
|
45
|
+
type: 'voucher',
|
|
46
|
+
custom_title: {
|
|
47
|
+
original: 'Voucher',
|
|
48
|
+
en: 'Voucher',
|
|
49
|
+
'zh-CN': '代金券',
|
|
50
|
+
'zh-HK': '代金券'
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
type: 'discount',
|
|
54
|
+
custom_title: {
|
|
55
|
+
original: 'Discount',
|
|
56
|
+
en: 'Discount',
|
|
57
|
+
'zh-CN': '折扣券',
|
|
58
|
+
'zh-HK': '折扣券'
|
|
59
|
+
}
|
|
60
|
+
}];
|
|
61
|
+
var SortableWalletPassTypes = function SortableWalletPassTypes(props) {
|
|
62
|
+
var _props$value = props.value,
|
|
63
|
+
value = _props$value === void 0 ? [] : _props$value,
|
|
64
|
+
onChange = props.onChange,
|
|
65
|
+
_props$disabled = props.disabled,
|
|
66
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
67
|
+
className = props.className,
|
|
68
|
+
style = props.style;
|
|
69
|
+
|
|
70
|
+
// 生成完整的数据源,确保四种类型都存在,保持外部传入的顺序
|
|
71
|
+
var dataSource = useMemo(function () {
|
|
72
|
+
var result = [];
|
|
73
|
+
var processedTypes = new Set();
|
|
74
|
+
|
|
75
|
+
// 首先按照 value 的顺序添加已存在的项
|
|
76
|
+
value.forEach(function (item) {
|
|
77
|
+
if (WALLET_PASS_TYPES.includes(item.type) && !processedTypes.has(item.type)) {
|
|
78
|
+
result.push(item);
|
|
79
|
+
processedTypes.add(item.type);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// 然后添加缺失的默认类型
|
|
84
|
+
DEFAULT_WALLET_PASS_TYPES_CONFIG.forEach(function (defaultType) {
|
|
85
|
+
if (!processedTypes.has(defaultType.type)) {
|
|
86
|
+
result.push({
|
|
87
|
+
type: defaultType.type,
|
|
88
|
+
display: 0,
|
|
89
|
+
custom_title: defaultType.custom_title
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
return result;
|
|
94
|
+
}, [value]);
|
|
95
|
+
|
|
96
|
+
// 处理排序变化
|
|
97
|
+
var handleSortChange = useCallback(function (newList) {
|
|
98
|
+
if (!onChange || disabled) return;
|
|
99
|
+
onChange(newList);
|
|
100
|
+
}, [onChange, disabled]);
|
|
101
|
+
|
|
102
|
+
// 处理显示/隐藏切换
|
|
103
|
+
var handleToggleDisplay = useCallback(function (index) {
|
|
104
|
+
if (!onChange || disabled) return;
|
|
105
|
+
var newList = _toConsumableArray(dataSource);
|
|
106
|
+
newList[index] = _objectSpread(_objectSpread({}, newList[index]), {}, {
|
|
107
|
+
display: newList[index].display === 1 ? 0 : 1
|
|
108
|
+
});
|
|
109
|
+
onChange(newList);
|
|
110
|
+
}, [dataSource, onChange, disabled]);
|
|
111
|
+
|
|
112
|
+
// 处理标题编辑
|
|
113
|
+
var handleTitleChange = useCallback(function (index, newTitle) {
|
|
114
|
+
if (!onChange || disabled) return;
|
|
115
|
+
var newList = _toConsumableArray(dataSource);
|
|
116
|
+
newList[index] = _objectSpread(_objectSpread({}, newList[index]), {}, {
|
|
117
|
+
custom_title: typeof newTitle === 'string' ? {
|
|
118
|
+
original: newTitle,
|
|
119
|
+
en: newTitle
|
|
120
|
+
} : newTitle
|
|
121
|
+
});
|
|
122
|
+
onChange(newList);
|
|
123
|
+
}, [dataSource, onChange, disabled]);
|
|
124
|
+
|
|
125
|
+
// 获取显示标题
|
|
126
|
+
var getDisplayTitle = useCallback(function (item) {
|
|
127
|
+
var defaultType = DEFAULT_WALLET_PASS_TYPES_CONFIG.find(function (t) {
|
|
128
|
+
return t.type === item.type;
|
|
129
|
+
});
|
|
130
|
+
return item.custom_title || (defaultType === null || defaultType === void 0 ? void 0 : defaultType.custom_title) || {
|
|
131
|
+
original: item.type,
|
|
132
|
+
en: item.type
|
|
133
|
+
};
|
|
134
|
+
}, []);
|
|
135
|
+
|
|
136
|
+
// 渲染单个项
|
|
137
|
+
var renderItem = useCallback(function (item, index) {
|
|
138
|
+
var displayTitle = getDisplayTitle(item);
|
|
139
|
+
var isVisible = item.display === 1;
|
|
140
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: classNames('sortable-wallet-pass-item', {
|
|
142
|
+
'sortable-wallet-pass-item-disabled': disabled,
|
|
143
|
+
'sortable-wallet-pass-item-hidden': !isVisible
|
|
144
|
+
})
|
|
145
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
146
|
+
className: "sortable-wallet-pass-drag-handle"
|
|
147
|
+
}, /*#__PURE__*/React.createElement(HolderOutlined, {
|
|
148
|
+
className: "drag-dots",
|
|
149
|
+
size: 20
|
|
150
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
151
|
+
className: "sortable-wallet-pass-title"
|
|
152
|
+
}, /*#__PURE__*/React.createElement(Editable, {
|
|
153
|
+
value: displayTitle,
|
|
154
|
+
editable: !disabled && {
|
|
155
|
+
maxLength: 10
|
|
156
|
+
},
|
|
157
|
+
onChange: function onChange(newValue) {
|
|
158
|
+
return handleTitleChange(index, newValue);
|
|
159
|
+
}
|
|
160
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: "sortable-wallet-pass-toggle"
|
|
162
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
163
|
+
type: "button",
|
|
164
|
+
style: {
|
|
165
|
+
cursor: 'pointer',
|
|
166
|
+
border: 'none',
|
|
167
|
+
background: 'transparent'
|
|
168
|
+
},
|
|
169
|
+
onClick: function onClick() {
|
|
170
|
+
return handleToggleDisplay(index);
|
|
171
|
+
}
|
|
172
|
+
}, isVisible ? /*#__PURE__*/React.createElement(EyeOutlined, {
|
|
173
|
+
className: "eye-icon eye-icon-visible"
|
|
174
|
+
}) : /*#__PURE__*/React.createElement(EyeInvisibleOutlined, {
|
|
175
|
+
className: "eye-icon eye-icon-hidden"
|
|
176
|
+
}))));
|
|
177
|
+
}, [disabled, getDisplayTitle, handleTitleChange, handleToggleDisplay]);
|
|
178
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
className: classNames('sortable-wallet-pass-types', className, {
|
|
180
|
+
'sortable-wallet-pass-types-disabled': disabled
|
|
181
|
+
}),
|
|
182
|
+
style: style
|
|
183
|
+
}, /*#__PURE__*/React.createElement(SortableList, {
|
|
184
|
+
dataSource: dataSource,
|
|
185
|
+
onChange: handleSortChange,
|
|
186
|
+
rowKey: "type",
|
|
187
|
+
renderItem: renderItem,
|
|
188
|
+
activationConstraint: {
|
|
189
|
+
distance: 5
|
|
190
|
+
}
|
|
191
|
+
}));
|
|
192
|
+
};
|
|
193
|
+
export default SortableWalletPassTypes;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
.sortable-wallet-pass-types {
|
|
2
|
+
background: #fff;
|
|
3
|
+
border-radius: 8px;
|
|
4
|
+
|
|
5
|
+
&-disabled {
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
opacity: 0.6;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.sortable-wallet-pass-item {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
padding: 4px 8px;
|
|
15
|
+
border-bottom: 1px solid #f0f0f0;
|
|
16
|
+
background: #fff;
|
|
17
|
+
transition: all 0.2s ease;
|
|
18
|
+
cursor: grab;
|
|
19
|
+
|
|
20
|
+
&:last-child {
|
|
21
|
+
border-bottom: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
background: #fafafa;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:active {
|
|
29
|
+
cursor: grabbing;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-disabled {
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background: #fff;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&-hidden {
|
|
41
|
+
.sortable-wallet-pass-title {
|
|
42
|
+
opacity: 0.5;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.sortable-wallet-pass-drag-handle {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
margin-right: 8px;
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
cursor: grab;
|
|
54
|
+
line-height: 1;
|
|
55
|
+
|
|
56
|
+
.drag-dots {
|
|
57
|
+
display: inline-block;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:active {
|
|
61
|
+
cursor: grabbing;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.sortable-wallet-pass-title {
|
|
66
|
+
flex: 1;
|
|
67
|
+
margin-right: 12px;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
min-height: 36px;
|
|
71
|
+
font-weight: bold;
|
|
72
|
+
|
|
73
|
+
.pisell-text-editable {
|
|
74
|
+
min-width: 120px;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.sortable-wallet-pass-toggle {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: center;
|
|
82
|
+
width: 24px;
|
|
83
|
+
height: 24px;
|
|
84
|
+
cursor: pointer;
|
|
85
|
+
border-radius: 4px;
|
|
86
|
+
transition: all 0.2s ease;
|
|
87
|
+
|
|
88
|
+
&:hover {
|
|
89
|
+
background: #f5f5f5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.eye-icon {
|
|
93
|
+
font-size: 16px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 拖拽时的样式
|
|
98
|
+
.sortable-wallet-pass-item[data-dnd-dragging='true'] {
|
|
99
|
+
background: #e6f7ff;
|
|
100
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
101
|
+
border-radius: 6px;
|
|
102
|
+
transform: rotate(3deg);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// 拖拽占位符样式
|
|
106
|
+
.sortable-wallet-pass-item[data-dnd-placeholder='true'] {
|
|
107
|
+
background: #f0f2f5;
|
|
108
|
+
border: 2px dashed #d9d9d9;
|
|
109
|
+
opacity: 0.6;
|
|
110
|
+
}
|