@pisell/private-materials 6.11.32 → 6.11.34

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.
@@ -948,7 +948,7 @@ var Footer = function Footer(props) {
948
948
  });
949
949
  isNewOrder = !state.bookingId; // 如果有编辑内容, 则先保存
950
950
  if (!isEdit) {
951
- _context7.next = 28;
951
+ _context7.next = 29;
952
952
  break;
953
953
  }
954
954
  if (!isDayBooking(state)) {
@@ -963,7 +963,7 @@ var Footer = function Footer(props) {
963
963
  return _context7.abrupt("return");
964
964
  case 9:
965
965
  if (!state.isBookingTicket2) {
966
- _context7.next = 22;
966
+ _context7.next = 23;
967
967
  break;
968
968
  }
969
969
  _context7.next = 12;
@@ -992,12 +992,14 @@ var Footer = function Footer(props) {
992
992
  };
993
993
  setPaymentModalData(modalData);
994
994
  setIsPaymentModalOpen(true); // 打开 modal
995
+ window.isPaymentModalPluginOpen = true;
995
996
  setCheckoutLoading(false);
996
997
  setPaymentCallback(function () {
997
998
  return function (paymentResult) {
998
999
  var _paymentResult$respon;
999
1000
  console.log('Payment result:', paymentResult);
1000
1001
  setIsPaymentModalOpen(false);
1002
+ window.isPaymentModalPluginOpen = false;
1001
1003
  if ((paymentResult === null || paymentResult === void 0 ? void 0 : paymentResult.status) === 'success' || (paymentResult === null || paymentResult === void 0 || (_paymentResult$respon = paymentResult.response) === null || _paymentResult$respon === void 0 || (_paymentResult$respon = _paymentResult$respon.data) === null || _paymentResult$respon === void 0 ? void 0 : _paymentResult$respon.payment_status) === 'paid') {
1002
1004
  console.log('Payment completed successfully');
1003
1005
  // logger.addLog({
@@ -1034,24 +1036,24 @@ var Footer = function Footer(props) {
1034
1036
  }
1035
1037
  };
1036
1038
  });
1037
- _context7.next = 27;
1039
+ _context7.next = 28;
1038
1040
  break;
1039
- case 22:
1040
- _context7.next = 24;
1041
+ case 23:
1042
+ _context7.next = 25;
1041
1043
  return handleSave({
1042
1044
  type: 'checkout',
1043
1045
  messageShow: !(isTerminal !== null && isTerminal !== void 0 && isTerminal())
1044
1046
  });
1045
- case 24:
1047
+ case 25:
1046
1048
  _res = _context7.sent;
1047
1049
  // goCheckout2(res);
1048
1050
  console.log(_res);
1049
1051
  goCheckout((_res === null || _res === void 0 ? void 0 : _res.order_id) || state.bookingId, isNewOrder);
1050
- case 27:
1051
- return _context7.abrupt("return");
1052
1052
  case 28:
1053
- return _context7.abrupt("return", goCheckout(state.bookingId, isNewOrder));
1053
+ return _context7.abrupt("return");
1054
1054
  case 29:
1055
+ return _context7.abrupt("return", goCheckout(state.bookingId, isNewOrder));
1056
+ case 30:
1055
1057
  case "end":
1056
1058
  return _context7.stop();
1057
1059
  }
@@ -2343,6 +2345,7 @@ var Footer = function Footer(props) {
2343
2345
  onClose: function onClose(reset) {
2344
2346
  console.log('🔄 Footer: Closing PaymentModal', reset);
2345
2347
  setIsPaymentModalOpen(false);
2348
+ window.isPaymentModalPluginOpen = false;
2346
2349
  setPaymentModalData(null);
2347
2350
  setPaymentCallback(null);
2348
2351
  // if (reset) {
@@ -722,11 +722,13 @@ var Footer = (props) => {
722
722
  };
723
723
  setPaymentModalData(modalData);
724
724
  setIsPaymentModalOpen(true);
725
+ window.isPaymentModalPluginOpen = true;
725
726
  setCheckoutLoading(false);
726
727
  setPaymentCallback(() => (paymentResult) => {
727
728
  var _a3, _b3, _c3, _d2;
728
729
  console.log("Payment result:", paymentResult);
729
730
  setIsPaymentModalOpen(false);
731
+ window.isPaymentModalPluginOpen = false;
730
732
  if ((paymentResult == null ? void 0 : paymentResult.status) === "success" || ((_b3 = (_a3 = paymentResult == null ? void 0 : paymentResult.response) == null ? void 0 : _a3.data) == null ? void 0 : _b3.payment_status) === "paid") {
731
733
  console.log("Payment completed successfully");
732
734
  setPaymentModalData(null);
@@ -1665,6 +1667,7 @@ var Footer = (props) => {
1665
1667
  onClose: (reset) => {
1666
1668
  console.log("🔄 Footer: Closing PaymentModal", reset);
1667
1669
  setIsPaymentModalOpen(false);
1670
+ window.isPaymentModalPluginOpen = false;
1668
1671
  setPaymentModalData(null);
1669
1672
  setPaymentCallback(null);
1670
1673
  if (reset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.11.32",
3
+ "version": "6.11.34",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -68,8 +68,8 @@
68
68
  "react-resizable": "^3.0.5",
69
69
  "styled-components": "^6.0.0-rc.3",
70
70
  "@pisell/utils": "3.0.2",
71
- "@pisell/materials": "6.11.11",
72
71
  "@pisell/date-picker": "3.0.8",
72
+ "@pisell/materials": "6.11.11",
73
73
  "@pisell/icon": "0.0.11"
74
74
  },
75
75
  "peerDependencies": {
@@ -1,20 +0,0 @@
1
- export declare type TCallback = (result: {
2
- type: string;
3
- value: string;
4
- }) => void;
5
- declare class ScanListener {
6
- private isInitialized;
7
- private listeners;
8
- constructor();
9
- /**
10
- * 初始化外设扫码结果监听
11
- */
12
- initPeripheralsListener(interaction: any): void;
13
- addListener(interaction: any, key: string, callback: TCallback): void;
14
- removeListener(key: string): void;
15
- getActiveListener(): string | null;
16
- setActiveListener(key: string): void;
17
- destroy(): void;
18
- }
19
- declare const scanListener: ScanListener;
20
- export default scanListener;
@@ -1,20 +0,0 @@
1
- export declare type TCallback = (result: {
2
- type: string;
3
- value: string;
4
- }) => void;
5
- declare class ScanListener {
6
- private isInitialized;
7
- private listeners;
8
- constructor();
9
- /**
10
- * 初始化外设扫码结果监听
11
- */
12
- initPeripheralsListener(interaction: any): void;
13
- addListener(interaction: any, key: string, callback: TCallback): void;
14
- removeListener(key: string): void;
15
- getActiveListener(): string | null;
16
- setActiveListener(key: string): void;
17
- destroy(): void;
18
- }
19
- declare const scanListener: ScanListener;
20
- export default scanListener;