@pisell/private-materials 6.4.66 → 6.4.67

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.
@@ -1410,10 +1410,14 @@ var PaymentModal = function PaymentModal(_ref18) {
1410
1410
  _useState34 = _slicedToArray(_useState33, 2),
1411
1411
  showRetryModal = _useState34[0],
1412
1412
  setShowRetryModal = _useState34[1];
1413
- var _useState35 = useState(editOrderId || 0),
1413
+ var _useState35 = useState(false),
1414
1414
  _useState36 = _slicedToArray(_useState35, 2),
1415
- currentEditOrderId = _useState36[0],
1416
- _setCurrentEditOrderId = _useState36[1];
1415
+ showCreateErrorModal = _useState36[0],
1416
+ setShowCreateErrorModal = _useState36[1];
1417
+ var _useState37 = useState(editOrderId || 0),
1418
+ _useState38 = _slicedToArray(_useState37, 2),
1419
+ currentEditOrderId = _useState38[0],
1420
+ _setCurrentEditOrderId = _useState38[1];
1417
1421
  var _useActiveExecute2 = useActiveExecute(),
1418
1422
  executeIfActive = _useActiveExecute2.executeIfActive;
1419
1423
  var Toast = useToast();
@@ -1548,18 +1552,18 @@ var PaymentModal = function PaymentModal(_ref18) {
1548
1552
  }, []);
1549
1553
 
1550
1554
  // 订单备注相关状态
1551
- var _useState37 = useState(false),
1552
- _useState38 = _slicedToArray(_useState37, 2),
1553
- noteModalOpen = _useState38[0],
1554
- setNoteModalOpen = _useState38[1];
1555
- var _useState39 = useState(''),
1555
+ var _useState39 = useState(false),
1556
1556
  _useState40 = _slicedToArray(_useState39, 2),
1557
- orderNote = _useState40[0],
1558
- setOrderNote = _useState40[1];
1559
- var _useState41 = useState('payment-content'),
1557
+ noteModalOpen = _useState40[0],
1558
+ setNoteModalOpen = _useState40[1];
1559
+ var _useState41 = useState(''),
1560
1560
  _useState42 = _slicedToArray(_useState41, 2),
1561
- noteModalSource = _useState42[0],
1562
- setNoteModalSource = _useState42[1];
1561
+ orderNote = _useState42[0],
1562
+ setOrderNote = _useState42[1];
1563
+ var _useState43 = useState('payment-content'),
1564
+ _useState44 = _slicedToArray(_useState43, 2),
1565
+ noteModalSource = _useState44[0],
1566
+ setNoteModalSource = _useState44[1];
1563
1567
 
1564
1568
  // 订单备注相关处理函数
1565
1569
  var handleNoteConfirm = /*#__PURE__*/function () {
@@ -2288,7 +2292,7 @@ var PaymentModal = function PaymentModal(_ref18) {
2288
2292
  setOrderInfo(_orderInfo4);
2289
2293
  isLocalOrderCreated.current = true;
2290
2294
  case 42:
2291
- _context23.next = 48;
2295
+ _context23.next = 49;
2292
2296
  break;
2293
2297
  case 44:
2294
2298
  _context23.prev = 44;
@@ -2301,7 +2305,9 @@ var PaymentModal = function PaymentModal(_ref18) {
2301
2305
  error: _context23.t0
2302
2306
  }
2303
2307
  });
2304
- case 48:
2308
+ // 如果订单创建失败,弹出提示让重新加载 app
2309
+ setShowCreateErrorModal(true);
2310
+ case 49:
2305
2311
  case "end":
2306
2312
  return _context23.stop();
2307
2313
  }
@@ -2807,7 +2813,39 @@ var PaymentModal = function PaymentModal(_ref18) {
2807
2813
  width: '100%',
2808
2814
  marginTop: '80px'
2809
2815
  }
2810
- }, locales.getText('retry') || '重试'))));
2816
+ }, locales.getText('retry') || '重试'))), /*#__PURE__*/React.createElement(PisellContainer, {
2817
+ renderType: "modal",
2818
+ props: {
2819
+ open: showCreateErrorModal,
2820
+ title: locales.getText('pisell2.checkout.tips'),
2821
+ footer: null,
2822
+ keyboard: false,
2823
+ onCancel: function onCancel() {
2824
+ setShowCreateErrorModal(false);
2825
+ } // 禁用关闭
2826
+ }
2827
+ }, /*#__PURE__*/React.createElement("div", {
2828
+ style: {
2829
+ textAlign: 'center',
2830
+ padding: '20px'
2831
+ }
2832
+ }, /*#__PURE__*/React.createElement("div", {
2833
+ style: {
2834
+ marginBottom: '16px',
2835
+ fontSize: '16px'
2836
+ }
2837
+ }, locales.getText('pisell2.checkout.order-create-failed')), /*#__PURE__*/React.createElement(Button, {
2838
+ type: "primary",
2839
+ size: "large",
2840
+ onClick: function onClick() {
2841
+ setShowCreateErrorModal(false);
2842
+ window.location.reload();
2843
+ },
2844
+ style: {
2845
+ width: '100%',
2846
+ marginTop: '80px'
2847
+ }
2848
+ }, locales.getText('confirm') || '确认'))));
2811
2849
  };
2812
2850
 
2813
2851
  // 导出类型供外部使用
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any;
20
+ expiredWalletIds: any[];
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -154,6 +154,7 @@ declare const _default: {
154
154
  'wallet-pass-module-customer-name-walk-in': string;
155
155
  'pisell2.amount-summary.amount-cannot-be-zero': string;
156
156
  'pisell2.checkout.order-sync-failed': string;
157
+ 'pisell2.checkout.order-create-failed': string;
157
158
  'pisell2.checkout.sync-retry-hint': string;
158
159
  'pisell2.checkout.tips': string;
159
160
  retry: string;
@@ -322,6 +323,7 @@ declare const _default: {
322
323
  'wallet-pass-module-customer-name-walk-in': string;
323
324
  'pisell2.amount-summary.amount-cannot-be-zero': string;
324
325
  'pisell2.checkout.order-sync-failed': string;
326
+ 'pisell2.checkout.order-create-failed': string;
325
327
  'pisell2.checkout.sync-retry-hint': string;
326
328
  'pisell2.checkout.tips': string;
327
329
  retry: string;
@@ -490,6 +492,7 @@ declare const _default: {
490
492
  'wallet-pass-module-customer-name-walk-in': string;
491
493
  'pisell2.amount-summary.amount-cannot-be-zero': string;
492
494
  'pisell2.checkout.order-sync-failed': string;
495
+ 'pisell2.checkout.order-create-failed': string;
493
496
  'pisell2.checkout.sync-retry-hint': string;
494
497
  'pisell2.checkout.tips': string;
495
498
  retry: string;
@@ -200,6 +200,7 @@ export default {
200
200
  'pisell2.amount-summary.amount-cannot-be-zero': 'The amount cannot be 0',
201
201
  // Order sync errors
202
202
  'pisell2.checkout.order-sync-failed': 'Order sync failed, please check your network',
203
+ 'pisell2.checkout.order-create-failed': 'Order create failed, please refresh app',
203
204
  'pisell2.checkout.sync-retry-hint': 'Network error, please click the retry button to resync the order',
204
205
  'pisell2.checkout.tips': 'Tips',
205
206
  'retry': 'Retry',
@@ -418,6 +419,7 @@ export default {
418
419
  'pisell2.amount-summary.amount-cannot-be-zero': '金额不能为0',
419
420
  // Order sync errors
420
421
  'pisell2.checkout.order-sync-failed': '订单同步失败,请检查网络',
422
+ 'pisell2.checkout.order-create-failed': '订单创建失败,请重启APP',
421
423
  'pisell2.checkout.sync-retry-hint': '网络异常,请点击重试按钮重新同步订单',
422
424
  'pisell2.checkout.tips': '提示',
423
425
  'retry': '重试',
@@ -636,6 +638,7 @@ export default {
636
638
  'pisell2.amount-summary.amount-cannot-be-zero': '金額不能為0',
637
639
  // Order sync errors
638
640
  'pisell2.checkout.order-sync-failed': '訂單同步失敗,請檢查網絡',
641
+ 'pisell2.checkout.order-create-failed': '订单创建失败,请重启APP',
639
642
  'pisell2.checkout.sync-retry-hint': '網絡異常,請點擊重試按鈕重新同步訂單',
640
643
  'pisell2.checkout.tips': '提示',
641
644
  'retry': '重試',
@@ -1063,6 +1063,7 @@ var PaymentModal = ({
1063
1063
  const [actualShowCashPayment, setActualShowCashPayment] = (0, import_react.useState)(true);
1064
1064
  const [windowHeight, setWindowHeight] = (0, import_react.useState)(0);
1065
1065
  const [showRetryModal, setShowRetryModal] = (0, import_react.useState)(false);
1066
+ const [showCreateErrorModal, setShowCreateErrorModal] = (0, import_react.useState)(false);
1066
1067
  const [currentEditOrderId, setCurrentEditOrderId] = (0, import_react.useState)(editOrderId || 0);
1067
1068
  const { executeIfActive } = (0, import_pisellos.useActiveExecute)();
1068
1069
  const Toast = (0, import_materials.useToast)();
@@ -1620,6 +1621,7 @@ var PaymentModal = ({
1620
1621
  error
1621
1622
  }
1622
1623
  });
1624
+ setShowCreateErrorModal(true);
1623
1625
  }
1624
1626
  };
1625
1627
  if (data) {
@@ -2052,6 +2054,34 @@ var PaymentModal = ({
2052
2054
  },
2053
2055
  import_utils.locales.getText("retry") || "重试"
2054
2056
  ))
2057
+ ), /* @__PURE__ */ import_react.default.createElement(
2058
+ import_materials.PisellContainer,
2059
+ {
2060
+ renderType: "modal",
2061
+ props: {
2062
+ open: showCreateErrorModal,
2063
+ title: import_utils.locales.getText("pisell2.checkout.tips"),
2064
+ footer: null,
2065
+ keyboard: false,
2066
+ onCancel: () => {
2067
+ setShowCreateErrorModal(false);
2068
+ }
2069
+ // 禁用关闭
2070
+ }
2071
+ },
2072
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { textAlign: "center", padding: "20px" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: "16px", fontSize: "16px" } }, import_utils.locales.getText("pisell2.checkout.order-create-failed")), /* @__PURE__ */ import_react.default.createElement(
2073
+ import_antd.Button,
2074
+ {
2075
+ type: "primary",
2076
+ size: "large",
2077
+ onClick: () => {
2078
+ setShowCreateErrorModal(false);
2079
+ window.location.reload();
2080
+ },
2081
+ style: { width: "100%", marginTop: "80px" }
2082
+ },
2083
+ import_utils.locales.getText("confirm") || "确认"
2084
+ ))
2055
2085
  ));
2056
2086
  };
2057
2087
  var PaymentModal_default = PaymentModal;
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any;
20
+ expiredWalletIds: any[];
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -154,6 +154,7 @@ declare const _default: {
154
154
  'wallet-pass-module-customer-name-walk-in': string;
155
155
  'pisell2.amount-summary.amount-cannot-be-zero': string;
156
156
  'pisell2.checkout.order-sync-failed': string;
157
+ 'pisell2.checkout.order-create-failed': string;
157
158
  'pisell2.checkout.sync-retry-hint': string;
158
159
  'pisell2.checkout.tips': string;
159
160
  retry: string;
@@ -322,6 +323,7 @@ declare const _default: {
322
323
  'wallet-pass-module-customer-name-walk-in': string;
323
324
  'pisell2.amount-summary.amount-cannot-be-zero': string;
324
325
  'pisell2.checkout.order-sync-failed': string;
326
+ 'pisell2.checkout.order-create-failed': string;
325
327
  'pisell2.checkout.sync-retry-hint': string;
326
328
  'pisell2.checkout.tips': string;
327
329
  retry: string;
@@ -490,6 +492,7 @@ declare const _default: {
490
492
  'wallet-pass-module-customer-name-walk-in': string;
491
493
  'pisell2.amount-summary.amount-cannot-be-zero': string;
492
494
  'pisell2.checkout.order-sync-failed': string;
495
+ 'pisell2.checkout.order-create-failed': string;
493
496
  'pisell2.checkout.sync-retry-hint': string;
494
497
  'pisell2.checkout.tips': string;
495
498
  retry: string;
@@ -210,6 +210,7 @@ var locales_default = {
210
210
  "pisell2.amount-summary.amount-cannot-be-zero": "The amount cannot be 0",
211
211
  // Order sync errors
212
212
  "pisell2.checkout.order-sync-failed": "Order sync failed, please check your network",
213
+ "pisell2.checkout.order-create-failed": "Order create failed, please refresh app",
213
214
  "pisell2.checkout.sync-retry-hint": "Network error, please click the retry button to resync the order",
214
215
  "pisell2.checkout.tips": "Tips",
215
216
  "retry": "Retry",
@@ -415,6 +416,7 @@ var locales_default = {
415
416
  "pisell2.amount-summary.amount-cannot-be-zero": "金额不能为0",
416
417
  // Order sync errors
417
418
  "pisell2.checkout.order-sync-failed": "订单同步失败,请检查网络",
419
+ "pisell2.checkout.order-create-failed": "订单创建失败,请重启APP",
418
420
  "pisell2.checkout.sync-retry-hint": "网络异常,请点击重试按钮重新同步订单",
419
421
  "pisell2.checkout.tips": "提示",
420
422
  "retry": "重试",
@@ -620,6 +622,7 @@ var locales_default = {
620
622
  "pisell2.amount-summary.amount-cannot-be-zero": "金額不能為0",
621
623
  // Order sync errors
622
624
  "pisell2.checkout.order-sync-failed": "訂單同步失敗,請檢查網絡",
625
+ "pisell2.checkout.order-create-failed": "订单创建失败,请重启APP",
623
626
  "pisell2.checkout.sync-retry-hint": "網絡異常,請點擊重試按鈕重新同步訂單",
624
627
  "pisell2.checkout.tips": "提示",
625
628
  "retry": "重試",
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.4.66",
3
+ "version": "6.4.67",
4
+ "scripts": {
5
+ "dev": "father dev",
6
+ "build": "father build",
7
+ "lowcode:dev": "build-scripts start --config ./build.lowcode.js",
8
+ "lowcode:build": " build-scripts build --config ./build.lowcode.js"
9
+ },
4
10
  "main": "./lib/index.js",
5
11
  "module": "./es/index.js",
6
12
  "types": "./lib/index.d.ts",
@@ -50,6 +56,10 @@
50
56
  "@dnd-kit/modifiers": "^6.0.1",
51
57
  "@dnd-kit/sortable": "^7.0.2",
52
58
  "@dnd-kit/utilities": "^3.2.1",
59
+ "@pisell/date-picker": "workspace:*",
60
+ "@pisell/icon": "workspace:*",
61
+ "@pisell/materials": "workspace:*",
62
+ "@pisell/utils": "workspace:*",
53
63
  "ahooks": "^3.7.6",
54
64
  "antd": "^5.6.3",
55
65
  "classnames": "^2.3.2",
@@ -60,11 +70,7 @@
60
70
  "react-resizable": "^3.0.5",
61
71
  "styled-components": "^6.0.0-rc.3",
62
72
  "@react-spring/web": "^9.6.1",
63
- "@use-gesture/react": "^10.3.1",
64
- "@pisell/icon": "0.0.11",
65
- "@pisell/materials": "6.4.16",
66
- "@pisell/utils": "3.0.2",
67
- "@pisell/date-picker": "3.0.7"
73
+ "@use-gesture/react": "^10.3.1"
68
74
  },
69
75
  "peerDependencies": {
70
76
  "react": "^18.0.0",
@@ -72,11 +78,5 @@
72
78
  },
73
79
  "componentConfig": {
74
80
  "materialSchema": "https://unpkg.com/@pisell/materials@1.0.1/build/lowcode/assets-prod.json"
75
- },
76
- "scripts": {
77
- "dev": "father dev",
78
- "build": "father build",
79
- "lowcode:dev": "build-scripts start --config ./build.lowcode.js",
80
- "lowcode:build": " build-scripts build --config ./build.lowcode.js"
81
81
  }
82
- }
82
+ }