@pisell/private-materials 6.6.4 → 6.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Services/index.js +25 -22
- package/es/components/appointmentBooking/components/Voucher/index.js +15 -1
- package/es/components/booking/addons/index.js +25 -17
- package/es/components/booking/components/actionButtons/index.js +3 -1
- package/es/components/booking/components/footer/amount.d.ts +1 -0
- package/es/components/booking/components/footer/amount.js +548 -84
- package/es/components/booking/components/footer/index.js +36 -33
- package/es/components/booking/components/footer/utils.d.ts +19 -0
- package/es/components/booking/components/footer/utils.js +166 -67
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/es/components/booking/components/voucher/index.js +53 -15
- package/es/components/booking/forms/table/index.d.ts +0 -1
- package/es/components/booking/hooks/useQuotation.js +4 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +0 -1
- package/es/components/booking/info/service2/utils.js +1 -0
- package/es/components/booking/info2/cartClientCard/index.js +5 -3
- package/es/components/booking/info2/service/addService/index.js +9 -9
- package/es/components/booking/info2/service/editNormalService/index.js +6 -0
- package/es/components/booking/info2/service/editService/index.js +27 -17
- package/es/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/es/components/booking/info2/service/editService/utils.js +66 -0
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +1 -0
- package/es/components/booking/utils.js +15 -2
- package/es/components/checkout/components/AmountSummary/index.less +4 -5
- package/es/components/eftpos/deviceList/index.d.ts +0 -1
- package/es/components/eftpos/form/index.d.ts +0 -1
- package/es/components/eftpos/group/index.d.ts +0 -1
- package/es/components/eftpos/hooks.d.ts +0 -1
- package/es/components/eftpos/icon/apiKey.d.ts +0 -1
- package/es/components/eftpos/icon/device.d.ts +0 -1
- package/es/components/eftpos/receipt/index.d.ts +0 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/es/components/eftposPay/component/step/index.d.ts +0 -1
- package/es/components/eftposPay/component/step/step.d.ts +0 -1
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/payo/config.js +70 -32
- package/es/components/eftposPay/payo/payment.d.ts +66 -0
- package/es/components/eftposPay/payo/payment.js +579 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/es/components/eftposPay/utils/log/index.d.ts +110 -0
- package/es/components/eftposPay/utils/log/index.js +371 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/es/components/index.d.ts +2 -2
- package/es/components/index.js +2 -2
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +2 -0
- package/es/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pay/toC/index.js +7 -4
- package/es/components/pay/toC/locales.d.ts +3 -0
- package/es/components/pay/toC/locales.js +6 -3
- package/es/components/pay/toC/status.d.ts +1 -0
- package/es/components/pay/toC/status.js +3 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/es/components/schedules/products/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/es/components/subTotal/index.js +1 -1
- package/es/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/es/components/{wallet/serve.js → systemSettings/registry/components/GroupModal.js} +145 -190
- package/es/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ItemModal.js +547 -0
- package/es/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/ModuleList.js +54 -0
- package/es/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SectionList.js +174 -0
- package/es/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/es/components/systemSettings/registry/components/SettingsTable.js +765 -0
- package/es/components/systemSettings/registry/components/index.d.ts +4 -0
- package/es/components/systemSettings/registry/components/index.js +4 -0
- package/es/components/systemSettings/registry/index.d.ts +5 -0
- package/es/components/systemSettings/registry/index.js +1059 -0
- package/es/components/systemSettings/registry/index.less +410 -0
- package/es/components/systemSettings/registry/locales.d.ts +272 -0
- package/es/components/systemSettings/registry/locales.js +300 -0
- package/es/components/systemSettings/registry/services.d.ts +77 -0
- package/es/components/systemSettings/registry/services.js +472 -0
- package/es/components/systemSettings/registry/types.d.ts +126 -0
- package/es/components/systemSettings/registry/types.js +1 -0
- package/es/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/es/components/systemSettings/registry/utils/typeValidation.js +284 -0
- package/es/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/es/components/systemSettings/registry/utils/validators.js +44 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +7 -5
- package/es/components/ticketBooking/utils/index.d.ts +5 -0
- package/es/components/ticketBooking/utils/index.js +38 -17
- package/es/components/walletList/index.d.ts +0 -25
- package/es/components/walletList/index.js +173 -41
- package/es/components/walletList/locales.d.ts +9 -0
- package/es/components/walletList/locales.js +12 -3
- package/es/components/walletList/serve.d.ts +19 -0
- package/es/components/walletList/serve.js +94 -5
- package/es/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/es/components/walletList/tempHolderSelector/index.js +196 -0
- package/es/components/walletList/tempHolderSelector/index.less +63 -0
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/index.d.ts +3 -2
- package/es/index.js +4 -3
- package/es/plus/clientName/index.d.ts +0 -1
- package/es/plus/walletEditor/WalletEditor.js +60 -2
- package/es/plus/walletEditor/locales.d.ts +9 -0
- package/es/plus/walletEditor/locales.js +12 -3
- package/es/plus/walletPassGallery/components/footerButton/index.js +2 -4
- package/es/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/es/plus/walletPassGallery/components/passDetail/index.js +5 -1
- package/es/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/es/plus/walletPassGallery/components/passList/index.js +17 -5
- package/es/plus/walletPassGallery/components/recharge/index.js +19 -8
- package/es/plus/walletPassGallery/index.js +226 -42
- package/es/plus/walletPassGallery/locales.d.ts +15 -0
- package/es/plus/walletPassGallery/locales.js +29 -5
- package/es/plus/walletPassGallery/serve.d.ts +15 -1
- package/es/plus/walletPassGallery/serve.js +59 -2
- package/es/plus/walletPassGallery/utils.d.ts +48 -0
- package/es/plus/walletPassGallery/utils.js +342 -0
- package/es/pro/Login2.0/index.less +15 -8
- package/es/pro/pisellPaymentList/example.d.ts +0 -1
- package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +35 -30
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Services/index.js +5 -2
- package/lib/components/appointmentBooking/components/Voucher/index.js +13 -1
- package/lib/components/booking/addons/index.js +15 -7
- package/lib/components/booking/components/actionButtons/index.js +4 -2
- package/lib/components/booking/components/footer/amount.d.ts +1 -0
- package/lib/components/booking/components/footer/amount.js +293 -41
- package/lib/components/booking/components/footer/index.js +5 -2
- package/lib/components/booking/components/footer/utils.d.ts +19 -0
- package/lib/components/booking/components/footer/utils.js +111 -35
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
- package/lib/components/booking/components/voucher/index.js +56 -16
- package/lib/components/booking/forms/table/index.d.ts +0 -1
- package/lib/components/booking/hooks/useQuotation.js +2 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.js +1 -0
- package/lib/components/booking/info2/cartClientCard/index.js +4 -2
- package/lib/components/booking/info2/service/addService/index.js +1 -1
- package/lib/components/booking/info2/service/editNormalService/index.js +6 -0
- package/lib/components/booking/info2/service/editService/index.js +30 -8
- package/lib/components/booking/info2/service/editService/utils.d.ts +15 -0
- package/lib/components/booking/info2/service/editService/utils.js +40 -3
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +1 -0
- package/lib/components/booking/utils.js +11 -0
- package/lib/components/checkout/components/AmountSummary/index.less +4 -5
- package/lib/components/eftpos/deviceList/index.d.ts +0 -1
- package/lib/components/eftpos/form/index.d.ts +0 -1
- package/lib/components/eftpos/group/index.d.ts +0 -1
- package/lib/components/eftpos/hooks.d.ts +0 -1
- package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
- package/lib/components/eftpos/icon/device.d.ts +0 -1
- package/lib/components/eftpos/receipt/index.d.ts +0 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
- package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
- package/lib/components/eftposPay/component/step/index.d.ts +0 -1
- package/lib/components/eftposPay/component/step/step.d.ts +0 -1
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/payo/config.js +98 -73
- package/lib/components/eftposPay/payo/payment.d.ts +66 -0
- package/lib/components/eftposPay/payo/payment.js +357 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
- package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
- package/lib/components/eftposPay/utils/log/index.js +294 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
- package/lib/components/index.d.ts +2 -2
- package/lib/components/index.js +3 -3
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/components/PaymentReturnContent/index.less +13 -3
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pay/toC/index.js +4 -1
- package/lib/components/pay/toC/locales.d.ts +3 -0
- package/lib/components/pay/toC/locales.js +6 -3
- package/lib/components/pay/toC/status.d.ts +1 -0
- package/lib/components/pay/toC/status.js +5 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
- package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
- package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
- package/lib/components/schedules/products/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
- package/lib/components/subTotal/index.js +1 -1
- package/lib/components/systemSettings/registry/components/GroupModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/GroupModal.js +177 -0
- package/lib/components/systemSettings/registry/components/ItemModal.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ItemModal.js +508 -0
- package/lib/components/systemSettings/registry/components/ModuleList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/ModuleList.js +71 -0
- package/lib/components/systemSettings/registry/components/SectionList.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SectionList.js +181 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.d.ts +4 -0
- package/lib/components/systemSettings/registry/components/SettingsTable.js +575 -0
- package/lib/components/systemSettings/registry/components/index.d.ts +4 -0
- package/lib/components/{wallet → systemSettings/registry}/components/index.js +13 -10
- package/lib/components/systemSettings/registry/index.d.ts +5 -0
- package/lib/components/systemSettings/registry/index.js +529 -0
- package/lib/components/systemSettings/registry/index.less +410 -0
- package/lib/components/systemSettings/registry/locales.d.ts +272 -0
- package/lib/components/systemSettings/registry/locales.js +324 -0
- package/lib/components/systemSettings/registry/services.d.ts +77 -0
- package/lib/components/systemSettings/registry/services.js +290 -0
- package/lib/components/systemSettings/registry/types.d.ts +126 -0
- package/lib/components/{wallet/RechargeableCard/serve.js → systemSettings/registry/types.js} +3 -19
- package/lib/components/systemSettings/registry/utils/typeValidation.d.ts +16 -0
- package/lib/components/systemSettings/registry/utils/typeValidation.js +228 -0
- package/lib/components/systemSettings/registry/utils/validators.d.ts +8 -0
- package/lib/components/systemSettings/registry/utils/validators.js +54 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +9 -7
- package/lib/components/ticketBooking/utils/index.d.ts +5 -0
- package/lib/components/ticketBooking/utils/index.js +22 -6
- package/lib/components/walletList/index.d.ts +0 -25
- package/lib/components/walletList/index.js +100 -4
- package/lib/components/walletList/locales.d.ts +9 -0
- package/lib/components/walletList/locales.js +12 -3
- package/lib/components/walletList/serve.d.ts +19 -0
- package/lib/components/walletList/serve.js +26 -3
- package/lib/components/walletList/tempHolderSelector/index.d.ts +14 -0
- package/lib/components/walletList/tempHolderSelector/index.js +166 -0
- package/lib/components/walletList/tempHolderSelector/index.less +63 -0
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.js +5 -2
- package/lib/plus/clientName/index.d.ts +0 -1
- package/lib/plus/walletEditor/WalletEditor.js +53 -0
- package/lib/plus/walletEditor/locales.d.ts +9 -0
- package/lib/plus/walletEditor/locales.js +12 -3
- package/lib/plus/walletPassGallery/components/footerButton/index.js +2 -2
- package/lib/plus/walletPassGallery/components/footerButton/index.less +14 -59
- package/lib/plus/walletPassGallery/components/passDetail/index.js +4 -1
- package/lib/plus/walletPassGallery/components/passDetail/index.less +4 -0
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
- package/lib/plus/walletPassGallery/components/passList/index.js +16 -4
- package/lib/plus/walletPassGallery/components/recharge/index.js +7 -1
- package/lib/plus/walletPassGallery/index.js +157 -28
- package/lib/plus/walletPassGallery/locales.d.ts +15 -0
- package/lib/plus/walletPassGallery/locales.js +32 -5
- package/lib/plus/walletPassGallery/serve.d.ts +15 -1
- package/lib/plus/walletPassGallery/serve.js +17 -5
- package/lib/plus/walletPassGallery/utils.d.ts +48 -0
- package/lib/plus/walletPassGallery/utils.js +287 -0
- package/lib/pro/Login2.0/index.less +15 -8
- package/lib/pro/pisellPaymentList/example.d.ts +0 -1
- package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +34 -39
- package/lowcode/settings-registry/meta.ts +29 -0
- package/package.json +4 -4
- package/es/components/wallet/Detail/index.d.ts +0 -42
- package/es/components/wallet/Detail/index.js +0 -1182
- package/es/components/wallet/Detail/index.less +0 -386
- package/es/components/wallet/Detail/locales.d.ts +0 -153
- package/es/components/wallet/Detail/locales.js +0 -170
- package/es/components/wallet/Detail/model.d.ts +0 -13
- package/es/components/wallet/Detail/model.js +0 -22
- package/es/components/wallet/Detail/serve.d.ts +0 -39
- package/es/components/wallet/Detail/serve.js +0 -64
- package/es/components/wallet/DetailContext.d.ts +0 -25
- package/es/components/wallet/DetailContext.js +0 -162
- package/es/components/wallet/DiscountCard/index.d.ts +0 -3
- package/es/components/wallet/DiscountCard/index.js +0 -218
- package/es/components/wallet/DiscountCard/index.less +0 -9
- package/es/components/wallet/DiscountCard/model.d.ts +0 -14
- package/es/components/wallet/DiscountCard/model.js +0 -22
- package/es/components/wallet/PointCard/index.d.ts +0 -3
- package/es/components/wallet/PointCard/index.js +0 -169
- package/es/components/wallet/PointCard/index.less +0 -9
- package/es/components/wallet/PointCard/model.d.ts +0 -13
- package/es/components/wallet/PointCard/model.js +0 -22
- package/es/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/es/components/wallet/RechargeableCard/index.js +0 -463
- package/es/components/wallet/RechargeableCard/index.less +0 -108
- package/es/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/es/components/wallet/RechargeableCard/model.js +0 -28
- package/es/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/es/components/wallet/RechargeableCard/serve.js +0 -32
- package/es/components/wallet/Voucher/index.d.ts +0 -12
- package/es/components/wallet/Voucher/index.js +0 -131
- package/es/components/wallet/Voucher/index.less +0 -9
- package/es/components/wallet/Voucher/locales.d.ts +0 -21
- package/es/components/wallet/Voucher/locales.js +0 -20
- package/es/components/wallet/Voucher/model.d.ts +0 -13
- package/es/components/wallet/Voucher/model.js +0 -22
- package/es/components/wallet/carouselArrow.png +0 -0
- package/es/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/es/components/wallet/components/FooterButtons/index.js +0 -81
- package/es/components/wallet/components/FooterButtons/index.less +0 -91
- package/es/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/es/components/wallet/components/UsageRules/index.js +0 -147
- package/es/components/wallet/components/UsageRules/index.less +0 -157
- package/es/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/es/components/wallet/components/WalletBar/index.js +0 -19
- package/es/components/wallet/components/WalletBar/index.less +0 -36
- package/es/components/wallet/components/WalletCard.d.ts +0 -11
- package/es/components/wallet/components/WalletCard.js +0 -91
- package/es/components/wallet/components/index.d.ts +0 -3
- package/es/components/wallet/components/index.js +0 -4
- package/es/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/es/components/wallet/hooks/useWalletCard.js +0 -147
- package/es/components/wallet/index.d.ts +0 -10
- package/es/components/wallet/index.js +0 -807
- package/es/components/wallet/index.less +0 -151
- package/es/components/wallet/locales.d.ts +0 -132
- package/es/components/wallet/locales.js +0 -139
- package/es/components/wallet/model.d.ts +0 -37
- package/es/components/wallet/model.js +0 -86
- package/es/components/wallet/serve.d.ts +0 -150
- package/es/components/wallet/utils/formatUtils.d.ts +0 -36
- package/es/components/wallet/utils/formatUtils.js +0 -73
- package/lib/components/wallet/Detail/index.d.ts +0 -42
- package/lib/components/wallet/Detail/index.js +0 -874
- package/lib/components/wallet/Detail/index.less +0 -386
- package/lib/components/wallet/Detail/locales.d.ts +0 -153
- package/lib/components/wallet/Detail/locales.js +0 -194
- package/lib/components/wallet/Detail/model.d.ts +0 -13
- package/lib/components/wallet/Detail/model.js +0 -43
- package/lib/components/wallet/Detail/serve.d.ts +0 -39
- package/lib/components/wallet/Detail/serve.js +0 -44
- package/lib/components/wallet/DetailContext.d.ts +0 -25
- package/lib/components/wallet/DetailContext.js +0 -118
- package/lib/components/wallet/DiscountCard/index.d.ts +0 -3
- package/lib/components/wallet/DiscountCard/index.js +0 -209
- package/lib/components/wallet/DiscountCard/index.less +0 -9
- package/lib/components/wallet/DiscountCard/model.d.ts +0 -14
- package/lib/components/wallet/DiscountCard/model.js +0 -43
- package/lib/components/wallet/PointCard/index.d.ts +0 -3
- package/lib/components/wallet/PointCard/index.js +0 -190
- package/lib/components/wallet/PointCard/index.less +0 -9
- package/lib/components/wallet/PointCard/model.d.ts +0 -13
- package/lib/components/wallet/PointCard/model.js +0 -43
- package/lib/components/wallet/RechargeableCard/index.d.ts +0 -13
- package/lib/components/wallet/RechargeableCard/index.js +0 -380
- package/lib/components/wallet/RechargeableCard/index.less +0 -108
- package/lib/components/wallet/RechargeableCard/model.d.ts +0 -29
- package/lib/components/wallet/RechargeableCard/model.js +0 -49
- package/lib/components/wallet/RechargeableCard/serve.d.ts +0 -23
- package/lib/components/wallet/Voucher/index.d.ts +0 -12
- package/lib/components/wallet/Voucher/index.js +0 -146
- package/lib/components/wallet/Voucher/index.less +0 -9
- package/lib/components/wallet/Voucher/locales.d.ts +0 -21
- package/lib/components/wallet/Voucher/locales.js +0 -44
- package/lib/components/wallet/Voucher/model.d.ts +0 -13
- package/lib/components/wallet/Voucher/model.js +0 -43
- package/lib/components/wallet/carouselArrow.png +0 -0
- package/lib/components/wallet/components/FooterButtons/index.d.ts +0 -18
- package/lib/components/wallet/components/FooterButtons/index.js +0 -109
- package/lib/components/wallet/components/FooterButtons/index.less +0 -91
- package/lib/components/wallet/components/UsageRules/index.d.ts +0 -23
- package/lib/components/wallet/components/UsageRules/index.js +0 -113
- package/lib/components/wallet/components/UsageRules/index.less +0 -157
- package/lib/components/wallet/components/WalletBar/index.d.ts +0 -8
- package/lib/components/wallet/components/WalletBar/index.js +0 -49
- package/lib/components/wallet/components/WalletBar/index.less +0 -36
- package/lib/components/wallet/components/WalletCard.d.ts +0 -11
- package/lib/components/wallet/components/WalletCard.js +0 -97
- package/lib/components/wallet/components/index.d.ts +0 -3
- package/lib/components/wallet/hooks/useWalletCard.d.ts +0 -34
- package/lib/components/wallet/hooks/useWalletCard.js +0 -111
- package/lib/components/wallet/index.d.ts +0 -10
- package/lib/components/wallet/index.js +0 -580
- package/lib/components/wallet/index.less +0 -151
- package/lib/components/wallet/locales.d.ts +0 -132
- package/lib/components/wallet/locales.js +0 -163
- package/lib/components/wallet/model.d.ts +0 -37
- package/lib/components/wallet/model.js +0 -91
- package/lib/components/wallet/serve.d.ts +0 -150
- package/lib/components/wallet/serve.js +0 -85
- package/lib/components/wallet/utils/formatUtils.d.ts +0 -36
- package/lib/components/wallet/utils/formatUtils.js +0 -73
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React, { useContext, useEffect, useMemo, useRef } from 'react';
|
|
8
|
-
import { RecordView, PisellEmpty, PisellText, Typography } from '@pisell/materials';
|
|
9
|
-
import { Context, Provider } from "./model";
|
|
10
|
-
import { useDetail } from "../DetailContext";
|
|
11
|
-
import WalletCard from "../components/WalletCard";
|
|
12
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
13
|
-
import { locales, isMobile } from '@pisell/utils';
|
|
14
|
-
import localeTexts from "../locales";
|
|
15
|
-
import "./index.less";
|
|
16
|
-
var Title = Typography.Title;
|
|
17
|
-
var Amount = PisellText.Amount;
|
|
18
|
-
var RechargeableCard = Provider(function (props) {
|
|
19
|
-
var _utils$getStore, _dvaStore$core;
|
|
20
|
-
var globalState = props.globalState,
|
|
21
|
-
setGlobalState = props.setGlobalState;
|
|
22
|
-
var currentId = globalState.currentId,
|
|
23
|
-
_globalState$product_ = globalState.product_discount_card,
|
|
24
|
-
product_discount_card = _globalState$product_ === void 0 ? [] : _globalState$product_,
|
|
25
|
-
currentDetail = globalState.currentDetail;
|
|
26
|
-
var _useContext = useContext(Context),
|
|
27
|
-
state = _useContext.state,
|
|
28
|
-
dispatch = _useContext.dispatch;
|
|
29
|
-
var context = useEngineContext();
|
|
30
|
-
var utils = context.appHelper.utils || {};
|
|
31
|
-
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();
|
|
32
|
-
var platform = useMemo(function () {
|
|
33
|
-
return isMobile() ? 'h5' : 'pc';
|
|
34
|
-
}, []);
|
|
35
|
-
var _useDetail = useDetail(),
|
|
36
|
-
openDetail = _useDetail.openDetail,
|
|
37
|
-
renderDetail = _useDetail.renderDetail,
|
|
38
|
-
closeDetail = _useDetail.closeDetail;
|
|
39
|
-
|
|
40
|
-
// 添加RecordView引用
|
|
41
|
-
var recordViewRef = useRef(null);
|
|
42
|
-
|
|
43
|
-
// 监听setup状态变化关闭详情
|
|
44
|
-
useEffect(function () {
|
|
45
|
-
if ((state === null || state === void 0 ? void 0 : state.setup) !== 'detail' && recordViewRef.current) {
|
|
46
|
-
recordViewRef.current.closeDetailModal();
|
|
47
|
-
}
|
|
48
|
-
}, [state === null || state === void 0 ? void 0 : state.setup]);
|
|
49
|
-
|
|
50
|
-
// 监听全局状态变化,同步到组件内部状态
|
|
51
|
-
useEffect(function () {
|
|
52
|
-
if (globalState.setup && globalState.setup !== (state === null || state === void 0 ? void 0 : state.setup)) {
|
|
53
|
-
dispatch({
|
|
54
|
-
type: 'setState',
|
|
55
|
-
payload: {
|
|
56
|
-
setup: globalState.setup
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// 添加打印,便于调试
|
|
61
|
-
}
|
|
62
|
-
}, [globalState.setup]);
|
|
63
|
-
|
|
64
|
-
// 添加处理后退按钮的方法
|
|
65
|
-
var handleBack = function handleBack() {
|
|
66
|
-
if (recordViewRef.current) {
|
|
67
|
-
recordViewRef.current.closeDetailModal();
|
|
68
|
-
}
|
|
69
|
-
// 关闭详情
|
|
70
|
-
closeDetail();
|
|
71
|
-
|
|
72
|
-
// 更新组件内部状态
|
|
73
|
-
dispatch({
|
|
74
|
-
type: 'setState',
|
|
75
|
-
payload: {
|
|
76
|
-
setup: 'list'
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// 更新全局状态
|
|
81
|
-
setGlobalState({
|
|
82
|
-
setup: 'list'
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
// 添加打印,便于调试
|
|
86
|
-
};
|
|
87
|
-
var _renderItem = function renderItem(item) {
|
|
88
|
-
return /*#__PURE__*/React.createElement(WalletCard, {
|
|
89
|
-
item: item,
|
|
90
|
-
currentId: currentId,
|
|
91
|
-
isDiscountCard: true,
|
|
92
|
-
onClick: function onClick() {
|
|
93
|
-
setGlobalState({
|
|
94
|
-
currentId: item.id
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
useEffect(function () {
|
|
100
|
-
if (currentId) {
|
|
101
|
-
dispatch({
|
|
102
|
-
type: 'setState',
|
|
103
|
-
payload: {
|
|
104
|
-
currentDetail: product_discount_card.find(function (item) {
|
|
105
|
-
return item.id === currentId;
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}, [currentId]);
|
|
111
|
-
useEffect(function () {
|
|
112
|
-
var enabledCards = product_discount_card.filter(function (item) {
|
|
113
|
-
return item.limit_status === 'enable';
|
|
114
|
-
});
|
|
115
|
-
var total = enabledCards.reduce(function (sum, item) {
|
|
116
|
-
return sum + Number(item.balance);
|
|
117
|
-
}, 0);
|
|
118
|
-
dispatch({
|
|
119
|
-
type: 'setState',
|
|
120
|
-
payload: {
|
|
121
|
-
total: total
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
}, [product_discount_card]);
|
|
125
|
-
var isEmpty = !product_discount_card.some(function (item) {
|
|
126
|
-
return item.limit_status === 'enable';
|
|
127
|
-
}); //判断可用卡片是否为空
|
|
128
|
-
// 注册多语言
|
|
129
|
-
locales.init(localeTexts, (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
|
|
130
|
-
var formatData = function formatData() {
|
|
131
|
-
var fileterArr = product_discount_card.filter(function () {});
|
|
132
|
-
var available = {
|
|
133
|
-
title: locales.getText('page.wallet.available'),
|
|
134
|
-
dataSource: product_discount_card.filter(function (item) {
|
|
135
|
-
return item.limit_status === 'enable';
|
|
136
|
-
})
|
|
137
|
-
};
|
|
138
|
-
var unavailable = {
|
|
139
|
-
title: locales.getText('page.wallet.unavailable'),
|
|
140
|
-
dataSource: product_discount_card.filter(function (item) {
|
|
141
|
-
return item.limit_status === 'disable';
|
|
142
|
-
})
|
|
143
|
-
};
|
|
144
|
-
return [available, unavailable];
|
|
145
|
-
};
|
|
146
|
-
var detail = function detail() {
|
|
147
|
-
if (!(currentDetail !== null && currentDetail !== void 0 && currentDetail.id)) return null;
|
|
148
|
-
|
|
149
|
-
// 打印当前状态
|
|
150
|
-
|
|
151
|
-
// 添加必要属性,确保详情正确显示
|
|
152
|
-
var detailWithBar = _objectSpread(_objectSpread({}, currentDetail), {}, {
|
|
153
|
-
isDiscoundCard: true,
|
|
154
|
-
showWalletBar: platform === 'h5',
|
|
155
|
-
// 添加显示WalletBar的标志
|
|
156
|
-
onBack: handleBack // 添加返回处理函数
|
|
157
|
-
});
|
|
158
|
-
return renderDetail(detailWithBar);
|
|
159
|
-
};
|
|
160
|
-
return isEmpty ? /*#__PURE__*/React.createElement(PisellEmpty, null) : /*#__PURE__*/React.createElement(React.Fragment, null, platform !== 'pc' && /*#__PURE__*/React.createElement(Title, {
|
|
161
|
-
className: "wallet-discountCard-title"
|
|
162
|
-
}, locales.getText('page.wallet.discountCard')), /*#__PURE__*/React.createElement(RecordView, {
|
|
163
|
-
ref: recordViewRef,
|
|
164
|
-
leftSpan: 9,
|
|
165
|
-
rightSpan: 15,
|
|
166
|
-
gutter: 20,
|
|
167
|
-
onRowClick: function onRowClick(currentDetail) {
|
|
168
|
-
// 设置全局状态
|
|
169
|
-
setGlobalState({
|
|
170
|
-
currentId: currentDetail.id || '',
|
|
171
|
-
currentDetail: currentDetail,
|
|
172
|
-
setup: 'detail' // 设置状态为detail
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
// 设置组件内部状态
|
|
176
|
-
dispatch({
|
|
177
|
-
type: 'setState',
|
|
178
|
-
payload: {
|
|
179
|
-
setup: 'detail'
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
// 添加打印,便于调试
|
|
184
|
-
|
|
185
|
-
// 添加必要属性,确保详情正确显示
|
|
186
|
-
openDetail(_objectSpread(_objectSpread({}, currentDetail), {}, {
|
|
187
|
-
isDiscoundCard: true,
|
|
188
|
-
showWalletBar: platform === 'h5',
|
|
189
|
-
// 添加显示WalletBar的标志
|
|
190
|
-
onBack: handleBack // 添加返回处理函数
|
|
191
|
-
}));
|
|
192
|
-
},
|
|
193
|
-
pcDetailModalDisplay: platform === 'h5' ? true : false,
|
|
194
|
-
padDetailModalDisplay: true,
|
|
195
|
-
mobilePadDetailModalDisplay: true,
|
|
196
|
-
modalWrapStyle: {
|
|
197
|
-
overflowY: 'auto',
|
|
198
|
-
top: 0,
|
|
199
|
-
height: '100%',
|
|
200
|
-
zIndex: 998,
|
|
201
|
-
position: 'fixed',
|
|
202
|
-
left: 0,
|
|
203
|
-
right: 0
|
|
204
|
-
},
|
|
205
|
-
split: false,
|
|
206
|
-
detail: detail(),
|
|
207
|
-
children: null,
|
|
208
|
-
emptyButtons: [],
|
|
209
|
-
doubleList: true,
|
|
210
|
-
doubleListSource: formatData(),
|
|
211
|
-
dataSource: product_discount_card,
|
|
212
|
-
renderItem: function renderItem(value) {
|
|
213
|
-
return _renderItem(value);
|
|
214
|
-
},
|
|
215
|
-
isShowClode: false
|
|
216
|
-
}));
|
|
217
|
-
});
|
|
218
|
-
export default RechargeableCard;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
setup?: 'menu' | 'list' | 'detail' | string;
|
|
5
|
-
}
|
|
6
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
7
|
-
state: RechargeState;
|
|
8
|
-
} & {
|
|
9
|
-
dispatch: (params: {
|
|
10
|
-
type: string;
|
|
11
|
-
payload: any;
|
|
12
|
-
}) => void;
|
|
13
|
-
}>;
|
|
14
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { miniRedux } from '@pisell/utils';
|
|
8
|
-
var defaultState = {
|
|
9
|
-
total: 0
|
|
10
|
-
};
|
|
11
|
-
var _miniRedux = miniRedux({
|
|
12
|
-
namespace: 'state',
|
|
13
|
-
state: defaultState,
|
|
14
|
-
reducers: {
|
|
15
|
-
setState: function setState(state, payload) {
|
|
16
|
-
return _objectSpread(_objectSpread({}, state), payload);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}),
|
|
20
|
-
Provider = _miniRedux.Provider,
|
|
21
|
-
Context = _miniRedux.Context;
|
|
22
|
-
export { Provider, Context };
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import React, { useContext, useEffect, useRef, useCallback } from 'react';
|
|
8
|
-
import { RecordView, PisellEmpty, CardMetricItem, Typography } from '@pisell/materials';
|
|
9
|
-
import { Context, Provider } from "./model";
|
|
10
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
11
|
-
import { locales, isMobile } from '@pisell/utils';
|
|
12
|
-
import localeTexts from "../locales";
|
|
13
|
-
import "./index.less";
|
|
14
|
-
import { useDetail } from "../DetailContext";
|
|
15
|
-
import WalletCard from "../components/WalletCard";
|
|
16
|
-
var Title = Typography.Title;
|
|
17
|
-
var RechargeableCard = Provider(function (props) {
|
|
18
|
-
var _utils$getStore, _dvaStore$core;
|
|
19
|
-
var globalState = props.globalState,
|
|
20
|
-
setGlobalState = props.setGlobalState;
|
|
21
|
-
var currentId = globalState.currentId,
|
|
22
|
-
currentDetail = globalState.currentDetail,
|
|
23
|
-
point_card = globalState.point_card;
|
|
24
|
-
var _useContext = useContext(Context),
|
|
25
|
-
state = _useContext.state,
|
|
26
|
-
dispatch = _useContext.dispatch;
|
|
27
|
-
var context = useEngineContext();
|
|
28
|
-
var utils = context.appHelper.utils || {};
|
|
29
|
-
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();
|
|
30
|
-
var recordViewRef = useRef(null);
|
|
31
|
-
var _useDetail = useDetail(),
|
|
32
|
-
openDetail = _useDetail.openDetail,
|
|
33
|
-
renderDetail = _useDetail.renderDetail;
|
|
34
|
-
useEffect(function () {
|
|
35
|
-
document.body.id = 'body';
|
|
36
|
-
}, []);
|
|
37
|
-
var platform = isMobile() ? 'h5' : 'pc';
|
|
38
|
-
var _renderItem = function renderItem(item) {
|
|
39
|
-
return /*#__PURE__*/React.createElement(WalletCard, {
|
|
40
|
-
item: item,
|
|
41
|
-
balanceTitle: locales.getText('page.wallet.pointCard'),
|
|
42
|
-
currentId: currentId,
|
|
43
|
-
onClick: function onClick() {
|
|
44
|
-
setGlobalState({
|
|
45
|
-
type: 'setState',
|
|
46
|
-
payload: {
|
|
47
|
-
currentId: item.id
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
};
|
|
53
|
-
useEffect(function () {
|
|
54
|
-
var enabledCards = point_card.filter(function (item) {
|
|
55
|
-
return item.limit_status === 'enable';
|
|
56
|
-
});
|
|
57
|
-
var total = enabledCards.reduce(function (sum, item) {
|
|
58
|
-
return sum + Number(item.balance);
|
|
59
|
-
}, 0);
|
|
60
|
-
dispatch({
|
|
61
|
-
type: 'setState',
|
|
62
|
-
payload: {
|
|
63
|
-
total: total
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}, [point_card]);
|
|
67
|
-
var detail = function detail() {
|
|
68
|
-
if (!(currentDetail !== null && currentDetail !== void 0 && currentDetail.id)) return null;
|
|
69
|
-
|
|
70
|
-
// 添加必要属性,确保详情正确显示
|
|
71
|
-
var detailWithProps = _objectSpread(_objectSpread({}, currentDetail), {}, {
|
|
72
|
-
showWalletBar: platform === 'h5',
|
|
73
|
-
// 添加显示WalletBar的标志
|
|
74
|
-
onBack: handleBack // 添加返回处理函数
|
|
75
|
-
});
|
|
76
|
-
return renderDetail(detailWithProps);
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
// 添加处理后退按钮的方法
|
|
80
|
-
var handleBack = useCallback(function () {
|
|
81
|
-
if (recordViewRef.current) {
|
|
82
|
-
recordViewRef.current.closeDetailModal();
|
|
83
|
-
}
|
|
84
|
-
// 更新状态
|
|
85
|
-
setGlobalState({
|
|
86
|
-
setup: 'list'
|
|
87
|
-
});
|
|
88
|
-
}, [recordViewRef, setGlobalState]);
|
|
89
|
-
var isEmpty = !point_card.some(function (item) {
|
|
90
|
-
return item.limit_status === 'enable';
|
|
91
|
-
}); //判断可用卡片是否为空
|
|
92
|
-
|
|
93
|
-
// 注册多语言
|
|
94
|
-
locales.init(localeTexts, (dvaStore === null || dvaStore === void 0 || (_dvaStore$core = dvaStore.core) === null || _dvaStore$core === void 0 ? void 0 : _dvaStore$core.translateLocale) || 'en');
|
|
95
|
-
var formatData = function formatData() {
|
|
96
|
-
var available = {
|
|
97
|
-
title: locales.getText('page.wallet.available'),
|
|
98
|
-
dataSource: point_card.filter(function (item) {
|
|
99
|
-
return item.limit_status === 'enable';
|
|
100
|
-
})
|
|
101
|
-
};
|
|
102
|
-
var unavailable = {
|
|
103
|
-
title: locales.getText('page.wallet.unavailable'),
|
|
104
|
-
dataSource: point_card.filter(function (item) {
|
|
105
|
-
return item.limit_status === 'disable';
|
|
106
|
-
})
|
|
107
|
-
};
|
|
108
|
-
return [available, unavailable];
|
|
109
|
-
};
|
|
110
|
-
useEffect(function () {
|
|
111
|
-
if (globalState.setup !== 'detail') {
|
|
112
|
-
var _recordViewRef$curren;
|
|
113
|
-
(_recordViewRef$curren = recordViewRef.current) === null || _recordViewRef$curren === void 0 || _recordViewRef$curren.closeDetailModal();
|
|
114
|
-
}
|
|
115
|
-
}, [globalState.setup]);
|
|
116
|
-
return isEmpty ? /*#__PURE__*/React.createElement(PisellEmpty, null) : /*#__PURE__*/React.createElement(React.Fragment, null, platform !== 'pc' && /*#__PURE__*/React.createElement(Title, {
|
|
117
|
-
className: "wallet-pointCard-title"
|
|
118
|
-
}, locales.getText('page.wallet.pointCard')), /*#__PURE__*/React.createElement(CardMetricItem, {
|
|
119
|
-
title: locales.getText('page.wallet.points'),
|
|
120
|
-
style: {
|
|
121
|
-
margin: '8px 0 24px'
|
|
122
|
-
},
|
|
123
|
-
hint: false,
|
|
124
|
-
tags: false,
|
|
125
|
-
number: state.total,
|
|
126
|
-
showCurrencySymbol: false
|
|
127
|
-
}), /*#__PURE__*/React.createElement(RecordView, {
|
|
128
|
-
ref: recordViewRef,
|
|
129
|
-
mobilePadDetailModalDisplay: true,
|
|
130
|
-
leftSpan: 9,
|
|
131
|
-
rightSpan: 15,
|
|
132
|
-
gutter: 20,
|
|
133
|
-
onRowClick: function onRowClick(currentDetail) {
|
|
134
|
-
setGlobalState({
|
|
135
|
-
currentId: currentDetail.id || '',
|
|
136
|
-
currentDetail: currentDetail,
|
|
137
|
-
setup: 'detail' // 设置状态为detail
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
// 添加必要属性,确保详情正确显示
|
|
141
|
-
var detailWithProps = _objectSpread(_objectSpread({}, currentDetail), {}, {
|
|
142
|
-
showWalletBar: platform === 'h5',
|
|
143
|
-
// 添加显示WalletBar的标志
|
|
144
|
-
onBack: handleBack // 添加返回处理函数
|
|
145
|
-
});
|
|
146
|
-
openDetail(detailWithProps);
|
|
147
|
-
},
|
|
148
|
-
modalWrapStyle: {
|
|
149
|
-
overflowY: 'auto',
|
|
150
|
-
top: 68,
|
|
151
|
-
height: 'calc(100% - 68px)',
|
|
152
|
-
zIndex: 998
|
|
153
|
-
},
|
|
154
|
-
pcDetailModalDisplay: platform === 'h5' ? true : false,
|
|
155
|
-
padDetailModalDisplay: true,
|
|
156
|
-
isShowClode: false,
|
|
157
|
-
split: false,
|
|
158
|
-
children: null,
|
|
159
|
-
detail: detail(),
|
|
160
|
-
emptyButtons: [],
|
|
161
|
-
doubleList: true,
|
|
162
|
-
doubleListSource: formatData(),
|
|
163
|
-
dataSource: point_card,
|
|
164
|
-
renderItem: function renderItem(value) {
|
|
165
|
-
return _renderItem(value);
|
|
166
|
-
}
|
|
167
|
-
}));
|
|
168
|
-
});
|
|
169
|
-
export default RechargeableCard;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface RechargeState {
|
|
3
|
-
total: number;
|
|
4
|
-
}
|
|
5
|
-
export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
|
|
6
|
-
state: RechargeState;
|
|
7
|
-
} & {
|
|
8
|
-
dispatch: (params: {
|
|
9
|
-
type: string;
|
|
10
|
-
payload: any;
|
|
11
|
-
}) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { miniRedux } from '@pisell/utils';
|
|
8
|
-
var defaultState = {
|
|
9
|
-
total: 0
|
|
10
|
-
};
|
|
11
|
-
var _miniRedux = miniRedux({
|
|
12
|
-
namespace: 'state',
|
|
13
|
-
state: defaultState,
|
|
14
|
-
reducers: {
|
|
15
|
-
setState: function setState(state, payload) {
|
|
16
|
-
return _objectSpread(_objectSpread({}, state), payload);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}),
|
|
20
|
-
Provider = _miniRedux.Provider,
|
|
21
|
-
Context = _miniRedux.Context;
|
|
22
|
-
export { Provider, Context };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
export interface RechargeableCardProps {
|
|
4
|
-
globalState: any;
|
|
5
|
-
setGlobalState: (state: any) => void;
|
|
6
|
-
handleAddWalletCard?: (addWallet: () => void) => void;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* 充值卡组件
|
|
10
|
-
* 管理充值卡的展示和操作
|
|
11
|
-
*/
|
|
12
|
-
declare const RechargeableCard: React.FC<RechargeableCardProps>;
|
|
13
|
-
export default RechargeableCard;
|