@pisell/private-materials 6.4.32 → 6.4.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.js +6 -6
- package/es/businessModel/SalesModel/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/index.d.ts +0 -1
- package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/es/components/booking/components/footer/index.js +23 -7
- package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/es/components/booking/forms/single/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/es/components/booking/info/clientVariant/hooks/useClientFn.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/header/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/actions/index.d.ts +1 -0
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/es/components/booking/info/service2/Lists.d.ts +0 -1
- package/es/components/booking/info/service2/utils.d.ts +1 -1
- package/es/components/booking/info2/service/actions/index.d.ts +1 -0
- package/es/components/booking/materiels/contacts/index.d.ts +1 -0
- package/es/components/booking/materiels/duration/index.d.ts +1 -0
- package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/es/components/checkout/PaymentModal.js +23 -33
- package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/es/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/es/components/checkout/components/ScrollableList/index.js +0 -1
- package/es/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/es/components/eftpos/index.d.ts +1 -0
- package/es/components/eftpos/pos.d.ts +1 -0
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/component/fail/network.d.ts +1 -0
- package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/es/components/eftposPay/component/manual/index.d.ts +1 -0
- package/es/components/eftposPay/component/signature/index.d.ts +1 -0
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +2 -2
- package/es/components/eftposPay/payo/config.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +6 -6
- package/es/components/eftposPay/tip.d.ts +1 -0
- package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/es/components/login/index.d.ts +1 -0
- package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/es/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/es/components/pay/toB/components/MX51/index.js +14 -44
- package/es/components/pay/toB/types/index.d.ts +0 -12
- package/es/components/pay/toB/types/index.js +0 -4
- package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/es/components/schedules/calendar/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/es/components/schedules/products/list/index.d.ts +1 -0
- package/es/components/schedules/resources/index.d.ts +1 -0
- package/es/components/schedules/resources/list/index.d.ts +1 -0
- package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/es/components/schedules/schedules/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/es/components/taxSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/utils/index.d.ts +1 -1
- package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/es/hooks/usePaymentLogger.d.ts +1 -0
- package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/es/plus/saasCreateOrganization/index.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/es/plus/saasRegister/components/Header.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/lib/businessModel/SalesModel/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
- package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
- package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
- package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
- package/lib/components/booking/components/footer/index.js +8 -7
- package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
- package/lib/components/booking/forms/single/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
- package/lib/components/booking/info/clientVariant/hooks/useClientFn.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/header/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/actions/index.d.ts +1 -0
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
- package/lib/components/booking/info/service2/Lists.d.ts +0 -1
- package/lib/components/booking/info/service2/utils.d.ts +1 -1
- package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
- package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
- package/lib/components/booking/materiels/duration/index.d.ts +1 -0
- package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
- package/lib/components/checkout/PaymentModal.js +7 -17
- package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +1 -1
- package/lib/components/checkout/components/PaymentResultToast/index.js +1 -1
- package/lib/components/checkout/components/ScrollableList/index.js +0 -1
- package/lib/components/checkout/components/WalletPassModule/components/ConflictModal/index.d.ts +0 -1
- package/lib/components/eftpos/index.d.ts +1 -0
- package/lib/components/eftpos/pos.d.ts +1 -0
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
- package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
- package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
- package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +2 -2
- package/lib/components/eftposPay/payo/config.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +6 -6
- package/lib/components/eftposPay/tip.d.ts +1 -0
- package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
- package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
- package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
- package/lib/components/login/index.d.ts +1 -0
- package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
- package/lib/components/pay/toB/components/Content/Header.d.ts +1 -0
- package/lib/components/pay/toB/components/MX51/index.js +12 -37
- package/lib/components/pay/toB/types/index.d.ts +0 -12
- package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
- package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
- package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
- package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
- package/lib/components/schedules/calendar/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
- package/lib/components/schedules/products/list/index.d.ts +1 -0
- package/lib/components/schedules/resources/index.d.ts +1 -0
- package/lib/components/schedules/resources/list/index.d.ts +1 -0
- package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
- package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
- package/lib/components/schedules/schedules/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
- package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
- package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
- package/lib/components/taxSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/utils/index.d.ts +1 -1
- package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
- package/lib/hooks/usePaymentLogger.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
- package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
- package/lib/plus/saasCreateOrganization/index.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
- package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
- package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
- package/lib/plus/saasRegister/components/Header.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
- package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
- package/package.json +1 -1
- package/es/hooks/printer.d.ts +0 -4
- package/es/hooks/printer.js +0 -35
- package/lib/hooks/printer.d.ts +0 -4
- package/lib/hooks/printer.js +0 -60
@@ -64,7 +64,6 @@ var import_lodash = require("lodash");
|
|
64
64
|
var import_utils2 = require("./utils");
|
65
65
|
var import_usePaymentLogger = __toESM(require("./hooks/usePaymentLogger"));
|
66
66
|
var import_antd = require("antd");
|
67
|
-
var import_printer = __toESM(require("../../hooks/printer"));
|
68
67
|
var CheckoutHooks = {
|
69
68
|
OnStateAmountChanged: "checkout:onStateAmountChanged",
|
70
69
|
OnBalanceDueAmountChanged: "checkout:onBalanceDueAmountChanged",
|
@@ -118,7 +117,6 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
118
117
|
const walletPassRef = (0, import_react.useRef)(null);
|
119
118
|
const [paymentItems, setPaymentItems] = (0, import_react.useState)([]);
|
120
119
|
const [walletPassData, setWalletPassData] = (0, import_react.useState)({});
|
121
|
-
const { nativePrint } = (0, import_printer.default)();
|
122
120
|
const isOrderFree = (0, import_react.useMemo)(() => {
|
123
121
|
if (!customAmount) return false;
|
124
122
|
const amount = parseFloat(customAmount);
|
@@ -301,10 +299,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
301
299
|
}
|
302
300
|
if (checkoutModule && isModalOpen) {
|
303
301
|
checkoutModule.getPaymentMethodsAsync().then(async (paymentMethods2) => {
|
304
|
-
const reorderedPaymentMethods = await (0, import_utils2.reorderPaymentMethodList)(
|
305
|
-
paymentMethods2,
|
306
|
-
interaction
|
307
|
-
);
|
302
|
+
const reorderedPaymentMethods = await (0, import_utils2.reorderPaymentMethodList)(paymentMethods2, interaction);
|
308
303
|
setPaymentMethods(reorderedPaymentMethods);
|
309
304
|
const isShowCashPayment = paymentMethods2.some(
|
310
305
|
(item) => item.code === "CASHMANUAL"
|
@@ -517,12 +512,11 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
517
512
|
data: {
|
518
513
|
order_id: responseData.order_id,
|
519
514
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
520
|
-
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data
|
521
|
-
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
515
|
+
small_ticket_data: (_b2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _b2.small_ticket_data
|
522
516
|
}
|
523
517
|
};
|
524
518
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
525
|
-
|
519
|
+
(0, import_utils.webPrint)(params, (res) => {
|
526
520
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
527
521
|
});
|
528
522
|
} catch (error) {
|
@@ -691,7 +685,7 @@ var PaymentContent = (0, import_react.forwardRef)(
|
|
691
685
|
data: { order_id: data.orderId }
|
692
686
|
};
|
693
687
|
try {
|
694
|
-
|
688
|
+
(0, import_utils.webPrint)(params, (res) => {
|
695
689
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
696
690
|
if (!(res == null ? void 0 : res.result)) {
|
697
691
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -994,7 +988,6 @@ var PaymentModal = ({
|
|
994
988
|
const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
|
995
989
|
const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
|
996
990
|
const Toast = (0, import_useToast.default)();
|
997
|
-
const { nativePrint } = (0, import_printer.default)();
|
998
991
|
const handleRetry = async () => {
|
999
992
|
const checkoutModule = pisellos == null ? void 0 : pisellos.getModule("checkout");
|
1000
993
|
const res = await (checkoutModule == null ? void 0 : checkoutModule.manualSyncOrderAsync());
|
@@ -1223,7 +1216,6 @@ var PaymentModal = ({
|
|
1223
1216
|
order_rounding_setting: getData("order_rounding_setting"),
|
1224
1217
|
shop_wallet_pass_id
|
1225
1218
|
});
|
1226
|
-
console.time("initCheckoutData");
|
1227
1219
|
const newData = (0, import_lodash.cloneDeep)(data);
|
1228
1220
|
await checkout.createLocalOrderAsync({
|
1229
1221
|
orderData: newData.order_info,
|
@@ -1231,7 +1223,6 @@ var PaymentModal = ({
|
|
1231
1223
|
autoPayment: true,
|
1232
1224
|
totalInfo: newData.subtotal_info
|
1233
1225
|
});
|
1234
|
-
console.timeEnd("initCheckoutData");
|
1235
1226
|
const orderInfo2 = checkout.getCurrentOrderInfo();
|
1236
1227
|
if (orderInfo2 && orderInfo2.totalAmount) {
|
1237
1228
|
setTotalAmount(orderInfo2.totalAmount);
|
@@ -1279,8 +1270,7 @@ var PaymentModal = ({
|
|
1279
1270
|
data: {
|
1280
1271
|
order_id: responseData.order_id,
|
1281
1272
|
machine_code_print_info: responseData == null ? void 0 : responseData.machine_code_print_info,
|
1282
|
-
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data
|
1283
|
-
machine_code_print_info_v2: responseData == null ? void 0 : responseData.machine_code_print_info_v2
|
1273
|
+
small_ticket_data: (_c2 = responseData == null ? void 0 : responseData.payment_info) == null ? void 0 : _c2.small_ticket_data
|
1284
1274
|
}
|
1285
1275
|
};
|
1286
1276
|
console.log("print_order_onOrderSynced_params>>>>", params);
|
@@ -1291,7 +1281,7 @@ var PaymentModal = ({
|
|
1291
1281
|
params
|
1292
1282
|
}
|
1293
1283
|
});
|
1294
|
-
|
1284
|
+
(0, import_utils.webPrint)(params, (res) => {
|
1295
1285
|
console.log("print_order_onOrderSynced_res>>>>", res);
|
1296
1286
|
logger == null ? void 0 : logger.addLog({
|
1297
1287
|
type: "info",
|
@@ -1435,7 +1425,7 @@ var PaymentModal = ({
|
|
1435
1425
|
data: { order_id: data2.orderId }
|
1436
1426
|
};
|
1437
1427
|
try {
|
1438
|
-
|
1428
|
+
(0, import_utils.webPrint)(params, (res) => {
|
1439
1429
|
console.log("handleButtonClick_print-receipt_res>>>>", res);
|
1440
1430
|
if (!(res == null ? void 0 : res.result)) {
|
1441
1431
|
Toast == null ? void 0 : Toast.error((res == null ? void 0 : res.msg) || "");
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
8
8
|
*/
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
10
10
|
className?: string | undefined;
|
11
|
-
onChange?: ((status: "
|
11
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
12
12
|
[keys: string]: unknown;
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
14
14
|
onClose: () => void;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { PosProps, RouteType } from './const';
|
3
2
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
4
3
|
action: RouteType;
|
@@ -11,7 +11,7 @@ import './device.less';
|
|
11
11
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
|
12
12
|
api: PayProps['api'];
|
13
13
|
className?: string | undefined;
|
14
|
-
onChange?: ((status: "
|
14
|
+
onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
|
15
15
|
[keys: string]: unknown;
|
16
16
|
} | undefined, other?: any) => void) | undefined;
|
17
17
|
onClose: () => void;
|
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
|
|
15
15
|
readonly numRef: React.MutableRefObject<string | number | undefined>;
|
16
16
|
readonly orderIdRef: React.MutableRefObject<string | number>;
|
17
17
|
readonly modeRef: React.MutableRefObject<ModeEnum>;
|
18
|
-
readonly statusRef: React.MutableRefObject<"
|
18
|
+
readonly statusRef: React.MutableRefObject<"loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question">;
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
22
|
+
readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
25
25
|
};
|
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
|
|
174
174
|
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
175
175
|
type: EActionTypes;
|
176
176
|
payload: {
|
177
|
-
status: "
|
177
|
+
status: "loading" | "warn" | "success" | "fail" | "question";
|
178
178
|
};
|
179
179
|
};
|
180
180
|
/**
|
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "refund" | "
|
298
|
+
mode?: "refund" | "fullPay" | "pay" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
|
-
eftpos?: "
|
301
|
-
action?: "
|
300
|
+
eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "unset" | "step" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
310
310
|
form?: string | undefined;
|
311
|
-
status?: "
|
311
|
+
status?: "loading" | "warn" | "success" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
312
312
|
warn?: string | undefined;
|
313
313
|
steps?: {
|
314
314
|
/** 用于重置当前步骤 */
|
@@ -33,8 +33,8 @@ __export(MX51_exports, {
|
|
33
33
|
});
|
34
34
|
module.exports = __toCommonJS(MX51_exports);
|
35
35
|
var import_react = require("react");
|
36
|
+
var import_utils = require("@pisell/utils");
|
36
37
|
var import_useLogger = __toESM(require("../../../../../hooks/useLogger"));
|
37
|
-
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
38
38
|
var getUuid = () => {
|
39
39
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxx".replace(/[xy]/g, (c) => {
|
40
40
|
const r = Math.random() * 16 | 0;
|
@@ -43,10 +43,7 @@ var getUuid = () => {
|
|
43
43
|
});
|
44
44
|
};
|
45
45
|
var MX51 = (props, ref) => {
|
46
|
-
var _a, _b;
|
47
46
|
const logger = (0, import_useLogger.default)();
|
48
|
-
const context = (0, import_useEngineContext.default)();
|
49
|
-
const action = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.action;
|
50
47
|
const onOpen = ({ data, payCallback }) => {
|
51
48
|
const { params, mode } = data;
|
52
49
|
const uniquePaymentNumber = getUuid();
|
@@ -65,40 +62,18 @@ var MX51 = (props, ref) => {
|
|
65
62
|
title: "ToB_MX51_onOpen 开始调用",
|
66
63
|
metadata: { params: newData }
|
67
64
|
});
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
isSame = (_res == null ? void 0 : _res.uniquePaymentNumber) === uniquePaymentNumber;
|
77
|
-
if (isSame) {
|
78
|
-
payCallback == null ? void 0 : payCallback(_res);
|
79
|
-
}
|
80
|
-
} else {
|
81
|
-
const _res = res;
|
82
|
-
const newRes = {
|
83
|
-
result: (_res == null ? void 0 : _res.code) == "200" ? true : false,
|
84
|
-
msg: _res == null ? void 0 : _res.msg,
|
85
|
-
amount: (_a2 = _res == null ? void 0 : _res.data) == null ? void 0 : _a2.amount,
|
86
|
-
surcharge: (_b2 = _res == null ? void 0 : _res.data) == null ? void 0 : _b2.surcharge,
|
87
|
-
uniquePaymentNumber: _res == null ? void 0 : _res.uuid
|
88
|
-
};
|
89
|
-
isSame = (_res == null ? void 0 : _res.uuid) === uniquePaymentNumber;
|
90
|
-
if (isSame) {
|
91
|
-
payCallback == null ? void 0 : payCallback(newRes);
|
92
|
-
}
|
65
|
+
(0, import_utils.webPayment)(newData, (res) => {
|
66
|
+
const isSame = (res == null ? void 0 : res.uniquePaymentNumber) === uniquePaymentNumber;
|
67
|
+
logger == null ? void 0 : logger.addLog({
|
68
|
+
type: "info",
|
69
|
+
title: "ToB_MX51_onOpen_callback",
|
70
|
+
metadata: {
|
71
|
+
msg: isSame ? "uniquePaymentNumber一致" : "uniquePaymentNumber不一致",
|
72
|
+
res
|
93
73
|
}
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
metadata: {
|
98
|
-
msg: isSame ? "交易流水号一致" : "交易流水号不一致",
|
99
|
-
res
|
100
|
-
}
|
101
|
-
});
|
74
|
+
});
|
75
|
+
if (isSame) {
|
76
|
+
payCallback == null ? void 0 : payCallback(res);
|
102
77
|
}
|
103
78
|
});
|
104
79
|
};
|
@@ -58,15 +58,3 @@ export interface MX51PayResult {
|
|
58
58
|
surcharge: number;
|
59
59
|
uniquePaymentNumber: string;
|
60
60
|
}
|
61
|
-
/**
|
62
|
-
* @title 原生MX51支付结果
|
63
|
-
*/
|
64
|
-
export interface NativeMX51PayResult {
|
65
|
-
code: string;
|
66
|
-
msg?: string;
|
67
|
-
data: {
|
68
|
-
amount: number;
|
69
|
-
surcharge: number;
|
70
|
-
};
|
71
|
-
uuid: string;
|
72
|
-
}
|