@pisell/private-materials 3.0.124 → 3.0.126

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.
Files changed (41) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +4 -4
  7. package/build/lowcode/render/default/view.js +13 -11
  8. package/build/lowcode/view.js +12 -10
  9. package/es/components/booking/addons/model.d.ts +2 -1
  10. package/es/components/booking/forms/forms.d.ts +1 -1
  11. package/es/components/booking/forms/model.d.ts +2 -1
  12. package/es/components/booking/notes/index.d.ts +1 -1
  13. package/es/components/booking/notes/model.d.ts +2 -1
  14. package/es/components/booking/payments/model.d.ts +2 -1
  15. package/es/components/eftposPay/store/index.d.ts +2 -2
  16. package/es/components/pay/toC/index.js +96 -24
  17. package/es/components/pay/toC/locales.d.ts +9 -0
  18. package/es/components/pay/toC/locales.js +12 -3
  19. package/es/components/pay/toC/status.d.ts +9 -0
  20. package/es/components/pay/toC/status.js +38 -4
  21. package/es/components/pay/toC/utils.d.ts +8 -0
  22. package/es/components/pay/toC/utils.js +13 -0
  23. package/es/components/schedules/index.d.ts +1 -1
  24. package/es/components/schedules/model.d.ts +2 -1
  25. package/lib/components/booking/addons/model.d.ts +2 -1
  26. package/lib/components/booking/forms/forms.d.ts +1 -1
  27. package/lib/components/booking/forms/model.d.ts +2 -1
  28. package/lib/components/booking/notes/index.d.ts +1 -1
  29. package/lib/components/booking/notes/model.d.ts +2 -1
  30. package/lib/components/booking/payments/model.d.ts +2 -1
  31. package/lib/components/eftposPay/store/index.d.ts +2 -2
  32. package/lib/components/pay/toC/index.js +30 -0
  33. package/lib/components/pay/toC/locales.d.ts +9 -0
  34. package/lib/components/pay/toC/locales.js +12 -3
  35. package/lib/components/pay/toC/status.d.ts +9 -0
  36. package/lib/components/pay/toC/status.js +35 -5
  37. package/lib/components/pay/toC/utils.d.ts +8 -0
  38. package/lib/components/pay/toC/utils.js +9 -2
  39. package/lib/components/schedules/index.d.ts +1 -1
  40. package/lib/components/schedules/model.d.ts +2 -1
  41. package/package.json +4 -4
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => JSX.Element;
7
+ declare const Notes: (props: any) => any;
8
8
  export default Notes;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -190,12 +190,12 @@ export declare const backUpProduction: (payload: Partial<State>) => {
190
190
  export declare const backUpFree: (payload: Partial<State>) => {
191
191
  type: EActionTypes;
192
192
  payload: {
193
- mode?: "refund" | "pay" | "query" | undefined;
193
+ mode?: "pay" | "refund" | "query" | undefined;
194
194
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "eftpos" | undefined;
195
195
  key?: number | undefined;
196
196
  step?: number | undefined;
197
197
  title?: string | undefined;
198
- type?: "unset" | "step" | undefined;
198
+ type?: "step" | "unset" | undefined;
199
199
  render?: boolean | undefined;
200
200
  component?: string | undefined;
201
201
  lastComponent?: string | undefined;
@@ -16,8 +16,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useState, useMemo, useContext, useRef, useImperativeHandle, forwardRef } from 'react';
17
17
  import { Decimal } from 'decimal.js';
18
18
  import { useMemoizedFn, useUpdateEffect } from 'ahooks';
19
- import { PisellModal, PisellText, PisellContainer, PisellLoading } from '@pisell/materials';
20
- import { locales } from '@pisell/utils';
19
+ import { PisellModal, PisellText, PisellContainer, PisellLoading, PisellToast } from '@pisell/materials';
20
+ import { detectIncognito, locales, copyToClipboard } from '@pisell/utils';
21
21
  import PayCountdown from "./PayCountdown";
22
22
  import PayAmount from "./PayAmount";
23
23
  import WalletPassBlock from "./WalletPassBlock";
@@ -29,6 +29,7 @@ import useEngineContext from "../../../hooks/useEngineContext";
29
29
  import { request } from "../../../utils";
30
30
  import { removePayGroupFromStorage } from "./payGroup";
31
31
  import localeTexts from "./locales";
32
+ import { getIsWalletPassAndTripartitePayment } from "./utils";
32
33
  import "./index.less";
33
34
  /**
34
35
  * @title: C端支付
@@ -76,6 +77,11 @@ var ToCPay = function ToCPay(props, ref) {
76
77
  _useState10 = _slicedToArray(_useState9, 2),
77
78
  showInformation = _useState10[0],
78
79
  setShowInformation = _useState10[1];
80
+ // 隐私模式提示
81
+ var _useState11 = useState(false),
82
+ _useState12 = _slicedToArray(_useState11, 2),
83
+ showDetectIncognitoConfirm = _useState12[0],
84
+ setShowDetectIncognitoConfirm = _useState12[1];
79
85
  // lowCode utils
80
86
  var utils = context.appHelper.utils || {};
81
87
  // stope
@@ -373,6 +379,36 @@ var ToCPay = function ToCPay(props, ref) {
373
379
  }
374
380
  }, [state.payGroup, waitAmount, isWalletPassPay]);
375
381
 
382
+ /**
383
+ * @title: 获取是否提示无痕模式
384
+ * @description: walletPass和三方支付的组合支付在无痕模式浏览器需要给出提示
385
+ * @return: *
386
+ * @Author: shengjie.zuo
387
+ * @Date: 2024-08-30 10:23:48
388
+ */
389
+ var getIsShowDetectIncognitoConfirm = /*#__PURE__*/function () {
390
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(payGroup) {
391
+ var _yield$detectIncognit, isPrivate;
392
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
393
+ while (1) switch (_context5.prev = _context5.next) {
394
+ case 0:
395
+ _context5.next = 2;
396
+ return detectIncognito();
397
+ case 2:
398
+ _yield$detectIncognit = _context5.sent;
399
+ isPrivate = _yield$detectIncognit.isPrivate;
400
+ return _context5.abrupt("return", ((payGroup === null || payGroup === void 0 ? void 0 : payGroup.wait_amount) || 0) > 0 && getIsWalletPassAndTripartitePayment(payGroup) && isPrivate);
401
+ case 5:
402
+ case "end":
403
+ return _context5.stop();
404
+ }
405
+ }, _callee5);
406
+ }));
407
+ return function getIsShowDetectIncognitoConfirm(_x7) {
408
+ return _ref6.apply(this, arguments);
409
+ };
410
+ }();
411
+
376
412
  /**
377
413
  * @title: 提交
378
414
  * @description:
@@ -381,32 +417,43 @@ var ToCPay = function ToCPay(props, ref) {
381
417
  * @Date: 2024-08-15 13:25
382
418
  */
383
419
  var onSubmit = /*#__PURE__*/function () {
384
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(newOrderId) {
420
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(newOrderId) {
385
421
  var _state$payGroup9;
386
- var newPayGroup;
387
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
388
- while (1) switch (_context5.prev = _context5.next) {
422
+ var newPayGroup, result;
423
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
424
+ while (1) switch (_context6.prev = _context6.next) {
389
425
  case 0:
390
- newPayGroup = state.payGroup; // 如果未创建交易组, 则先创建交易组
426
+ newPayGroup = state.payGroup; // 是否要展示无痕模式提示
427
+ _context6.next = 3;
428
+ return getIsShowDetectIncognitoConfirm(newPayGroup);
429
+ case 3:
430
+ result = _context6.sent;
431
+ if (!result) {
432
+ _context6.next = 7;
433
+ break;
434
+ }
435
+ setShowDetectIncognitoConfirm(true);
436
+ return _context6.abrupt("return");
437
+ case 7:
391
438
  if ((_state$payGroup9 = state.payGroup) !== null && _state$payGroup9 !== void 0 && _state$payGroup9.payment_group_id) {
392
- _context5.next = 5;
439
+ _context6.next = 11;
393
440
  break;
394
441
  }
395
- _context5.next = 4;
442
+ _context6.next = 10;
396
443
  return paymentInit(newOrderId);
397
- case 4:
398
- newPayGroup = _context5.sent;
399
- case 5:
444
+ case 10:
445
+ newPayGroup = _context6.sent;
446
+ case 11:
400
447
  // 调用支付
401
448
  handlePaymentByType(undefined, newPayGroup);
402
- case 6:
449
+ case 12:
403
450
  case "end":
404
- return _context5.stop();
451
+ return _context6.stop();
405
452
  }
406
- }, _callee5);
453
+ }, _callee6);
407
454
  }));
408
- return function onSubmit(_x7) {
409
- return _ref6.apply(this, arguments);
455
+ return function onSubmit(_x8) {
456
+ return _ref7.apply(this, arguments);
410
457
  };
411
458
  }();
412
459
 
@@ -463,10 +510,10 @@ var ToCPay = function ToCPay(props, ref) {
463
510
  * @Date: 2024-08-09 14:25
464
511
  */
465
512
  var payCallback = /*#__PURE__*/function () {
466
- var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(res) {
513
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(res) {
467
514
  var _props$callback;
468
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
469
- while (1) switch (_context6.prev = _context6.next) {
515
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
516
+ while (1) switch (_context7.prev = _context7.next) {
470
517
  case 0:
471
518
  // 取消支付,关闭弹窗
472
519
  if (res.key === 'cancel') {
@@ -477,12 +524,12 @@ var ToCPay = function ToCPay(props, ref) {
477
524
  (_props$callback = props.callback) === null || _props$callback === void 0 ? void 0 : _props$callback.call(props, res);
478
525
  case 2:
479
526
  case "end":
480
- return _context6.stop();
527
+ return _context7.stop();
481
528
  }
482
- }, _callee6);
529
+ }, _callee7);
483
530
  }));
484
- return function payCallback(_x8) {
485
- return _ref7.apply(this, arguments);
531
+ return function payCallback(_x9) {
532
+ return _ref8.apply(this, arguments);
486
533
  };
487
534
  }();
488
535
 
@@ -619,6 +666,31 @@ var ToCPay = function ToCPay(props, ref) {
619
666
  onOk: function onOk() {
620
667
  setShowInformation(false);
621
668
  }
669
+ }), /*#__PURE__*/React.createElement(PisellModal.Information, {
670
+ open: showDetectIncognitoConfirm,
671
+ describe: locales.getText('tocPay.text.detectIncognitoConfirm'),
672
+ okText: locales.getText('tocPay.text.copyLink'),
673
+ closable: true,
674
+ maskClosable: false,
675
+ onCancel: function onCancel() {
676
+ setShowDetectIncognitoConfirm(false);
677
+ },
678
+ onOk: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
679
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
680
+ while (1) switch (_context8.prev = _context8.next) {
681
+ case 0:
682
+ _context8.next = 2;
683
+ return copyToClipboard(window.location.href);
684
+ case 2:
685
+ PisellToast({
686
+ content: locales.getText('tocPay.text.copySuccess')
687
+ });
688
+ case 3:
689
+ case "end":
690
+ return _context8.stop();
691
+ }
692
+ }, _callee8);
693
+ }))
622
694
  }), /*#__PURE__*/React.createElement(PisellLoading, {
623
695
  loading: loading,
624
696
  mask: true
@@ -67,6 +67,9 @@ declare const _default: {
67
67
  'tocPay.text.walletCanPay': string;
68
68
  'tocPay.text.paymentInstructions': string;
69
69
  'tocPay.text.walletSearchEmpty': string;
70
+ 'tocPay.text.detectIncognitoConfirm': string;
71
+ 'tocPay.text.copyLink': string;
72
+ 'tocPay.text.copySuccess': string;
70
73
  };
71
74
  'zh-CN': {
72
75
  'tocPay.text.checkout': string;
@@ -135,6 +138,9 @@ declare const _default: {
135
138
  'tocPay.text.walletPassNoExtraPay': string;
136
139
  'tocPay.text.walletCanPay': string;
137
140
  'tocPay.text.walletSearchEmpty': string;
141
+ 'tocPay.text.detectIncognitoConfirm': string;
142
+ 'tocPay.text.copyLink': string;
143
+ 'tocPay.text.copySuccess': string;
138
144
  };
139
145
  'zh-HK': {
140
146
  'tocPay.text.checkout': string;
@@ -203,6 +209,9 @@ declare const _default: {
203
209
  'tocPay.text.walletPassNoExtraPay': string;
204
210
  'tocPay.text.walletCanPay': string;
205
211
  'tocPay.text.walletSearchEmpty': string;
212
+ 'tocPay.text.detectIncognitoConfirm': string;
213
+ 'tocPay.text.copyLink': string;
214
+ 'tocPay.text.copySuccess': string;
206
215
  };
207
216
  };
208
217
  export default _default;
@@ -66,7 +66,10 @@ export default {
66
66
  'tocPay.text.walletPassNoExtraPay': 'No extra pay needed',
67
67
  'tocPay.text.walletCanPay': 'You can use the balance in your wallet pass or other eligible types of voucher to pay.',
68
68
  'tocPay.text.paymentInstructions': 'Instructions',
69
- 'tocPay.text.walletSearchEmpty': 'No results found.'
69
+ 'tocPay.text.walletSearchEmpty': 'No results found.',
70
+ 'tocPay.text.detectIncognitoConfirm': 'You are currently in private mode, wallet payment may not succeed. Please copy the link and continue payment in a non-private browsing tab.',
71
+ 'tocPay.text.copyLink': 'Copy link',
72
+ 'tocPay.text.copySuccess': 'Copy Success'
70
73
  },
71
74
  'zh-CN': {
72
75
  'tocPay.text.checkout': '结账',
@@ -134,7 +137,10 @@ export default {
134
137
  'tocPay.text.walletPassCompleteTitle': '请点击底部的“提交”按钮完成支付',
135
138
  'tocPay.text.walletPassNoExtraPay': '无需额外支付金额',
136
139
  'tocPay.text.walletCanPay': '您可以使用钱包内的余额或其他符合条件的代金券进行支付。',
137
- 'tocPay.text.walletSearchEmpty': '没有查询到任何结果。'
140
+ 'tocPay.text.walletSearchEmpty': '没有查询到任何结果。',
141
+ 'tocPay.text.detectIncognitoConfirm': '当前处于无痕模式,钱包支付可能失败,请复制链接在非无痕模式下继续支付。',
142
+ 'tocPay.text.copyLink': '复制链接',
143
+ 'tocPay.text.copySuccess': '复制成功'
138
144
  },
139
145
  'zh-HK': {
140
146
  'tocPay.text.checkout': '結帳',
@@ -202,6 +208,9 @@ export default {
202
208
  'tocPay.text.walletPassCompleteTitle': '請點擊底部的“提交”按鈕完成支付',
203
209
  'tocPay.text.walletPassNoExtraPay': '無需額外支付金額',
204
210
  'tocPay.text.walletCanPay': '您可以使用錢包內的餘額或其他符合資格的代金券進行支付。',
205
- 'tocPay.text.walletSearchEmpty': '沒有查詢到任何結果。'
211
+ 'tocPay.text.walletSearchEmpty': '沒有查詢到任何結果。',
212
+ 'tocPay.text.detectIncognitoConfirm': '目前處於無痕模式,錢包支付可能失敗,請複製連結在非無痕模式下繼續支付。',
213
+ 'tocPay.text.copyLink': '復製链接',
214
+ 'tocPay.text.copySuccess': '復製成功'
206
215
  }
207
216
  };
@@ -1,3 +1,12 @@
1
1
  export declare const paymentServices: any;
2
2
  export declare const paymentTypes: any[];
3
+ export declare const tripartitePaymentKeys: string[];
3
4
  export declare const paymentKeys: string[];
5
+ /**
6
+ * @title: 判断是否是三方支付
7
+ * @description:
8
+ * @return: *
9
+ * @Author: shengjie.zuo
10
+ * @Date: 2024-08-30 10:16:26
11
+ */
12
+ export declare const isTripartitePayment: (service: string) => boolean;
@@ -21,48 +21,61 @@ export var paymentServices = {
21
21
  // stripe支付
22
22
  stripe: {
23
23
  // url: stripe,
24
+ isTripartitePayment: true
24
25
  },
25
26
  // 微信支付
26
27
  'globepay.wechat.jsapi': {
27
28
  // url: wxpay,
29
+ isTripartitePayment: true
28
30
  },
29
31
  // 微信H5支付
30
32
  'superpay.wechat.h5': {
31
33
  // url: wxpay,
32
- channel: ['wx']
34
+ channel: ['wx'],
35
+ isTripartitePayment: true
33
36
  },
34
37
  // 支付包H5支付
35
38
  'globepay.alipay.h5': {
36
39
  // url: alipay,
37
- channel: ['nowx', 'phone', 'ios']
40
+ channel: ['nowx', 'phone', 'ios'],
41
+ isTripartitePayment: true
38
42
  },
39
43
  'globepay.paypal.h5': {
40
44
  // url: paypal,
41
- channel: ['wx', 'nowx', 'phone', 'ios']
45
+ channel: ['wx', 'nowx', 'phone', 'ios'],
46
+ isTripartitePayment: false
42
47
  },
43
48
  'superpay.alipay.h5': {
44
49
  // url: alipay,
50
+ isTripartitePayment: true
45
51
  },
46
52
  'mw.google': {
47
53
  // url: google_pay,
54
+ isTripartitePayment: true
48
55
  },
49
56
  'mw.apple': {
50
57
  // url: apple_pay,
58
+ isTripartitePayment: true
51
59
  },
52
60
  'mw.credit_card': {
53
61
  // url: credit_card,
62
+ isTripartitePayment: true
54
63
  },
55
64
  'pisell.bank_deposit': {
56
65
  // url: bank_deposit,
66
+ isTripartitePayment: false
57
67
  },
58
68
  'pisell.offline_payment': {
59
69
  // url: offline_payment,
70
+ isTripartitePayment: false
60
71
  },
61
72
  'pisell.other.cashmanual': {
62
73
  // url: custom,
74
+ isTripartitePayment: false
63
75
  },
64
76
  'pisell.custom_payment': {
65
77
  // url: custom,
78
+ isTripartitePayment: false
66
79
  }
67
80
  };
68
81
  var getPaymentTypes = function getPaymentTypes() {
@@ -74,9 +87,30 @@ var getPaymentTypes = function getPaymentTypes() {
74
87
  }
75
88
  return arr;
76
89
  };
90
+ var getTripartitePaymentKeys = function getTripartitePaymentKeys() {
91
+ var arr = [];
92
+ for (var key in paymentServices) {
93
+ if (paymentServices[key].isTripartitePayment) {
94
+ arr.push(key);
95
+ }
96
+ }
97
+ return arr;
98
+ };
77
99
 
78
100
  //支付类型列表
79
101
  export var paymentTypes = getPaymentTypes();
102
+ export var tripartitePaymentKeys = getTripartitePaymentKeys();
80
103
  export var paymentKeys = Object.keys(paymentServices);
81
104
 
82
- // H5 分为 微信环境 非微信环境 手机环境 IOS环境
105
+ // H5 分为 微信环境 非微信环境 手机环境 IOS环境
106
+
107
+ /**
108
+ * @title: 判断是否是三方支付
109
+ * @description:
110
+ * @return: *
111
+ * @Author: shengjie.zuo
112
+ * @Date: 2024-08-30 10:16:26
113
+ */
114
+ export var isTripartitePayment = function isTripartitePayment(service) {
115
+ return tripartitePaymentKeys.includes(service);
116
+ };
@@ -28,3 +28,11 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
28
28
  wallet_pass_usage_unit: any;
29
29
  }[];
30
30
  };
31
+ /**
32
+ * @title: 获取是否walletPass和三方支付的组合支付
33
+ * @description: 三方支付 (stripe 支付宝 微信 苹果 谷歌)
34
+ * @return: *
35
+ * @Author: shengjie.zuo
36
+ * @Date: 2024-08-30 10:06:17
37
+ */
38
+ export declare const getIsWalletPassAndTripartitePayment: (payGroup: PayGroup) => boolean | 0 | undefined;
@@ -1,4 +1,5 @@
1
1
  import { Decimal } from 'decimal.js';
2
+ import { isTripartitePayment } from "./status";
2
3
  /**
3
4
  * 计算walletPass列表数据的总金额
4
5
  * @param list
@@ -45,4 +46,16 @@ export var formatWalletPassParams = function formatWalletPassParams(payGroup) {
45
46
  payment_group_id: payment_group_id,
46
47
  payments: payments
47
48
  };
49
+ };
50
+
51
+ /**
52
+ * @title: 获取是否walletPass和三方支付的组合支付
53
+ * @description: 三方支付 (stripe 支付宝 微信 苹果 谷歌)
54
+ * @return: *
55
+ * @Author: shengjie.zuo
56
+ * @Date: 2024-08-30 10:06:17
57
+ */
58
+ export var getIsWalletPassAndTripartitePayment = function getIsWalletPassAndTripartitePayment(payGroup) {
59
+ var _payGroup$walletPass, _payGroup$walletPass$, _payGroup$otherPaymen;
60
+ return (payGroup === null || payGroup === void 0 ? void 0 : (_payGroup$walletPass = payGroup.walletPass) === null || _payGroup$walletPass === void 0 ? void 0 : (_payGroup$walletPass$ = _payGroup$walletPass.cards) === null || _payGroup$walletPass$ === void 0 ? void 0 : _payGroup$walletPass$.length) && isTripartitePayment(payGroup === null || payGroup === void 0 ? void 0 : (_payGroup$otherPaymen = payGroup.otherPayment) === null || _payGroup$otherPaymen === void 0 ? void 0 : _payGroup$otherPaymen.service);
48
61
  };
@@ -1,3 +1,3 @@
1
1
  import "./index.less";
2
- declare const Schedules: (props: any) => JSX.Element;
2
+ declare const Schedules: (props: any) => any;
3
3
  export default Schedules;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem, ScheduleItem } from "./type";
2
3
  import dayjs from "dayjs";
3
4
  export interface FormState {
@@ -68,7 +69,7 @@ export interface FormState {
68
69
  };
69
70
  setGlobalState: Function | null;
70
71
  }
71
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
72
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
72
73
  state: FormState;
73
74
  } & {
74
75
  dispatch: (params: {
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -21,5 +21,5 @@ export interface InfoProps {
21
21
  * @Author: zhiwei.Wang
22
22
  * @Date: 2024-01-30 17:10
23
23
  */
24
- declare const Forms: (props: any) => JSX.Element;
24
+ declare const Forms: (props: any) => any;
25
25
  export default Forms;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -4,5 +4,5 @@ export interface InfoProps {
4
4
  globalState: any;
5
5
  setGlobalState: any;
6
6
  }
7
- declare const Notes: (props: any) => JSX.Element;
7
+ declare const Notes: (props: any) => any;
8
8
  export default Notes;
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from "../model";
2
- export declare const Provider: (ComponentUi: any) => (props: any) => JSX.Element, Context: import("react").Context<{
3
+ export declare const Provider: (ComponentUi: any) => (props: any) => any, Context: import("react").Context<{
3
4
  state: FormState;
4
5
  } & {
5
6
  dispatch: (params: {
@@ -190,12 +190,12 @@ export declare const backUpProduction: (payload: Partial<State>) => {
190
190
  export declare const backUpFree: (payload: Partial<State>) => {
191
191
  type: EActionTypes;
192
192
  payload: {
193
- mode?: "refund" | "pay" | "query" | undefined;
193
+ mode?: "pay" | "refund" | "query" | undefined;
194
194
  eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "eftpos" | undefined;
195
195
  key?: number | undefined;
196
196
  step?: number | undefined;
197
197
  title?: string | undefined;
198
- type?: "unset" | "step" | undefined;
198
+ type?: "step" | "unset" | undefined;
199
199
  render?: boolean | undefined;
200
200
  component?: string | undefined;
201
201
  lastComponent?: string | undefined;
@@ -48,6 +48,7 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
48
48
  var import_utils2 = require("../../../utils");
49
49
  var import_payGroup = require("./payGroup");
50
50
  var import_locales = __toESM(require("./locales"));
51
+ var import_utils3 = require("./utils");
51
52
  var import_index = require("./index.less");
52
53
  var ToCPay = (props, ref) => {
53
54
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
@@ -60,6 +61,7 @@ var ToCPay = (props, ref) => {
60
61
  const [renderType, setRenderType] = (0, import_react.useState)("modal");
61
62
  const context = (0, import_useEngineContext.default)();
62
63
  const [showInformation, setShowInformation] = (0, import_react.useState)(false);
64
+ const [showDetectIncognitoConfirm, setShowDetectIncognitoConfirm] = (0, import_react.useState)(false);
63
65
  const utils = context.appHelper.utils || {};
64
66
  const dvaStore = (_c = (_b = (_a = context.appHelper.utils) == null ? void 0 : _a.getStore) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.getState();
65
67
  const customer_id = (_i = (_h = (_g = (_f = (_e = (_d = context.appHelper.utils) == null ? void 0 : _d.getStore()) == null ? void 0 : _e.getState) == null ? void 0 : _f.call(_e)) == null ? void 0 : _g.global) == null ? void 0 : _h.userInfo) == null ? void 0 : _i.id;
@@ -192,9 +194,18 @@ var ToCPay = (props, ref) => {
192
194
  return !isWalletPassPay;
193
195
  }
194
196
  }, [state.payGroup, waitAmount, isWalletPassPay]);
197
+ const getIsShowDetectIncognitoConfirm = async (payGroup) => {
198
+ const { isPrivate } = await (0, import_utils.detectIncognito)();
199
+ return ((payGroup == null ? void 0 : payGroup.wait_amount) || 0) > 0 && (0, import_utils3.getIsWalletPassAndTripartitePayment)(payGroup) && isPrivate;
200
+ };
195
201
  const onSubmit = async (newOrderId) => {
196
202
  var _a2;
197
203
  let newPayGroup = state.payGroup;
204
+ const result = await getIsShowDetectIncognitoConfirm(newPayGroup);
205
+ if (result) {
206
+ setShowDetectIncognitoConfirm(true);
207
+ return;
208
+ }
198
209
  if (!((_a2 = state.payGroup) == null ? void 0 : _a2.payment_group_id)) {
199
210
  newPayGroup = await paymentInit(newOrderId);
200
211
  }
@@ -331,6 +342,25 @@ var ToCPay = (props, ref) => {
331
342
  }
332
343
  }
333
344
  ),
345
+ /* @__PURE__ */ import_react.default.createElement(
346
+ import_materials.PisellModal.Information,
347
+ {
348
+ open: showDetectIncognitoConfirm,
349
+ describe: import_utils.locales.getText("tocPay.text.detectIncognitoConfirm"),
350
+ okText: import_utils.locales.getText("tocPay.text.copyLink"),
351
+ closable: true,
352
+ maskClosable: false,
353
+ onCancel: () => {
354
+ setShowDetectIncognitoConfirm(false);
355
+ },
356
+ onOk: async () => {
357
+ await (0, import_utils.copyToClipboard)(window.location.href);
358
+ (0, import_materials.PisellToast)({
359
+ content: import_utils.locales.getText("tocPay.text.copySuccess")
360
+ });
361
+ }
362
+ }
363
+ ),
334
364
  /* @__PURE__ */ import_react.default.createElement(
335
365
  import_materials.PisellLoading,
336
366
  {
@@ -67,6 +67,9 @@ declare const _default: {
67
67
  'tocPay.text.walletCanPay': string;
68
68
  'tocPay.text.paymentInstructions': string;
69
69
  'tocPay.text.walletSearchEmpty': string;
70
+ 'tocPay.text.detectIncognitoConfirm': string;
71
+ 'tocPay.text.copyLink': string;
72
+ 'tocPay.text.copySuccess': string;
70
73
  };
71
74
  'zh-CN': {
72
75
  'tocPay.text.checkout': string;
@@ -135,6 +138,9 @@ declare const _default: {
135
138
  'tocPay.text.walletPassNoExtraPay': string;
136
139
  'tocPay.text.walletCanPay': string;
137
140
  'tocPay.text.walletSearchEmpty': string;
141
+ 'tocPay.text.detectIncognitoConfirm': string;
142
+ 'tocPay.text.copyLink': string;
143
+ 'tocPay.text.copySuccess': string;
138
144
  };
139
145
  'zh-HK': {
140
146
  'tocPay.text.checkout': string;
@@ -203,6 +209,9 @@ declare const _default: {
203
209
  'tocPay.text.walletPassNoExtraPay': string;
204
210
  'tocPay.text.walletCanPay': string;
205
211
  'tocPay.text.walletSearchEmpty': string;
212
+ 'tocPay.text.detectIncognitoConfirm': string;
213
+ 'tocPay.text.copyLink': string;
214
+ 'tocPay.text.copySuccess': string;
206
215
  };
207
216
  };
208
217
  export default _default;