@pisell/private-materials 6.6.21 → 6.6.23

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 (116) 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 +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +9 -9
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +9 -9
  11. package/es/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +0 -1
  12. package/es/components/booking/components/footer/amount.js +3 -0
  13. package/es/components/booking/components/footer/index.js +32 -33
  14. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  15. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  16. package/es/components/booking/info/service2/utils.js +41 -39
  17. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/info2/service/editService/index.js +0 -1
  19. package/es/components/booking/utils/confirmHolderModal.js +3 -4
  20. package/es/components/checkout/PaymentModal.js +4 -2
  21. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  22. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  23. package/es/components/eftposPay/EFTPos.js +6 -6
  24. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  25. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
  26. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  27. package/es/components/eftposPay/aggregatePayment/index.js +3 -0
  28. package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  29. package/es/components/eftposPay/aggregatePayment/service.js +69 -0
  30. package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  31. package/es/components/eftposPay/aggregatePayment/types.js +65 -0
  32. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  33. package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
  34. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  35. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
  36. package/es/components/eftposPay/app.js +5 -0
  37. package/es/components/eftposPay/component/fail/failCustom.js +16 -12
  38. package/es/components/eftposPay/component/fail/index.js +12 -5
  39. package/es/components/eftposPay/const.d.ts +6 -1
  40. package/es/components/eftposPay/const.js +3 -0
  41. package/es/components/eftposPay/hooks.d.ts +3 -2
  42. package/es/components/eftposPay/hooks.js +12 -0
  43. package/es/components/eftposPay/huifu/Action.d.ts +8 -0
  44. package/es/components/eftposPay/huifu/Action.js +146 -0
  45. package/es/components/eftposPay/huifu/const.d.ts +5 -0
  46. package/es/components/eftposPay/huifu/const.js +70 -0
  47. package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
  48. package/es/components/eftposPay/huifu/hooks.js +184 -0
  49. package/es/components/eftposPay/huifu/index.d.ts +5 -0
  50. package/es/components/eftposPay/huifu/index.js +196 -0
  51. package/es/components/eftposPay/huifu/index.less +180 -0
  52. package/es/components/eftposPay/huifu/types.d.ts +14 -0
  53. package/es/components/eftposPay/huifu/types.js +1 -0
  54. package/es/components/eftposPay/index.js +5 -1
  55. package/es/components/eftposPay/locales.d.ts +36 -0
  56. package/es/components/eftposPay/locales.js +42 -3
  57. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  58. package/es/components/eftposPay/manufacturer.js +5 -0
  59. package/es/components/eftposPay/pay.js +6 -2
  60. package/es/components/eftposPay/store/index.d.ts +10 -3
  61. package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
  62. package/es/components/pay/toB/types/index.d.ts +1 -0
  63. package/es/components/ticketBooking/components/addServiceVariant/addService.js +10 -11
  64. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.js +0 -1
  65. package/lib/components/booking/components/footer/index.js +0 -1
  66. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  67. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  68. package/lib/components/booking/info/service2/utils.js +3 -1
  69. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  70. package/lib/components/booking/info2/service/editService/index.js +0 -1
  71. package/lib/components/booking/utils/confirmHolderModal.js +0 -1
  72. package/lib/components/checkout/PaymentModal.js +5 -2
  73. package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  74. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  75. package/lib/components/eftposPay/EFTPos.js +7 -7
  76. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  77. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
  78. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  79. package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
  80. package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  81. package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
  82. package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  83. package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
  84. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  85. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
  86. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  87. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
  88. package/lib/components/eftposPay/app.js +5 -0
  89. package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
  90. package/lib/components/eftposPay/component/fail/index.js +4 -1
  91. package/lib/components/eftposPay/const.d.ts +6 -1
  92. package/lib/components/eftposPay/const.js +3 -0
  93. package/lib/components/eftposPay/hooks.d.ts +3 -2
  94. package/lib/components/eftposPay/hooks.js +16 -0
  95. package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
  96. package/lib/components/eftposPay/huifu/Action.js +174 -0
  97. package/lib/components/eftposPay/huifu/const.d.ts +5 -0
  98. package/lib/components/eftposPay/huifu/const.js +86 -0
  99. package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
  100. package/lib/components/eftposPay/huifu/hooks.js +186 -0
  101. package/lib/components/eftposPay/huifu/index.d.ts +5 -0
  102. package/lib/components/eftposPay/huifu/index.js +200 -0
  103. package/lib/components/eftposPay/huifu/index.less +180 -0
  104. package/lib/components/eftposPay/huifu/types.d.ts +14 -0
  105. package/lib/components/eftposPay/huifu/types.js +17 -0
  106. package/lib/components/eftposPay/index.js +5 -1
  107. package/lib/components/eftposPay/locales.d.ts +36 -0
  108. package/lib/components/eftposPay/locales.js +42 -3
  109. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  110. package/lib/components/eftposPay/manufacturer.js +7 -0
  111. package/lib/components/eftposPay/pay.js +3 -2
  112. package/lib/components/eftposPay/store/index.d.ts +10 -3
  113. package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
  114. package/lib/components/pay/toB/types/index.d.ts +1 -0
  115. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +0 -1
  116. package/package.json +4 -4
@@ -149,7 +149,20 @@ export default {
149
149
  },
150
150
  'page.eftpos-pay.text.tyro': function pageEftposPayTextTyro(key) {
151
151
  return key;
152
- }
152
+ },
153
+ // 汇付天下定制文案
154
+ 'page.eftpos-pay.text.huifu.scan.title': 'Scan to Pay (Alipay · WeChat Pay · UnionPay)',
155
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': 'Scanner Connected',
156
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': 'Scan the customer’s payment code to collect payment',
157
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': 'Scanner Not Connected',
158
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': 'Connect the scanner to scan the customer’s payment code',
159
+ 'page.eftpos-pay.text.huifu.scan.camera-title': 'Click to use the camera',
160
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': 'Align the customer’s payment code within the frame',
161
+ 'page.eftpos-pay.text.huifu.scan.input-title': 'Or enter the payment code manually',
162
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': 'Enter payment code',
163
+ 'page.eftpos-pay.text.huifu.scan.input-tip': 'Tip: The payment code is 18 digits',
164
+ 'page.eftpos-pay.text.huifu.scan.cancel': 'Cancel',
165
+ 'page.eftpos-pay.text.huifu.scan.confirm': 'Confirm Payment'
153
166
  },
154
167
  'zh-CN': {
155
168
  'page.eftpos-pay.text.loading': function pageEftposPayTextLoading(mode) {
@@ -447,7 +460,20 @@ export default {
447
460
  return '请使用以下选项之一回答此问题';
448
461
  }
449
462
  return key;
450
- }
463
+ },
464
+ // 汇付天下定制文案
465
+ 'page.eftpos-pay.text.huifu.scan.title': '扫码支付(支付宝 · 微信支付 · 银联)',
466
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': '扫码枪已连接',
467
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': '直接扫描消费者付款码即可',
468
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': '未连接扫码枪',
469
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': '连接扫码枪后可直接扫码消费者付款码',
470
+ 'page.eftpos-pay.text.huifu.scan.camera-title': '点击可使用设备摄像头',
471
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': '将消费者付款码对准扫描框',
472
+ 'page.eftpos-pay.text.huifu.scan.input-title': '或手动输入付款码',
473
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': '请输入',
474
+ 'page.eftpos-pay.text.huifu.scan.input-tip': '提示:付款码为18位数字',
475
+ 'page.eftpos-pay.text.huifu.scan.cancel': '取消',
476
+ 'page.eftpos-pay.text.huifu.scan.confirm': '确认支付'
451
477
  },
452
478
  'zh-HK': {
453
479
  'page.eftpos-pay.text.loading': function pageEftposPayTextLoading(mode) {
@@ -745,6 +771,19 @@ export default {
745
771
  return '請使用以下選項之一回答此問題';
746
772
  }
747
773
  return key;
748
- }
774
+ },
775
+ // 汇付天下定制文案
776
+ 'page.eftpos-pay.text.huifu.scan.title': '掃碼支付(支付寶 · 微信支付 · 銀聯)',
777
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': '掃碼槍已連接',
778
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': '直接掃描消費者付款碼即可',
779
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': '未連接掃碼槍',
780
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': '連接掃碼槍後可直接掃碼消費者付款碼',
781
+ 'page.eftpos-pay.text.huifu.scan.camera-title': '點擊可使用設備攝像頭',
782
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': '將消費者付款碼對準掃描框',
783
+ 'page.eftpos-pay.text.huifu.scan.input-title': '或手動輸入付款碼',
784
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': '請輸入',
785
+ 'page.eftpos-pay.text.huifu.scan.input-tip': '提示:付款碼為18位數字',
786
+ 'page.eftpos-pay.text.huifu.scan.cancel': '取消',
787
+ 'page.eftpos-pay.text.huifu.scan.confirm': '確認支付'
749
788
  }
750
789
  };
@@ -4,4 +4,5 @@ export { default as Payo } from './payo';
4
4
  export { default as Windcave } from './windcave/windcave';
5
5
  export { default as Tyro } from './tyro';
6
6
  export { default as Linkly } from './linkly';
7
+ export { default as Huifu } from './huifu';
7
8
  export declare const getInitState: (type: string, params?: any) => State;
@@ -3,12 +3,15 @@ import getPayoInitState from "./payo/const";
3
3
  import getTyroInitState from "./tyro/const";
4
4
  import getWindcaveInitState from "./windcave/const";
5
5
  import getLinklyInitState from "./linkly/const";
6
+ import getHuifuInitState from "./huifu/const";
6
7
  export { getAmonunt } from "./helper";
7
8
  export { default as Payo } from "./payo";
8
9
  export { default as Windcave } from "./windcave/windcave";
9
10
  export { default as Tyro } from "./tyro";
10
11
  export { default as Linkly } from "./linkly";
12
+ export { default as Huifu } from "./huifu";
11
13
  export var getInitState = function getInitState(type, params) {
14
+ console.log('type = ', type);
12
15
  switch (type) {
13
16
  case EftposEnum.Payo:
14
17
  return getPayoInitState(params);
@@ -18,6 +21,8 @@ export var getInitState = function getInitState(type, params) {
18
21
  return getTyroInitState(params);
19
22
  case EftposEnum.Linkly:
20
23
  return getLinklyInitState(params);
24
+ case EftposEnum.Huifu:
25
+ return getHuifuInitState(params);
21
26
  default:
22
27
  throw new Error('未知的厂商类型');
23
28
  }
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
10
10
  import Manual from "./component/manual";
11
11
  import Signature from "./component/signature";
12
12
  import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
13
- import { Payo, Windcave, Tyro, Linkly } from "./manufacturer";
13
+ import { Payo, Windcave, Tyro, Linkly, Huifu } from "./manufacturer";
14
14
  import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
15
15
  import "./index.less";
16
16
 
@@ -156,7 +156,7 @@ var Pay = function Pay(_ref) {
156
156
  style: data.type === 'step' ? {} : {
157
157
  display: 'none'
158
158
  }
159
- }, /*#__PURE__*/React.createElement(Header, {
159
+ }, data.status !== StatusEnum.Init && /*#__PURE__*/React.createElement(Header, {
160
160
  status: data.status,
161
161
  title: data.title,
162
162
  subTitle: data.subTitle
@@ -182,6 +182,10 @@ var Pay = function Pay(_ref) {
182
182
  key: data.key,
183
183
  api: api,
184
184
  onChange: onChange
185
+ }) : null, data.eftpos === 'huifu' ? /*#__PURE__*/React.createElement(Huifu, {
186
+ key: data.key,
187
+ onChange: onChange,
188
+ isNativeApp: isMobile
185
189
  }) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
186
190
  onChange: onChange,
187
191
  api: api,
@@ -91,6 +91,10 @@ export declare type State = {
91
91
  };
92
92
  backup?: Omit<State, 'backup'>;
93
93
  client: ClientEnum;
94
+ /** 原始参数 - 用于 retry 时完整恢复 */
95
+ originalParams?: {
96
+ [key: string]: unknown;
97
+ };
94
98
  };
95
99
  export declare type Action = {
96
100
  type: EActionTypes;
@@ -297,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
301
  amount?: string | number | undefined;
298
302
  mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
299
303
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
304
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
305
+ action?: "pay" | "amount" | "deviceList" | undefined;
302
306
  key?: number | undefined;
303
307
  step?: number | undefined;
304
308
  title?: string | undefined;
@@ -308,7 +312,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
312
  net?: boolean | undefined;
309
313
  component?: string | undefined;
310
314
  form?: string | undefined;
311
- status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
315
+ status?: "loading" | "success" | "warn" | "init" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
316
  warn?: string | undefined;
313
317
  steps?: {
314
318
  /** 用于重置当前步骤 */
@@ -344,6 +348,9 @@ export declare const backUpFree: (payload: Partial<State>) => {
344
348
  } | undefined;
345
349
  backup?: Omit<State, "backup"> | undefined;
346
350
  client?: ClientEnum | undefined;
351
+ originalParams?: {
352
+ [key: string]: unknown;
353
+ } | undefined;
347
354
  };
348
355
  };
349
356
  export declare function reducers(state: State, action: Action): State;
@@ -127,7 +127,14 @@ var EFTPOS = function EFTPOS(props, ref) {
127
127
  name: payMethod.name,
128
128
  symbol: params.symbol,
129
129
  amount: params.amount,
130
- device_number: device_number
130
+ device_number: device_number,
131
+ custom_payment_id: payMethod === null || payMethod === void 0 ? void 0 : payMethod.id,
132
+ custom_payment_code: payMethod === null || payMethod === void 0 ? void 0 : payMethod.code,
133
+ custom_payment_name: payMethod === null || payMethod === void 0 ? void 0 : payMethod.name,
134
+ custom_payment_type: payMethod === null || payMethod === void 0 ? void 0 : payMethod.type,
135
+ operator_type: params === null || params === void 0 ? void 0 : params.operator_type,
136
+ operator_id: params === null || params === void 0 ? void 0 : params.operator_id,
137
+ platform: params === null || params === void 0 ? void 0 : params.platform
131
138
  },
132
139
  mode: mode
133
140
  };
@@ -14,6 +14,7 @@ export interface ToBPayParams {
14
14
  symbol?: string;
15
15
  amount: string;
16
16
  surcharge?: string;
17
+ [key: string]: any;
17
18
  };
18
19
  mode: 'pay' | 'refund';
19
20
  };
@@ -536,15 +536,14 @@ var AddSerivce = function AddSerivce(props) {
536
536
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
537
537
  while (1) switch (_context5.prev = _context5.next) {
538
538
  case 0:
539
- debugger;
540
539
  setCurrentProduct(null);
541
540
  // 防止选择商品弹窗多次触发callback
542
541
  if (!lock) {
543
- _context5.next = 4;
542
+ _context5.next = 3;
544
543
  break;
545
544
  }
546
545
  return _context5.abrupt("return");
547
- case 4:
546
+ case 3:
548
547
  lock = true;
549
548
 
550
549
  // 2秒后解除
@@ -552,28 +551,28 @@ var AddSerivce = function AddSerivce(props) {
552
551
  lock = false;
553
552
  }, 2000);
554
553
  if (isBooking4) {
555
- _context5.next = 12;
554
+ _context5.next = 11;
556
555
  break;
557
556
  }
558
- _context5.next = 9;
557
+ _context5.next = 8;
559
558
  return createBookingData({
560
559
  product: _objectSpread(_objectSpread({}, detail || item), {}, {
561
560
  _params: e
562
561
  })
563
562
  });
564
- case 9:
563
+ case 8:
565
564
  data = _context5.sent;
566
565
  // 创建预约
567
566
  createBooking({
568
567
  booking: data
569
568
  });
570
569
  return _context5.abrupt("return");
571
- case 12:
570
+ case 11:
572
571
  // info2 addService 逻辑
573
572
  _detail = detail || item; // 判断是否是跨日商品,如果是,先打开时间选择弹窗
574
573
  isMultiDay = isMultiDayProduct(_detail || item);
575
574
  if (!isMultiDay) {
576
- _context5.next = 18;
575
+ _context5.next = 17;
577
576
  break;
578
577
  }
579
578
  // 保存待处理的数据
@@ -586,10 +585,10 @@ var AddSerivce = function AddSerivce(props) {
586
585
  // 打开时间选择弹窗
587
586
  setMultiDayModalOpen(true);
588
587
  return _context5.abrupt("return");
589
- case 18:
590
- _context5.next = 20;
588
+ case 17:
589
+ _context5.next = 19;
591
590
  return processAddService(item, _detail, e, notShowToast, state.date.value);
592
- case 20:
591
+ case 19:
593
592
  case "end":
594
593
  return _context5.stop();
595
594
  }
@@ -60,7 +60,6 @@ var SaaSManagermentAuth = ({
60
60
  import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
61
61
  const allTabs = ["pageSetting"];
62
62
  const saveData = (data) => {
63
- debugger;
64
63
  request.post(`/api/tenant_channel:update?filter=%7B%22channel_code%22%3A%22${channel}%22%7D`, {
65
64
  ...channelData,
66
65
  metadata: {
@@ -611,7 +611,6 @@ var Footer = (props) => {
611
611
  const isHasDayProducts = handleDaySubmit();
612
612
  if (isHasDayProducts) return;
613
613
  }
614
- debugger;
615
614
  const hasUnspecifiedHolderProduct = (_d2 = state.service.value) == null ? void 0 : _d2.some((item) => {
616
615
  var _a3, _b3, _c3;
617
616
  return (!((_a3 = item._extend) == null ? void 0 : _a3.holder_id) || ((_c3 = (_b3 = item._extend) == null ? void 0 : _b3.holder_id) == null ? void 0 : _c3.length) === 0) && !(0, import_utils2.isNormalProductByDurationSchedule)(item);
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<any>;
7
+ handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
8
8
  };
9
9
  export default useSendModal;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -174,7 +174,9 @@ var currentResource = (state, useResource, cacheItem) => {
174
174
  };
175
175
  var handleChangeHolder = (products, currentItem, other) => {
176
176
  return products.map((item) => {
177
- if (item._id === currentItem._id) {
177
+ var _a, _b, _c, _d;
178
+ const isSameGroup = ((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId) && ((_b = item._extend) == null ? void 0 : _b.groupId) === ((_d = (_c = currentItem == null ? void 0 : currentItem._origin) == null ? void 0 : _c._extend) == null ? void 0 : _d.groupId);
179
+ if (item._id === currentItem._id || isSameGroup) {
178
180
  return {
179
181
  ...item,
180
182
  _extend: {
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -741,7 +741,6 @@ var Info = (_, ref) => {
741
741
  {
742
742
  required: ((_h2 = (_g2 = (_f2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f2.config) == null ? void 0 : _g2.basic) == null ? void 0 : _h2.subject_require) === "require",
743
743
  validator: (rule, value, callback) => {
744
- debugger;
745
744
  if (showExtra) {
746
745
  callback(import_utils.locales.getText("page.booking.text.holder.length-error"));
747
746
  } else {
@@ -135,7 +135,6 @@ var ConfirmHolderModal = () => {
135
135
  };
136
136
  const handleChange = async (currentItem, type, other) => {
137
137
  var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k;
138
- debugger;
139
138
  const holderConfig = ((_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.holder) || {};
140
139
  const currentMaxSelectedCount = (holderConfig == null ? void 0 : holderConfig.maxSelectedCount) || ((_c2 = (_b2 = currentItem == null ? void 0 : currentItem.cacheItem) == null ? void 0 : _b2._extend) == null ? void 0 : _c2.quantity) || 1;
141
140
  const currentHolderId = (_d = currentItem == null ? void 0 : currentItem._extend) == null ? void 0 : _d.holder_id;
@@ -207,7 +207,8 @@ var PaymentContent = (0, import_react.forwardRef)(
207
207
  "EFTPOS_LINKLY",
208
208
  "EFTPOS_PAYO",
209
209
  "EFTPOS_WINDCAVE",
210
- "EFTPOS_TYRO"
210
+ "EFTPOS_TYRO",
211
+ "EFTPOS_HUIFU"
211
212
  ];
212
213
  const mx51Code = "EFTPOS";
213
214
  let payType = "";
@@ -236,7 +237,9 @@ var PaymentContent = (0, import_react.forwardRef)(
236
237
  orderId: data.orderId,
237
238
  symbol: getData("shop_symbol"),
238
239
  amount: finalAmount,
239
- surcharge: processSurcharge(method.surcharge)
240
+ surcharge: processSurcharge(method.surcharge),
241
+ operator_type: "shop",
242
+ platform: "pos"
240
243
  },
241
244
  mode: "pay"
242
245
  },
@@ -47,7 +47,8 @@ var SHOW_METHODS_CODE = [
47
47
  "EFTPOS",
48
48
  "EFTPOS_TYRO",
49
49
  "EFTPOS_WINDCAVE",
50
- "EFTPOS_PAYO"
50
+ "EFTPOS_PAYO",
51
+ "EFTPOS_HUIFU"
51
52
  ];
52
53
  function PaymentOptionsModule({
53
54
  amountSymbol,
@@ -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;
@@ -198,19 +198,19 @@ var EFTPos = (props, ref) => {
198
198
  if (status === "success" || status === "fail") {
199
199
  isComplete.current = true;
200
200
  }
201
- if (lowcodeRef) {
202
- lowcodeRef.onChange({
203
- status,
204
- params
205
- });
201
+ if (props == null ? void 0 : props.onPayResult) {
202
+ props.onPayResult({ status, params });
206
203
  if (status === "success" || status === "fail") {
207
204
  setVisible(false);
208
205
  isComplete.current = false;
209
206
  }
210
207
  return;
211
208
  }
212
- if (props == null ? void 0 : props.onPayResult) {
213
- props.onPayResult({ status, params });
209
+ if (lowcodeRef) {
210
+ lowcodeRef.onChange({
211
+ status,
212
+ params
213
+ });
214
214
  if (status === "success" || status === "fail") {
215
215
  setVisible(false);
216
216
  isComplete.current = false;
@@ -0,0 +1,7 @@
1
+ import { HooksRunParams, PaymentMethodOptions } from '../types';
2
+ declare const useMicropay: (options: PaymentMethodOptions) => {
3
+ run: (runParams?: HooksRunParams) => void;
4
+ query: () => void;
5
+ action: (data: Record<string, any>) => void;
6
+ };
7
+ export default useMicropay;
@@ -0,0 +1,133 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/eftposPay/aggregatePayment/hooks/useMicropay.ts
30
+ var useMicropay_exports = {};
31
+ __export(useMicropay_exports, {
32
+ default: () => useMicropay_default
33
+ });
34
+ module.exports = __toCommonJS(useMicropay_exports);
35
+ var import_react = require("react");
36
+ var import_payment = __toESM(require("../utils/payment"));
37
+ var import_const = require("../../const");
38
+ var import_hooks = require("../../hooks");
39
+ var import_helper = require("../../helper");
40
+ var import_store = require("../../store");
41
+ var import_store2 = require("../../store");
42
+ var useMicropay = (options) => {
43
+ const { custom } = (0, import_store2.useContextData)();
44
+ const { modeRef, payRef, orderIdRef, eftposRef, deviceRef, amountRef } = (0, import_hooks.useStoreRef)();
45
+ const paymentMethodRef = (0, import_react.useRef)(null);
46
+ const dispatch = (0, import_store.useDispatch)();
47
+ const uniquePaymentNumberRef = (0, import_react.useRef)(null);
48
+ const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
49
+ (0, import_react.useEffect)(() => {
50
+ var _a;
51
+ if (!paymentMethodRef.current) {
52
+ if (!options.paymentNum) {
53
+ const paymentNum = (0, import_helper.getUuid)();
54
+ dispatch((0, import_store.updateState)({ number: paymentNum }));
55
+ options.paymentNum = paymentNum;
56
+ uniquePaymentNumberRef.current = paymentNum;
57
+ } else {
58
+ uniquePaymentNumberRef.current = options.paymentNum;
59
+ }
60
+ options.orderId = orderIdRef.current;
61
+ options.deviceId = (_a = deviceRef.current) == null ? void 0 : _a.id;
62
+ paymentMethodRef.current = new import_payment.default(options);
63
+ }
64
+ return () => {
65
+ var _a2, _b;
66
+ (_b = (_a2 = paymentMethodRef.current) == null ? void 0 : _a2.destroy) == null ? void 0 : _b.call(_a2);
67
+ paymentMethodRef.current = null;
68
+ };
69
+ }, []);
70
+ const run = (runParams) => {
71
+ var _a, _b, _c, _d, _e, _f, _g;
72
+ const params = {
73
+ order_id: orderIdRef.current,
74
+ unique_payment_number: uniquePaymentNumberRef.current,
75
+ payment_code: options.paymentCode,
76
+ amount: isPay ? (_a = payRef.current) == null ? void 0 : _a.total : amountRef.current,
77
+ operator_id: custom == null ? void 0 : custom.operator_id,
78
+ operator_type: custom == null ? void 0 : custom.operator_type,
79
+ platform: custom == null ? void 0 : custom.platform,
80
+ micropay: {
81
+ card_reader_type: eftposRef.current,
82
+ card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id
83
+ }
84
+ };
85
+ if (isPay) {
86
+ params.payment = {
87
+ original_amount: (_c = payRef.current) == null ? void 0 : _c.amount,
88
+ order_payment_type: "normal",
89
+ // TODO: 需要使用方提供
90
+ custom_payment_id: custom == null ? void 0 : custom.custom_payment_id,
91
+ custom_payment_code: custom == null ? void 0 : custom.custom_payment_code,
92
+ custom_payment_name: custom == null ? void 0 : custom.custom_payment_name,
93
+ custom_payment_type: custom == null ? void 0 : custom.custom_payment_type,
94
+ service_charge: {
95
+ amount: (_d = payRef.current) == null ? void 0 : _d.surMoney,
96
+ percentage: (_e = payRef.current) == null ? void 0 : _e.surPercentRate
97
+ },
98
+ metadata: {
99
+ unique_payment_number: uniquePaymentNumberRef.current
100
+ }
101
+ };
102
+ params.micropay.auth_code = (runParams == null ? void 0 : runParams.authCode) || "";
103
+ (_f = paymentMethodRef.current) == null ? void 0 : _f.pay(params);
104
+ } else {
105
+ params.micropay.order_payment_id = (runParams == null ? void 0 : runParams.orderPaymentId) || "";
106
+ (_g = paymentMethodRef.current) == null ? void 0 : _g.refund(params);
107
+ }
108
+ };
109
+ const query = () => {
110
+ var _a, _b;
111
+ if (isPay) {
112
+ (_a = paymentMethodRef.current) == null ? void 0 : _a.payQuery();
113
+ } else {
114
+ (_b = paymentMethodRef.current) == null ? void 0 : _b.refundQuery();
115
+ }
116
+ };
117
+ const action = (data) => {
118
+ var _a, _b;
119
+ const params = {
120
+ order_id: orderIdRef.current,
121
+ unique_payment_number: uniquePaymentNumberRef.current,
122
+ payment_code: options.paymentCode,
123
+ data
124
+ };
125
+ if (isPay) {
126
+ (_a = paymentMethodRef.current) == null ? void 0 : _a.payAction(params);
127
+ } else {
128
+ (_b = paymentMethodRef.current) == null ? void 0 : _b.refundAction(params);
129
+ }
130
+ };
131
+ return { run, query, action };
132
+ };
133
+ var useMicropay_default = useMicropay;
@@ -0,0 +1,3 @@
1
+ import { EActionStatus } from './types';
2
+ import useMicropay from './hooks/useMicropay';
3
+ export { useMicropay, EActionStatus };
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/eftposPay/aggregatePayment/index.ts
30
+ var aggregatePayment_exports = {};
31
+ __export(aggregatePayment_exports, {
32
+ EActionStatus: () => import_types.EActionStatus,
33
+ useMicropay: () => import_useMicropay.default
34
+ });
35
+ module.exports = __toCommonJS(aggregatePayment_exports);
36
+ var import_types = require("./types");
37
+ var import_useMicropay = __toESM(require("./hooks/useMicropay"));
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ EActionStatus,
41
+ useMicropay
42
+ });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 聚合支付-支付接口
3
+ */
4
+ export declare const AGPTPayApi: (data: any, config: any) => Promise<any>;
5
+ /**
6
+ * 聚合支付-支付-查询接口
7
+ */
8
+ export declare const AGPTQueryApi: (param: any, config: any) => Promise<any>;
9
+ /**
10
+ * 聚合支付-支付-支付行为接口
11
+ */
12
+ export declare const AGPTActionApi: (param: any, config: any) => Promise<any>;
13
+ /**
14
+ * 聚合支付-退款接口
15
+ */
16
+ export declare const AGPTRefundApi: (data: any, config: any) => Promise<any>;
17
+ /**
18
+ * 聚合支付-退款-查询接口
19
+ */
20
+ export declare const AGPTRefundQueryApi: (param: any, config: any) => Promise<any>;
21
+ /**
22
+ * 聚合支付-退款-支付行为接口
23
+ */
24
+ export declare const AGPTRefundActionApi: (param: any, config: any) => Promise<any>;