@pisell/private-materials 6.3.66 → 6.3.67
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 +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/Sales/Summary/utils.d.ts +51 -0
- 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/locales.d.ts +363 -0
- package/es/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
- package/es/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
- package/es/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
- package/es/components/authentication/admin/AuthMethods/types.d.ts +76 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
- package/es/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
- package/es/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
- package/es/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
- package/es/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
- package/es/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
- package/es/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
- package/es/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
- package/es/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
- package/es/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
- package/es/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
- package/es/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
- package/es/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
- package/es/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
- package/es/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
- package/es/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
- package/es/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
- package/es/components/authentication/index.d.ts +0 -0
- 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/tabPane/index.d.ts +4 -0
- package/es/components/booking/dashboard/serve.d.ts +1 -0
- package/es/components/booking/editBookingModal/utils.d.ts +12 -0
- package/es/components/booking/forms/model.d.ts +10 -1
- package/es/components/booking/forms/serve.d.ts +18 -0
- package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/client/serve.d.ts +2 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- 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/pet/serve.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service/editService/constants.d.ts +1 -0
- package/es/components/booking/info/service/serve.d.ts +20 -0
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/locales.d.ts +843 -0
- 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/model.d.ts +10 -1
- package/es/components/booking/payments/model.d.ts +10 -1
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/const.d.ts +184 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/locales.d.ts +330 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/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/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/index.js +54 -5
- package/es/components/pay/toC/PaymentList/index.less +58 -1
- package/es/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/es/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/es/components/pay/toC/PaymentList/serve.js +7 -0
- package/es/components/pay/toC/PaymentList/utils.d.ts +31 -0
- package/es/components/pay/toC/PaymentList/utils.js +165 -5
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -0
- 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/index.js +2 -1
- package/es/components/pay/toC/locales.d.ts +307 -0
- package/es/components/pay/toC/locales.js +9 -3
- package/es/components/pay/toC/model.d.ts +9 -1
- package/es/components/pay/toC/status.d.ts +13 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/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/ruleSetting/locales.d.ts +48 -0
- package/es/components/schedules/model.d.ts +9 -1
- package/es/components/shoppingCart/components/Cart/Product.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/locales.d.ts +33 -0
- package/es/components/shoppingCart/type.d.ts +48 -0
- package/es/components/subTotal/locales.d.ts +42 -0
- package/es/components/systemSettings/registry/locales.d.ts +272 -0
- package/es/components/systemSettings/registry/services.d.ts +77 -0
- package/es/components/systemSettings/registry/types.d.ts +126 -0
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/es/components/ticketBooking/locales.d.ts +174 -0
- package/es/components/wallet/utils.d.ts +48 -0
- package/es/components/walletList/locales.d.ts +27 -0
- package/es/components/walletList/types/index.d.ts +194 -0
- package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/es/components/workSpaceList/components/Card/constants.d.ts +2 -0
- 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/useEngineContext.d.ts +10 -0
- package/es/hooks/useWindowSize.d.ts +5 -0
- package/es/plus/clientName/index.d.ts +4 -0
- package/es/plus/clientName/type.d.ts +13 -0
- package/es/plus/clientName/utils.d.ts +2 -0
- package/es/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/es/plus/contactInfo/locales.d.ts +15 -0
- package/es/plus/contactInfo/types.d.ts +91 -0
- package/es/plus/contactInfo/utils.d.ts +7 -0
- package/es/plus/contactInfoModal/locales.d.ts +66 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/productSelect/index.js +5 -1
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/es/plus/selectHolder/locales.d.ts +21 -0
- package/es/plus/selectHolder/types.d.ts +104 -0
- package/es/plus/selectHolder/utils.d.ts +9 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/es/plus/skuOptionsSelection/locales.d.ts +30 -0
- package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/es/plus/skuOptionsSelection/types.d.ts +424 -0
- package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/es/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/es/plus/walletEditor/locales.d.ts +135 -0
- package/es/plus/walletEditor/types.d.ts +52 -0
- package/es/plus/walletPassGallery/locales.d.ts +285 -0
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/pro/Login2.0/hooks/index.d.ts +2 -0
- package/es/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/es/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/es/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/es/pro/Login2.0/locales.d.ts +543 -0
- package/es/pro/Login2.0/shared/Header.d.ts +11 -0
- package/es/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/es/pro/Login2.0/shared/types.d.ts +232 -0
- package/es/pro/Login2.0/steps/CodeInput.js +37 -7
- package/es/pro/Login2.0/types.d.ts +167 -0
- package/es/pro/NumericStepper/index.d.ts +43 -0
- package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/es/pro/Selector/Item.d.ts +14 -0
- package/es/pro/Selector/Selector.stories.d.ts +78 -0
- package/es/pro/Selector/components/Card/index.d.ts +57 -0
- package/es/pro/Selector/components/Card/types.d.ts +1 -0
- package/es/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
- package/es/pro/Selector/components/Media/index.d.ts +6 -0
- package/es/pro/Selector/components/Media/types.d.ts +47 -0
- package/es/pro/Selector/components/index.d.ts +4 -0
- package/es/pro/Selector/demo.d.ts +2 -0
- package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/es/pro/Selector/index.d.ts +11 -0
- package/es/pro/Selector/locales.d.ts +36 -0
- package/es/pro/Selector/types.d.ts +173 -0
- package/es/pro/Selector/utils/index.d.ts +49 -0
- package/es/pro/pisellPaymentList/example.d.ts +19 -0
- package/es/test/setup.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/Sales/Summary/utils.d.ts +51 -0
- 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/locales.d.ts +363 -0
- package/lib/components/authentication/admin/AuthMethods/components/DefaultSettingsContent.d.ts +11 -0
- package/lib/components/authentication/admin/AuthMethods/components/LoginMethodsList.d.ts +13 -0
- package/lib/components/authentication/admin/AuthMethods/locales.d.ts +249 -0
- package/lib/components/authentication/admin/AuthMethods/types.d.ts +76 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/locales.d.ts +84 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/AuthenticationMethods/types.d.ts +41 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/locales.d.ts +72 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/CollectInfo/types.d.ts +33 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/locales.d.ts +27 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSetting/types.d.ts +25 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/locales.d.ts +66 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/PageSettingItem/types.d.ts +26 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/locales.d.ts +39 -0
- package/lib/components/authentication/admin/ChannelAuthSetting/types.d.ts +36 -0
- package/lib/components/authentication/admin/CustomerAuth/locales.d.ts +66 -0
- package/lib/components/authentication/admin/CustomerAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/locales.d.ts +108 -0
- package/lib/components/authentication/admin/CustomerOAuthConfig/types.d.ts +22 -0
- package/lib/components/authentication/admin/DeviceAuth/locales.d.ts +57 -0
- package/lib/components/authentication/admin/DeviceAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/OAuthConfig/locales.d.ts +90 -0
- package/lib/components/authentication/admin/OAuthConfig/types.d.ts +22 -0
- package/lib/components/authentication/admin/OrgAdminAuth/locales.d.ts +54 -0
- package/lib/components/authentication/admin/OrgAdminAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/POSOperatorAuth/locales.d.ts +48 -0
- package/lib/components/authentication/admin/POSOperatorAuth/types.d.ts +16 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/locales.d.ts +54 -0
- package/lib/components/authentication/admin/SaaSAdminAuth/types.d.ts +16 -0
- package/lib/components/authentication/index.d.ts +0 -0
- 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/tabPane/index.d.ts +4 -0
- package/lib/components/booking/dashboard/serve.d.ts +1 -0
- package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
- package/lib/components/booking/forms/model.d.ts +10 -1
- package/lib/components/booking/forms/serve.d.ts +18 -0
- package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/client/serve.d.ts +2 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/hooks/useHolderConfig.d.ts +9 -0
- 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/pet/serve.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service/editService/constants.d.ts +1 -0
- package/lib/components/booking/info/service/serve.d.ts +20 -0
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/locales.d.ts +843 -0
- 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/model.d.ts +10 -1
- package/lib/components/booking/payments/model.d.ts +10 -1
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/const.d.ts +184 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/locales.d.ts +330 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/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/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/pay/toC/PaymentList/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/index.js +36 -5
- package/lib/components/pay/toC/PaymentList/index.less +58 -1
- package/lib/components/pay/toC/PaymentList/payment/credit_card.png +0 -0
- package/lib/components/pay/toC/PaymentList/payment/visa.png +0 -0
- package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
- package/lib/components/pay/toC/PaymentList/serve.js +5 -1
- package/lib/components/pay/toC/PaymentList/utils.d.ts +31 -0
- package/lib/components/pay/toC/PaymentList/utils.js +134 -6
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/Content.d.ts +6 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +2 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -0
- 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/index.js +2 -1
- package/lib/components/pay/toC/locales.d.ts +307 -0
- package/lib/components/pay/toC/locales.js +9 -3
- package/lib/components/pay/toC/model.d.ts +9 -1
- package/lib/components/pay/toC/status.d.ts +13 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/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/ruleSetting/locales.d.ts +48 -0
- package/lib/components/schedules/model.d.ts +9 -1
- package/lib/components/shoppingCart/components/Cart/Product.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/locales.d.ts +33 -0
- package/lib/components/shoppingCart/type.d.ts +48 -0
- package/lib/components/subTotal/locales.d.ts +42 -0
- package/lib/components/systemSettings/registry/locales.d.ts +272 -0
- package/lib/components/systemSettings/registry/services.d.ts +77 -0
- package/lib/components/systemSettings/registry/types.d.ts +126 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
- package/lib/components/ticketBooking/locales.d.ts +174 -0
- package/lib/components/wallet/utils.d.ts +48 -0
- package/lib/components/walletList/locales.d.ts +27 -0
- package/lib/components/walletList/types/index.d.ts +194 -0
- package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +8 -0
- package/lib/components/workSpaceList/components/Card/constants.d.ts +2 -0
- 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/useEngineContext.d.ts +10 -0
- package/lib/hooks/useWindowSize.d.ts +5 -0
- package/lib/plus/clientName/index.d.ts +4 -0
- package/lib/plus/clientName/type.d.ts +13 -0
- package/lib/plus/clientName/utils.d.ts +2 -0
- package/lib/plus/contactInfo/components/SwipeAction/index.d.ts +46 -0
- package/lib/plus/contactInfo/locales.d.ts +15 -0
- package/lib/plus/contactInfo/types.d.ts +91 -0
- package/lib/plus/contactInfo/utils.d.ts +7 -0
- package/lib/plus/contactInfoModal/locales.d.ts +66 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/productSelect/index.js +4 -1
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
- package/lib/plus/selectHolder/locales.d.ts +21 -0
- package/lib/plus/selectHolder/types.d.ts +104 -0
- package/lib/plus/selectHolder/utils.d.ts +9 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
- package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/locales.d.ts +30 -0
- package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
- package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
- package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
- package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/types.d.ts +424 -0
- package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
- package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
- package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
- package/lib/plus/walletEditor/components/JsonEditor/index.d.ts +11 -0
- package/lib/plus/walletEditor/locales.d.ts +135 -0
- package/lib/plus/walletEditor/types.d.ts +52 -0
- package/lib/plus/walletPassGallery/locales.d.ts +285 -0
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/pro/Login2.0/hooks/index.d.ts +2 -0
- package/lib/pro/Login2.0/hooks/usePasswordValidationRules.d.ts +24 -0
- package/lib/pro/Login2.0/hooks/useRegisterFlow.d.ts +39 -0
- package/lib/pro/Login2.0/hooks/useRegistrationMethods.d.ts +9 -0
- package/lib/pro/Login2.0/locales.d.ts +543 -0
- package/lib/pro/Login2.0/shared/Header.d.ts +11 -0
- package/lib/pro/Login2.0/shared/registerFlow.d.ts +116 -0
- package/lib/pro/Login2.0/shared/types.d.ts +232 -0
- package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
- package/lib/pro/Login2.0/types.d.ts +167 -0
- package/lib/pro/NumericStepper/index.d.ts +43 -0
- package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
- package/lib/pro/Selector/Item.d.ts +14 -0
- package/lib/pro/Selector/Selector.stories.d.ts +78 -0
- package/lib/pro/Selector/components/Card/index.d.ts +57 -0
- package/lib/pro/Selector/components/Card/types.d.ts +1 -0
- package/lib/pro/Selector/components/Indicator/index.d.ts +19 -0
- package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +16 -0
- package/lib/pro/Selector/components/Media/index.d.ts +6 -0
- package/lib/pro/Selector/components/Media/types.d.ts +47 -0
- package/lib/pro/Selector/components/index.d.ts +4 -0
- package/lib/pro/Selector/demo.d.ts +2 -0
- package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
- package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
- package/lib/pro/Selector/index.d.ts +11 -0
- package/lib/pro/Selector/locales.d.ts +36 -0
- package/lib/pro/Selector/types.d.ts +173 -0
- package/lib/pro/Selector/utils/index.d.ts +49 -0
- package/lib/pro/pisellPaymentList/example.d.ts +19 -0
- package/lib/test/setup.d.ts +1 -0
- package/package.json +4 -4
|
@@ -90,11 +90,11 @@ var PaymentList = (props, ref) => {
|
|
|
90
90
|
var _a2, _b2;
|
|
91
91
|
return (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2);
|
|
92
92
|
}, []);
|
|
93
|
-
const init = (list) => {
|
|
93
|
+
const init = (list, amount) => {
|
|
94
94
|
var _a2, _b2;
|
|
95
95
|
setLoading(true);
|
|
96
96
|
const platform = ((_b2 = (_a2 = context.appHelper) == null ? void 0 : _a2.constants) == null ? void 0 : _b2.platform) || "h5";
|
|
97
|
-
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp);
|
|
97
|
+
const { paymentList: paymentList2, walletPass } = (0, import_serve.filterPaymentList)(list, platform, isApp, amount);
|
|
98
98
|
if (paymentList2.length > 0) {
|
|
99
99
|
let first = paymentList2[0];
|
|
100
100
|
setPaymentList(paymentList2);
|
|
@@ -147,6 +147,24 @@ var PaymentList = (props, ref) => {
|
|
|
147
147
|
}
|
|
148
148
|
));
|
|
149
149
|
};
|
|
150
|
+
const renderCreditCardToast = (_item) => {
|
|
151
|
+
var _a2;
|
|
152
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-wrap surcharge-modal-wrap-credit-card" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-lists" }, (_a2 = _item == null ? void 0 : _item.surcharge_config_result) == null ? void 0 : _a2.map((d) => {
|
|
153
|
+
var _a3, _b2;
|
|
154
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: d.name, className: "surcharge-modal-list-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-header" }, (_a3 = d == null ? void 0 : d.icons) == null ? void 0 : _a3.map((icon) => {
|
|
155
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
156
|
+
import_materials.Image,
|
|
157
|
+
{
|
|
158
|
+
src: icon,
|
|
159
|
+
className: "header-icon",
|
|
160
|
+
isPreview: false
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}), /* @__PURE__ */ import_react.default.createElement("span", null, d.name)), /* @__PURE__ */ import_react.default.createElement("div", { className: "surcharge-modal-list-item-content" }, (_b2 = d == null ? void 0 : d.lists) == null ? void 0 : _b2.map((item) => {
|
|
164
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: item.name, className: "content-item" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils2.locales.getText(item.area_text)), /* @__PURE__ */ import_react.default.createElement("span", { className: "item-fee" }, item.surcharge_fee), /* @__PURE__ */ import_react.default.createElement("span", null, item.surcharge_text));
|
|
165
|
+
})));
|
|
166
|
+
})));
|
|
167
|
+
};
|
|
150
168
|
const content = (0, import_react.useMemo)(() => {
|
|
151
169
|
if (loading) {
|
|
152
170
|
return null;
|
|
@@ -172,8 +190,9 @@ var PaymentList = (props, ref) => {
|
|
|
172
190
|
onChange: paymentTypeChange,
|
|
173
191
|
optionClassName: "payment-item",
|
|
174
192
|
renderOption: (d, active) => {
|
|
175
|
-
var _a2, _b2;
|
|
193
|
+
var _a2, _b2, _c2;
|
|
176
194
|
const showIcon = d.surcharge && d.service !== "pisell.other.cashmanual" && d.service !== "pisell.custom_payment" || ((_a2 = d == null ? void 0 : d.params) == null ? void 0 : _a2.description) && (d.service === "pisell.other.cashmanual" || d.service === "pisell.custom_payment");
|
|
195
|
+
const showCreditCardToast = (d == null ? void 0 : d.service) === "mw.credit_card" && ((_b2 = d == null ? void 0 : d.surcharge_config_result) == null ? void 0 : _b2.length) > 0;
|
|
177
196
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
178
197
|
import_materials.PisellRow,
|
|
179
198
|
{
|
|
@@ -199,12 +218,24 @@ var PaymentList = (props, ref) => {
|
|
|
199
218
|
d.title,
|
|
200
219
|
" "
|
|
201
220
|
),
|
|
202
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((
|
|
221
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "" }, (((_c2 = d == null ? void 0 : d.params) == null ? void 0 : _c2.description) || d.surcharge) && d.service !== "pisell.offline_payment" ? /* @__PURE__ */ import_react.default.createElement(
|
|
203
222
|
import_materials.PisellTooltip,
|
|
204
223
|
{
|
|
205
|
-
title: renderToast(d),
|
|
224
|
+
title: showCreditCardToast ? renderCreditCardToast(d) : renderToast(d),
|
|
206
225
|
onClick: (e) => {
|
|
207
226
|
e.stopPropagation();
|
|
227
|
+
},
|
|
228
|
+
overlayClassName: showCreditCardToast ? "surcharge-tooltip-overlay-wrap" : "",
|
|
229
|
+
getPopupContainer: (triggerNode) => {
|
|
230
|
+
var _a3;
|
|
231
|
+
if (showCreditCardToast) {
|
|
232
|
+
const modalContainer = (_a3 = triggerNode == null ? void 0 : triggerNode.closest) == null ? void 0 : _a3.call(
|
|
233
|
+
triggerNode,
|
|
234
|
+
".toc-pay-modal-content .pisell-lowcode-modal"
|
|
235
|
+
);
|
|
236
|
+
return modalContainer || document.body;
|
|
237
|
+
}
|
|
238
|
+
return document.body;
|
|
208
239
|
}
|
|
209
240
|
},
|
|
210
241
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -109,4 +109,61 @@
|
|
|
109
109
|
font-style: normal;
|
|
110
110
|
font-weight: 500;
|
|
111
111
|
}
|
|
112
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.surcharge-tooltip-overlay-wrap{
|
|
115
|
+
max-width: 92% !important;
|
|
116
|
+
width: 92%;
|
|
117
|
+
left: 4% !important;
|
|
118
|
+
.pisell-lowcode-tooltip-inner{
|
|
119
|
+
background: #F2F4F7 !important;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.surcharge-modal-wrap-credit-card {
|
|
124
|
+
.surcharge-modal-lists {
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
gap: 16px;
|
|
128
|
+
.surcharge-modal-list-item {
|
|
129
|
+
display: flex;
|
|
130
|
+
flex-direction: column;
|
|
131
|
+
gap: 8px;
|
|
132
|
+
.surcharge-modal-list-item-header {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
gap: 12px;
|
|
136
|
+
color: #101828;
|
|
137
|
+
font-size: 14px;
|
|
138
|
+
font-weight: 600;
|
|
139
|
+
line-height: 20px;
|
|
140
|
+
.header-icon{
|
|
141
|
+
width: 58px;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
.surcharge-modal-list-item-content {
|
|
145
|
+
display: flex;
|
|
146
|
+
gap: 12px;
|
|
147
|
+
.content-item {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-direction: column;
|
|
150
|
+
flex: 1;
|
|
151
|
+
padding: 8px 12px;
|
|
152
|
+
border-radius: 8px;
|
|
153
|
+
box-shadow: 0px 2px 4px -2px rgba(16, 24, 40, 0.06);
|
|
154
|
+
background: white;
|
|
155
|
+
color: #475467;
|
|
156
|
+
font-size: 12px;
|
|
157
|
+
font-weight: 400;
|
|
158
|
+
line-height: 18px;
|
|
159
|
+
.item-fee {
|
|
160
|
+
color: black;
|
|
161
|
+
font-size: 24px;
|
|
162
|
+
font-weight: 700;
|
|
163
|
+
line-height: 32px;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -20,7 +20,7 @@ export declare const getPaymentList: (values: any) => Promise<{
|
|
|
20
20
|
* @Author: zhiwei.Wang
|
|
21
21
|
* @Date: 2024-08-16 10:57
|
|
22
22
|
*/
|
|
23
|
-
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean) => {
|
|
23
|
+
export declare const filterPaymentList: (list: any[], platform: string | undefined, isApp: boolean, amount?: number) => {
|
|
24
24
|
message: string;
|
|
25
25
|
status: string;
|
|
26
26
|
paymentList: any[];
|
|
@@ -27,6 +27,7 @@ var import_utils = require("../../../../utils");
|
|
|
27
27
|
var import_status = require("./status");
|
|
28
28
|
var import_utils2 = require("@pisell/utils");
|
|
29
29
|
var import_status2 = require("./status");
|
|
30
|
+
var import_utils3 = require("./utils");
|
|
30
31
|
var getPaymentList = async (values) => {
|
|
31
32
|
let { data = [] } = await import_utils.request.getRequest().get("/h5/pay/order/payments", values);
|
|
32
33
|
return filterPaymentList(data);
|
|
@@ -43,7 +44,7 @@ var sortArr = [
|
|
|
43
44
|
"pisell.other.cashmanual",
|
|
44
45
|
"pisell.custom_payment"
|
|
45
46
|
];
|
|
46
|
-
var filterPaymentList = (list, platform = "h5", isApp) => {
|
|
47
|
+
var filterPaymentList = (list, platform = "h5", isApp, amount) => {
|
|
47
48
|
let paymentList = [...list];
|
|
48
49
|
let _paymentKeys = [...import_status.paymentKeys];
|
|
49
50
|
const walletPass = paymentList.find((d) => d.service === "pisell.wallet_pass");
|
|
@@ -82,6 +83,9 @@ var filterPaymentList = (list, platform = "h5", isApp) => {
|
|
|
82
83
|
if ((0, import_status2.isCustomPayment)(d.service)) {
|
|
83
84
|
service = service + "|" + d.params.custom_payment_id;
|
|
84
85
|
}
|
|
86
|
+
if (service === "mw.credit_card") {
|
|
87
|
+
d.surcharge_config_result = (0, import_utils3.formatCreditCardSurchargeList)(d, amount);
|
|
88
|
+
}
|
|
85
89
|
return {
|
|
86
90
|
...d,
|
|
87
91
|
service,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description: visa/master手续费是否一致
|
|
3
|
+
* @param {any} creditCardConfig
|
|
4
|
+
* @return {*}
|
|
5
|
+
*/
|
|
6
|
+
export declare const isCreditCardSurchargeSame: (creditCardConfig: any[]) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* @description: 格式化visa/master手续费
|
|
9
|
+
* @param {any} item 支付列表项
|
|
10
|
+
* @param {number} amount 订单金额
|
|
11
|
+
* @param {boolean} isSame 手续费是否一致
|
|
12
|
+
* @return {*}
|
|
13
|
+
*/
|
|
14
|
+
export declare const formatCreditCardSurcharge: (item: any, amount: number, isSame: boolean) => any;
|
|
15
|
+
/**
|
|
16
|
+
* @description: 格式化visa/master手续费列表
|
|
17
|
+
* @param {any} item
|
|
18
|
+
* @param {number} amount
|
|
19
|
+
* @return {*}
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatCreditCardSurchargeList: (item: any, amount: number) => any;
|
|
22
|
+
/**
|
|
23
|
+
* @title: 计算支付列表的手续费
|
|
24
|
+
* @description:
|
|
25
|
+
* @param {any} paymentList
|
|
26
|
+
* @param {number} amount
|
|
27
|
+
* @return {*}
|
|
28
|
+
* @Author: zhiwei.Wang
|
|
29
|
+
* @Date: 2024-08-18 09:30
|
|
30
|
+
*/
|
|
31
|
+
export declare const calculateSurcharge: (paymentList: any[], amount: number) => any[];
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,14 +16,128 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
|
|
19
29
|
// src/components/pay/toC/PaymentList/utils.ts
|
|
20
30
|
var utils_exports = {};
|
|
21
31
|
__export(utils_exports, {
|
|
22
|
-
calculateSurcharge: () => calculateSurcharge
|
|
32
|
+
calculateSurcharge: () => calculateSurcharge,
|
|
33
|
+
formatCreditCardSurcharge: () => formatCreditCardSurcharge,
|
|
34
|
+
formatCreditCardSurchargeList: () => formatCreditCardSurchargeList,
|
|
35
|
+
isCreditCardSurchargeSame: () => isCreditCardSurchargeSame
|
|
23
36
|
});
|
|
24
37
|
module.exports = __toCommonJS(utils_exports);
|
|
38
|
+
var import_visa = __toESM(require("./payment/visa.png"));
|
|
39
|
+
var import_credit_card = __toESM(require("./payment/credit_card.png"));
|
|
40
|
+
var isCreditCardSurchargeSame = (creditCardConfig) => {
|
|
41
|
+
try {
|
|
42
|
+
const configMap = {};
|
|
43
|
+
creditCardConfig.forEach((config) => {
|
|
44
|
+
const key = `${(config == null ? void 0 : config.credit_card_type) || "-"}_${(config == null ? void 0 : config.area) || "-"}`;
|
|
45
|
+
configMap[key] = config;
|
|
46
|
+
});
|
|
47
|
+
const visaDomestic = configMap["visa_domestic"];
|
|
48
|
+
const visaWorld = configMap["visa_world"];
|
|
49
|
+
const masterDomestic = configMap["master_domestic"];
|
|
50
|
+
const masterWorld = configMap["master_world"];
|
|
51
|
+
const formatFee = (config) => {
|
|
52
|
+
if (!config) return null;
|
|
53
|
+
const percent = parseFloat(config.percent ?? config.percentage ?? "0");
|
|
54
|
+
const amount = parseFloat(config.amount ?? "0");
|
|
55
|
+
return {
|
|
56
|
+
percentStr: percent,
|
|
57
|
+
amountStr: amount
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const visaDomesticFee = formatFee(visaDomestic);
|
|
61
|
+
const visaWorldFee = formatFee(visaWorld);
|
|
62
|
+
const masterDomesticFee = formatFee(masterDomestic);
|
|
63
|
+
const masterWorldFee = formatFee(masterWorld);
|
|
64
|
+
const isFeeSame = (fee1, fee2) => {
|
|
65
|
+
if (!fee1 || !fee2) return false;
|
|
66
|
+
return fee1.percentStr === fee2.percentStr && fee1.amountStr === fee2.amountStr;
|
|
67
|
+
};
|
|
68
|
+
const isDomesticSame = isFeeSame(visaDomesticFee, masterDomesticFee);
|
|
69
|
+
const isWorldSame = isFeeSame(visaWorldFee, masterWorldFee);
|
|
70
|
+
const isAllSame = isDomesticSame && isWorldSame;
|
|
71
|
+
return isAllSame;
|
|
72
|
+
} catch (error) {
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
var totalFee = (config, amount) => {
|
|
77
|
+
const percentageFee = parseFloat(config.percent ?? config.percentage) * Number(amount);
|
|
78
|
+
const totalFee2 = percentageFee + parseFloat(config.amount);
|
|
79
|
+
return totalFee2;
|
|
80
|
+
};
|
|
81
|
+
var formatCreditCardSurcharge = (item, amount, isSame) => {
|
|
82
|
+
try {
|
|
83
|
+
const { surcharge_config, currency_symbol } = item;
|
|
84
|
+
const formatSurchargeList = (list) => {
|
|
85
|
+
return list == null ? void 0 : list.map((config) => {
|
|
86
|
+
const percentageFee = parseFloat(
|
|
87
|
+
(config == null ? void 0 : config.percent) ?? (config == null ? void 0 : config.percentage) ?? 0
|
|
88
|
+
);
|
|
89
|
+
const percent = (percentageFee * 100).toFixed(2);
|
|
90
|
+
const amountFee = parseFloat(config == null ? void 0 : config.amount).toFixed(2);
|
|
91
|
+
const _totalFee = totalFee(config, amount).toFixed(2);
|
|
92
|
+
const areaText = (config == null ? void 0 : config.area) === "world" ? "tocPay.text.rest-of-world" : "tocPay.text.domestic";
|
|
93
|
+
return {
|
|
94
|
+
...config,
|
|
95
|
+
area_text: areaText,
|
|
96
|
+
surcharge_text: `${percent}% + ${currency_symbol}${amountFee}`,
|
|
97
|
+
surcharge_fee: `${currency_symbol}${_totalFee}`
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
if (isSame) {
|
|
102
|
+
const visaResult = surcharge_config.filter((config) => {
|
|
103
|
+
return config.credit_card_type === "visa";
|
|
104
|
+
});
|
|
105
|
+
return [
|
|
106
|
+
{
|
|
107
|
+
icons: [import_visa.default, import_credit_card.default],
|
|
108
|
+
name: "Visa / Mastercard",
|
|
109
|
+
lists: formatSurchargeList(visaResult)
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
} else {
|
|
113
|
+
const visaResult = surcharge_config.filter((config) => {
|
|
114
|
+
return config.credit_card_type === "visa";
|
|
115
|
+
});
|
|
116
|
+
const masterResult = surcharge_config.filter((config) => {
|
|
117
|
+
return config.credit_card_type === "master";
|
|
118
|
+
});
|
|
119
|
+
return [
|
|
120
|
+
{
|
|
121
|
+
icons: [import_visa.default],
|
|
122
|
+
name: "Visa",
|
|
123
|
+
lists: formatSurchargeList(visaResult)
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
icons: [import_credit_card.default],
|
|
127
|
+
name: "Mastercard",
|
|
128
|
+
lists: formatSurchargeList(masterResult)
|
|
129
|
+
}
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
} catch (error) {
|
|
133
|
+
console.error(error);
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
var formatCreditCardSurchargeList = (item, amount) => {
|
|
138
|
+
const isSame = isCreditCardSurchargeSame((item == null ? void 0 : item.surcharge_config) || []);
|
|
139
|
+
return formatCreditCardSurcharge(item || {}, amount, isSame);
|
|
140
|
+
};
|
|
25
141
|
var calculateSurcharge = (paymentList, amount) => {
|
|
26
142
|
return paymentList.map((payment) => {
|
|
27
143
|
const { surcharge_config, currency_symbol, surcharge_text } = payment;
|
|
@@ -30,9 +146,7 @@ var calculateSurcharge = (paymentList, amount) => {
|
|
|
30
146
|
return payment;
|
|
31
147
|
}
|
|
32
148
|
const fees = surcharge_config.map((config) => {
|
|
33
|
-
|
|
34
|
-
const totalFee = percentageFee + parseFloat(config.amount);
|
|
35
|
-
return totalFee;
|
|
149
|
+
return totalFee(config, amount);
|
|
36
150
|
});
|
|
37
151
|
const minFee = Math.min(...fees);
|
|
38
152
|
const maxFee = Math.max(...fees);
|
|
@@ -41,12 +155,26 @@ var calculateSurcharge = (paymentList, amount) => {
|
|
|
41
155
|
} else if (minFee === maxFee) {
|
|
42
156
|
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(2)}`;
|
|
43
157
|
} else {
|
|
44
|
-
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
158
|
+
payment.surcharge = `${surcharge_text}${currency_symbol}${minFee.toFixed(
|
|
159
|
+
2
|
|
160
|
+
)} ~ ${currency_symbol}${maxFee.toFixed(2)}`;
|
|
161
|
+
}
|
|
162
|
+
if (payment.service === "mw.credit_card") {
|
|
163
|
+
const percentList = surcharge_config.map((config) => {
|
|
164
|
+
return parseFloat(config.percent ?? config.percentage ?? "0") * 100;
|
|
165
|
+
});
|
|
166
|
+
const minPercent = Math.min(...percentList);
|
|
167
|
+
const maxPercent = Math.max(...percentList);
|
|
168
|
+
payment.surcharge = `${surcharge_text}${minPercent}% ~ ${maxPercent}%`;
|
|
169
|
+
payment.surcharge_config_result = formatCreditCardSurchargeList(payment, amount);
|
|
45
170
|
}
|
|
46
171
|
return payment;
|
|
47
172
|
});
|
|
48
173
|
};
|
|
49
174
|
// Annotate the CommonJS export names for ESM import in node:
|
|
50
175
|
0 && (module.exports = {
|
|
51
|
-
calculateSurcharge
|
|
176
|
+
calculateSurcharge,
|
|
177
|
+
formatCreditCardSurcharge,
|
|
178
|
+
formatCreditCardSurchargeList,
|
|
179
|
+
isCreditCardSurchargeSame
|
|
52
180
|
});
|
|
@@ -206,7 +206,7 @@ var ToCPay = (props, ref) => {
|
|
|
206
206
|
wait_amount: remain_amount
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
|
-
await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list));
|
|
209
|
+
await ((_b2 = paymentListRef.current) == null ? void 0 : _b2.init(payment_list, remain_amount || 0));
|
|
210
210
|
setTimeout(() => {
|
|
211
211
|
setLoading(false);
|
|
212
212
|
}, 100);
|
|
@@ -515,6 +515,7 @@ var ToCPay = (props, ref) => {
|
|
|
515
515
|
open,
|
|
516
516
|
cancelVisible: false,
|
|
517
517
|
okText,
|
|
518
|
+
wrapClassName: "toc-pay-modal-content",
|
|
518
519
|
bodyStyle: {
|
|
519
520
|
padding: 24
|
|
520
521
|
},
|