@pisell/private-materials 6.0.22 → 6.0.23
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 +149 -149
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +12 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -20
- package/es/components/booking/addons/index.js +14 -14
- package/es/components/booking/addons/model.js +5 -5
- package/es/components/booking/components/TabProduct/index.d.ts +2 -2
- package/es/components/booking/components/TabProduct/index.js +6 -6
- package/es/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +2 -2
- package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
- package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
- package/es/components/booking/components/addButton/index.js +1 -1
- package/es/components/booking/components/authWrap/index.d.ts +1 -1
- package/es/components/booking/components/browserSelect/index.d.ts +1 -1
- package/es/components/booking/components/browserSelect/index.js +1 -1
- package/es/components/booking/components/collapsibleList/index.js +1 -1
- package/es/components/booking/components/collapsibleList/utils.d.ts +2 -2
- package/es/components/booking/components/customSelect/index.js +10 -10
- package/es/components/booking/components/drawer/index.d.ts +1 -1
- package/es/components/booking/components/drawer/index.js +1 -1
- package/es/components/booking/components/emptyBooking/index.d.ts +2 -2
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +2 -2
- package/es/components/booking/components/footer/amount.js +7 -7
- package/es/components/booking/components/footer/index.d.ts +2 -2
- package/es/components/booking/components/footer/index.js +54 -54
- package/es/components/booking/components/footer/serve.js +2 -2
- package/es/components/booking/components/footer/utils.js +54 -21
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +2 -2
- package/es/components/booking/components/menuButton/index.d.ts +1 -1
- package/es/components/booking/dashboard/index.d.ts +1 -1
- package/es/components/booking/dashboard/index.js +10 -9
- package/es/components/booking/dashboard/serve.js +2 -2
- package/es/components/booking/deposit/ClientItem/index.d.ts +1 -1
- package/es/components/booking/deposit/DepositItem/index.d.ts +1 -1
- package/es/components/booking/deposit/DepositItem/index.js +2 -2
- package/es/components/booking/deposit/EditDepositModal/index.js +2 -3
- package/es/components/booking/deposit/index.d.ts +2 -2
- package/es/components/booking/deposit/index.js +12 -12
- package/es/components/booking/deposit/serve.js +2 -2
- package/es/components/booking/forms/format.js +8 -8
- package/es/components/booking/forms/forms.js +7 -7
- package/es/components/booking/forms/index.js +25 -25
- package/es/components/booking/forms/model.js +5 -5
- package/es/components/booking/forms/serve.js +2 -2
- package/es/components/booking/forms/single/RenderValueById.js +6 -6
- package/es/components/booking/forms/single/index.d.ts +2 -2
- package/es/components/booking/forms/single/index.js +6 -6
- package/es/components/booking/forms/table/index.d.ts +2 -2
- package/es/components/booking/hooks/useClearCart.d.ts +1 -2
- package/es/components/booking/hooks/useClearCart.js +6 -6
- package/es/components/booking/index.js +5 -5
- package/es/components/booking/info/addServiceVariant/index.d.ts +2 -2
- package/es/components/booking/info/addServiceVariant/index.js +7 -7
- package/es/components/booking/info/client/index.d.ts +1 -1
- package/es/components/booking/info/client/index.js +14 -14
- package/es/components/booking/info/client/serve.js +2 -2
- package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +2 -2
- package/es/components/booking/info/clientVariant/hooks/useClientFn.js +23 -24
- package/es/components/booking/info/clientVariant/vertical/SelectDrawer.js +13 -14
- package/es/components/booking/info/clientVariant/vertical/index.js +51 -52
- package/es/components/booking/info/date/index.d.ts +2 -2
- package/es/components/booking/info/date/index.js +7 -7
- package/es/components/booking/info/header/index.d.ts +2 -2
- package/es/components/booking/info/header/index.js +15 -15
- package/es/components/booking/info/index.d.ts +2 -2
- package/es/components/booking/info/index.js +2 -2
- package/es/components/booking/info/main.js +22 -21
- package/es/components/booking/info/model.js +5 -5
- package/es/components/booking/info/notes/index.d.ts +2 -2
- package/es/components/booking/info/notes/index.js +7 -7
- package/es/components/booking/info/pet/index.d.ts +1 -1
- package/es/components/booking/info/pet/index.js +51 -56
- package/es/components/booking/info/service/actions/index.d.ts +2 -2
- package/es/components/booking/info/service/actions/index.js +4 -4
- package/es/components/booking/info/service/addService/index.d.ts +2 -2
- package/es/components/booking/info/service/addService/index.js +23 -23
- package/es/components/booking/info/service/addService/utils.js +8 -8
- package/es/components/booking/info/service/addTimeModal/index.d.ts +2 -2
- package/es/components/booking/info/service/addTimeModal/index.js +28 -28
- package/es/components/booking/info/service/addTimeModal/serve.js +2 -2
- package/es/components/booking/info/service/addTimeModal/utils.js +5 -5
- package/es/components/booking/info/service/editService/index.js +33 -33
- package/es/components/booking/info/service/index.d.ts +1 -1
- package/es/components/booking/info/service/index.js +5 -5
- package/es/components/booking/info/service/like/index.d.ts +2 -2
- package/es/components/booking/info/service/like/index.js +1 -1
- package/es/components/booking/info/service/serve.js +2 -2
- package/es/components/booking/info/service/serviceItem/index.d.ts +1 -2
- package/es/components/booking/info/service/serviceItem/index.js +3 -3
- package/es/components/booking/info/service/serviceList/index.d.ts +2 -2
- package/es/components/booking/info/service/serviceList/index.js +8 -8
- package/es/components/booking/info/utils.js +1 -1
- package/es/components/booking/info2/index.js +26 -25
- package/es/components/booking/info2/serve.js +2 -2
- package/es/components/booking/info2/service/actions/index.d.ts +2 -2
- package/es/components/booking/info2/service/actions/index.js +9 -9
- package/es/components/booking/info2/service/addService/index.d.ts +2 -2
- package/es/components/booking/info2/service/addService/index.js +19 -19
- package/es/components/booking/info2/service/addService/utils.js +19 -20
- package/es/components/booking/info2/service/addTimeModal/index.d.ts +2 -2
- package/es/components/booking/info2/service/addTimeModal/index.js +31 -31
- package/es/components/booking/info2/service/addTimeModal/serve.js +2 -2
- package/es/components/booking/info2/service/addTimeModal/utils.js +7 -7
- package/es/components/booking/info2/service/editService/Capacity/index.js +7 -7
- package/es/components/booking/info2/service/editService/Resources/index.js +19 -19
- package/es/components/booking/info2/service/editService/index.js +26 -27
- package/es/components/booking/info2/service/editService/utils.js +5 -5
- package/es/components/booking/info2/service/index.d.ts +1 -1
- package/es/components/booking/info2/service/index.js +5 -5
- package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -2
- package/es/components/booking/info2/service/serviceItem/index.js +7 -8
- package/es/components/booking/info2/service/serviceList/index.d.ts +2 -2
- package/es/components/booking/info2/service/serviceList/index.js +6 -6
- package/es/components/booking/info2/utilsByBooking.js +12 -12
- package/es/components/booking/materiels/contacts/index.d.ts +1 -2
- package/es/components/booking/materiels/contacts/index.js +7 -6
- package/es/components/booking/materiels/duration/index.d.ts +2 -2
- package/es/components/booking/materiels/duration/index.js +2 -2
- package/es/components/booking/materiels/resources/index.js +8 -8
- package/es/components/booking/materiels/startTime/index.d.ts +2 -2
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/mock.js +5 -5
- package/es/components/booking/model.js +5 -5
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +2 -2
- package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
- package/es/components/booking/notes/NoteBlock/index.d.ts +2 -2
- package/es/components/booking/notes/NoteBlock/index.js +11 -11
- package/es/components/booking/notes/addNote/index.d.ts +2 -2
- package/es/components/booking/notes/addNote/index.js +1 -1
- package/es/components/booking/notes/index.js +17 -17
- package/es/components/booking/notes/model.js +5 -5
- package/es/components/booking/payments/index.js +7 -7
- package/es/components/booking/payments/model.js +5 -5
- package/es/components/booking/utils.js +6 -6
- package/es/components/eftpos/const.js +15 -12
- package/es/components/eftpos/device.d.ts +1 -1
- package/es/components/eftpos/deviceList/index.d.ts +2 -2
- package/es/components/eftpos/deviceList/index.js +7 -7
- package/es/components/eftpos/form/index.d.ts +2 -2
- package/es/components/eftpos/form/index.js +1 -1
- package/es/components/eftpos/group/index.d.ts +3 -3
- package/es/components/eftpos/group/index.js +1 -1
- package/es/components/eftpos/hooks.js +3 -3
- package/es/components/eftpos/icon/apiKey.d.ts +2 -2
- package/es/components/eftpos/icon/device.d.ts +2 -2
- package/es/components/eftpos/index.d.ts +1 -2
- package/es/components/eftpos/index.js +13 -12
- package/es/components/eftpos/log.d.ts +2 -2
- package/es/components/eftpos/log.js +1 -1
- package/es/components/eftpos/pos.d.ts +2 -2
- package/es/components/eftpos/receipt/index.d.ts +2 -2
- package/es/components/eftpos/receipt/index.js +5 -6
- package/es/components/eftpos/surcharge/index.d.ts +2 -2
- package/es/components/eftpos/surcharge/index.js +7 -8
- package/es/components/eftpos/table.js +8 -8
- package/es/components/eftposPay/amount.d.ts +3 -3
- package/es/components/eftposPay/amount.js +1 -1
- package/es/components/eftposPay/app.d.ts +2 -2
- package/es/components/eftposPay/app.js +6 -6
- package/es/components/eftposPay/component/alert/index.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +2 -2
- package/es/components/eftposPay/component/fail/failCustom.d.ts +2 -2
- package/es/components/eftposPay/component/fail/index.d.ts +2 -2
- package/es/components/eftposPay/component/fail/index.js +2 -2
- package/es/components/eftposPay/component/fail/network.d.ts +2 -2
- package/es/components/eftposPay/component/fail/network.js +1 -1
- package/es/components/eftposPay/component/fail/unknow.d.ts +2 -2
- package/es/components/eftposPay/component/header/index.d.ts +1 -1
- package/es/components/eftposPay/component/header/index.js +0 -4
- package/es/components/eftposPay/component/header/titlebar.d.ts +2 -2
- package/es/components/eftposPay/component/header/titlebar.js +3 -3
- package/es/components/eftposPay/component/manual/index.d.ts +2 -2
- package/es/components/eftposPay/component/manual/index.js +6 -6
- package/es/components/eftposPay/component/signature/index.d.ts +2 -2
- package/es/components/eftposPay/component/signature/index.js +1 -1
- package/es/components/eftposPay/component/step/index.d.ts +2 -2
- package/es/components/eftposPay/component/step/step.d.ts +2 -2
- package/es/components/eftposPay/const.js +32 -32
- package/es/components/eftposPay/device.d.ts +3 -3
- package/es/components/eftposPay/device.js +8 -8
- package/es/components/eftposPay/helper.js +10 -10
- package/es/components/eftposPay/hooks.js +5 -18
- package/es/components/eftposPay/index.d.ts +1 -2
- package/es/components/eftposPay/index.js +13 -12
- package/es/components/eftposPay/pay.d.ts +2 -2
- package/es/components/eftposPay/payo/config.d.ts +2 -3
- package/es/components/eftposPay/payo/config.js +12 -12
- package/es/components/eftposPay/payo/const.js +5 -5
- package/es/components/eftposPay/payo/hooks.js +7 -7
- package/es/components/eftposPay/payo/index.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eftposPay/store/index.js +9 -10
- package/es/components/eftposPay/store/useThunkReducer.js +1 -1
- package/es/components/eftposPay/tip.d.ts +2 -2
- package/es/components/eftposPay/tip.js +6 -6
- package/es/components/eftposPay/tyro/const.js +5 -5
- package/es/components/eftposPay/tyro/hooks.js +1 -1
- package/es/components/eftposPay/tyro/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/index.js +15 -17
- package/es/components/eftposPay/windcave/const.js +13 -13
- package/es/components/eftposPay/windcave/helper.js +14 -16
- package/es/components/eftposPay/windcave/receiptAction.d.ts +3 -3
- package/es/components/eftposPay/windcave/receiptAction.js +6 -8
- package/es/components/eftposPay/windcave/timer.js +7 -7
- package/es/components/eftposPay/windcave/windcave.d.ts +2 -2
- package/es/components/eftposPay/windcave/windcave.js +72 -39
- package/es/components/index.d.ts +4 -2
- package/es/components/index.js +4 -2
- package/es/components/listComponent/index.js +5 -5
- package/es/components/login/index.d.ts +1 -2
- package/es/components/login/index.js +16 -9
- package/es/components/login/locales.d.ts +24 -0
- package/es/components/login/locales.js +23 -0
- package/es/components/pay/toC/PaymentList/index.js +19 -15
- package/es/components/pay/toC/PaymentList/serve.js +6 -6
- package/es/components/pay/toC/PaymentList/status.js +5 -6
- package/es/components/pay/toC/PaymentMethods/ApplePay/index.js +8 -8
- package/es/components/pay/toC/PaymentMethods/BankDeposit/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/CashManual/index.js +6 -6
- package/es/components/pay/toC/PaymentMethods/CashManual/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/CustomPayment/index.js +6 -6
- package/es/components/pay/toC/PaymentMethods/CustomPayment/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.js +6 -6
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.js +6 -6
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/index.js +2 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.js +6 -6
- package/es/components/pay/toC/PaymentMethods/GooglePay/index.js +8 -8
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +6 -4
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/List/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +2 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.js +13 -10
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.js +9 -9
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +9 -9
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/index.js +3 -3
- package/es/components/pay/toC/PaymentMethods/OfflinePayment/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/DynamicSDK.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.js +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.js +3 -3
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/StripePay/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/StripePay/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.js +6 -6
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +4 -4
- package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.js +6 -6
- package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +5 -5
- package/es/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +1 -1
- package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +8 -8
- package/es/components/pay/toC/PaymentMethods/WalletPass/serve.js +2 -2
- package/es/components/pay/toC/PaymentMethods/index.js +10 -10
- package/es/components/pay/toC/WalletPassBlock/index.d.ts +1 -1
- package/es/components/pay/toC/WalletPassBlock/index.js +9 -9
- package/es/components/pay/toC/index.js +30 -30
- package/es/components/pay/toC/model.js +5 -5
- package/es/components/pay/toC/payGroup.js +5 -5
- package/es/components/pay/toC/serve.js +6 -6
- package/es/components/pay/toC/status.js +5 -5
- package/es/components/pay/toC/utils.js +2 -2
- package/es/components/pisellSelectCustomerModal/CustomerCard/index.d.ts +1 -1
- package/es/components/pisellSelectCustomerModal/CustomerCard/index.js +1 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.js +6 -6
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.js +5 -5
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/serve.js +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.js +6 -6
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +2 -2
- package/es/components/pisellSelectCustomerModal/RightPanel/index.js +7 -7
- package/es/components/pisellSelectCustomerModal/RightPanel/serve.js +2 -2
- package/es/components/pisellSelectCustomerModal/index.d.ts +1 -2
- package/es/components/pisellSelectCustomerModal/index.js +9 -8
- package/es/components/productExtension/card/index.js +3 -3
- package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +2 -2
- package/es/components/productExtension/fields/Forms/index.d.ts +2 -2
- package/es/components/productExtension/fields/Forms/index.js +12 -12
- package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +2 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +2 -2
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
- package/es/components/productExtension/fields/SelectProducts/index.d.ts +2 -2
- package/es/components/productExtension/fields/SelectProducts/index.js +3 -3
- package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +2 -2
- package/es/components/productExtension/fields/SelectResourcesTable/index.js +9 -9
- package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
- package/es/components/productExtension/index.d.ts +1 -2
- package/es/components/productExtension/index.js +9 -8
- package/es/components/productExtension/server.js +2 -2
- package/es/components/ruleSetting/index.d.ts +1 -2
- package/es/components/ruleSetting/index.js +11 -10
- package/es/components/ruleSetting/ruleBorder/index.d.ts +2 -2
- package/es/components/ruleSetting/ruleBorder/index.js +1 -1
- package/es/components/ruleSetting/server.js +6 -6
- package/es/components/schedules/calendar/calendarItem.d.ts +2 -2
- package/es/components/schedules/calendar/index.d.ts +2 -2
- package/es/components/schedules/calendar/index.js +4 -4
- package/es/components/schedules/calendar/serve.js +2 -2
- package/es/components/schedules/components/Card/index.d.ts +1 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +2 -2
- package/es/components/schedules/components/CurrentDay/index.js +5 -5
- package/es/components/schedules/components/CurrentDay/serve.js +2 -2
- package/es/components/schedules/components/DropdownSort/index.js +1 -1
- package/es/components/schedules/components/ResourceList/index.d.ts +1 -1
- package/es/components/schedules/components/ResourceList/index.js +1 -1
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +2 -2
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +2 -2
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.js +2 -2
- package/es/components/schedules/components/ScheduleList/index.d.ts +2 -2
- package/es/components/schedules/components/Search/index.d.ts +1 -1
- package/es/components/schedules/components/Search/index.js +5 -5
- package/es/components/schedules/hooks/useSchedulesDataSource.js +1 -1
- package/es/components/schedules/index.js +12 -11
- package/es/components/schedules/model.js +5 -5
- package/es/components/schedules/openHours/index.js +1 -1
- package/es/components/schedules/openHours/serve.js +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.js +14 -14
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +2 -2
- package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
- package/es/components/schedules/products/index.d.ts +2 -2
- package/es/components/schedules/products/list/ProductItem/index.d.ts +2 -2
- package/es/components/schedules/products/list/index.d.ts +2 -2
- package/es/components/schedules/products/list/index.js +6 -6
- package/es/components/schedules/products/serve.js +2 -2
- package/es/components/schedules/products/utils.js +5 -5
- package/es/components/schedules/resources/add/index.js +3 -3
- package/es/components/schedules/resources/detail/detailContent.js +2 -2
- package/es/components/schedules/resources/detail/index.js +10 -10
- package/es/components/schedules/resources/edit/index.js +3 -3
- package/es/components/schedules/resources/index.d.ts +2 -2
- package/es/components/schedules/resources/index.js +13 -13
- package/es/components/schedules/resources/list/index.d.ts +2 -2
- package/es/components/schedules/resources/list/index.js +2 -2
- package/es/components/schedules/resources/relationProduct/index.d.ts +2 -2
- package/es/components/schedules/resources/relationProduct/index.js +1 -1
- package/es/components/schedules/resources/serve.js +2 -2
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +2 -2
- package/es/components/schedules/schedules/AllSchedules/index.js +1 -1
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +2 -2
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
- package/es/components/schedules/schedules/Schedules.d.ts +1 -1
- package/es/components/schedules/schedules/SchedulesForDay/index.d.ts +1 -1
- package/es/components/schedules/schedules/index.d.ts +2 -2
- package/es/components/schedules/schedules/index.js +8 -8
- package/es/components/schedules/schedules/serve.js +2 -2
- package/es/components/schedules/schedules/utils.js +8 -8
- package/es/components/schedules/utils.js +4 -4
- package/es/components/selectModal/index.js +2 -2
- package/es/components/tabProduct/index.d.ts +1 -1
- package/es/components/tabProduct/index.js +5 -6
- package/es/components/tabProduct/tabs/index.js +5 -1
- package/es/components/taxSelect/index.d.ts +1 -2
- package/es/components/taxSelect/index.js +6 -5
- package/es/components/wallet/Detail/index.d.ts +42 -0
- package/es/components/wallet/Detail/index.js +956 -0
- package/es/components/wallet/Detail/index.less +375 -0
- package/es/components/wallet/Detail/locales.d.ts +96 -0
- package/es/components/wallet/Detail/locales.js +104 -0
- package/es/components/wallet/Detail/model.d.ts +13 -0
- package/es/components/wallet/Detail/model.js +22 -0
- package/es/components/wallet/Detail/serve.d.ts +39 -0
- package/es/components/wallet/Detail/serve.js +60 -0
- package/es/components/wallet/DetailContext.d.ts +25 -0
- package/es/components/wallet/DetailContext.js +162 -0
- package/es/components/wallet/DiscountCard/index.d.ts +3 -0
- package/es/components/wallet/DiscountCard/index.js +218 -0
- package/es/components/wallet/DiscountCard/index.less +10 -0
- package/es/components/wallet/DiscountCard/model.d.ts +14 -0
- package/es/components/wallet/DiscountCard/model.js +22 -0
- package/es/components/wallet/PointCard/index.d.ts +3 -0
- package/es/components/wallet/PointCard/index.js +169 -0
- package/es/components/wallet/PointCard/index.less +10 -0
- package/es/components/wallet/PointCard/model.d.ts +13 -0
- package/es/components/wallet/PointCard/model.js +22 -0
- package/es/components/wallet/RechargeableCard/index.d.ts +13 -0
- package/es/components/wallet/RechargeableCard/index.js +463 -5
- package/es/components/wallet/RechargeableCard/index.less +112 -0
- package/es/components/wallet/RechargeableCard/model.d.ts +29 -0
- package/es/components/wallet/RechargeableCard/model.js +28 -0
- package/es/components/wallet/RechargeableCard/serve.d.ts +23 -0
- package/es/components/wallet/RechargeableCard/serve.js +32 -0
- package/es/components/wallet/Voucher/index.d.ts +12 -0
- package/es/components/wallet/Voucher/index.js +129 -0
- package/es/components/wallet/Voucher/index.less +10 -0
- package/es/components/wallet/Voucher/locales.d.ts +21 -0
- package/es/components/wallet/Voucher/locales.js +20 -0
- package/es/components/wallet/Voucher/model.d.ts +13 -0
- package/es/components/wallet/Voucher/model.js +22 -0
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +18 -0
- package/es/components/wallet/components/FooterButtons/index.js +81 -0
- package/es/components/wallet/components/FooterButtons/index.less +91 -0
- package/es/components/wallet/components/WalletBar/index.d.ts +8 -0
- package/es/components/wallet/components/WalletBar/index.js +19 -0
- package/es/components/wallet/components/WalletBar/index.less +36 -0
- package/es/components/wallet/components/WalletCard.d.ts +11 -0
- package/es/components/wallet/components/WalletCard.js +81 -0
- package/es/components/wallet/components/index.d.ts +2 -0
- package/es/components/wallet/components/index.js +3 -0
- package/es/components/wallet/hooks/useWalletCard.d.ts +33 -0
- package/es/components/wallet/hooks/useWalletCard.js +147 -0
- package/es/components/wallet/index.d.ts +10 -0
- package/es/components/wallet/index.js +745 -0
- package/es/components/wallet/index.less +155 -0
- package/es/components/wallet/locales.d.ts +129 -0
- package/es/components/wallet/locales.js +136 -0
- package/es/components/wallet/model.d.ts +37 -0
- package/es/components/wallet/model.js +86 -0
- package/es/components/wallet/serve.d.ts +143 -0
- package/es/components/wallet/serve.js +205 -0
- package/es/components/wallet/utils/formatUtils.d.ts +36 -0
- package/es/components/wallet/utils/formatUtils.js +73 -0
- package/es/components/walletList/index.d.ts +28 -0
- package/es/components/walletList/index.js +770 -0
- package/es/components/walletList/index.less +367 -0
- package/es/components/walletList/model.d.ts +6 -0
- package/es/components/walletList/model.js +59 -0
- package/es/components/walletList/serve.d.ts +12 -0
- package/es/components/walletList/serve.js +69 -0
- package/es/components/walletList/types/index.d.ts +194 -0
- package/es/components/walletList/types/index.js +49 -0
- package/es/components/workSpaceList/components/AppearanceEdit/Color.js +4 -4
- package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.js +4 -4
- package/es/components/workSpaceList/components/AppearanceEdit/constants.js +5 -5
- package/es/components/workSpaceList/components/AppearanceEdit/index.js +2 -2
- package/es/components/workSpaceList/components/Card/index.js +8 -9
- package/es/components/workSpaceList/components/CardList/index.js +1 -1
- package/es/components/workSpaceList/components/CreateBaseModal/index.js +2 -2
- package/es/components/workSpaceList/components/EditableString/index.js +3 -3
- package/es/components/workSpaceList/components/Modal/antdConfirmPromise.js +6 -6
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -2
- package/es/components/workSpaceList/components/Modal/index.js +5 -5
- package/es/components/workSpaceList/components/SearchBar/index.js +9 -9
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -2
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +4 -4
- package/es/components/workSpaceList/components/Sort/index.js +2 -3
- package/es/components/workSpaceList/components/WorkspaceItem/index.js +6 -8
- package/es/components/workSpaceList/index.js +11 -11
- package/es/components/workSpaceList/server.js +2 -2
- package/es/components/workSpaceListDetail/index.js +11 -11
- package/es/components/workSpaceListDetail/server.js +6 -6
- package/es/hooks/useComponents.js +1 -1
- package/es/hooks/usePrefix.js +4 -4
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/utils/index.js +6 -6
- package/es/utils/locales.d.ts +1 -0
- package/es/utils/locales.js +3 -0
- package/lib/components/booking/components/TabProduct/index.d.ts +2 -2
- package/lib/components/booking/components/TabProduct/productItem/index.d.ts +2 -2
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +2 -2
- package/lib/components/booking/components/authWrap/index.d.ts +1 -1
- package/lib/components/booking/components/browserSelect/index.d.ts +1 -1
- package/lib/components/booking/components/collapsibleList/utils.d.ts +2 -2
- package/lib/components/booking/components/drawer/index.d.ts +1 -1
- package/lib/components/booking/components/emptyBooking/index.d.ts +2 -2
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +2 -2
- package/lib/components/booking/components/footer/amount.js +4 -8
- package/lib/components/booking/components/footer/index.d.ts +2 -2
- package/lib/components/booking/components/footer/utils.js +29 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +2 -2
- package/lib/components/booking/components/menuButton/index.d.ts +1 -1
- package/lib/components/booking/dashboard/index.d.ts +1 -1
- package/lib/components/booking/dashboard/index.js +2 -1
- package/lib/components/booking/deposit/ClientItem/index.d.ts +1 -1
- package/lib/components/booking/deposit/DepositItem/index.d.ts +1 -1
- package/lib/components/booking/deposit/index.d.ts +2 -2
- package/lib/components/booking/deposit/index.js +5 -10
- package/lib/components/booking/forms/single/index.d.ts +2 -2
- package/lib/components/booking/forms/table/index.d.ts +2 -2
- package/lib/components/booking/hooks/useClearCart.d.ts +1 -2
- package/lib/components/booking/info/addServiceVariant/index.d.ts +2 -2
- package/lib/components/booking/info/client/index.d.ts +1 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +2 -2
- package/lib/components/booking/info/date/index.d.ts +2 -2
- package/lib/components/booking/info/header/index.d.ts +2 -2
- package/lib/components/booking/info/index.d.ts +2 -2
- package/lib/components/booking/info/main.js +2 -1
- package/lib/components/booking/info/notes/index.d.ts +2 -2
- package/lib/components/booking/info/pet/index.d.ts +1 -1
- package/lib/components/booking/info/pet/index.js +1 -2
- package/lib/components/booking/info/service/actions/index.d.ts +2 -2
- package/lib/components/booking/info/service/addService/index.d.ts +2 -2
- package/lib/components/booking/info/service/addService/index.js +1 -2
- package/lib/components/booking/info/service/addTimeModal/index.d.ts +2 -2
- package/lib/components/booking/info/service/index.d.ts +1 -1
- package/lib/components/booking/info/service/like/index.d.ts +2 -2
- package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -2
- package/lib/components/booking/info/service/serviceList/index.d.ts +2 -2
- package/lib/components/booking/info/utils.js +1 -1
- package/lib/components/booking/info2/index.js +2 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +2 -2
- package/lib/components/booking/info2/service/addService/index.d.ts +2 -2
- package/lib/components/booking/info2/service/addService/index.js +1 -2
- package/lib/components/booking/info2/service/addTimeModal/index.d.ts +2 -2
- package/lib/components/booking/info2/service/index.d.ts +1 -1
- package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -2
- package/lib/components/booking/info2/service/serviceList/index.d.ts +2 -2
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -2
- package/lib/components/booking/materiels/contacts/index.js +2 -1
- package/lib/components/booking/materiels/duration/index.d.ts +2 -2
- package/lib/components/booking/materiels/startTime/index.d.ts +2 -2
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +2 -2
- package/lib/components/booking/notes/NoteBlock/index.d.ts +2 -2
- package/lib/components/booking/notes/addNote/index.d.ts +2 -2
- package/lib/components/booking/utils.js +1 -1
- package/lib/components/eftpos/device.d.ts +1 -1
- package/lib/components/eftpos/deviceList/index.d.ts +2 -2
- package/lib/components/eftpos/form/index.d.ts +2 -2
- package/lib/components/eftpos/group/index.d.ts +3 -3
- package/lib/components/eftpos/icon/apiKey.d.ts +2 -2
- package/lib/components/eftpos/icon/device.d.ts +2 -2
- package/lib/components/eftpos/index.d.ts +1 -2
- package/lib/components/eftpos/index.js +2 -1
- package/lib/components/eftpos/log.d.ts +2 -2
- package/lib/components/eftpos/pos.d.ts +2 -2
- package/lib/components/eftpos/receipt/index.d.ts +2 -2
- package/lib/components/eftpos/surcharge/index.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +3 -3
- package/lib/components/eftposPay/app.d.ts +2 -2
- package/lib/components/eftposPay/component/alert/index.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +2 -2
- package/lib/components/eftposPay/component/fail/failCustom.d.ts +2 -2
- package/lib/components/eftposPay/component/fail/index.d.ts +2 -2
- package/lib/components/eftposPay/component/fail/network.d.ts +2 -2
- package/lib/components/eftposPay/component/fail/unknow.d.ts +2 -2
- package/lib/components/eftposPay/component/header/index.d.ts +1 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +2 -2
- package/lib/components/eftposPay/component/manual/index.d.ts +2 -2
- package/lib/components/eftposPay/component/signature/index.d.ts +2 -2
- package/lib/components/eftposPay/component/step/index.d.ts +2 -2
- package/lib/components/eftposPay/component/step/step.d.ts +2 -2
- package/lib/components/eftposPay/device.d.ts +3 -3
- package/lib/components/eftposPay/helper.js +6 -12
- package/lib/components/eftposPay/index.d.ts +1 -2
- package/lib/components/eftposPay/index.js +2 -1
- package/lib/components/eftposPay/pay.d.ts +2 -2
- package/lib/components/eftposPay/payo/config.d.ts +2 -3
- package/lib/components/eftposPay/payo/index.d.ts +1 -1
- package/lib/components/eftposPay/payo/index.js +1 -2
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eftposPay/tip.d.ts +2 -2
- package/lib/components/eftposPay/tyro/index.d.ts +1 -1
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +3 -3
- package/lib/components/eftposPay/windcave/timer.js +8 -3
- package/lib/components/eftposPay/windcave/windcave.d.ts +2 -2
- package/lib/components/eftposPay/windcave/windcave.js +28 -11
- package/lib/components/index.d.ts +4 -2
- package/lib/components/index.js +8 -2
- package/lib/components/login/index.d.ts +1 -2
- package/lib/components/login/index.js +14 -7
- package/lib/components/login/locales.d.ts +24 -0
- package/lib/components/login/locales.js +47 -0
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/Add/index.js +1 -2
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +2 -2
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +2 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +2 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -2
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +2 -2
- package/lib/components/pay/toC/PaymentMethods/WalletPass/MultiModeSearch/index.d.ts +1 -1
- package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +3 -6
- package/lib/components/pay/toC/WalletPassBlock/index.d.ts +1 -1
- package/lib/components/pisellSelectCustomerModal/CustomerCard/index.d.ts +1 -1
- package/lib/components/pisellSelectCustomerModal/CustomerCard/index.js +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +2 -2
- package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -2
- package/lib/components/pisellSelectCustomerModal/index.js +2 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +2 -2
- package/lib/components/productExtension/fields/Forms/index.d.ts +2 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +2 -2
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +2 -2
- package/lib/components/productExtension/fields/SelectProducts/index.d.ts +2 -2
- package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +2 -2
- package/lib/components/productExtension/index.d.ts +1 -2
- package/lib/components/productExtension/index.js +2 -1
- package/lib/components/ruleSetting/index.d.ts +1 -2
- package/lib/components/ruleSetting/index.js +2 -1
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +2 -2
- package/lib/components/schedules/calendar/calendarItem.d.ts +2 -2
- package/lib/components/schedules/calendar/index.d.ts +2 -2
- package/lib/components/schedules/components/Card/index.d.ts +1 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +2 -2
- package/lib/components/schedules/components/ResourceList/index.d.ts +1 -1
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +2 -2
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +2 -2
- package/lib/components/schedules/components/ScheduleList/index.d.ts +2 -2
- package/lib/components/schedules/components/Search/index.d.ts +1 -1
- package/lib/components/schedules/index.js +3 -3
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +2 -2
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +2 -2
- package/lib/components/schedules/products/index.d.ts +2 -2
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +2 -2
- package/lib/components/schedules/products/list/index.d.ts +2 -2
- package/lib/components/schedules/resources/index.d.ts +2 -2
- package/lib/components/schedules/resources/list/index.d.ts +2 -2
- package/lib/components/schedules/resources/relationProduct/index.d.ts +2 -2
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +2 -2
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +2 -2
- package/lib/components/schedules/schedules/Schedules.d.ts +1 -1
- package/lib/components/schedules/schedules/SchedulesForDay/index.d.ts +1 -1
- package/lib/components/schedules/schedules/index.d.ts +2 -2
- package/lib/components/schedules/schedules/index.js +1 -2
- package/lib/components/schedules/schedules/utils.js +1 -2
- package/lib/components/schedules/utils.js +1 -1
- package/lib/components/tabProduct/index.d.ts +1 -1
- package/lib/components/taxSelect/index.d.ts +1 -2
- package/lib/components/taxSelect/index.js +2 -1
- package/lib/components/wallet/Detail/index.d.ts +42 -0
- package/lib/components/wallet/Detail/index.js +709 -0
- package/lib/components/wallet/Detail/index.less +375 -0
- package/lib/components/wallet/Detail/locales.d.ts +96 -0
- package/lib/components/wallet/Detail/locales.js +128 -0
- package/lib/components/wallet/Detail/model.d.ts +13 -0
- package/lib/components/wallet/Detail/model.js +43 -0
- package/lib/components/wallet/Detail/serve.d.ts +39 -0
- package/lib/components/wallet/Detail/serve.js +39 -0
- package/lib/components/wallet/DetailContext.d.ts +25 -0
- package/lib/components/wallet/DetailContext.js +118 -0
- package/lib/components/wallet/DiscountCard/index.d.ts +3 -0
- package/lib/components/wallet/DiscountCard/index.js +209 -0
- package/lib/components/wallet/DiscountCard/index.less +10 -0
- package/lib/components/wallet/DiscountCard/model.d.ts +14 -0
- package/lib/components/wallet/DiscountCard/model.js +43 -0
- package/lib/components/wallet/PointCard/index.d.ts +3 -0
- package/lib/components/wallet/PointCard/index.js +190 -0
- package/lib/components/wallet/PointCard/index.less +10 -0
- package/lib/components/wallet/PointCard/model.d.ts +13 -0
- package/lib/components/wallet/PointCard/model.js +43 -0
- package/lib/components/wallet/RechargeableCard/index.d.ts +13 -0
- package/lib/components/wallet/RechargeableCard/index.js +378 -4
- package/lib/components/wallet/RechargeableCard/index.less +112 -0
- package/lib/components/wallet/RechargeableCard/model.d.ts +29 -0
- package/lib/components/wallet/RechargeableCard/model.js +49 -0
- package/lib/components/wallet/RechargeableCard/serve.d.ts +23 -0
- package/lib/components/wallet/RechargeableCard/serve.js +33 -0
- package/lib/components/wallet/Voucher/index.d.ts +12 -0
- package/lib/components/wallet/Voucher/index.js +145 -0
- package/lib/components/wallet/Voucher/index.less +10 -0
- package/lib/components/wallet/Voucher/locales.d.ts +21 -0
- package/lib/components/wallet/Voucher/locales.js +44 -0
- package/lib/components/wallet/Voucher/model.d.ts +13 -0
- package/lib/components/wallet/Voucher/model.js +43 -0
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +18 -0
- package/lib/components/wallet/components/FooterButtons/index.js +109 -0
- package/lib/components/wallet/components/FooterButtons/index.less +91 -0
- package/lib/components/wallet/components/WalletBar/index.d.ts +8 -0
- package/lib/components/wallet/components/WalletBar/index.js +49 -0
- package/lib/components/wallet/components/WalletBar/index.less +36 -0
- package/lib/components/wallet/components/WalletCard.d.ts +11 -0
- package/lib/components/wallet/components/WalletCard.js +91 -0
- package/lib/components/wallet/components/index.d.ts +2 -0
- package/lib/components/wallet/components/index.js +42 -0
- package/lib/components/wallet/hooks/useWalletCard.d.ts +33 -0
- package/lib/components/wallet/hooks/useWalletCard.js +111 -0
- package/lib/components/wallet/index.d.ts +10 -0
- package/lib/components/wallet/index.js +541 -0
- package/lib/components/wallet/index.less +155 -0
- package/lib/components/wallet/locales.d.ts +129 -0
- package/lib/components/wallet/locales.js +160 -0
- package/lib/components/wallet/model.d.ts +37 -0
- package/lib/components/wallet/model.js +91 -0
- package/lib/components/wallet/serve.d.ts +143 -0
- package/lib/components/wallet/serve.js +85 -0
- package/lib/components/wallet/utils/formatUtils.d.ts +36 -0
- package/lib/components/wallet/utils/formatUtils.js +73 -0
- package/lib/components/walletList/index.d.ts +28 -0
- package/lib/components/walletList/index.js +520 -0
- package/lib/components/walletList/index.less +367 -0
- package/lib/components/walletList/model.d.ts +6 -0
- package/lib/components/walletList/model.js +72 -0
- package/lib/components/walletList/serve.d.ts +12 -0
- package/lib/components/walletList/serve.js +47 -0
- package/lib/components/walletList/types/index.d.ts +194 -0
- package/lib/components/walletList/types/index.js +42 -0
- package/lib/components/workSpaceList/components/Card/index.js +1 -2
- package/lib/components/workSpaceList/components/EditableString/index.js +1 -2
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -2
- package/lib/components/workSpaceList/components/SearchBar/index.js +3 -6
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -2
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.js +1 -2
- package/lib/components/workSpaceList/components/WorkspaceItem/index.js +0 -5
- package/lib/components/workSpaceList/index.js +2 -4
- package/lib/components/workSpaceListDetail/index.js +2 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.js +7 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/locales.d.ts +1 -0
- package/lib/utils/locales.js +31 -0
- package/lowcode/wallet/meta.ts +79 -0
- package/lowcode/wallet-list/meta.ts +79 -0
- package/package.json +2 -2
@@ -0,0 +1,956 @@
|
|
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 _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
+
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."); }
|
7
|
+
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); }
|
8
|
+
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; }
|
9
|
+
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; } }
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
+
import React, { useEffect, useMemo, useState, useRef, forwardRef, useImperativeHandle, useCallback, useLayoutEffect } from 'react';
|
12
|
+
import { usePisellConfig } from '@pisell/materials';
|
13
|
+
import dayjs from 'dayjs';
|
14
|
+
import XClose from '@pisell/icon/es/XClose';
|
15
|
+
import timezone from 'dayjs/plugin/timezone';
|
16
|
+
// import { isWx, isMobile, isSafari } from '@pisell/utils';
|
17
|
+
import { isMobile, isIos, locales } from '@pisell/utils';
|
18
|
+
import utc from 'dayjs/plugin/utc';
|
19
|
+
import { ButtonGroupPreview, PisellEmpty, Timeline, PisellAnchor, PisellModal, Typography, PisellStatisticList, Button, PisellToast, Skeleton } from '@pisell/materials';
|
20
|
+
import useEngineContext from "./../../../hooks/useEngineContext";
|
21
|
+
import localeTexts from "./locales";
|
22
|
+
import { getAssetList, getDetailApi } from "./serve";
|
23
|
+
import { request } from "./../../../utils";
|
24
|
+
import { WalletBar, FooterButtons } from "../components";
|
25
|
+
import "./index.less";
|
26
|
+
var Text = Typography.Text;
|
27
|
+
|
28
|
+
// 为Web PKI API添加TypeScript声明
|
29
|
+
|
30
|
+
dayjs.extend(timezone);
|
31
|
+
dayjs.extend(utc);
|
32
|
+
var Detail = /*#__PURE__*/forwardRef(function (props, ref) {
|
33
|
+
var _context$appHelper, _utils$getStore, _dvaStore$core, _context$appHelper2, _store$getState, _detail$machinecode_c;
|
34
|
+
var _props$detail = props.detail,
|
35
|
+
detail = _props$detail === void 0 ? {} : _props$detail,
|
36
|
+
_props$buttonGroupLis = props.buttonGroupList,
|
37
|
+
buttonGroupList = _props$buttonGroupLis === void 0 ? [[]] : _props$buttonGroupLis,
|
38
|
+
className = props.className,
|
39
|
+
_props$showWalletBar = props.showWalletBar,
|
40
|
+
showWalletBar = _props$showWalletBar === void 0 ? false : _props$showWalletBar,
|
41
|
+
onBack = props.onBack;
|
42
|
+
|
43
|
+
// 直接从detail对象中解构这些属性可能是问题所在,它们可能不会正确传递
|
44
|
+
// 将它们作为独立属性来处理,避免嵌套解构导致的问题
|
45
|
+
var _detail$code = detail.code,
|
46
|
+
code = _detail$code === void 0 ? '' : _detail$code,
|
47
|
+
_detail$tag = detail.tag,
|
48
|
+
tag = _detail$tag === void 0 ? '' : _detail$tag,
|
49
|
+
_detail$product_title = detail.product_title,
|
50
|
+
product_title = _detail$product_title === void 0 ? '' : _detail$product_title,
|
51
|
+
_detail$encoded = detail.encoded,
|
52
|
+
encoded = _detail$encoded === void 0 ? '' : _detail$encoded,
|
53
|
+
balance = detail.balance,
|
54
|
+
_detail$expire_date = detail.expire_date,
|
55
|
+
expire_date = _detail$expire_date === void 0 ? '' : _detail$expire_date,
|
56
|
+
_detail$product = detail.product,
|
57
|
+
product = _detail$product === void 0 ? {} : _detail$product;
|
58
|
+
var _product$description = product.description,
|
59
|
+
description = _product$description === void 0 ? '' : _product$description;
|
60
|
+
var context = useEngineContext();
|
61
|
+
var utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
62
|
+
var dvaStore = utils === null || utils === void 0 || (_utils$getStore = utils.getStore) === null || _utils$getStore === void 0 || (_utils$getStore = _utils$getStore.call(utils)) === null || _utils$getStore === void 0 ? void 0 : _utils$getStore.getState();
|
63
|
+
var _useState = useState([]),
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
65
|
+
TimeLineData = _useState2[0],
|
66
|
+
setTimeLineData = _useState2[1];
|
67
|
+
var _useState3 = useState(false),
|
68
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
69
|
+
isShowtimeLineDetail = _useState4[0],
|
70
|
+
setIsShowtimeLineDetail = _useState4[1];
|
71
|
+
var _useState5 = useState(true),
|
72
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
73
|
+
isSpending = _useState6[0],
|
74
|
+
setIsSpending = _useState6[1];
|
75
|
+
var _useState7 = useState({}),
|
76
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
77
|
+
timeLineDetail = _useState8[0],
|
78
|
+
setTimeLineDetail = _useState8[1];
|
79
|
+
var _useState9 = useState(false),
|
80
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
81
|
+
wechatModalOpen = _useState10[0],
|
82
|
+
setWechatModalOpen = _useState10[1];
|
83
|
+
var _useState11 = useState(''),
|
84
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
85
|
+
copyUrl = _useState12[0],
|
86
|
+
setCopyUrl = _useState12[1];
|
87
|
+
var _useState13 = useState(false),
|
88
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
89
|
+
isLoading = _useState14[0],
|
90
|
+
setIsLoading = _useState14[1];
|
91
|
+
var _useState15 = useState(''),
|
92
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
93
|
+
apple_wallet_url = _useState16[0],
|
94
|
+
setAppleWalletUrl = _useState16[1];
|
95
|
+
var _useState17 = useState(''),
|
96
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
97
|
+
google_wallet_url = _useState18[0],
|
98
|
+
setGoogleWalletUrl = _useState18[1];
|
99
|
+
var stateTimeUnix = 1723255863; //2024.8.10 时间戳
|
100
|
+
|
101
|
+
var _useState19 = useState([]),
|
102
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
103
|
+
listData = _useState20[0],
|
104
|
+
setListData = _useState20[1];
|
105
|
+
var modalContentRef = useRef(null);
|
106
|
+
var tabsRef = useRef();
|
107
|
+
var _useState21 = useState('detail'),
|
108
|
+
_useState22 = _slicedToArray(_useState21, 2),
|
109
|
+
activeTab = _useState22[0],
|
110
|
+
setActiveTab = _useState22[1];
|
111
|
+
var _useState23 = useState(false),
|
112
|
+
_useState24 = _slicedToArray(_useState23, 2),
|
113
|
+
isScrolling = _useState24[0],
|
114
|
+
setIsScrolling = _useState24[1];
|
115
|
+
var isUserClickRef = useRef(false);
|
116
|
+
var scrollTimeoutRef = useRef(null);
|
117
|
+
var _useState25 = useState(false),
|
118
|
+
_useState26 = _slicedToArray(_useState25, 2),
|
119
|
+
addWalletLoading = _useState26[0],
|
120
|
+
setAddWalletLoading = _useState26[1];
|
121
|
+
var _useState27 = useState(false),
|
122
|
+
_useState28 = _slicedToArray(_useState27, 2),
|
123
|
+
isAddingToWallet = _useState28[0],
|
124
|
+
setIsAddingToWallet = _useState28[1];
|
125
|
+
var anchorOptions = useMemo(function () {
|
126
|
+
// 始终包含detail选项
|
127
|
+
var options = [{
|
128
|
+
id: 'detail',
|
129
|
+
name: locales.getText('page.wallet.detail')
|
130
|
+
}];
|
131
|
+
|
132
|
+
// 仅在tag不等于product_discount_card时添加activityLog选项
|
133
|
+
if (tag !== 'product_discount_card') {
|
134
|
+
options.push({
|
135
|
+
id: 'activityLog',
|
136
|
+
name: locales.getText('page.wallet.activelog')
|
137
|
+
});
|
138
|
+
}
|
139
|
+
return options;
|
140
|
+
}, [tag] // 添加tag作为依赖项,当tag变化时重新计算
|
141
|
+
);
|
142
|
+
useImperativeHandle(ref, function () {
|
143
|
+
return {
|
144
|
+
addWalletCard: addWalletCard
|
145
|
+
};
|
146
|
+
});
|
147
|
+
var addWalletCard = function addWalletCard() {
|
148
|
+
if (isIos()) {
|
149
|
+
onAppleClick();
|
150
|
+
} else {
|
151
|
+
onGoogleClick();
|
152
|
+
}
|
153
|
+
};
|
154
|
+
useEffect(function () {
|
155
|
+
var data = [{
|
156
|
+
label: locales.getText('page.wallet.cardName'),
|
157
|
+
value: product_title
|
158
|
+
}, {
|
159
|
+
label: locales.getText('page.wallet.carNumber'),
|
160
|
+
value: encoded,
|
161
|
+
isLink: false
|
162
|
+
}, {
|
163
|
+
label: locales.getText('page.wallet.validDate'),
|
164
|
+
value: expire_date ? expire_date : locales.getText('page.wallet.expireDate')
|
165
|
+
}];
|
166
|
+
//折扣卡显示折扣字段 其他显示余额字段
|
167
|
+
if (tag === 'product_discount_card') {
|
168
|
+
data.splice(2, 0, {
|
169
|
+
label: locales.getText('page.wallet.discount'),
|
170
|
+
value: balance ? "".concat(Number(balance), "%") : ''
|
171
|
+
});
|
172
|
+
} else if (tag === 'point_card') {
|
173
|
+
data.splice(2, 0, {
|
174
|
+
label: locales.getText('page.wallet.points'),
|
175
|
+
value: balance ? "".concat(Number(balance)) : ''
|
176
|
+
});
|
177
|
+
} else {
|
178
|
+
data.splice(2, 0, {
|
179
|
+
label: locales.getText('page.wallet.balance'),
|
180
|
+
value: balance ? "".concat(symbol).concat(Number(balance)) : ''
|
181
|
+
});
|
182
|
+
}
|
183
|
+
setListData(data);
|
184
|
+
}, [detail]);
|
185
|
+
var _usePisellConfig = usePisellConfig(),
|
186
|
+
_usePisellConfig$symb = _usePisellConfig.symbol,
|
187
|
+
symbol = _usePisellConfig$symb === void 0 ? '$' : _usePisellConfig$symb;
|
188
|
+
|
189
|
+
// 注册多语言
|
190
|
+
locales.init(localeTexts, (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
|
191
|
+
// 注册请求
|
192
|
+
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
193
|
+
var _ref = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {
|
194
|
+
store: {}
|
195
|
+
},
|
196
|
+
store = _ref.store;
|
197
|
+
var platform = isMobile() ? 'h5' : 'pc';
|
198
|
+
var timezone = (store === null || store === void 0 || (_store$getState = store.getState) === null || _store$getState === void 0 || (_store$getState = _store$getState.call(store)) === null || _store$getState === void 0 || (_store$getState = _store$getState.global) === null || _store$getState === void 0 || (_store$getState = _store$getState.symbol) === null || _store$getState === void 0 ? void 0 : _store$getState.shop.timezone) || 'Asia/Shanghai';
|
199
|
+
var formatTimeLineDta = function formatTimeLineDta(data) {
|
200
|
+
if (data.length < 0) return [];
|
201
|
+
|
202
|
+
// 过滤掉积分卡的零额记录
|
203
|
+
var filteredData = data.filter(function (item) {
|
204
|
+
return !(item.tag === 'point_card' && (item.amount === '0' || parseFloat(item.amount || '0') === 0));
|
205
|
+
});
|
206
|
+
var formatData = filteredData.map(function (item) {
|
207
|
+
return {
|
208
|
+
children: assetActionEnum[(item === null || item === void 0 ? void 0 : item.action) || ''] ? timeTreeNode(item) : null
|
209
|
+
};
|
210
|
+
});
|
211
|
+
return formatData;
|
212
|
+
};
|
213
|
+
|
214
|
+
// 金额格式化通用函数
|
215
|
+
var formatCurrencyAmount = function formatCurrencyAmount() {
|
216
|
+
var amount = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
217
|
+
var isNegative = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
218
|
+
if (!amount) return '';
|
219
|
+
|
220
|
+
// 移除可能存在的负号
|
221
|
+
var absAmount = amount.startsWith('-') ? amount.substring(1) : amount;
|
222
|
+
|
223
|
+
// 根据isNegative参数决定是否添加负号
|
224
|
+
return isNegative ? "-".concat(tag !== 'point_card' ? symbol : '').concat(absAmount) : "".concat(tag !== 'point_card' ? symbol : '').concat(amount);
|
225
|
+
};
|
226
|
+
var getDetail = /*#__PURE__*/function () {
|
227
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
228
|
+
var _yield$getDetailApi, _yield$getDetailApi$a, apple_wallet_url, _yield$getDetailApi$g, google_wallet_url;
|
229
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
230
|
+
while (1) switch (_context.prev = _context.next) {
|
231
|
+
case 0:
|
232
|
+
_context.next = 2;
|
233
|
+
return getDetailApi({
|
234
|
+
id: detail.id || ''
|
235
|
+
});
|
236
|
+
case 2:
|
237
|
+
_yield$getDetailApi = _context.sent;
|
238
|
+
_yield$getDetailApi$a = _yield$getDetailApi.apple_wallet_url;
|
239
|
+
apple_wallet_url = _yield$getDetailApi$a === void 0 ? '' : _yield$getDetailApi$a;
|
240
|
+
_yield$getDetailApi$g = _yield$getDetailApi.google_wallet_url;
|
241
|
+
google_wallet_url = _yield$getDetailApi$g === void 0 ? '' : _yield$getDetailApi$g;
|
242
|
+
setAppleWalletUrl(apple_wallet_url);
|
243
|
+
setGoogleWalletUrl(google_wallet_url);
|
244
|
+
case 9:
|
245
|
+
case "end":
|
246
|
+
return _context.stop();
|
247
|
+
}
|
248
|
+
}, _callee);
|
249
|
+
}));
|
250
|
+
return function getDetail() {
|
251
|
+
return _ref2.apply(this, arguments);
|
252
|
+
};
|
253
|
+
}();
|
254
|
+
useEffect(function () {
|
255
|
+
if (detail.id) {
|
256
|
+
getDetail();
|
257
|
+
}
|
258
|
+
}, [detail.id]);
|
259
|
+
var timeTreeNode = function timeTreeNode(data) {
|
260
|
+
var _data$action = data.action,
|
261
|
+
action = _data$action === void 0 ? '' : _data$action,
|
262
|
+
_data$created_at = data.created_at,
|
263
|
+
created_at = _data$created_at === void 0 ? '' : _data$created_at,
|
264
|
+
_data$amount = data.amount,
|
265
|
+
amount = _data$amount === void 0 ? '' : _data$amount,
|
266
|
+
_data$currency_symbol = data.currency_symbol,
|
267
|
+
currency_symbol = _data$currency_symbol === void 0 ? '' : _data$currency_symbol;
|
268
|
+
return /*#__PURE__*/React.createElement("div", {
|
269
|
+
className: "wallet-detail-timeline-node"
|
270
|
+
}, /*#__PURE__*/React.createElement("div", {
|
271
|
+
className: "wallet-detail-timeline-node-left"
|
272
|
+
}, /*#__PURE__*/React.createElement("p", {
|
273
|
+
className: "wallet-detail-timeline-node-action"
|
274
|
+
}, action ? assetActionEnum[action] : ''), created_at && /*#__PURE__*/React.createElement("p", {
|
275
|
+
className: "wallet-detail-timeline-node-time"
|
276
|
+
}, created_at, (action === 'recharge' || action === 'order_expend') &&
|
277
|
+
/*#__PURE__*/
|
278
|
+
// @ts-ignore 忽略TypeScript错误,React类型定义问题
|
279
|
+
React.createElement("span", {
|
280
|
+
className: "wallet-detail-timeline-node-detail-link",
|
281
|
+
onClick: function onClick() {
|
282
|
+
setIsShowtimeLineDetail(true);
|
283
|
+
setIsSpending(action === 'order_expend');
|
284
|
+
setTimeLineDetail(data);
|
285
|
+
}
|
286
|
+
}, locales.getText('page.wallet.viewDetails')))), /*#__PURE__*/React.createElement("div", {
|
287
|
+
className: "wallet-detail-timeline-node-amount".concat(action === 'recharge' ? ' wallet-detail-timeline-node-amount-positive' : '').concat(action === 'order_expend' ? ' wallet-detail-timeline-node-amount-negative' : '')
|
288
|
+
}, amount && currency_symbol ? formatCurrencyAmount(amount, action === 'order_expend') : ''));
|
289
|
+
};
|
290
|
+
var getTimeTreeList = /*#__PURE__*/function () {
|
291
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
292
|
+
var _yield$getAssetList, _yield$getAssetList$l, list, filterList, i, _filterList$i, _filterList$i2, _filterList$i3, _filterList$i4;
|
293
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
294
|
+
while (1) switch (_context2.prev = _context2.next) {
|
295
|
+
case 0:
|
296
|
+
setIsLoading(true);
|
297
|
+
_context2.prev = 1;
|
298
|
+
_context2.next = 4;
|
299
|
+
return getAssetList({
|
300
|
+
num: '99',
|
301
|
+
skip: '1',
|
302
|
+
card_id: code,
|
303
|
+
sourceType: tag,
|
304
|
+
tag: tag,
|
305
|
+
business_object: 'customer'
|
306
|
+
});
|
307
|
+
case 4:
|
308
|
+
_yield$getAssetList = _context2.sent;
|
309
|
+
_yield$getAssetList$l = _yield$getAssetList.list;
|
310
|
+
list = _yield$getAssetList$l === void 0 ? [] : _yield$getAssetList$l;
|
311
|
+
//移除掉非指定action的记录
|
312
|
+
filterList = list.filter(function (item) {
|
313
|
+
return !!assetActionEnum[item.action || ''];
|
314
|
+
}); // 如果是消费订单 移除掉2024-8-10之前的数据
|
315
|
+
for (i = filterList.length - 1; i >= 0; i--) {
|
316
|
+
if (((_filterList$i = filterList[i]) === null || _filterList$i === void 0 ? void 0 : _filterList$i.action) === 'order_expend' && dayjs.tz((_filterList$i2 = filterList[i]) === null || _filterList$i2 === void 0 ? void 0 : _filterList$i2.created_at, timezone).unix() < stateTimeUnix) {
|
317
|
+
filterList.splice(i, 1); // 移除当前索引的元素
|
318
|
+
}
|
319
|
+
|
320
|
+
// 如果是积分卡 移除掉2024-8-10之前的数据
|
321
|
+
if (((_filterList$i3 = filterList[i]) === null || _filterList$i3 === void 0 ? void 0 : _filterList$i3.tag) === 'point_card' && dayjs.tz((_filterList$i4 = filterList[i]) === null || _filterList$i4 === void 0 ? void 0 : _filterList$i4.created_at, timezone).unix() < stateTimeUnix) {
|
322
|
+
filterList.splice(i, 1); // 移除当前索引的元素
|
323
|
+
}
|
324
|
+
}
|
325
|
+
setTimeLineData(formatTimeLineDta(filterList));
|
326
|
+
_context2.next = 15;
|
327
|
+
break;
|
328
|
+
case 12:
|
329
|
+
_context2.prev = 12;
|
330
|
+
_context2.t0 = _context2["catch"](1);
|
331
|
+
console.error('Failed to fetch asset list:', _context2.t0);
|
332
|
+
case 15:
|
333
|
+
_context2.prev = 15;
|
334
|
+
setIsLoading(false);
|
335
|
+
return _context2.finish(15);
|
336
|
+
case 18:
|
337
|
+
case "end":
|
338
|
+
return _context2.stop();
|
339
|
+
}
|
340
|
+
}, _callee2, null, [[1, 12, 15, 18]]);
|
341
|
+
}));
|
342
|
+
return function getTimeTreeList() {
|
343
|
+
return _ref3.apply(this, arguments);
|
344
|
+
};
|
345
|
+
}();
|
346
|
+
useEffect(function () {
|
347
|
+
if (code) {
|
348
|
+
getTimeTreeList();
|
349
|
+
}
|
350
|
+
}, [code]);
|
351
|
+
/**
|
352
|
+
* 添加钱包卡片的公共函数
|
353
|
+
* @param url 钱包卡片URL
|
354
|
+
* @param type 钱包类型('apple'或'google')
|
355
|
+
* @returns Promise<boolean> 是否添加成功
|
356
|
+
*/
|
357
|
+
var addWalletPass = /*#__PURE__*/function () {
|
358
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(url, type) {
|
359
|
+
var response, passData, blob, downloadUrl, a;
|
360
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
361
|
+
while (1) switch (_context3.prev = _context3.next) {
|
362
|
+
case 0:
|
363
|
+
if (url) {
|
364
|
+
_context3.next = 3;
|
365
|
+
break;
|
366
|
+
}
|
367
|
+
PisellToast({
|
368
|
+
content: locales.getText('page.wallet.urlEmpty') || '钱包链接为空',
|
369
|
+
duration: 2
|
370
|
+
});
|
371
|
+
return _context3.abrupt("return", false);
|
372
|
+
case 3:
|
373
|
+
if (!isWechat()) {
|
374
|
+
_context3.next = 7;
|
375
|
+
break;
|
376
|
+
}
|
377
|
+
setWechatModalOpen(true);
|
378
|
+
setCopyUrl(url);
|
379
|
+
return _context3.abrupt("return", false);
|
380
|
+
case 7:
|
381
|
+
setAddWalletLoading(true);
|
382
|
+
_context3.prev = 8;
|
383
|
+
if (!(type === 'apple')) {
|
384
|
+
_context3.next = 27;
|
385
|
+
break;
|
386
|
+
}
|
387
|
+
_context3.next = 12;
|
388
|
+
return fetch(url);
|
389
|
+
case 12:
|
390
|
+
response = _context3.sent;
|
391
|
+
if (response.ok) {
|
392
|
+
_context3.next = 15;
|
393
|
+
break;
|
394
|
+
}
|
395
|
+
throw new Error("HTTP error! status: ".concat(response.status));
|
396
|
+
case 15:
|
397
|
+
_context3.next = 17;
|
398
|
+
return response.arrayBuffer();
|
399
|
+
case 17:
|
400
|
+
passData = _context3.sent;
|
401
|
+
blob = new Blob([passData], {
|
402
|
+
type: 'application/vnd.apple.pkpass'
|
403
|
+
});
|
404
|
+
downloadUrl = URL.createObjectURL(blob);
|
405
|
+
a = document.createElement('a');
|
406
|
+
a.href = downloadUrl;
|
407
|
+
a.download = 'pass.pkpass';
|
408
|
+
a.click();
|
409
|
+
URL.revokeObjectURL(downloadUrl); // 清理创建的URL
|
410
|
+
_context3.next = 28;
|
411
|
+
break;
|
412
|
+
case 27:
|
413
|
+
window.open(url);
|
414
|
+
case 28:
|
415
|
+
_context3.next = 34;
|
416
|
+
break;
|
417
|
+
case 30:
|
418
|
+
_context3.prev = 30;
|
419
|
+
_context3.t0 = _context3["catch"](8);
|
420
|
+
console.error('Failed to add wallet:', _context3.t0);
|
421
|
+
PisellToast({
|
422
|
+
content: locales.getText('page.wallet.error.addFailed'),
|
423
|
+
duration: 3
|
424
|
+
});
|
425
|
+
case 34:
|
426
|
+
_context3.prev = 34;
|
427
|
+
setAddWalletLoading(false);
|
428
|
+
return _context3.finish(34);
|
429
|
+
case 37:
|
430
|
+
case "end":
|
431
|
+
return _context3.stop();
|
432
|
+
}
|
433
|
+
}, _callee3, null, [[8, 30, 34, 37]]);
|
434
|
+
}));
|
435
|
+
return function addWalletPass(_x, _x2) {
|
436
|
+
return _ref4.apply(this, arguments);
|
437
|
+
};
|
438
|
+
}();
|
439
|
+
var onAppleClick = /*#__PURE__*/function () {
|
440
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
441
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
442
|
+
while (1) switch (_context4.prev = _context4.next) {
|
443
|
+
case 0:
|
444
|
+
_context4.next = 2;
|
445
|
+
return addWalletPass(apple_wallet_url, 'apple');
|
446
|
+
case 2:
|
447
|
+
case "end":
|
448
|
+
return _context4.stop();
|
449
|
+
}
|
450
|
+
}, _callee4);
|
451
|
+
}));
|
452
|
+
return function onAppleClick() {
|
453
|
+
return _ref5.apply(this, arguments);
|
454
|
+
};
|
455
|
+
}();
|
456
|
+
var onGoogleClick = /*#__PURE__*/function () {
|
457
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
458
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
459
|
+
while (1) switch (_context5.prev = _context5.next) {
|
460
|
+
case 0:
|
461
|
+
_context5.next = 2;
|
462
|
+
return addWalletPass(google_wallet_url, 'google');
|
463
|
+
case 2:
|
464
|
+
case "end":
|
465
|
+
return _context5.stop();
|
466
|
+
}
|
467
|
+
}, _callee5);
|
468
|
+
}));
|
469
|
+
return function onGoogleClick() {
|
470
|
+
return _ref6.apply(this, arguments);
|
471
|
+
};
|
472
|
+
}();
|
473
|
+
var isWechat = function isWechat() {
|
474
|
+
return /MicroMessenger/i.test(window.navigator.userAgent);
|
475
|
+
};
|
476
|
+
var httpCopyToClipboard = function httpCopyToClipboard(text) {
|
477
|
+
var textArea = document.createElement('textarea');
|
478
|
+
textArea.value = text;
|
479
|
+
textArea.style.position = 'fixed';
|
480
|
+
textArea.style.top = '-10000px';
|
481
|
+
textArea.style.left = '-10000px';
|
482
|
+
document.body.appendChild(textArea);
|
483
|
+
textArea.focus();
|
484
|
+
textArea.select();
|
485
|
+
document.execCommand('copy');
|
486
|
+
document.body.removeChild(textArea);
|
487
|
+
};
|
488
|
+
var copyToClipboard = function copyToClipboard(text) {
|
489
|
+
if (navigator.clipboard) {
|
490
|
+
return navigator.clipboard.writeText(text);
|
491
|
+
} else {
|
492
|
+
return httpCopyToClipboard(text);
|
493
|
+
}
|
494
|
+
};
|
495
|
+
var onCopyClick = function onCopyClick() {
|
496
|
+
copyToClipboard(copyUrl);
|
497
|
+
PisellToast({
|
498
|
+
content: locales.getText('page.wallet.copySuccess'),
|
499
|
+
duration: 2
|
500
|
+
});
|
501
|
+
setWechatModalOpen(false);
|
502
|
+
};
|
503
|
+
|
504
|
+
// 增加卡片内容区域的ref
|
505
|
+
var cardContentRef = useRef(null);
|
506
|
+
|
507
|
+
/**
|
508
|
+
* 处理tab切换
|
509
|
+
* @param key 切换的标签ID
|
510
|
+
*/
|
511
|
+
var handleTabChange = function handleTabChange(key) {
|
512
|
+
// 设置当前激活的标签
|
513
|
+
setActiveTab(typeof key === 'string' ? key : key.toString());
|
514
|
+
|
515
|
+
// 如果在H5环境下,需要进行滚动处理
|
516
|
+
if (platform === 'h5') {
|
517
|
+
setIsScrolling(true);
|
518
|
+
setTimeout(function () {
|
519
|
+
setIsScrolling(false);
|
520
|
+
}, 500);
|
521
|
+
}
|
522
|
+
|
523
|
+
// 只有在用户点击时才进行滚动处理
|
524
|
+
if (isUserClickRef.current) {
|
525
|
+
// 找到对应的section元素并滚动到该位置
|
526
|
+
var section = document.querySelector("[data-section=\"".concat(typeof key === 'string' ? key : key.toString(), "\"]"));
|
527
|
+
if (section && cardContentRef.current) {
|
528
|
+
// 获取section的顶部位置
|
529
|
+
var sectionTop = section.getBoundingClientRect().top;
|
530
|
+
// 获取content的顶部位置
|
531
|
+
var contentTop = cardContentRef.current.getBoundingClientRect().top;
|
532
|
+
// 计算要滚动的距离
|
533
|
+
var scrollTop = cardContentRef.current.scrollTop + (sectionTop - contentTop) - 50;
|
534
|
+
|
535
|
+
// 平滑滚动到目标位置
|
536
|
+
cardContentRef.current.scrollTo({
|
537
|
+
top: scrollTop,
|
538
|
+
behavior: 'smooth'
|
539
|
+
});
|
540
|
+
}
|
541
|
+
isUserClickRef.current = false;
|
542
|
+
}
|
543
|
+
};
|
544
|
+
|
545
|
+
// 防止滚动穿透的处理函数
|
546
|
+
var preventScrollPropagation = useCallback(function (e) {
|
547
|
+
if (!cardContentRef.current) return;
|
548
|
+
var scrollContainer = cardContentRef.current;
|
549
|
+
var isAtTop = scrollContainer.scrollTop <= 0;
|
550
|
+
var isAtBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop <= scrollContainer.clientHeight + 1;
|
551
|
+
|
552
|
+
// 检查是否触摸事件
|
553
|
+
if ('touches' in e) {
|
554
|
+
// 触摸事件处理
|
555
|
+
var touchEvent = e;
|
556
|
+
if (isAtTop && touchEvent.touches[0].clientY > 0 || isAtBottom && touchEvent.touches[0].clientY < 0) {
|
557
|
+
// 在边界处阻止事件冒泡
|
558
|
+
e.stopPropagation();
|
559
|
+
}
|
560
|
+
} else {
|
561
|
+
// 滚轮事件处理
|
562
|
+
var wheelEvent = e;
|
563
|
+
if (isAtTop || isAtBottom) {
|
564
|
+
// 在边界处阻止事件冒泡和默认行为
|
565
|
+
wheelEvent.stopPropagation();
|
566
|
+
}
|
567
|
+
}
|
568
|
+
}, []);
|
569
|
+
|
570
|
+
// 添加触摸事件监听
|
571
|
+
useEffect(function () {
|
572
|
+
if (!cardContentRef.current || platform !== 'h5') return;
|
573
|
+
var scrollContainer = cardContentRef.current;
|
574
|
+
|
575
|
+
// 添加触摸事件监听器
|
576
|
+
var handleTouchMove = function handleTouchMove(e) {
|
577
|
+
preventScrollPropagation(e);
|
578
|
+
};
|
579
|
+
scrollContainer.addEventListener('touchmove', handleTouchMove, {
|
580
|
+
passive: false
|
581
|
+
});
|
582
|
+
return function () {
|
583
|
+
scrollContainer.removeEventListener('touchmove', handleTouchMove);
|
584
|
+
};
|
585
|
+
}, [platform, preventScrollPropagation]);
|
586
|
+
|
587
|
+
// 处理滚动监听 - 使用cardContentRef
|
588
|
+
useEffect(function () {
|
589
|
+
if (!cardContentRef.current) return;
|
590
|
+
|
591
|
+
// 添加一个变量跟踪是否正在滚动
|
592
|
+
var isCurrentlyScrolling = false;
|
593
|
+
// 添加一个变量存储最后一次滚动时间
|
594
|
+
var lastScrollTime = 0;
|
595
|
+
// 添加一个变量存储待更新的锚点ID
|
596
|
+
var pendingAnchorId = null;
|
597
|
+
var handleScroll = function handleScroll() {
|
598
|
+
// 如果是由用户点击锚点触发的滚动,不处理
|
599
|
+
if (isScrolling || isUserClickRef.current) return;
|
600
|
+
|
601
|
+
// 更新最后滚动时间
|
602
|
+
lastScrollTime = Date.now();
|
603
|
+
// 标记正在滚动
|
604
|
+
isCurrentlyScrolling = true;
|
605
|
+
|
606
|
+
// 清除之前的定时器
|
607
|
+
if (scrollTimeoutRef.current) {
|
608
|
+
clearTimeout(scrollTimeoutRef.current);
|
609
|
+
}
|
610
|
+
|
611
|
+
// 计算当前应该激活的锚点,但不立即更新UI
|
612
|
+
var container = cardContentRef.current;
|
613
|
+
if (!container) return;
|
614
|
+
var scrollTop = container.scrollTop;
|
615
|
+
var headerHeight = 56;
|
616
|
+
var containerHeight = container.clientHeight;
|
617
|
+
|
618
|
+
// 获取所有section的位置信息
|
619
|
+
var sectionPositions = anchorOptions.map(function (option) {
|
620
|
+
var element = document.getElementById(option.id) || document.querySelector("[data-section=\"".concat(option.id, "\"]"));
|
621
|
+
if (!element) return null;
|
622
|
+
|
623
|
+
// 使用offsetTop计算更准确
|
624
|
+
var elementOffsetTop = element.offsetTop;
|
625
|
+
var elementHeight = element.offsetHeight;
|
626
|
+
|
627
|
+
// 计算可见度
|
628
|
+
var isElementVisible = elementOffsetTop >= scrollTop && elementOffsetTop <= scrollTop + containerHeight || elementOffsetTop + elementHeight >= scrollTop && elementOffsetTop + elementHeight <= scrollTop + containerHeight || elementOffsetTop <= scrollTop && elementOffsetTop + elementHeight >= scrollTop + containerHeight;
|
629
|
+
return {
|
630
|
+
id: option.id,
|
631
|
+
offsetTop: elementOffsetTop,
|
632
|
+
height: elementHeight,
|
633
|
+
distanceFromViewportTop: Math.abs(elementOffsetTop - scrollTop - headerHeight),
|
634
|
+
isVisible: isElementVisible
|
635
|
+
};
|
636
|
+
}).filter(function (section) {
|
637
|
+
return section !== null;
|
638
|
+
});
|
639
|
+
|
640
|
+
// 找到最合适的section - 优先考虑可见的且距离视口顶部最近的
|
641
|
+
var visibleSections = sectionPositions.filter(function (section) {
|
642
|
+
return section.isVisible;
|
643
|
+
});
|
644
|
+
if (visibleSections.length === 0) return;
|
645
|
+
var bestSection = visibleSections.reduce(function (prev, current) {
|
646
|
+
return prev.distanceFromViewportTop < current.distanceFromViewportTop ? prev : current;
|
647
|
+
});
|
648
|
+
|
649
|
+
// 存储待更新的锚点ID,但不立即更新
|
650
|
+
if (bestSection && activeTab !== bestSection.id) {
|
651
|
+
pendingAnchorId = bestSection.id;
|
652
|
+
}
|
653
|
+
|
654
|
+
// 设置一个定时器,在滚动停止300ms后更新锚点
|
655
|
+
scrollTimeoutRef.current = setTimeout(function () {
|
656
|
+
// 检查自上次滚动以来是否已经过了300ms
|
657
|
+
var timeSinceLastScroll = Date.now() - lastScrollTime;
|
658
|
+
if (timeSinceLastScroll >= 300) {
|
659
|
+
// 滚动已停止300ms,可以更新锚点
|
660
|
+
isCurrentlyScrolling = false;
|
661
|
+
|
662
|
+
// 如果有待更新的锚点ID且不是当前激活的锚点,则更新
|
663
|
+
if (pendingAnchorId && activeTab !== pendingAnchorId && !isScrolling) {
|
664
|
+
setActiveTab(pendingAnchorId);
|
665
|
+
}
|
666
|
+
|
667
|
+
// 重置待更新的锚点ID
|
668
|
+
pendingAnchorId = null;
|
669
|
+
} else {
|
670
|
+
// 滚动停止时间不足300ms,继续等待
|
671
|
+
scrollTimeoutRef.current = setTimeout(function () {
|
672
|
+
isCurrentlyScrolling = false;
|
673
|
+
if (pendingAnchorId && activeTab !== pendingAnchorId && !isScrolling) {
|
674
|
+
setActiveTab(pendingAnchorId);
|
675
|
+
}
|
676
|
+
pendingAnchorId = null;
|
677
|
+
}, 300 - timeSinceLastScroll);
|
678
|
+
}
|
679
|
+
}, 300);
|
680
|
+
};
|
681
|
+
var container = cardContentRef.current;
|
682
|
+
container.addEventListener('scroll', handleScroll);
|
683
|
+
return function () {
|
684
|
+
container.removeEventListener('scroll', handleScroll);
|
685
|
+
if (scrollTimeoutRef.current) {
|
686
|
+
clearTimeout(scrollTimeoutRef.current);
|
687
|
+
}
|
688
|
+
};
|
689
|
+
}, [anchorOptions, activeTab, isScrolling]);
|
690
|
+
|
691
|
+
// 创建直接的后退处理函数,而不是在useEffect中设置
|
692
|
+
var handleBack = useCallback(function () {
|
693
|
+
// 简单地调用传入的onBack函数
|
694
|
+
if (onBack) {
|
695
|
+
onBack();
|
696
|
+
}
|
697
|
+
|
698
|
+
// 仍然保留重置滚动位置和状态的逻辑
|
699
|
+
setTimeout(function () {
|
700
|
+
if (cardContentRef.current) {
|
701
|
+
cardContentRef.current.scrollTop = 0;
|
702
|
+
}
|
703
|
+
setActiveTab('detail');
|
704
|
+
setIsScrolling(false);
|
705
|
+
}, 100);
|
706
|
+
}, [onBack]);
|
707
|
+
|
708
|
+
// 仍然保留enhancedOnBack设置,但修改逻辑避免冲突
|
709
|
+
useEffect(function () {
|
710
|
+
// 不需要任何操作,onBack会在需要时通过handleBack直接调用
|
711
|
+
}, [onBack, platform]);
|
712
|
+
|
713
|
+
// 添加ref用于获取容器元素
|
714
|
+
var detailWrapperRef = useRef(null);
|
715
|
+
var _useState29 = useState(undefined),
|
716
|
+
_useState30 = _slicedToArray(_useState29, 2),
|
717
|
+
contentHeight = _useState30[0],
|
718
|
+
setContentHeight = _useState30[1];
|
719
|
+
|
720
|
+
// 添加锚点导航ref
|
721
|
+
var anchorWrapperRef = useRef(null);
|
722
|
+
|
723
|
+
// 计算内容区域高度 - 使用useLayoutEffect确保在DOM渲染后立即计算
|
724
|
+
useLayoutEffect(function () {
|
725
|
+
var updateContentHeight = function updateContentHeight() {
|
726
|
+
if (detailWrapperRef.current) {
|
727
|
+
// 计算可视区域高度
|
728
|
+
var viewportHeight = window.innerHeight;
|
729
|
+
// 获取容器到视口顶部的距离
|
730
|
+
var containerTop = detailWrapperRef.current.getBoundingClientRect().top;
|
731
|
+
|
732
|
+
// 获取不参与滚动区域的参考元素
|
733
|
+
var detailHeaderEl = anchorWrapperRef.current;
|
734
|
+
|
735
|
+
// 计算不参与滚动区域的高度(锚点导航等)
|
736
|
+
var nonScrollableHeight = 0;
|
737
|
+
if (detailHeaderEl) {
|
738
|
+
// 获取实际高度
|
739
|
+
var headerHeight = detailHeaderEl.getBoundingClientRect().height;
|
740
|
+
// 添加额外间距
|
741
|
+
nonScrollableHeight = headerHeight + 8; // 减少额外间距以增加内容区高度
|
742
|
+
} else {
|
743
|
+
// 默认值60px
|
744
|
+
nonScrollableHeight = 60;
|
745
|
+
}
|
746
|
+
|
747
|
+
// 底部留白和底部按钮高度
|
748
|
+
var bottomPadding = 10; // 减少底部留白以增加内容区高度
|
749
|
+
|
750
|
+
// 移动端环境下,为底部按钮预留空间
|
751
|
+
var footerHeight = platform === 'h5' ? 80 : 0; // 底部按钮高度 + 边距
|
752
|
+
|
753
|
+
// 设置内容高度 = 视口高度 - 容器顶部位置 - 不滚动区域高度 - 底部留白 - 底部按钮高度
|
754
|
+
var calculatedHeight = viewportHeight - containerTop - nonScrollableHeight - bottomPadding - footerHeight;
|
755
|
+
|
756
|
+
// 确保最小高度为400px,以占满更多可用空间
|
757
|
+
var finalHeight = Math.max(Math.min(calculatedHeight, viewportHeight - 80), 400);
|
758
|
+
|
759
|
+
// 更新状态
|
760
|
+
setContentHeight(finalHeight);
|
761
|
+
} else {
|
762
|
+
setContentHeight(undefined);
|
763
|
+
}
|
764
|
+
};
|
765
|
+
|
766
|
+
// 初始化时计算一次,使用setTimeout确保DOM已经渲染完成
|
767
|
+
var timer = setTimeout(function () {
|
768
|
+
updateContentHeight();
|
769
|
+
// 第二次计算,确保准确性
|
770
|
+
setTimeout(updateContentHeight, 200);
|
771
|
+
}, 100);
|
772
|
+
|
773
|
+
// 窗口大小变化时重新计算
|
774
|
+
window.addEventListener('resize', updateContentHeight);
|
775
|
+
|
776
|
+
// 创建ResizeObserver来监听容器尺寸变化
|
777
|
+
var resizeObserver = null;
|
778
|
+
if (detailWrapperRef.current) {
|
779
|
+
resizeObserver = new ResizeObserver(function () {
|
780
|
+
updateContentHeight();
|
781
|
+
});
|
782
|
+
resizeObserver.observe(detailWrapperRef.current);
|
783
|
+
}
|
784
|
+
return function () {
|
785
|
+
window.removeEventListener('resize', updateContentHeight);
|
786
|
+
if (resizeObserver) {
|
787
|
+
resizeObserver.disconnect();
|
788
|
+
}
|
789
|
+
clearTimeout(timer);
|
790
|
+
};
|
791
|
+
}, [platform]);
|
792
|
+
|
793
|
+
// assetActionEnum定义,在上次编辑中被意外删除
|
794
|
+
var assetActionEnum = {
|
795
|
+
recharge: tag === 'point_card' ? locales.getText('page.wallet.pointsEarned') : locales.getText('page.wallet.recharge'),
|
796
|
+
order_expend: tag === 'point_card' ? locales.getText('page.wallet.pointsRedeemed') : locales.getText('page.wallet.spending'),
|
797
|
+
order_refund: locales.getText('page.wallet.refund'),
|
798
|
+
expire: locales.getText('page.wallet.expire')
|
799
|
+
};
|
800
|
+
|
801
|
+
// 处理充值事件 - 与PC端充值按钮功能一致
|
802
|
+
var handleRecharge = function handleRecharge() {
|
803
|
+
// 触发充值事件
|
804
|
+
if (props.buttonGroupList && props.buttonGroupList[0] && props.buttonGroupList[0][0]) {
|
805
|
+
var rechargeButton = props.buttonGroupList[0][0];
|
806
|
+
if (rechargeButton.buttonProps && rechargeButton.buttonProps.onClick) {
|
807
|
+
rechargeButton.buttonProps.onClick();
|
808
|
+
}
|
809
|
+
}
|
810
|
+
};
|
811
|
+
return /*#__PURE__*/React.createElement("div", {
|
812
|
+
className: "wallet-detail".concat(platform === 'h5' ? ' wallet-detail-h5' : ' wallet-detail-pc', " ").concat(className || ''),
|
813
|
+
ref: detailWrapperRef
|
814
|
+
}, (platform === 'h5' || showWalletBar) && /*#__PURE__*/React.createElement("div", {
|
815
|
+
className: "wallet-detail-header"
|
816
|
+
}, /*#__PURE__*/React.createElement(WalletBar, {
|
817
|
+
setup: "detail",
|
818
|
+
onBack: handleBack
|
819
|
+
})), /*#__PURE__*/React.createElement("div", {
|
820
|
+
className: "wallet-detail-content ".concat(platform === 'h5' ? 'wallet-detail-content-h5' : 'wallet-detail-content-pc'),
|
821
|
+
ref: modalContentRef
|
822
|
+
}, /*#__PURE__*/React.createElement("div", {
|
823
|
+
className: "wallet-detail-card ".concat(platform === 'h5' ? 'wallet-detail-card-h5' : '')
|
824
|
+
}, /*#__PURE__*/React.createElement("div", {
|
825
|
+
className: "wallet-detail-card-header ".concat(platform === 'h5' ? 'wallet-detail-card-header-h5' : ''),
|
826
|
+
ref: anchorWrapperRef
|
827
|
+
}, /*#__PURE__*/React.createElement("div", {
|
828
|
+
className: "wallet-detail-card-header-anchor"
|
829
|
+
}, /*#__PURE__*/React.createElement(PisellAnchor, {
|
830
|
+
ref: tabsRef,
|
831
|
+
options: anchorOptions,
|
832
|
+
tab: activeTab,
|
833
|
+
containerRef: cardContentRef,
|
834
|
+
onChange: function onChange(key) {
|
835
|
+
handleTabChange(key);
|
836
|
+
},
|
837
|
+
onTabClick: function onTabClick() {
|
838
|
+
isUserClickRef.current = true;
|
839
|
+
},
|
840
|
+
platform: platform
|
841
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
842
|
+
className: "wallet-detail-card-content ".concat(platform === 'h5' ? 'wallet-detail-card-content-h5' : 'wallet-detail-card-content-pc', " wallet-detail-card-content-hide-scrollbar"),
|
843
|
+
ref: cardContentRef
|
844
|
+
}, /*#__PURE__*/React.createElement("section", {
|
845
|
+
className: "wallet-detail-card-content-section",
|
846
|
+
"data-section": "detail"
|
847
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
848
|
+
className: "wallet-detail-card-content-section-title"
|
849
|
+
}, locales.getText('page.wallet.details')), platform === 'pc' && /*#__PURE__*/React.createElement(ButtonGroupPreview, {
|
850
|
+
buttonGroupList: buttonGroupList
|
851
|
+
}), /*#__PURE__*/React.createElement(PisellStatisticList, {
|
852
|
+
data: listData,
|
853
|
+
labelColor: "#667085",
|
854
|
+
valueColor: "#101828",
|
855
|
+
backgroundColors: ['#fff'],
|
856
|
+
isHasBorder: false
|
857
|
+
}), /*#__PURE__*/React.createElement("div", {
|
858
|
+
className: "wallet-detail-card-content-tip"
|
859
|
+
}, description ?
|
860
|
+
/*#__PURE__*/
|
861
|
+
// @ts-ignore 忽略TypeScript错误,React类型定义问题
|
862
|
+
React.createElement("div", {
|
863
|
+
dangerouslySetInnerHTML: {
|
864
|
+
__html: description
|
865
|
+
}
|
866
|
+
}) : null)), /*#__PURE__*/React.createElement("section", {
|
867
|
+
className: "wallet-detail-card-content-section wallet-detail-card-content-section-timeline",
|
868
|
+
"data-section": "activityLog"
|
869
|
+
}, tag !== 'product_discount_card' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
870
|
+
className: "wallet-detail-card-content-section-subtitle"
|
871
|
+
}, locales.getText('page.wallet.activelog')), isLoading ? /*#__PURE__*/React.createElement("div", {
|
872
|
+
className: "wallet-detail-timeline-loading"
|
873
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
874
|
+
active: true,
|
875
|
+
paragraph: {
|
876
|
+
rows: 6
|
877
|
+
},
|
878
|
+
round: true
|
879
|
+
})) : TimeLineData.length > 0 ? /*#__PURE__*/React.createElement(Timeline, {
|
880
|
+
items: TimeLineData,
|
881
|
+
className: "wallet-detail-timeline-list"
|
882
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
883
|
+
className: "wallet-detail-card-content-section-empty"
|
884
|
+
}, /*#__PURE__*/React.createElement(PisellEmpty, null))))))), platform === 'h5' && /*#__PURE__*/React.createElement(FooterButtons, {
|
885
|
+
step: "detail",
|
886
|
+
addWalletLoading: addWalletLoading,
|
887
|
+
onAppleWalletClick: tag === 'gift_card' ? addWalletCard : undefined,
|
888
|
+
onRechargeClick: tag === 'gift_card' && (detail === null || detail === void 0 || (_detail$machinecode_c = detail.machinecode_config) === null || _detail$machinecode_c === void 0 ? void 0 : _detail$machinecode_c.hide_recharge) === 0 ? handleRecharge : undefined,
|
889
|
+
platform: platform,
|
890
|
+
isIOS: isIos()
|
891
|
+
}), /*#__PURE__*/React.createElement(PisellModal, {
|
892
|
+
platform: platform === 'pc' ? 'pc' : 'h5',
|
893
|
+
mobileModalHeight: "auto",
|
894
|
+
cancelVisible: false,
|
895
|
+
destroyOnClose: true,
|
896
|
+
onCancel: function onCancel() {
|
897
|
+
return setIsShowtimeLineDetail(false);
|
898
|
+
},
|
899
|
+
title: isSpending ? locales.getText('page.wallet.spendingDetails') : locales.getText('page.wallet.rechargeDetails'),
|
900
|
+
open: isShowtimeLineDetail,
|
901
|
+
footer: [/*#__PURE__*/React.createElement(Button, {
|
902
|
+
type: "primary",
|
903
|
+
block: true,
|
904
|
+
size: "large",
|
905
|
+
onClick: function onClick() {
|
906
|
+
return setIsShowtimeLineDetail(false);
|
907
|
+
}
|
908
|
+
}, locales.getText('page.wallet.done'))]
|
909
|
+
}, /*#__PURE__*/React.createElement(PisellStatisticList, {
|
910
|
+
data: [{
|
911
|
+
label: locales.getText('page.wallet.date'),
|
912
|
+
value: timeLineDetail.created_at || ''
|
913
|
+
}, {
|
914
|
+
label: isSpending ? locales.getText('page.wallet.spending') : locales.getText('page.wallet.recharge'),
|
915
|
+
value: formatCurrencyAmount((timeLineDetail === null || timeLineDetail === void 0 ? void 0 : timeLineDetail.amount) || '', isSpending)
|
916
|
+
}, {
|
917
|
+
label: locales.getText('page.wallet.viewOrder'),
|
918
|
+
value: !!timeLineDetail.resource_code ? "#".concat(timeLineDetail.resource_code) : '',
|
919
|
+
isLink: !!timeLineDetail.resource_code,
|
920
|
+
link: "/order/details?id=".concat(timeLineDetail.resource_id)
|
921
|
+
}],
|
922
|
+
labelColor: "#101828",
|
923
|
+
valueColor: "#101828",
|
924
|
+
backgroundColors: ['#fff'],
|
925
|
+
isHasBorder: false
|
926
|
+
})), /*#__PURE__*/React.createElement(PisellModal, {
|
927
|
+
platform: platform === 'pc' ? 'pc' : 'h5',
|
928
|
+
mobileModalHeight: "auto",
|
929
|
+
headerDivider: false,
|
930
|
+
closable: true,
|
931
|
+
maskClosable: true,
|
932
|
+
onCancel: function onCancel() {
|
933
|
+
setWechatModalOpen(false);
|
934
|
+
},
|
935
|
+
closeIcon: /*#__PURE__*/React.createElement(XClose, {
|
936
|
+
size: 20,
|
937
|
+
style: {
|
938
|
+
fontSize: '24px'
|
939
|
+
}
|
940
|
+
}),
|
941
|
+
open: wechatModalOpen
|
942
|
+
// title={locales.getText('page.wallet.copyTitle')}
|
943
|
+
,
|
944
|
+
footer: [/*#__PURE__*/React.createElement(Button, {
|
945
|
+
onClick: onCopyClick,
|
946
|
+
block: true,
|
947
|
+
type: "primary",
|
948
|
+
size: "large"
|
949
|
+
}, locales.getText('page.wallet.copyButton'))]
|
950
|
+
}, /*#__PURE__*/React.createElement("div", {
|
951
|
+
className: "wallet-detail-copyTitle"
|
952
|
+
}, locales.getText('page.wallet.copyTitle')), /*#__PURE__*/React.createElement("div", {
|
953
|
+
className: "wallet-detail-copyText"
|
954
|
+
}, locales.getText('page.wallet.copyText'))));
|
955
|
+
});
|
956
|
+
export default Detail;
|