@pisell/private-materials 6.3.88 → 6.3.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/footer.d.ts +0 -1
- package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/es/components/booking/hooks/useClearCart.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/date/index.d.ts +1 -0
- package/es/components/booking/info/dateRange/index.d.ts +0 -1
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/es/components/{eftpos/PairModal → ecocup/components/AddCustomerModal}/index.js +159 -189
- package/es/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/es/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/es/components/ecocup/components/CupActionList/index.js +91 -0
- package/es/components/ecocup/components/CupActionList/index.less +102 -0
- package/es/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupActionModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/es/components/ecocup/components/CupActionModal/index.js +92 -0
- package/es/components/ecocup/components/CupActionModal/index.less +38 -0
- package/es/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
- package/es/components/ecocup/components/CupInfoCard/index.js +12 -0
- package/es/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/es/components/ecocup/components/CupStatusModal/hooks.js +68 -0
- package/es/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/es/components/ecocup/components/CupStatusModal/index.js +147 -0
- package/es/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/es/components/ecocup/components/CustomerAndCupModal/hooks.js +133 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.js +227 -0
- package/es/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/es/components/ecocup/components/CustomerCard/index.d.ts +6 -0
- package/es/components/ecocup/components/CustomerCard/index.js +34 -0
- package/es/components/ecocup/components/CustomerCard/index.less +50 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/es/components/ecocup/components/MoreDropdown/index.js +33 -0
- package/es/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/es/components/ecocup/components/PageHeader/index.js +37 -0
- package/es/components/ecocup/components/PageHeader/index.less +19 -0
- package/es/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/es/components/ecocup/components/SearchBar/const.js +16 -0
- package/es/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/es/components/ecocup/components/SearchBar/hooks.js +184 -0
- package/es/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/es/components/ecocup/components/SearchBar/index.js +218 -0
- package/es/components/ecocup/components/SearchBar/index.less +88 -0
- package/es/components/ecocup/cupList/const.d.ts +133 -0
- package/es/components/ecocup/cupList/const.js +306 -0
- package/es/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/es/components/ecocup/cupList/hooks/index.js +4 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/es/components/ecocup/cupList/hooks/useColumns.js +168 -0
- package/es/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/es/components/ecocup/cupList/hooks/useCupApi.js +172 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/es/components/ecocup/cupList/hooks/useSummary.js +40 -0
- package/es/components/ecocup/cupList/index.d.ts +6 -0
- package/es/components/ecocup/cupList/index.js +220 -0
- package/es/components/ecocup/cupList/index.less +113 -0
- package/es/components/ecocup/cupProject/const.d.ts +7 -0
- package/es/components/ecocup/cupProject/const.js +27 -0
- package/es/components/ecocup/cupProject/index.d.ts +3 -0
- package/es/components/ecocup/cupProject/index.js +103 -0
- package/es/components/ecocup/cupProject/index.less +41 -0
- package/es/components/ecocup/customerList/const.d.ts +44 -0
- package/es/components/ecocup/customerList/const.js +67 -0
- package/es/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/es/components/ecocup/customerList/hooks/index.js +3 -0
- package/es/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useColumns.js +44 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/es/components/ecocup/customerList/hooks/useCustomerApi.js +70 -0
- package/es/components/ecocup/customerList/index.d.ts +7 -0
- package/es/components/ecocup/customerList/index.js +127 -0
- package/es/components/ecocup/customerList/index.less +15 -0
- package/es/components/ecocup/hooks.d.ts +49 -0
- package/es/components/ecocup/hooks.js +151 -0
- package/es/components/ecocup/locales.d.ts +339 -0
- package/es/components/ecocup/locales.js +372 -0
- package/es/components/ecocup/types.d.ts +103 -0
- package/es/components/ecocup/types.js +36 -0
- package/es/components/ecocup/utils/scanListener.d.ts +20 -0
- package/es/components/ecocup/utils/scanListener.js +107 -0
- package/es/components/eftpos/const.d.ts +1 -3
- package/es/components/eftpos/const.js +0 -2
- package/es/components/eftpos/device.d.ts +1 -3
- package/es/components/eftpos/device.js +3 -5
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -7
- package/es/components/eftpos/hooks.js +0 -20
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/index.js +14 -118
- package/es/components/eftpos/index.less +1 -26
- package/es/components/eftpos/locales.d.ts +0 -24
- package/es/components/eftpos/locales.js +7 -91
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -0
- package/es/components/eftposPay/app.d.ts +1 -1
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/const.d.ts +1 -6
- package/es/components/eftposPay/const.js +0 -2
- package/es/components/eftposPay/device.js +208 -36
- package/es/components/eftposPay/hooks.d.ts +1 -2
- package/es/components/eftposPay/hooks.js +0 -12
- package/es/components/eftposPay/linkly/index.js +0 -1
- package/es/components/eftposPay/manufacturer.d.ts +0 -1
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.js +2 -7
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.js +9 -9
- package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/es/hooks/useEngineContext.d.ts +1 -0
- package/es/hooks/useEngineContext.js +7 -0
- package/es/index.d.ts +5 -1
- package/es/index.js +5 -1
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/es/plus/orderList/components/BatchActionBar.js +835 -0
- package/es/plus/orderList/components/FilterList.d.ts +8 -0
- package/es/plus/orderList/components/FilterList.js +78 -0
- package/es/plus/orderList/components/HandleActions.d.ts +4 -0
- package/es/plus/orderList/components/HandleActions.js +24 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/es/plus/orderList/components/QuickFilter.js +14 -0
- package/es/plus/orderList/components/Reset.d.ts +6 -0
- package/es/plus/orderList/components/Reset.js +23 -0
- package/es/plus/orderList/components/Toolbar.d.ts +5 -0
- package/es/plus/orderList/components/Toolbar.js +57 -0
- package/es/plus/orderList/config.d.ts +154 -0
- package/es/plus/orderList/config.js +786 -0
- package/es/plus/orderList/index.d.ts +9 -0
- package/es/plus/orderList/index.js +128 -0
- package/es/plus/orderList/index.less +125 -0
- package/es/plus/orderList/locales.d.ts +372 -0
- package/es/plus/orderList/locales.js +459 -0
- package/es/plus/orderList/serve.d.ts +42 -0
- package/es/plus/orderList/serve.js +351 -0
- package/es/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
- package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/es/plus/skuOptionsSelection/index.js +2 -2
- package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
- package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +8 -4
- package/es/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/es/pro/NumericStepper/index.d.ts +28 -3
- package/es/pro/NumericStepper/index.js +175 -107
- package/es/pro/NumericStepper/index.less +295 -143
- package/es/pro/Selector/Selector.js +33 -26
- package/es/pro/Selector/components/Card/index.js +2 -3
- package/es/pro/Selector/components/Card/index.less +11 -4
- package/es/pro/Selector/components/Indicator/index.d.ts +1 -0
- package/es/pro/Selector/components/Indicator/index.js +2 -1
- package/es/pro/Selector/components/Indicator/index.less +4 -1
- package/es/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
- package/es/pro/Selector/components/LayoutContainer/index.js +226 -9
- package/es/pro/Selector/components/LayoutContainer/index.less +19 -0
- package/es/pro/Selector/demo.js +1 -1
- package/es/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/es/pro/Selector/hooks/usePresetProps.js +60 -6
- package/es/pro/Selector/selector.less +0 -64
- package/es/pro/Selector/types.d.ts +40 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.js +54 -0
- package/es/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/es/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/es/pro/comprehensiveSearch/components/index.js +2 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.js +140 -0
- package/es/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/components/searchSection/locales.js +14 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/es/pro/comprehensiveSearch/hooks/useNativeScanner.js +24 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/es/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +44 -0
- package/es/pro/comprehensiveSearch/index.d.ts +7 -0
- package/es/pro/comprehensiveSearch/index.js +207 -0
- package/es/pro/comprehensiveSearch/index.less +196 -0
- package/es/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/es/pro/comprehensiveSearch/locales.js +14 -0
- package/es/pro/comprehensiveSearch/types.d.ts +32 -0
- package/es/pro/comprehensiveSearch/types.js +1 -0
- package/es/pro/keyboards/index.d.ts +2 -0
- package/es/pro/keyboards/index.js +1 -0
- package/es/pro/keyboards/locales.d.ts +24 -0
- package/es/pro/keyboards/locales.js +35 -0
- package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/es/pro/keyboards/numberKeyboard/index.js +523 -0
- package/es/pro/keyboards/numberKeyboard/index.less +59 -0
- package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/es/pro/keyboards/numberKeyboard/types.js +1 -0
- package/es/pro/pisellPaymentList/example.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +0 -1
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/footer.d.ts +0 -1
- package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
- package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/date/index.d.ts +1 -0
- package/lib/components/booking/info/dateRange/index.d.ts +0 -1
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +9 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.js +212 -0
- package/lib/components/ecocup/components/AddCustomerModal/index.less +9 -0
- package/lib/components/ecocup/components/CupActionList/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupActionList/index.js +116 -0
- package/lib/components/ecocup/components/CupActionList/index.less +102 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupActionModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupActionModal/index.d.ts +14 -0
- package/lib/components/ecocup/components/CupActionModal/index.js +125 -0
- package/lib/components/ecocup/components/CupActionModal/index.less +38 -0
- package/lib/components/ecocup/components/CupInfoCard/index.d.ts +7 -0
- package/lib/components/ecocup/components/CupInfoCard/index.js +43 -0
- package/lib/components/ecocup/components/CupInfoCard/index.less +11 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.d.ts +5 -0
- package/lib/components/ecocup/components/CupStatusModal/hooks.js +55 -0
- package/lib/components/ecocup/components/CupStatusModal/index.d.ts +13 -0
- package/lib/components/ecocup/components/CupStatusModal/index.js +140 -0
- package/lib/components/ecocup/components/CupStatusModal/index.less +35 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.d.ts +14 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/hooks.js +89 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +16 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.js +178 -0
- package/lib/components/ecocup/components/CustomerAndCupModal/index.less +68 -0
- package/lib/components/ecocup/components/CustomerCard/index.d.ts +6 -0
- package/lib/components/ecocup/components/CustomerCard/index.js +48 -0
- package/lib/components/ecocup/components/CustomerCard/index.less +50 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +8 -0
- package/lib/components/ecocup/components/MoreDropdown/index.js +68 -0
- package/lib/components/ecocup/components/PageHeader/index.d.ts +6 -0
- package/lib/components/ecocup/components/PageHeader/index.js +59 -0
- package/lib/components/ecocup/components/PageHeader/index.less +19 -0
- package/lib/components/ecocup/components/SearchBar/const.d.ts +4 -0
- package/lib/components/{eftposPay/mx51/types.js → ecocup/components/SearchBar/const.js} +28 -17
- package/lib/components/ecocup/components/SearchBar/hooks.d.ts +44 -0
- package/lib/components/ecocup/components/SearchBar/hooks.js +135 -0
- package/lib/components/ecocup/components/SearchBar/index.d.ts +12 -0
- package/lib/components/ecocup/components/SearchBar/index.js +213 -0
- package/lib/components/ecocup/components/SearchBar/index.less +88 -0
- package/lib/components/ecocup/cupList/const.d.ts +133 -0
- package/lib/components/ecocup/cupList/const.js +326 -0
- package/lib/components/ecocup/cupList/hooks/index.d.ts +4 -0
- package/lib/components/ecocup/cupList/hooks/index.js +39 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +43 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.js +202 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.d.ts +32 -0
- package/lib/components/ecocup/cupList/hooks/useCupApi.js +112 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +2 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.js +75 -0
- package/lib/components/ecocup/cupList/index.d.ts +6 -0
- package/lib/components/ecocup/cupList/index.js +208 -0
- package/lib/components/ecocup/cupList/index.less +113 -0
- package/lib/components/ecocup/cupProject/const.d.ts +7 -0
- package/lib/components/ecocup/cupProject/const.js +58 -0
- package/lib/components/ecocup/cupProject/index.d.ts +3 -0
- package/lib/components/ecocup/cupProject/index.js +126 -0
- package/lib/components/ecocup/cupProject/index.less +41 -0
- package/lib/components/ecocup/customerList/const.d.ts +44 -0
- package/lib/components/ecocup/customerList/const.js +93 -0
- package/lib/components/ecocup/customerList/hooks/index.d.ts +3 -0
- package/lib/components/{eftposPay/aggregatePayment → ecocup/customerList/hooks}/index.js +10 -10
- package/lib/components/ecocup/customerList/hooks/useColumns.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useColumns.js +89 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.d.ts +15 -0
- package/lib/components/ecocup/customerList/hooks/useCustomerApi.js +56 -0
- package/lib/components/ecocup/customerList/index.d.ts +7 -0
- package/lib/components/ecocup/customerList/index.js +138 -0
- package/lib/components/ecocup/customerList/index.less +15 -0
- package/lib/components/ecocup/hooks.d.ts +49 -0
- package/lib/components/ecocup/hooks.js +155 -0
- package/lib/components/ecocup/locales.d.ts +339 -0
- package/lib/components/ecocup/locales.js +389 -0
- package/lib/components/ecocup/types.d.ts +103 -0
- package/lib/components/ecocup/types.js +57 -0
- package/lib/components/ecocup/utils/scanListener.d.ts +20 -0
- package/lib/components/ecocup/utils/scanListener.js +90 -0
- package/lib/components/eftpos/const.d.ts +1 -3
- package/lib/components/eftpos/const.js +0 -2
- package/lib/components/eftpos/device.d.ts +1 -3
- package/lib/components/eftpos/device.js +3 -3
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -7
- package/lib/components/eftpos/hooks.js +0 -19
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/index.js +7 -73
- package/lib/components/eftpos/index.less +1 -26
- package/lib/components/eftpos/locales.d.ts +0 -24
- package/lib/components/eftpos/locales.js +4 -88
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -0
- package/lib/components/eftposPay/app.d.ts +1 -1
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/const.d.ts +1 -6
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/device.js +108 -23
- package/lib/components/eftposPay/hooks.d.ts +1 -2
- package/lib/components/eftposPay/hooks.js +0 -16
- package/lib/components/eftposPay/linkly/index.js +0 -1
- package/lib/components/eftposPay/manufacturer.d.ts +0 -1
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.js +2 -4
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.js +9 -9
- package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +1 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
- package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
- package/lib/hooks/useEngineContext.d.ts +1 -0
- package/lib/hooks/useEngineContext.js +10 -2
- package/lib/index.d.ts +5 -1
- package/lib/index.js +13 -1
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/orderList/components/BatchActionBar.d.ts +9 -0
- package/lib/plus/orderList/components/BatchActionBar.js +567 -0
- package/lib/plus/orderList/components/FilterList.d.ts +8 -0
- package/lib/plus/orderList/components/FilterList.js +121 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +4 -0
- package/lib/plus/orderList/components/HandleActions.js +52 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +4 -0
- package/lib/plus/orderList/components/QuickFilter.js +43 -0
- package/lib/plus/orderList/components/Reset.d.ts +6 -0
- package/lib/plus/orderList/components/Reset.js +58 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +5 -0
- package/lib/plus/orderList/components/Toolbar.js +68 -0
- package/lib/plus/orderList/config.d.ts +154 -0
- package/lib/plus/orderList/config.js +764 -0
- package/lib/plus/orderList/index.d.ts +9 -0
- package/lib/plus/orderList/index.js +132 -0
- package/lib/plus/orderList/index.less +125 -0
- package/lib/plus/orderList/locales.d.ts +372 -0
- package/lib/plus/orderList/locales.js +471 -0
- package/lib/plus/orderList/serve.d.ts +42 -0
- package/lib/plus/orderList/serve.js +177 -0
- package/lib/plus/saasRegister/components/VertifyEmail.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/OptionsCard/index.less +2 -0
- package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +0 -1
- package/lib/plus/skuOptionsSelection/index.js +2 -2
- package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.js +9 -2
- package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.js +7 -3
- package/lib/plus/walletPassGallery/components/passList/index.d.ts +0 -1
- package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +0 -1
- package/lib/pro/NumericStepper/index.d.ts +28 -3
- package/lib/pro/NumericStepper/index.js +176 -88
- package/lib/pro/NumericStepper/index.less +295 -143
- package/lib/pro/Selector/Selector.js +27 -16
- package/lib/pro/Selector/components/Card/index.js +9 -1
- package/lib/pro/Selector/components/Card/index.less +11 -4
- package/lib/pro/Selector/components/Indicator/index.d.ts +1 -0
- package/lib/pro/Selector/components/Indicator/index.js +1 -1
- package/lib/pro/Selector/components/Indicator/index.less +4 -1
- package/lib/pro/Selector/components/LayoutContainer/index.d.ts +5 -3
- package/lib/pro/Selector/components/LayoutContainer/index.js +130 -2
- package/lib/pro/Selector/components/LayoutContainer/index.less +19 -0
- package/lib/pro/Selector/demo.js +1 -1
- package/lib/pro/Selector/hooks/usePresetItemProps.js +2 -0
- package/lib/pro/Selector/hooks/usePresetProps.js +28 -6
- package/lib/pro/Selector/selector.less +0 -64
- package/lib/pro/Selector/types.d.ts +40 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.d.ts +11 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.js +64 -0
- package/lib/pro/comprehensiveSearch/components/deviceIconGroup/index.less +28 -0
- package/lib/pro/comprehensiveSearch/components/index.d.ts +2 -0
- package/lib/pro/comprehensiveSearch/components/index.js +42 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.d.ts +24 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.js +153 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/index.less +100 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/components/searchSection/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.d.ts +5 -0
- package/lib/pro/comprehensiveSearch/hooks/useNativeScanner.js +56 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.d.ts +9 -0
- package/lib/pro/comprehensiveSearch/hooks/useTerminalPeripherals.js +70 -0
- package/lib/pro/comprehensiveSearch/index.d.ts +7 -0
- package/lib/pro/comprehensiveSearch/index.js +190 -0
- package/lib/pro/comprehensiveSearch/index.less +196 -0
- package/lib/pro/comprehensiveSearch/locales.d.ts +15 -0
- package/lib/pro/comprehensiveSearch/locales.js +38 -0
- package/lib/pro/comprehensiveSearch/types.d.ts +32 -0
- package/lib/pro/comprehensiveSearch/types.js +17 -0
- package/lib/pro/keyboards/index.d.ts +2 -0
- package/lib/pro/keyboards/index.js +39 -0
- package/lib/pro/keyboards/locales.d.ts +24 -0
- package/lib/pro/keyboards/locales.js +47 -0
- package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
- package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
- package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
- package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
- package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
- package/lib/pro/pisellPaymentList/example.d.ts +1 -0
- package/lowcode/eco-cup-list/meta.ts +63 -0
- package/lowcode/eco-customer-list/meta.ts +63 -0
- package/lowcode/ecocup-cup-list/meta.ts +38 -0
- package/lowcode/ecocup-cup-project/meta.ts +35 -0
- package/lowcode/ecocup-customer-list/meta.ts +38 -0
- package/lowcode/order-list/meta.ts +87 -0
- package/package.json +6 -6
- package/es/components/eftpos/PairModal/hooks.d.ts +0 -27
- package/es/components/eftpos/PairModal/hooks.js +0 -67
- package/es/components/eftpos/PairModal/index.d.ts +0 -11
- package/es/components/eftpos/PairModal/index.less +0 -70
- package/es/components/eftpos/assets/mx51SCI.svg +0 -15
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
- package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -125
- package/es/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/es/components/eftposPay/aggregatePayment/index.js +0 -3
- package/es/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
- package/es/components/eftposPay/aggregatePayment/mock.js +0 -567
- package/es/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/es/components/eftposPay/aggregatePayment/service.js +0 -70
- package/es/components/eftposPay/aggregatePayment/types.d.ts +0 -96
- package/es/components/eftposPay/aggregatePayment/types.js +0 -61
- package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/es/components/eftposPay/aggregatePayment/utils/logs.js +0 -385
- package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +0 -1127
- package/es/components/eftposPay/mx51/Action.d.ts +0 -6
- package/es/components/eftposPay/mx51/Action.js +0 -91
- package/es/components/eftposPay/mx51/const.d.ts +0 -5
- package/es/components/eftposPay/mx51/const.js +0 -69
- package/es/components/eftposPay/mx51/index.d.ts +0 -6
- package/es/components/eftposPay/mx51/index.js +0 -362
- package/es/components/eftposPay/mx51/types.d.ts +0 -136
- package/es/components/eftposPay/mx51/types.js +0 -29
- package/es/components/eftposPay/mx51/utils.d.ts +0 -10
- package/es/components/eftposPay/mx51/utils.js +0 -120
- package/lib/components/eftpos/PairModal/hooks.d.ts +0 -27
- package/lib/components/eftpos/PairModal/hooks.js +0 -70
- package/lib/components/eftpos/PairModal/index.d.ts +0 -11
- package/lib/components/eftpos/PairModal/index.js +0 -197
- package/lib/components/eftpos/PairModal/index.less +0 -70
- package/lib/components/eftpos/assets/mx51SCI.svg +0 -15
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +0 -6
- package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +0 -152
- package/lib/components/eftposPay/aggregatePayment/index.d.ts +0 -3
- package/lib/components/eftposPay/aggregatePayment/mock.d.ts +0 -495
- package/lib/components/eftposPay/aggregatePayment/mock.js +0 -679
- package/lib/components/eftposPay/aggregatePayment/service.d.ts +0 -24
- package/lib/components/eftposPay/aggregatePayment/service.js +0 -81
- package/lib/components/eftposPay/aggregatePayment/types.d.ts +0 -96
- package/lib/components/eftposPay/aggregatePayment/types.js +0 -74
- package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +0 -110
- package/lib/components/eftposPay/aggregatePayment/utils/logs.js +0 -302
- package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +0 -132
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +0 -746
- package/lib/components/eftposPay/mx51/Action.d.ts +0 -6
- package/lib/components/eftposPay/mx51/Action.js +0 -127
- package/lib/components/eftposPay/mx51/const.d.ts +0 -5
- package/lib/components/eftposPay/mx51/const.js +0 -85
- package/lib/components/eftposPay/mx51/index.d.ts +0 -6
- package/lib/components/eftposPay/mx51/index.js +0 -330
- package/lib/components/eftposPay/mx51/types.d.ts +0 -136
- package/lib/components/eftposPay/mx51/utils.d.ts +0 -10
- package/lib/components/eftposPay/mx51/utils.js +0 -114
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import PaymentMethod from './utils/payment';
|
|
2
|
-
export declare enum EVisibleButtonType {
|
|
3
|
-
/** 取消按钮 */
|
|
4
|
-
CancelButton = "CancelButton",
|
|
5
|
-
/** 等待按钮 */
|
|
6
|
-
WaitButton = "WaitButton"
|
|
7
|
-
}
|
|
8
|
-
export declare enum EActionStatus {
|
|
9
|
-
/** 空 */
|
|
10
|
-
Empty = "Empty",
|
|
11
|
-
/** 取消 */
|
|
12
|
-
Cancel = "Cancel",
|
|
13
|
-
/** 取消中 */
|
|
14
|
-
CancelWaiting = "CancelWaiting",
|
|
15
|
-
/** 签名 */
|
|
16
|
-
Signature = "Signature",
|
|
17
|
-
/** 签名等待中 */
|
|
18
|
-
SignatureWaiting = "SignatureWaiting"
|
|
19
|
-
}
|
|
20
|
-
export declare const QUERY_START_DELAY: number;
|
|
21
|
-
export declare const GLOBAL_TIMEOUT: number;
|
|
22
|
-
export declare const REQUEST_TIMEOUT: number;
|
|
23
|
-
export declare const QUERY_INTERVAL: number;
|
|
24
|
-
/**
|
|
25
|
-
* 聚合支付初始化参数
|
|
26
|
-
*/
|
|
27
|
-
export interface PaymentMethodOptions {
|
|
28
|
-
/** 支付类型 */
|
|
29
|
-
paymentCode: string;
|
|
30
|
-
/** 交易号 */
|
|
31
|
-
paymentNum: string;
|
|
32
|
-
/** 订单ID */
|
|
33
|
-
orderId?: string | number;
|
|
34
|
-
/** 设备ID */
|
|
35
|
-
deviceId?: string | number;
|
|
36
|
-
/** 统一回调函数 */
|
|
37
|
-
callback: PaymentCallback;
|
|
38
|
-
/** 检查是否应该继续处理结果 */
|
|
39
|
-
shouldContinue?: () => boolean;
|
|
40
|
-
config?: PaymentMethodConfig;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 聚合支付操作类型
|
|
44
|
-
*/
|
|
45
|
-
export declare enum ActionType {
|
|
46
|
-
/** 支付 */
|
|
47
|
-
Pay = "pay",
|
|
48
|
-
/** 支付查询 */
|
|
49
|
-
PayQuery = "payQuery",
|
|
50
|
-
/** 支付行为 */
|
|
51
|
-
PayAction = "payAction",
|
|
52
|
-
/** 退款 */
|
|
53
|
-
Refund = "refund",
|
|
54
|
-
/** 退款查询 */
|
|
55
|
-
RefundQuery = "refundQuery",
|
|
56
|
-
/** 退款行为 */
|
|
57
|
-
RefundAction = "refundAction"
|
|
58
|
-
}
|
|
59
|
-
/** 回调事件 */
|
|
60
|
-
export interface CallbackEvent {
|
|
61
|
-
/** 事件类型:成功、失败、进度 */
|
|
62
|
-
status: EPaymentStatus;
|
|
63
|
-
/** 操作类型 */
|
|
64
|
-
actionType: ActionType;
|
|
65
|
-
/** 数据:成功时是结果,失败时是错误信息,进度时是进度数据 */
|
|
66
|
-
data: any;
|
|
67
|
-
}
|
|
68
|
-
/** 统一回调函数 */
|
|
69
|
-
export declare type PaymentCallback = (instance: PaymentMethod, event: CallbackEvent) => void;
|
|
70
|
-
/**
|
|
71
|
-
* 执行操作参数
|
|
72
|
-
*/
|
|
73
|
-
export interface RunOptions {
|
|
74
|
-
/** 操作类型 */
|
|
75
|
-
actionType: ActionType;
|
|
76
|
-
/** 请求参数 */
|
|
77
|
-
params?: Record<string, any>;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* 聚合支付配置参数
|
|
81
|
-
*/
|
|
82
|
-
export interface PaymentMethodConfig {
|
|
83
|
-
/** 是否需要轮询间隔 */
|
|
84
|
-
hasQueryInterval?: boolean;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* 支付状态
|
|
88
|
-
*/
|
|
89
|
-
export declare enum EPaymentStatus {
|
|
90
|
-
/** 支付中 */
|
|
91
|
-
Processing = "processing",
|
|
92
|
-
/** 支付成功 */
|
|
93
|
-
Success = "success",
|
|
94
|
-
/** 支付失败 */
|
|
95
|
-
Failed = "failed"
|
|
96
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export var EVisibleButtonType = /*#__PURE__*/function (EVisibleButtonType) {
|
|
2
|
-
EVisibleButtonType["CancelButton"] = "CancelButton";
|
|
3
|
-
EVisibleButtonType["WaitButton"] = "WaitButton";
|
|
4
|
-
return EVisibleButtonType;
|
|
5
|
-
}({});
|
|
6
|
-
export var EActionStatus = /*#__PURE__*/function (EActionStatus) {
|
|
7
|
-
EActionStatus["Empty"] = "Empty";
|
|
8
|
-
EActionStatus["Cancel"] = "Cancel";
|
|
9
|
-
EActionStatus["CancelWaiting"] = "CancelWaiting";
|
|
10
|
-
EActionStatus["Signature"] = "Signature";
|
|
11
|
-
EActionStatus["SignatureWaiting"] = "SignatureWaiting";
|
|
12
|
-
return EActionStatus;
|
|
13
|
-
}({});
|
|
14
|
-
|
|
15
|
-
// 开始轮询的延迟时间(支付发起后等待10秒)
|
|
16
|
-
export var QUERY_START_DELAY = 1000 * 10;
|
|
17
|
-
// 全局超时时间(2分钟)
|
|
18
|
-
export var GLOBAL_TIMEOUT = 1000 * 60 * 2;
|
|
19
|
-
// 单次请求超时时间(10秒)
|
|
20
|
-
export var REQUEST_TIMEOUT = 1000 * 10;
|
|
21
|
-
// 轮询间隔时间(2秒)
|
|
22
|
-
export var QUERY_INTERVAL = 1000 * 2;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* 聚合支付初始化参数
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* 聚合支付操作类型
|
|
30
|
-
*/
|
|
31
|
-
export var ActionType = /*#__PURE__*/function (ActionType) {
|
|
32
|
-
ActionType["Pay"] = "pay";
|
|
33
|
-
ActionType["PayQuery"] = "payQuery";
|
|
34
|
-
ActionType["PayAction"] = "payAction";
|
|
35
|
-
ActionType["Refund"] = "refund";
|
|
36
|
-
ActionType["RefundQuery"] = "refundQuery";
|
|
37
|
-
ActionType["RefundAction"] = "refundAction";
|
|
38
|
-
return ActionType;
|
|
39
|
-
}({});
|
|
40
|
-
|
|
41
|
-
/** 回调事件 */
|
|
42
|
-
|
|
43
|
-
/** 统一回调函数 */
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* 执行操作参数
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* 聚合支付配置参数
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* 支付状态
|
|
55
|
-
*/
|
|
56
|
-
export var EPaymentStatus = /*#__PURE__*/function (EPaymentStatus) {
|
|
57
|
-
EPaymentStatus["Processing"] = "processing";
|
|
58
|
-
EPaymentStatus["Success"] = "success";
|
|
59
|
-
EPaymentStatus["Failed"] = "failed";
|
|
60
|
-
return EPaymentStatus;
|
|
61
|
-
}({});
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
export interface LogEntry {
|
|
2
|
-
/** 日志标题 */
|
|
3
|
-
title: string;
|
|
4
|
-
/** 日志内容 */
|
|
5
|
-
content?: any;
|
|
6
|
-
/** 支付时间(精确到毫秒) */
|
|
7
|
-
time: string;
|
|
8
|
-
}
|
|
9
|
-
interface PaymentLogRecord {
|
|
10
|
-
/** 交易记录号 */
|
|
11
|
-
number: string;
|
|
12
|
-
/** 订单ID */
|
|
13
|
-
orderId?: string | number;
|
|
14
|
-
/** 设备ID */
|
|
15
|
-
deviceId?: string | number;
|
|
16
|
-
/** 支付类型 */
|
|
17
|
-
paymentCode?: string;
|
|
18
|
-
/** 创建时间 */
|
|
19
|
-
createdAt: string;
|
|
20
|
-
/** 日志条目列表 */
|
|
21
|
-
logs: LogEntry[];
|
|
22
|
-
}
|
|
23
|
-
declare class PaymentLogInstance {
|
|
24
|
-
private static instance;
|
|
25
|
-
/** 当前交易记录号 */
|
|
26
|
-
private currentNumber;
|
|
27
|
-
/** 当前日志记录 */
|
|
28
|
-
private currentRecord;
|
|
29
|
-
private constructor();
|
|
30
|
-
/**
|
|
31
|
-
* 获取单例实例
|
|
32
|
-
*/
|
|
33
|
-
static getInstance(): PaymentLogInstance;
|
|
34
|
-
/**
|
|
35
|
-
* 初始化支付日志
|
|
36
|
-
* @param number 交易记录号
|
|
37
|
-
* @param options 初始化选项
|
|
38
|
-
*/
|
|
39
|
-
init(number: string, options?: {
|
|
40
|
-
orderId?: string | number;
|
|
41
|
-
deviceId?: string | number;
|
|
42
|
-
paymentCode?: string;
|
|
43
|
-
[key: string]: any;
|
|
44
|
-
}): void;
|
|
45
|
-
/**
|
|
46
|
-
* 添加日志条目
|
|
47
|
-
* @param title 日志标题
|
|
48
|
-
* @param content 日志内容
|
|
49
|
-
*/
|
|
50
|
-
addLog(params: {
|
|
51
|
-
title: string;
|
|
52
|
-
content?: any;
|
|
53
|
-
}): void;
|
|
54
|
-
/**
|
|
55
|
-
* 构建日志内容
|
|
56
|
-
* @param record 日志记录
|
|
57
|
-
* @returns 格式化的日志内容数组
|
|
58
|
-
*/
|
|
59
|
-
private buildLogContent;
|
|
60
|
-
/**
|
|
61
|
-
* 发送单条日志记录到飞书
|
|
62
|
-
* @param record 日志记录
|
|
63
|
-
* @param isRestore 是否是恢复上传
|
|
64
|
-
*/
|
|
65
|
-
private sendLogRecord;
|
|
66
|
-
/**
|
|
67
|
-
* 发送日志到飞书
|
|
68
|
-
* @param title 日志标题(可选,仅在需要自定义标题时使用)
|
|
69
|
-
*/
|
|
70
|
-
sendLogs(title?: string): void;
|
|
71
|
-
/**
|
|
72
|
-
* 清除当前日志
|
|
73
|
-
* @param shouldSend 清除前是否发送到飞书,默认为 true
|
|
74
|
-
*/
|
|
75
|
-
clearLogs(shouldSend?: boolean): void;
|
|
76
|
-
/**
|
|
77
|
-
* 检查并上传旧日志
|
|
78
|
-
*/
|
|
79
|
-
private checkAndUploadOldLogs;
|
|
80
|
-
/**
|
|
81
|
-
* 获取所有支付日志对象
|
|
82
|
-
*/
|
|
83
|
-
private getAllLogsObject;
|
|
84
|
-
/**
|
|
85
|
-
* 保存所有支付日志对象
|
|
86
|
-
*/
|
|
87
|
-
private saveAllLogsObject;
|
|
88
|
-
/**
|
|
89
|
-
* 保存到 localStorage
|
|
90
|
-
*/
|
|
91
|
-
private saveToLocalStorage;
|
|
92
|
-
/**
|
|
93
|
-
* 从 localStorage 中删除
|
|
94
|
-
*/
|
|
95
|
-
private removeFromLocalStorage;
|
|
96
|
-
/**
|
|
97
|
-
* 获取所有旧日志
|
|
98
|
-
*/
|
|
99
|
-
private getOldLogsFromLocalStorage;
|
|
100
|
-
/**
|
|
101
|
-
* 获取当前日志记录(用于调试)
|
|
102
|
-
*/
|
|
103
|
-
getCurrentRecord(): PaymentLogRecord | null;
|
|
104
|
-
/**
|
|
105
|
-
* 获取当前交易号(用于调试)
|
|
106
|
-
*/
|
|
107
|
-
getCurrentNumber(): string | null;
|
|
108
|
-
}
|
|
109
|
-
declare const paymentLog: PaymentLogInstance;
|
|
110
|
-
export default paymentLog;
|
|
@@ -1,385 +0,0 @@
|
|
|
1
|
-
var _excluded = ["pay_param_base64"];
|
|
2
|
-
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
3
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
|
-
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); }
|
|
8
|
-
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; }
|
|
9
|
-
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; }
|
|
10
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
11
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
12
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
13
|
-
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; }
|
|
14
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
15
|
-
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); }
|
|
16
|
-
import dayjs from 'dayjs';
|
|
17
|
-
import { sendWarningLog } from '@pisell/utils';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 支付日志
|
|
21
|
-
* 1. 支付日志实行单例模式,以交易记录的number为key
|
|
22
|
-
* 2. 需要有init方法,用于初始化一次支付流程的日志,在初始化过程中需要首先判断localstorage中是否存在交易记录,如果存在需要将之前的交易记录上传飞书并从localstorage中删除,
|
|
23
|
-
* 然后创建一个新的日志对象,用于记录本次支付流程的日志
|
|
24
|
-
* 3. 需要有addLog方法,用于添加日志,日志内容需要包括支付状态,支付时间,支付金额,支付方式,支付结果等信息,需要记录到localstorage中
|
|
25
|
-
* 4. 需要有sendLogs方法,用于发送日志,日志内容需要包括支付状态,支付时间,支付金额,支付方式,支付结果等信息,需要上传飞书
|
|
26
|
-
* 5. 需要有clearLogs方法,用于清除日志,清除后需要将localstorage中记录的日志删除
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
// 本地存储的固定key
|
|
30
|
-
var PAYMENT_LOGS_KEY = 'pisell2_eftpos_payment_logs';
|
|
31
|
-
|
|
32
|
-
// 日志条目接口
|
|
33
|
-
|
|
34
|
-
// 日志记录接口
|
|
35
|
-
var PaymentLogInstance = /*#__PURE__*/function () {
|
|
36
|
-
function PaymentLogInstance() {
|
|
37
|
-
_classCallCheck(this, PaymentLogInstance);
|
|
38
|
-
/** 当前交易记录号 */
|
|
39
|
-
_defineProperty(this, "currentNumber", null);
|
|
40
|
-
/** 当前日志记录 */
|
|
41
|
-
_defineProperty(this, "currentRecord", null);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* 获取单例实例
|
|
46
|
-
*/
|
|
47
|
-
_createClass(PaymentLogInstance, [{
|
|
48
|
-
key: "init",
|
|
49
|
-
value:
|
|
50
|
-
/**
|
|
51
|
-
* 初始化支付日志
|
|
52
|
-
* @param number 交易记录号
|
|
53
|
-
* @param options 初始化选项
|
|
54
|
-
*/
|
|
55
|
-
function init(number, options) {
|
|
56
|
-
try {
|
|
57
|
-
// 1. 检查是否有旧的日志记录需要上传
|
|
58
|
-
this.checkAndUploadOldLogs();
|
|
59
|
-
|
|
60
|
-
// 2. 创建新的日志记录
|
|
61
|
-
this.currentNumber = number;
|
|
62
|
-
this.currentRecord = {
|
|
63
|
-
number: number,
|
|
64
|
-
orderId: options === null || options === void 0 ? void 0 : options.orderId,
|
|
65
|
-
deviceId: options === null || options === void 0 ? void 0 : options.deviceId,
|
|
66
|
-
paymentCode: options === null || options === void 0 ? void 0 : options.paymentCode,
|
|
67
|
-
createdAt: dayjs().format('YYYY-MM-DD HH:mm:ss.SSS'),
|
|
68
|
-
logs: []
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// 3. 添加初始化日志
|
|
72
|
-
this.addLog({
|
|
73
|
-
title: 'EFTPOS日志初始化',
|
|
74
|
-
content: _objectSpread({
|
|
75
|
-
number: number
|
|
76
|
-
}, options || {})
|
|
77
|
-
});
|
|
78
|
-
console.log("\uD83D\uDCDD \u652F\u4ED8\u65E5\u5FD7\u521D\u59CB\u5316\u6210\u529F\uFF0C\u4EA4\u6613\u53F7: ".concat(number));
|
|
79
|
-
} catch (error) {
|
|
80
|
-
console.error('❌ 支付日志初始化失败:', error);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 添加日志条目
|
|
86
|
-
* @param title 日志标题
|
|
87
|
-
* @param content 日志内容
|
|
88
|
-
*/
|
|
89
|
-
}, {
|
|
90
|
-
key: "addLog",
|
|
91
|
-
value: function addLog(params) {
|
|
92
|
-
try {
|
|
93
|
-
if (!this.currentRecord || !this.currentNumber) {
|
|
94
|
-
console.warn('⚠️ 日志未初始化,无法添加日志');
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
var logEntry = {
|
|
98
|
-
title: params.title,
|
|
99
|
-
time: dayjs().format('YYYY-MM-DD HH:mm:ss.SSS')
|
|
100
|
-
};
|
|
101
|
-
// 如果content存在,则添加到日志内容中,节约空间
|
|
102
|
-
if (params !== null && params !== void 0 && params.content) {
|
|
103
|
-
var _params$content;
|
|
104
|
-
// 特殊操作:如果content是对象并且对象中含有params字段,需要将对应的pay_param_base64字段删除
|
|
105
|
-
if (_typeof(params.content) === 'object' && (_params$content = params.content) !== null && _params$content !== void 0 && _params$content.params) {
|
|
106
|
-
var _params$content2, _params$content3;
|
|
107
|
-
var _ref = ((_params$content2 = params.content) === null || _params$content2 === void 0 || (_params$content2 = _params$content2.params) === null || _params$content2 === void 0 ? void 0 : _params$content2.eftpos) || {},
|
|
108
|
-
pay_param_base64 = _ref.pay_param_base64,
|
|
109
|
-
otherParams = _objectWithoutProperties(_ref, _excluded);
|
|
110
|
-
params.content.params = _objectSpread(_objectSpread({}, ((_params$content3 = params.content) === null || _params$content3 === void 0 ? void 0 : _params$content3.params) || {}), {}, {
|
|
111
|
-
eftpos: otherParams
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
logEntry.content = params.content;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// 添加到当前记录
|
|
118
|
-
this.currentRecord.logs.push(logEntry);
|
|
119
|
-
|
|
120
|
-
// 保存到 localStorage
|
|
121
|
-
this.saveToLocalStorage();
|
|
122
|
-
console.log("\uD83D\uDCDD \u6DFB\u52A0\u652F\u4ED8\u65E5\u5FD7: ".concat(params.title), logEntry);
|
|
123
|
-
} catch (error) {
|
|
124
|
-
console.error('❌ 添加日志失败:', error);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* 构建日志内容
|
|
130
|
-
* @param record 日志记录
|
|
131
|
-
* @returns 格式化的日志内容数组
|
|
132
|
-
*/
|
|
133
|
-
}, {
|
|
134
|
-
key: "buildLogContent",
|
|
135
|
-
value: function buildLogContent(record) {
|
|
136
|
-
return [{
|
|
137
|
-
key: '交易记录号',
|
|
138
|
-
value: record.number
|
|
139
|
-
}, {
|
|
140
|
-
key: '订单ID',
|
|
141
|
-
value: (record === null || record === void 0 ? void 0 : record.orderId) || '未知'
|
|
142
|
-
}, {
|
|
143
|
-
key: '设备ID',
|
|
144
|
-
value: (record === null || record === void 0 ? void 0 : record.deviceId) || '未知'
|
|
145
|
-
}, {
|
|
146
|
-
key: '支付类型',
|
|
147
|
-
value: (record === null || record === void 0 ? void 0 : record.paymentCode) || '未知'
|
|
148
|
-
}, {
|
|
149
|
-
key: '创建时间',
|
|
150
|
-
value: record.createdAt
|
|
151
|
-
}, {
|
|
152
|
-
key: '详细日志',
|
|
153
|
-
value: JSON.stringify(record.logs || [])
|
|
154
|
-
}];
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* 发送单条日志记录到飞书
|
|
159
|
-
* @param record 日志记录
|
|
160
|
-
* @param isRestore 是否是恢复上传
|
|
161
|
-
*/
|
|
162
|
-
}, {
|
|
163
|
-
key: "sendLogRecord",
|
|
164
|
-
value: function sendLogRecord(record) {
|
|
165
|
-
var isRestore = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
166
|
-
var prefix = isRestore ? '-[历史]' : '';
|
|
167
|
-
var title = "\u652F\u4ED8\u65E5\u5FD7-".concat(record.paymentCode || 'Unknown', "-").concat(record.orderId || 'Unknown').concat(prefix);
|
|
168
|
-
var content = this.buildLogContent(record);
|
|
169
|
-
sendWarningLog({
|
|
170
|
-
title: title,
|
|
171
|
-
content: content
|
|
172
|
-
});
|
|
173
|
-
console.log("\u2705 \u65E5\u5FD7\u5DF2\u53D1\u9001\u5230\u98DE\u4E66: ".concat(title));
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* 发送日志到飞书
|
|
178
|
-
* @param title 日志标题(可选,仅在需要自定义标题时使用)
|
|
179
|
-
*/
|
|
180
|
-
}, {
|
|
181
|
-
key: "sendLogs",
|
|
182
|
-
value: function sendLogs(title) {
|
|
183
|
-
try {
|
|
184
|
-
if (!this.currentRecord) {
|
|
185
|
-
console.warn('⚠️ 没有日志记录需要发送');
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
if (title) {
|
|
189
|
-
// 如果提供了自定义标题,使用自定义标题
|
|
190
|
-
var content = this.buildLogContent(this.currentRecord);
|
|
191
|
-
sendWarningLog({
|
|
192
|
-
title: title,
|
|
193
|
-
content: content
|
|
194
|
-
});
|
|
195
|
-
console.log("\u2705 \u65E5\u5FD7\u5DF2\u53D1\u9001\u5230\u98DE\u4E66: ".concat(title));
|
|
196
|
-
} else {
|
|
197
|
-
// 否则使用默认格式
|
|
198
|
-
this.sendLogRecord(this.currentRecord, false);
|
|
199
|
-
}
|
|
200
|
-
} catch (error) {
|
|
201
|
-
console.error('❌ 发送日志到飞书失败:', error);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* 清除当前日志
|
|
207
|
-
* @param shouldSend 清除前是否发送到飞书,默认为 true
|
|
208
|
-
*/
|
|
209
|
-
}, {
|
|
210
|
-
key: "clearLogs",
|
|
211
|
-
value: function clearLogs() {
|
|
212
|
-
var shouldSend = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
213
|
-
try {
|
|
214
|
-
if (!this.currentNumber) {
|
|
215
|
-
console.warn('⚠️ 没有活动的日志记录需要清除');
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// 如果需要,先发送到飞书
|
|
220
|
-
if (shouldSend && this.currentRecord) {
|
|
221
|
-
this.sendLogs();
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// 从 localStorage 中删除
|
|
225
|
-
this.removeFromLocalStorage(this.currentNumber);
|
|
226
|
-
|
|
227
|
-
// 重置当前状态
|
|
228
|
-
this.currentNumber = null;
|
|
229
|
-
this.currentRecord = null;
|
|
230
|
-
console.log('🧹 日志已清除');
|
|
231
|
-
} catch (error) {
|
|
232
|
-
console.error('❌ 清除日志失败:', error);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* 检查并上传旧日志
|
|
238
|
-
*/
|
|
239
|
-
}, {
|
|
240
|
-
key: "checkAndUploadOldLogs",
|
|
241
|
-
value: function checkAndUploadOldLogs() {
|
|
242
|
-
try {
|
|
243
|
-
var oldLogs = this.getOldLogsFromLocalStorage();
|
|
244
|
-
if (oldLogs.length === 0) {
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
console.log("\uD83D\uDCE4 \u53D1\u73B0 ".concat(oldLogs.length, " \u6761\u65E7\u65E5\u5FD7\u8BB0\u5F55\uFF0C\u51C6\u5907\u4E0A\u4F20..."));
|
|
248
|
-
|
|
249
|
-
// 逐个上传并删除
|
|
250
|
-
var _iterator = _createForOfIteratorHelper(oldLogs),
|
|
251
|
-
_step;
|
|
252
|
-
try {
|
|
253
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
254
|
-
var log = _step.value;
|
|
255
|
-
try {
|
|
256
|
-
// 使用统一的发送方法
|
|
257
|
-
this.sendLogRecord(log, true);
|
|
258
|
-
|
|
259
|
-
// 上传后删除
|
|
260
|
-
this.removeFromLocalStorage(log.number);
|
|
261
|
-
console.log("\u2705 \u65E7\u65E5\u5FD7\u5DF2\u4E0A\u4F20\u5E76\u5220\u9664: ".concat(log.number));
|
|
262
|
-
} catch (error) {
|
|
263
|
-
console.error("\u274C \u4E0A\u4F20\u65E7\u65E5\u5FD7\u5931\u8D25 (".concat(log.number, "):"), error);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
} catch (err) {
|
|
267
|
-
_iterator.e(err);
|
|
268
|
-
} finally {
|
|
269
|
-
_iterator.f();
|
|
270
|
-
}
|
|
271
|
-
} catch (error) {
|
|
272
|
-
console.error('❌ 检查旧日志失败:', error);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* 获取所有支付日志对象
|
|
278
|
-
*/
|
|
279
|
-
}, {
|
|
280
|
-
key: "getAllLogsObject",
|
|
281
|
-
value: function getAllLogsObject() {
|
|
282
|
-
try {
|
|
283
|
-
var value = localStorage.getItem(PAYMENT_LOGS_KEY);
|
|
284
|
-
if (!value) {
|
|
285
|
-
return {};
|
|
286
|
-
}
|
|
287
|
-
return JSON.parse(value);
|
|
288
|
-
} catch (error) {
|
|
289
|
-
console.error('❌ 读取 localStorage 失败:', error);
|
|
290
|
-
return {};
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* 保存所有支付日志对象
|
|
296
|
-
*/
|
|
297
|
-
}, {
|
|
298
|
-
key: "saveAllLogsObject",
|
|
299
|
-
value: function saveAllLogsObject(logsObject) {
|
|
300
|
-
try {
|
|
301
|
-
localStorage.setItem(PAYMENT_LOGS_KEY, JSON.stringify(logsObject));
|
|
302
|
-
} catch (error) {
|
|
303
|
-
console.error('❌ 保存到 localStorage 失败:', error);
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* 保存到 localStorage
|
|
309
|
-
*/
|
|
310
|
-
}, {
|
|
311
|
-
key: "saveToLocalStorage",
|
|
312
|
-
value: function saveToLocalStorage() {
|
|
313
|
-
try {
|
|
314
|
-
if (!this.currentRecord || !this.currentNumber) {
|
|
315
|
-
return;
|
|
316
|
-
}
|
|
317
|
-
var allLogs = this.getAllLogsObject();
|
|
318
|
-
allLogs[this.currentNumber] = this.currentRecord;
|
|
319
|
-
this.saveAllLogsObject(allLogs);
|
|
320
|
-
} catch (error) {
|
|
321
|
-
console.error('❌ 保存到 localStorage 失败:', error);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* 从 localStorage 中删除
|
|
327
|
-
*/
|
|
328
|
-
}, {
|
|
329
|
-
key: "removeFromLocalStorage",
|
|
330
|
-
value: function removeFromLocalStorage(number) {
|
|
331
|
-
try {
|
|
332
|
-
var allLogs = this.getAllLogsObject();
|
|
333
|
-
delete allLogs[number];
|
|
334
|
-
this.saveAllLogsObject(allLogs);
|
|
335
|
-
} catch (error) {
|
|
336
|
-
console.error('❌ 从 localStorage 删除失败:', error);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* 获取所有旧日志
|
|
342
|
-
*/
|
|
343
|
-
}, {
|
|
344
|
-
key: "getOldLogsFromLocalStorage",
|
|
345
|
-
value: function getOldLogsFromLocalStorage() {
|
|
346
|
-
try {
|
|
347
|
-
var allLogs = this.getAllLogsObject();
|
|
348
|
-
return Object.values(allLogs);
|
|
349
|
-
} catch (error) {
|
|
350
|
-
console.error('❌ 获取旧日志失败:', error);
|
|
351
|
-
return [];
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* 获取当前日志记录(用于调试)
|
|
357
|
-
*/
|
|
358
|
-
}, {
|
|
359
|
-
key: "getCurrentRecord",
|
|
360
|
-
value: function getCurrentRecord() {
|
|
361
|
-
return this.currentRecord;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* 获取当前交易号(用于调试)
|
|
366
|
-
*/
|
|
367
|
-
}, {
|
|
368
|
-
key: "getCurrentNumber",
|
|
369
|
-
value: function getCurrentNumber() {
|
|
370
|
-
return this.currentNumber;
|
|
371
|
-
}
|
|
372
|
-
}], [{
|
|
373
|
-
key: "getInstance",
|
|
374
|
-
value: function getInstance() {
|
|
375
|
-
if (!PaymentLogInstance.instance) {
|
|
376
|
-
PaymentLogInstance.instance = new PaymentLogInstance();
|
|
377
|
-
}
|
|
378
|
-
return PaymentLogInstance.instance;
|
|
379
|
-
}
|
|
380
|
-
}]);
|
|
381
|
-
return PaymentLogInstance;
|
|
382
|
-
}();
|
|
383
|
-
_defineProperty(PaymentLogInstance, "instance", void 0);
|
|
384
|
-
var paymentLog = PaymentLogInstance.getInstance();
|
|
385
|
-
export default paymentLog;
|