@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,91 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button, Input } from 'antd';
|
|
3
|
-
/**
|
|
4
|
-
* @title 渲染动态内容
|
|
5
|
-
* @description 用于渲染从接口解析出来的元素
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
var Action = function Action(props) {
|
|
9
|
-
var _data$layouts, _data$layouts2;
|
|
10
|
-
var data = props.data,
|
|
11
|
-
_props$showMessage = props.showMessage,
|
|
12
|
-
showMessage = _props$showMessage === void 0 ? true : _props$showMessage;
|
|
13
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, showMessage && (data === null || data === void 0 ? void 0 : data.message) && /*#__PURE__*/React.createElement("div", {
|
|
14
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
|
|
15
|
-
}, data === null || data === void 0 ? void 0 : data.message), (data === null || data === void 0 || (_data$layouts = data.layouts) === null || _data$layouts === void 0 ? void 0 : _data$layouts.length) > 0 && (data === null || data === void 0 || (_data$layouts2 = data.layouts) === null || _data$layouts2 === void 0 ? void 0 : _data$layouts2.map(function (item, index) {
|
|
16
|
-
var _item$elements;
|
|
17
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
18
|
-
key: index,
|
|
19
|
-
className: "pisell-lowcode__eft-pay-step-item-btns",
|
|
20
|
-
style: {
|
|
21
|
-
marginTop: '20px',
|
|
22
|
-
width: '100%',
|
|
23
|
-
display: 'flex',
|
|
24
|
-
justifyContent: 'center'
|
|
25
|
-
}
|
|
26
|
-
}, item === null || item === void 0 || (_item$elements = item.elements) === null || _item$elements === void 0 ? void 0 : _item$elements.map(function (element) {
|
|
27
|
-
var key = element.key,
|
|
28
|
-
label = element.label,
|
|
29
|
-
type = element.type,
|
|
30
|
-
text = element.text;
|
|
31
|
-
if (type === 'button') {
|
|
32
|
-
return /*#__PURE__*/React.createElement(Button, {
|
|
33
|
-
key: key + label,
|
|
34
|
-
block: true,
|
|
35
|
-
className: "pisell-lowcode__eft-pay-step-item-btn",
|
|
36
|
-
onClick: function onClick() {
|
|
37
|
-
var _props$onClick;
|
|
38
|
-
return props === null || props === void 0 || (_props$onClick = props.onClick) === null || _props$onClick === void 0 ? void 0 : _props$onClick.call(props, element);
|
|
39
|
-
}
|
|
40
|
-
}, element.label);
|
|
41
|
-
} else if (type === 'text') {
|
|
42
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
key: key + label,
|
|
44
|
-
className: "pisell-lowcode__eft-pay-step-item-tip"
|
|
45
|
-
}, label ? "".concat(label, ": ") : '', text || '');
|
|
46
|
-
} else if (type === 'image') {
|
|
47
|
-
var _ref = (element === null || element === void 0 ? void 0 : element.image) || {},
|
|
48
|
-
name = _ref.name,
|
|
49
|
-
_data = _ref.data,
|
|
50
|
-
encoding = _ref.encoding;
|
|
51
|
-
var imageUrl = _data ? "data:".concat(name || 'image/png', ";").concat(encoding || 'base64', ",").concat(_data) : '';
|
|
52
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
style: {
|
|
54
|
-
width: '100%',
|
|
55
|
-
display: 'flex',
|
|
56
|
-
justifyContent: 'center'
|
|
57
|
-
}
|
|
58
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
59
|
-
key: key + label,
|
|
60
|
-
src: imageUrl,
|
|
61
|
-
alt: label
|
|
62
|
-
}));
|
|
63
|
-
} else if (type === 'input') {
|
|
64
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
style: {
|
|
66
|
-
width: '100%',
|
|
67
|
-
display: 'flex',
|
|
68
|
-
alignItems: 'center'
|
|
69
|
-
}
|
|
70
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
71
|
-
style: {
|
|
72
|
-
marginRight: '10px'
|
|
73
|
-
}
|
|
74
|
-
}, "".concat(label ? "".concat(label, " ") : '')), /*#__PURE__*/React.createElement(Input, {
|
|
75
|
-
key: key + label,
|
|
76
|
-
alt: label,
|
|
77
|
-
style: {
|
|
78
|
-
flex: 1
|
|
79
|
-
}
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
return null;
|
|
83
|
-
}));
|
|
84
|
-
})), (data === null || data === void 0 ? void 0 : data.detailsText) && /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip",
|
|
86
|
-
style: {
|
|
87
|
-
marginTop: '24px'
|
|
88
|
-
}
|
|
89
|
-
}, data === null || data === void 0 ? void 0 : data.detailsText));
|
|
90
|
-
};
|
|
91
|
-
export default Action;
|
|
@@ -1,69 +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
|
-
var _excluded = ["order_id", "name", "symbol", "amount", "mode", "number", "pay", "device", "net", "client"];
|
|
3
|
-
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; }
|
|
4
|
-
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; }
|
|
5
|
-
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; }
|
|
6
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
-
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); }
|
|
8
|
-
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; }
|
|
9
|
-
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; }
|
|
10
|
-
import { locales } from '@pisell/utils';
|
|
11
|
-
import { ClientEnum, EftposEnum, ModeEnum, PayRouteEnum, StatusEnum } from "../const";
|
|
12
|
-
export var getStep = function getStep() {
|
|
13
|
-
var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ModeEnum.Pay;
|
|
14
|
-
return [{
|
|
15
|
-
key: Date.now(),
|
|
16
|
-
title: locales.getText('page.eftpos-pay.text.loading')(mode),
|
|
17
|
-
// 'Payment in process...',
|
|
18
|
-
text: locales.getText('page.eftpos-pay.text.waiting.processing'),
|
|
19
|
-
// 'Waiting for the processing...',
|
|
20
|
-
warn: '',
|
|
21
|
-
tip: locales.getText('page.eftpos-pay.text.processing'),
|
|
22
|
-
// 'processing...',
|
|
23
|
-
status: StatusEnum.Loading
|
|
24
|
-
}];
|
|
25
|
-
};
|
|
26
|
-
export default (function (params) {
|
|
27
|
-
var _ref = params || {
|
|
28
|
-
mode: ModeEnum.Pay
|
|
29
|
-
},
|
|
30
|
-
order_id = _ref.order_id,
|
|
31
|
-
name = _ref.name,
|
|
32
|
-
symbol = _ref.symbol,
|
|
33
|
-
amount = _ref.amount,
|
|
34
|
-
mode = _ref.mode,
|
|
35
|
-
number = _ref.number,
|
|
36
|
-
pay = _ref.pay,
|
|
37
|
-
device = _ref.device,
|
|
38
|
-
net = _ref.net,
|
|
39
|
-
client = _ref.client,
|
|
40
|
-
other = _objectWithoutProperties(_ref, _excluded);
|
|
41
|
-
console.log('params =>>>>>> ', params);
|
|
42
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
43
|
-
order_id: order_id,
|
|
44
|
-
name: name,
|
|
45
|
-
symbol: symbol,
|
|
46
|
-
amount: amount,
|
|
47
|
-
mode: mode,
|
|
48
|
-
eftpos: EftposEnum.MX51,
|
|
49
|
-
key: Date.now(),
|
|
50
|
-
step: 0,
|
|
51
|
-
type: PayRouteEnum.Step,
|
|
52
|
-
title: locales.getText('page.eftpos-pay.text.loading')(mode),
|
|
53
|
-
component: '',
|
|
54
|
-
status: StatusEnum.Loading,
|
|
55
|
-
steps: getStep(mode),
|
|
56
|
-
render: true,
|
|
57
|
-
client: client !== 'undefined' ? client : ClientEnum.Merchant,
|
|
58
|
-
warn: '',
|
|
59
|
-
custom: other || {}
|
|
60
|
-
}, typeof net !== 'undefined' ? {
|
|
61
|
-
net: net
|
|
62
|
-
} : {}), typeof number !== 'undefined' ? {
|
|
63
|
-
number: number
|
|
64
|
-
} : {}), typeof pay !== 'undefined' ? {
|
|
65
|
-
pay: pay
|
|
66
|
-
} : {}), typeof device !== 'undefined' ? {
|
|
67
|
-
device: device
|
|
68
|
-
} : {});
|
|
69
|
-
});
|
|
@@ -1,362 +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
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
function _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; }
|
|
11
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
14
|
-
import { locales } from '@pisell/utils';
|
|
15
|
-
import { PisellModal } from '@pisell/materials';
|
|
16
|
-
import useEngineContext from "../../../hooks/useEngineContext";
|
|
17
|
-
import { request } from "../../../utils";
|
|
18
|
-
import { useContextData } from "../store";
|
|
19
|
-
import { StatusEnum } from "../const";
|
|
20
|
-
import { useStoreRef } from "../hooks";
|
|
21
|
-
import { usePayment } from "../aggregatePayment";
|
|
22
|
-
import { EPaymentStatus } from "../aggregatePayment/types";
|
|
23
|
-
import { parseMX51Params } from "./utils";
|
|
24
|
-
import { EButtonKeyType } from "./types";
|
|
25
|
-
import Action from "./Action";
|
|
26
|
-
import { useDispatch, updateStatus, updateCustom, updateState } from "../store";
|
|
27
|
-
import { useFail } from "../hooks";
|
|
28
|
-
import { getInitState } from "../manufacturer";
|
|
29
|
-
import { getPayParams } from "../helper";
|
|
30
|
-
var AggregatePayment = function AggregatePayment(_ref) {
|
|
31
|
-
var onChange = _ref.onChange;
|
|
32
|
-
// 设置request
|
|
33
|
-
var context = useEngineContext();
|
|
34
|
-
var utils = context.appHelper.utils || {};
|
|
35
|
-
request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
|
|
36
|
-
|
|
37
|
-
// 数据源
|
|
38
|
-
var _useContextData = useContextData(),
|
|
39
|
-
title = _useContextData.title,
|
|
40
|
-
custom = _useContextData.custom,
|
|
41
|
-
status = _useContextData.status,
|
|
42
|
-
eftpos = _useContextData.eftpos,
|
|
43
|
-
mode = _useContextData.mode,
|
|
44
|
-
name = _useContextData.name,
|
|
45
|
-
symbol = _useContextData.symbol,
|
|
46
|
-
amount = _useContextData.amount,
|
|
47
|
-
order_id = _useContextData.order_id;
|
|
48
|
-
var _useStoreRef = useStoreRef(),
|
|
49
|
-
statusRef = _useStoreRef.statusRef,
|
|
50
|
-
numRef = _useStoreRef.numRef,
|
|
51
|
-
netRef = _useStoreRef.netRef,
|
|
52
|
-
modeRef = _useStoreRef.modeRef,
|
|
53
|
-
deviceRef = _useStoreRef.deviceRef,
|
|
54
|
-
orderIdRef = _useStoreRef.orderIdRef,
|
|
55
|
-
amountRef = _useStoreRef.amountRef,
|
|
56
|
-
payRef = _useStoreRef.payRef;
|
|
57
|
-
var dispatch = useDispatch();
|
|
58
|
-
var fail = useFail(0);
|
|
59
|
-
var failRef = useRef(fail);
|
|
60
|
-
var _useState = useState(false),
|
|
61
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
62
|
-
receiptModalShow = _useState2[0],
|
|
63
|
-
setReceiptModalShow = _useState2[1];
|
|
64
|
-
var _useState3 = useState(null),
|
|
65
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
-
receiptModalData = _useState4[0],
|
|
67
|
-
setReceiptModalData = _useState4[1];
|
|
68
|
-
useEffect(function () {
|
|
69
|
-
failRef.current = fail;
|
|
70
|
-
}, [fail]);
|
|
71
|
-
|
|
72
|
-
// 当前组件数据
|
|
73
|
-
var initRef = useRef(false);
|
|
74
|
-
var unloadRef = useRef(false);
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* 更新到加载状态
|
|
78
|
-
*/
|
|
79
|
-
var updateToLoading = function updateToLoading() {
|
|
80
|
-
dispatch(updateStatus(StatusEnum.Loading));
|
|
81
|
-
dispatch(updateState({
|
|
82
|
-
title: locales.getText('page.eftpos-pay.text.loading')(modeRef.current)
|
|
83
|
-
}));
|
|
84
|
-
};
|
|
85
|
-
var payment = usePayment({
|
|
86
|
-
paymentCode: 'EFTPOS_MX51',
|
|
87
|
-
paymentNum: numRef.current || '',
|
|
88
|
-
shouldContinue: function shouldContinue() {
|
|
89
|
-
return !(unloadRef.current || !netRef.current);
|
|
90
|
-
},
|
|
91
|
-
config: {
|
|
92
|
-
hasQueryInterval: false // 不开启轮询间隔
|
|
93
|
-
},
|
|
94
|
-
callback: function callback(_instance, response) {
|
|
95
|
-
var _data$data;
|
|
96
|
-
console.log('callback =>>>>>> ', response);
|
|
97
|
-
var _ref2 = response || {},
|
|
98
|
-
status = _ref2.status,
|
|
99
|
-
data = _ref2.data;
|
|
100
|
-
var _ref3 = (data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.external_unified_response) || {},
|
|
101
|
-
transaction = _ref3.transaction,
|
|
102
|
-
action = _ref3.action;
|
|
103
|
-
var transformedData = parseMX51Params(transaction, status, data);
|
|
104
|
-
console.log('event_transformedData =>>>>>> ', transformedData);
|
|
105
|
-
dispatch(updateCustom({
|
|
106
|
-
customAction: transformedData
|
|
107
|
-
}));
|
|
108
|
-
if (status === EPaymentStatus.Processing) {
|
|
109
|
-
if (action === 'signature') {
|
|
110
|
-
var _transformedData$auto;
|
|
111
|
-
// 签名,需要停止轮询
|
|
112
|
-
dispatch(updateStatus(StatusEnum.Question));
|
|
113
|
-
// 更新标题
|
|
114
|
-
dispatch(updateState({
|
|
115
|
-
title: (transformedData === null || transformedData === void 0 ? void 0 : transformedData.message) || ''
|
|
116
|
-
}));
|
|
117
|
-
_instance.stop();
|
|
118
|
-
// 如果存在签名票自动打印,需要触发打印
|
|
119
|
-
if (transformedData !== null && transformedData !== void 0 && (_transformedData$auto = transformedData.autoAction) !== null && _transformedData$auto !== void 0 && _transformedData$auto.includes('PRINT_MERCHANT_RECEIPT')) {
|
|
120
|
-
var merchantReceipt = (transformedData === null || transformedData === void 0 ? void 0 : transformedData.merchantReceipt) || '';
|
|
121
|
-
onChange('print', merchantReceipt ? [merchantReceipt] : []);
|
|
122
|
-
}
|
|
123
|
-
} else {
|
|
124
|
-
updateToLoading();
|
|
125
|
-
}
|
|
126
|
-
} else if (status === EPaymentStatus.Success) {
|
|
127
|
-
dispatch(updateStatus('success'));
|
|
128
|
-
dispatch(updateState({
|
|
129
|
-
title: (transformedData === null || transformedData === void 0 ? void 0 : transformedData.message) || ''
|
|
130
|
-
}));
|
|
131
|
-
} else if (status === EPaymentStatus.Failed) {
|
|
132
|
-
// 失败分为两种情况:MX51返回失败信息 和 后端返回失败信息
|
|
133
|
-
if (transformedData) {
|
|
134
|
-
// 渲染需要走自定义
|
|
135
|
-
dispatch(updateStatus('fail'));
|
|
136
|
-
dispatch(updateState({
|
|
137
|
-
title: (transformedData === null || transformedData === void 0 ? void 0 : transformedData.message) || ''
|
|
138
|
-
}));
|
|
139
|
-
} else {
|
|
140
|
-
var _failRef$current;
|
|
141
|
-
(_failRef$current = failRef.current) === null || _failRef$current === void 0 || _failRef$current.call(failRef, data, false);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
// 页面初始化处理
|
|
148
|
-
useEffect(function () {
|
|
149
|
-
// 支付检测
|
|
150
|
-
console.log('mx51页面初始化', statusRef.current);
|
|
151
|
-
if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail || statusRef.current === StatusEnum.Question) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
if (initRef.current) {
|
|
155
|
-
return;
|
|
156
|
-
}
|
|
157
|
-
initRef.current = true;
|
|
158
|
-
|
|
159
|
-
// 存在支付流水号
|
|
160
|
-
if (numRef.current) {
|
|
161
|
-
console.log('payment.query');
|
|
162
|
-
payment.query();
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
payment.run();
|
|
166
|
-
}, []);
|
|
167
|
-
|
|
168
|
-
// 页面卸载处理
|
|
169
|
-
useEffect(function () {
|
|
170
|
-
return function () {
|
|
171
|
-
console.log('页面卸载');
|
|
172
|
-
unloadRef.current = true;
|
|
173
|
-
};
|
|
174
|
-
}, []);
|
|
175
|
-
|
|
176
|
-
// 取消支付
|
|
177
|
-
var onCancel = function onCancel(element) {
|
|
178
|
-
console.log('onCancel', element);
|
|
179
|
-
payment.action({
|
|
180
|
-
submit_url: element === null || element === void 0 ? void 0 : element.submitUrl
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
// 拒绝签名
|
|
185
|
-
var onDecline = function onDecline(element) {
|
|
186
|
-
console.log('onDecline', element);
|
|
187
|
-
updateToLoading();
|
|
188
|
-
payment.action({
|
|
189
|
-
submit_url: element === null || element === void 0 ? void 0 : element.submitUrl
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
// 接受签名
|
|
194
|
-
var onAccept = function onAccept(element) {
|
|
195
|
-
console.log('onAccept', element);
|
|
196
|
-
updateToLoading();
|
|
197
|
-
payment.action({
|
|
198
|
-
submit_url: element === null || element === void 0 ? void 0 : element.submitUrl
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
// 打印商户收据
|
|
203
|
-
var onPrintMerchantReceipt = function onPrintMerchantReceipt(element) {
|
|
204
|
-
console.log('onPrintMerchantReceipt', element);
|
|
205
|
-
onChange('print', element !== null && element !== void 0 && element.receipt ? [element === null || element === void 0 ? void 0 : element.receipt] : []);
|
|
206
|
-
setReceiptModalShow(true);
|
|
207
|
-
setReceiptModalData(element === null || element === void 0 ? void 0 : element.receipt);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
// 打印客户收据
|
|
211
|
-
var onPrintCustomerReceipt = function onPrintCustomerReceipt(element) {
|
|
212
|
-
console.log('onPrintCustomerReceipt', element);
|
|
213
|
-
onChange('print', element !== null && element !== void 0 && element.receipt ? [element === null || element === void 0 ? void 0 : element.receipt] : []);
|
|
214
|
-
setReceiptModalShow(true);
|
|
215
|
-
setReceiptModalData(element === null || element === void 0 ? void 0 : element.receipt);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
// 重试交易
|
|
219
|
-
var onRetry = function onRetry(element) {
|
|
220
|
-
console.log('onRetry', element);
|
|
221
|
-
onChange('page', 'pay');
|
|
222
|
-
var _params = _objectSpread(_objectSpread({}, custom || {}), {}, {
|
|
223
|
-
// 自定义参数需要重新传递
|
|
224
|
-
mode: mode,
|
|
225
|
-
name: name,
|
|
226
|
-
symbol: symbol,
|
|
227
|
-
amount: amount,
|
|
228
|
-
order_id: order_id,
|
|
229
|
-
number: ''
|
|
230
|
-
});
|
|
231
|
-
dispatch(updateState(getInitState(eftpos, _params)));
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
// 交易完成
|
|
235
|
-
var onTransactionComplete = function onTransactionComplete(element) {
|
|
236
|
-
console.log('onTransactionComplete', element);
|
|
237
|
-
var _ref4 = element._extra || {},
|
|
238
|
-
paymentStatus = _ref4.paymentStatus,
|
|
239
|
-
response = _ref4.response,
|
|
240
|
-
merchantReceipt = _ref4.merchantReceipt,
|
|
241
|
-
customerReceipt = _ref4.customerReceipt;
|
|
242
|
-
if (paymentStatus === EPaymentStatus.Success) {
|
|
243
|
-
var _response$data, _deviceRef$current;
|
|
244
|
-
var receipt = [];
|
|
245
|
-
// 刷卡机的手续费
|
|
246
|
-
var card_reader_surcharge = (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 || (_response$data = _response$data.external_unified_response) === null || _response$data === void 0 ? void 0 : _response$data.external_service_fee) || 0;
|
|
247
|
-
var deviceSetting = (_deviceRef$current = deviceRef.current) === null || _deviceRef$current === void 0 ? void 0 : _deviceRef$current.setting;
|
|
248
|
-
// 设备是否打印商家小票
|
|
249
|
-
var isEftposPrintMerchantReceipt = deviceSetting === null || deviceSetting === void 0 ? void 0 : deviceSetting.print_merchant_receipt;
|
|
250
|
-
// 设备是否打印客户小票
|
|
251
|
-
var isEftposPrintCustomerReceipt = deviceSetting === null || deviceSetting === void 0 ? void 0 : deviceSetting.prompt_customer_receipt;
|
|
252
|
-
if (!isEftposPrintMerchantReceipt && merchantReceipt) {
|
|
253
|
-
receipt.push(merchantReceipt);
|
|
254
|
-
}
|
|
255
|
-
if (!isEftposPrintCustomerReceipt && customerReceipt) {
|
|
256
|
-
receipt.push(customerReceipt);
|
|
257
|
-
}
|
|
258
|
-
var _params2 = getPayParams({
|
|
259
|
-
mode: modeRef.current,
|
|
260
|
-
amount: amountRef.current,
|
|
261
|
-
order_id: orderIdRef.current,
|
|
262
|
-
number: numRef.current,
|
|
263
|
-
device: deviceRef.current,
|
|
264
|
-
pay: payRef.current,
|
|
265
|
-
custom: {
|
|
266
|
-
card_reader_surcharge: card_reader_surcharge,
|
|
267
|
-
receipt: receipt
|
|
268
|
-
}
|
|
269
|
-
}, 'success');
|
|
270
|
-
onChange('success', _objectSpread(_objectSpread({}, _params2), {}, {
|
|
271
|
-
receipt: receipt
|
|
272
|
-
}));
|
|
273
|
-
} else {
|
|
274
|
-
onChange('fail', {
|
|
275
|
-
order_id: orderIdRef.current,
|
|
276
|
-
number: numRef.current,
|
|
277
|
-
uniquePaymentNumber: numRef.current,
|
|
278
|
-
device: deviceRef.current
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
var onNormalClick = function onNormalClick(element) {
|
|
283
|
-
// 如果存在submit_url,则提交到API
|
|
284
|
-
if (element !== null && element !== void 0 && element.submitUrl) {
|
|
285
|
-
console.log('onNormalClick_submit_url', element === null || element === void 0 ? void 0 : element.submitUrl);
|
|
286
|
-
updateToLoading();
|
|
287
|
-
payment.action({
|
|
288
|
-
submit_url: element === null || element === void 0 ? void 0 : element.submitUrl
|
|
289
|
-
});
|
|
290
|
-
} else {
|
|
291
|
-
console.log('onNormalClick_no_submit_url', element);
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
// 点击元素
|
|
296
|
-
var onElementClick = function onElementClick(element) {
|
|
297
|
-
console.log('onElementClick', element);
|
|
298
|
-
switch (element.key) {
|
|
299
|
-
case EButtonKeyType.CancelTransaction:
|
|
300
|
-
onCancel(element);
|
|
301
|
-
break;
|
|
302
|
-
case EButtonKeyType.DeclineSignature:
|
|
303
|
-
onDecline(element);
|
|
304
|
-
break;
|
|
305
|
-
case EButtonKeyType.ApproveSignature:
|
|
306
|
-
onAccept(element);
|
|
307
|
-
break;
|
|
308
|
-
case EButtonKeyType.PrintMerchantReceipt:
|
|
309
|
-
onPrintMerchantReceipt(element);
|
|
310
|
-
break;
|
|
311
|
-
case EButtonKeyType.PrintCustomerReceipt:
|
|
312
|
-
onPrintCustomerReceipt(element);
|
|
313
|
-
break;
|
|
314
|
-
case EButtonKeyType.RetryTransaction:
|
|
315
|
-
onRetry(element);
|
|
316
|
-
break;
|
|
317
|
-
case EButtonKeyType.TransactionComplete:
|
|
318
|
-
onTransactionComplete(element);
|
|
319
|
-
break;
|
|
320
|
-
default:
|
|
321
|
-
onNormalClick(element);
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
console.log('custom>>>>', custom);
|
|
326
|
-
var onCloseReceiptModal = function onCloseReceiptModal() {
|
|
327
|
-
setReceiptModalShow(false);
|
|
328
|
-
setReceiptModalData(null);
|
|
329
|
-
};
|
|
330
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
331
|
-
className: "pisell-lowcode__eft-pay-body"
|
|
332
|
-
}, status === StatusEnum.Question ? /*#__PURE__*/React.createElement("div", {
|
|
333
|
-
className: "pisell-lowcode__eft-pay-title",
|
|
334
|
-
style: {
|
|
335
|
-
textAlign: 'center'
|
|
336
|
-
}
|
|
337
|
-
}, title) : null, /*#__PURE__*/React.createElement(Action, {
|
|
338
|
-
data: custom === null || custom === void 0 ? void 0 : custom.customAction,
|
|
339
|
-
showMessage: status === StatusEnum.Loading,
|
|
340
|
-
onClick: onElementClick
|
|
341
|
-
})), receiptModalShow ? /*#__PURE__*/React.createElement(PisellModal, {
|
|
342
|
-
open: receiptModalShow,
|
|
343
|
-
onCancel: onCloseReceiptModal,
|
|
344
|
-
maskClosable: true,
|
|
345
|
-
footer: null
|
|
346
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
347
|
-
style: {
|
|
348
|
-
padding: '16px',
|
|
349
|
-
display: 'flex',
|
|
350
|
-
alignItems: 'center',
|
|
351
|
-
justifyContent: 'center'
|
|
352
|
-
}
|
|
353
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
354
|
-
style: {
|
|
355
|
-
display: 'inline-block',
|
|
356
|
-
whiteSpace: 'pre-wrap',
|
|
357
|
-
fontFamily: 'monospace',
|
|
358
|
-
backgroundColor: '#fff'
|
|
359
|
-
}
|
|
360
|
-
}, receiptModalData))) : null);
|
|
361
|
-
};
|
|
362
|
-
export default AggregatePayment;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { EPaymentStatus } from '../aggregatePayment/types';
|
|
2
|
-
/** 元素类型定义 */
|
|
3
|
-
export interface ElementType {
|
|
4
|
-
label: string;
|
|
5
|
-
key: string;
|
|
6
|
-
}
|
|
7
|
-
/** 布局类型定义 */
|
|
8
|
-
export interface LayoutType {
|
|
9
|
-
type: string;
|
|
10
|
-
elements: ElementType[];
|
|
11
|
-
}
|
|
12
|
-
/** 元素属性定义 */
|
|
13
|
-
export interface ElementProperty {
|
|
14
|
-
type: 'button' | 'text' | 'image' | 'input';
|
|
15
|
-
submit_url: string;
|
|
16
|
-
action: string | null;
|
|
17
|
-
text?: string | null;
|
|
18
|
-
name?: string | null;
|
|
19
|
-
data?: string | null;
|
|
20
|
-
encoding?: string | null;
|
|
21
|
-
}
|
|
22
|
-
/** Action Form 定义 */
|
|
23
|
-
export interface ActionFormType {
|
|
24
|
-
layout: LayoutType[];
|
|
25
|
-
properties: {
|
|
26
|
-
[key: string]: ElementProperty;
|
|
27
|
-
};
|
|
28
|
-
details: {
|
|
29
|
-
[key: string]: string;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
/** POS 指令定义 */
|
|
33
|
-
export interface PosInstructions {
|
|
34
|
-
auto_actions: any;
|
|
35
|
-
action_form: ActionFormType | null;
|
|
36
|
-
}
|
|
37
|
-
/** MX51 参数定义 */
|
|
38
|
-
export interface MX51Params {
|
|
39
|
-
id: string;
|
|
40
|
-
version: number;
|
|
41
|
-
status: string;
|
|
42
|
-
message: string;
|
|
43
|
-
merchant_receipt: string | null;
|
|
44
|
-
customer_receipt: string | null;
|
|
45
|
-
result_amounts: any;
|
|
46
|
-
result_financial_status: string | null;
|
|
47
|
-
pos_instructions: PosInstructions | null;
|
|
48
|
-
}
|
|
49
|
-
/** 解析后的按钮配置 */
|
|
50
|
-
export interface ParsedElement {
|
|
51
|
-
/** 元素键 */
|
|
52
|
-
key: string;
|
|
53
|
-
/** 元素标签 */
|
|
54
|
-
label: string;
|
|
55
|
-
/** 提交URL */
|
|
56
|
-
submitUrl: string;
|
|
57
|
-
/** 按钮动作 */
|
|
58
|
-
action: string | null;
|
|
59
|
-
/** 元素类型 */
|
|
60
|
-
type: 'button' | 'text';
|
|
61
|
-
/** 文本信息 */
|
|
62
|
-
text?: string | null;
|
|
63
|
-
/** 小票信息 */
|
|
64
|
-
receipt?: string | null;
|
|
65
|
-
/** 额外信息 */
|
|
66
|
-
_extra?: {
|
|
67
|
-
/** 商户收据 */
|
|
68
|
-
merchantReceipt?: string | null;
|
|
69
|
-
/** 客户收据 */
|
|
70
|
-
customerReceipt?: string | null;
|
|
71
|
-
/** 支付状态 */
|
|
72
|
-
paymentStatus: EPaymentStatus;
|
|
73
|
-
/** 接口返回的原始数据 */
|
|
74
|
-
response: any;
|
|
75
|
-
};
|
|
76
|
-
/** 图片信息 */
|
|
77
|
-
image?: {
|
|
78
|
-
name?: string | null;
|
|
79
|
-
data?: string | null;
|
|
80
|
-
encoding?: string | null;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
/** 解析后的布局配置 */
|
|
84
|
-
export interface ParsedLayout {
|
|
85
|
-
/** 布局类型,如 horizontal_layout */
|
|
86
|
-
layoutType: string;
|
|
87
|
-
/** 该布局中的按钮列表 */
|
|
88
|
-
elements: ParsedElement[];
|
|
89
|
-
}
|
|
90
|
-
/** 解析后的结果 */
|
|
91
|
-
export interface ParsedMX51Result {
|
|
92
|
-
/** 交易ID */
|
|
93
|
-
transactionId: string;
|
|
94
|
-
/** 版本号 */
|
|
95
|
-
version: number;
|
|
96
|
-
/** 状态 */
|
|
97
|
-
status: string;
|
|
98
|
-
/** 提示信息 */
|
|
99
|
-
message: string;
|
|
100
|
-
/** 商户收据 */
|
|
101
|
-
merchantReceipt: string | null;
|
|
102
|
-
/** 客户收据 */
|
|
103
|
-
customerReceipt: string | null;
|
|
104
|
-
/** 结果金额 */
|
|
105
|
-
resultAmounts: any;
|
|
106
|
-
/** 结果财务状态 */
|
|
107
|
-
resultFinancialStatus: string | null;
|
|
108
|
-
/** 布局列表,每个布局包含其类型和按钮 */
|
|
109
|
-
layouts: ParsedLayout[];
|
|
110
|
-
/** 详情信息 */
|
|
111
|
-
details: {
|
|
112
|
-
[key: string]: string;
|
|
113
|
-
};
|
|
114
|
-
/** 详情信息 text */
|
|
115
|
-
detailsText: string;
|
|
116
|
-
/** 自动操作 */
|
|
117
|
-
autoAction: Array<string> | null;
|
|
118
|
-
}
|
|
119
|
-
export declare enum EButtonKeyType {
|
|
120
|
-
/** 取消交易 */
|
|
121
|
-
CancelTransaction = "cancel_transaction",
|
|
122
|
-
/** 交易完成 */
|
|
123
|
-
TransactionComplete = "transaction_complete",
|
|
124
|
-
/** 重试交易 */
|
|
125
|
-
RetryTransaction = "retry_transaction",
|
|
126
|
-
/** 打印商户收据 */
|
|
127
|
-
PrintMerchantReceipt = "print_merchant_receipt",
|
|
128
|
-
/** 打印客户收据 */
|
|
129
|
-
PrintCustomerReceipt = "print_customer_receipt",
|
|
130
|
-
/** 批准签名 */
|
|
131
|
-
ApproveSignature = "approve_signature",
|
|
132
|
-
/** 拒绝签名 */
|
|
133
|
-
DeclineSignature = "decline_signature",
|
|
134
|
-
/** 提交到API */
|
|
135
|
-
SubmitToAPI = "submit_to_api"
|
|
136
|
-
}
|