@pisell/private-materials 6.6.62 → 6.6.63

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 (203) 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 +8 -8
  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/booking/components/footer/amount.js +4 -3
  12. package/es/components/booking/components/footer/utils.js +10 -3
  13. package/es/components/booking/components/voucher/index.js +1 -1
  14. package/es/components/booking/info2/service/editService/index.js +76 -8
  15. package/es/components/booking/info2/service/editService/utils.d.ts +1 -0
  16. package/es/components/booking/info2/service/editService/utils.js +16 -0
  17. package/es/components/booking/payments/index.js +1 -1
  18. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  19. package/es/components/eftpos/PairModal/hooks.d.ts +27 -0
  20. package/es/components/eftpos/PairModal/hooks.js +67 -0
  21. package/es/components/eftpos/PairModal/index.d.ts +11 -0
  22. package/es/components/eftpos/PairModal/index.js +246 -0
  23. package/es/components/eftpos/PairModal/index.less +70 -0
  24. package/es/components/eftpos/SettlementModal/Action.d.ts +7 -0
  25. package/es/components/eftpos/SettlementModal/Action.js +141 -0
  26. package/es/components/eftpos/SettlementModal/index.d.ts +7 -0
  27. package/es/components/eftpos/SettlementModal/index.js +135 -0
  28. package/es/components/eftpos/SettlementModal/index.less +33 -0
  29. package/es/components/eftpos/SettlementModal/serve.d.ts +8 -0
  30. package/es/components/eftpos/SettlementModal/serve.js +171 -0
  31. package/es/components/eftpos/SettlementModal/types.d.ts +138 -0
  32. package/es/components/eftpos/SettlementModal/types.js +35 -0
  33. package/es/components/eftpos/SettlementModal/utils.d.ts +18 -0
  34. package/es/components/eftpos/SettlementModal/utils.js +351 -0
  35. package/es/components/eftpos/assets/mx51SCI.svg +15 -0
  36. package/es/components/eftpos/const.d.ts +3 -1
  37. package/es/components/eftpos/const.js +2 -0
  38. package/es/components/eftpos/device.d.ts +3 -1
  39. package/es/components/eftpos/device.js +14 -3
  40. package/es/components/eftpos/hooks.d.ts +13 -0
  41. package/es/components/eftpos/hooks.js +35 -0
  42. package/es/components/eftpos/index.js +198 -24
  43. package/es/components/eftpos/index.less +32 -1
  44. package/es/components/eftpos/locales.d.ts +80 -0
  45. package/es/components/eftpos/locales.js +205 -25
  46. package/es/components/eftpos/table.js +47 -3
  47. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
  48. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
  49. package/es/components/eftposPay/aggregatePayment/hooks/usePayment.js +145 -0
  50. package/es/components/eftposPay/aggregatePayment/index.d.ts +2 -1
  51. package/es/components/eftposPay/aggregatePayment/index.js +2 -1
  52. package/es/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  53. package/es/components/eftposPay/aggregatePayment/mock.js +567 -0
  54. package/es/components/eftposPay/aggregatePayment/service.js +1 -0
  55. package/es/components/eftposPay/aggregatePayment/types.d.ts +12 -12
  56. package/es/components/eftposPay/aggregatePayment/types.js +4 -8
  57. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
  58. package/es/components/eftposPay/aggregatePayment/utils/payment.js +231 -168
  59. package/es/components/eftposPay/amount.js +15 -1
  60. package/es/components/eftposPay/app.js +2 -3
  61. package/es/components/eftposPay/component/fail/failCustom.js +13 -4
  62. package/es/components/eftposPay/component/fail/index.js +12 -5
  63. package/es/components/eftposPay/component/fail/network.js +3 -0
  64. package/es/components/eftposPay/component/fail/unknow.js +8 -0
  65. package/es/components/eftposPay/component/manual/index.js +17 -3
  66. package/es/components/eftposPay/component/signature/index.js +3 -0
  67. package/es/components/eftposPay/const.d.ts +8 -3
  68. package/es/components/eftposPay/const.js +2 -0
  69. package/es/components/eftposPay/device.js +225 -38
  70. package/es/components/eftposPay/helper.d.ts +3 -0
  71. package/es/components/eftposPay/helper.js +2 -1
  72. package/es/components/eftposPay/hooks.d.ts +1 -1
  73. package/es/components/eftposPay/index.js +50 -13
  74. package/es/components/eftposPay/linkly/const.js +1 -1
  75. package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
  76. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
  77. package/es/components/eftposPay/linkly/index.js +11 -23
  78. package/es/components/eftposPay/locales.d.ts +15 -0
  79. package/es/components/eftposPay/locales.js +30 -15
  80. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  81. package/es/components/eftposPay/manufacturer.js +4 -0
  82. package/es/components/eftposPay/mx51/Action.d.ts +6 -0
  83. package/es/components/eftposPay/mx51/Action.js +144 -0
  84. package/es/components/eftposPay/mx51/const.d.ts +5 -0
  85. package/es/components/eftposPay/mx51/const.js +69 -0
  86. package/es/components/eftposPay/mx51/index.d.ts +6 -0
  87. package/es/components/eftposPay/mx51/index.js +498 -0
  88. package/es/components/eftposPay/mx51/types.d.ts +142 -0
  89. package/es/components/eftposPay/mx51/types.js +35 -0
  90. package/es/components/eftposPay/mx51/utils.d.ts +10 -0
  91. package/es/components/eftposPay/mx51/utils.js +121 -0
  92. package/es/components/eftposPay/pay.js +21 -9
  93. package/es/components/eftposPay/payo/config.js +39 -5
  94. package/es/components/eftposPay/payo/const.js +1 -1
  95. package/es/components/eftposPay/payo/hooks.js +3 -12
  96. package/es/components/eftposPay/payo/payment.js +69 -136
  97. package/es/components/eftposPay/store/index.d.ts +4 -8
  98. package/es/components/eftposPay/tip.js +5 -0
  99. package/es/components/eftposPay/tyro/const.js +1 -1
  100. package/es/components/eftposPay/tyro/index.js +44 -11
  101. package/es/components/eftposPay/utils/payLog.d.ts +81 -0
  102. package/es/components/eftposPay/utils/payLog.js +458 -0
  103. package/es/components/eftposPay/windcave/const.js +1 -1
  104. package/es/components/eftposPay/windcave/receiptAction.js +5 -0
  105. package/es/components/eftposPay/windcave/windcave.js +37 -38
  106. package/lib/components/booking/components/footer/amount.js +3 -3
  107. package/lib/components/booking/components/footer/utils.js +12 -5
  108. package/lib/components/booking/components/voucher/index.js +1 -1
  109. package/lib/components/booking/info2/service/editService/index.js +56 -5
  110. package/lib/components/booking/info2/service/editService/utils.d.ts +1 -0
  111. package/lib/components/booking/info2/service/editService/utils.js +16 -0
  112. package/lib/components/booking/payments/index.js +1 -1
  113. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  114. package/lib/components/eftpos/PairModal/hooks.d.ts +27 -0
  115. package/lib/components/eftpos/PairModal/hooks.js +70 -0
  116. package/lib/components/eftpos/PairModal/index.d.ts +11 -0
  117. package/lib/components/eftpos/PairModal/index.js +197 -0
  118. package/lib/components/eftpos/PairModal/index.less +70 -0
  119. package/lib/components/eftpos/SettlementModal/Action.d.ts +7 -0
  120. package/lib/components/eftpos/SettlementModal/Action.js +153 -0
  121. package/lib/components/eftpos/SettlementModal/index.d.ts +7 -0
  122. package/lib/components/eftpos/SettlementModal/index.js +170 -0
  123. package/lib/components/eftpos/SettlementModal/index.less +33 -0
  124. package/lib/components/eftpos/SettlementModal/serve.d.ts +8 -0
  125. package/lib/components/eftpos/SettlementModal/serve.js +45 -0
  126. package/lib/components/eftpos/SettlementModal/types.d.ts +138 -0
  127. package/lib/components/eftpos/SettlementModal/types.js +43 -0
  128. package/lib/components/eftpos/SettlementModal/utils.d.ts +18 -0
  129. package/lib/components/eftpos/SettlementModal/utils.js +248 -0
  130. package/lib/components/eftpos/assets/mx51SCI.svg +15 -0
  131. package/lib/components/eftpos/const.d.ts +3 -1
  132. package/lib/components/eftpos/const.js +2 -0
  133. package/lib/components/eftpos/device.d.ts +3 -1
  134. package/lib/components/eftpos/device.js +13 -3
  135. package/lib/components/eftpos/hooks.d.ts +13 -0
  136. package/lib/components/eftpos/hooks.js +30 -0
  137. package/lib/components/eftpos/index.js +121 -8
  138. package/lib/components/eftpos/index.less +32 -1
  139. package/lib/components/eftpos/locales.d.ts +80 -0
  140. package/lib/components/eftpos/locales.js +231 -21
  141. package/lib/components/eftpos/table.js +30 -2
  142. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +2 -2
  143. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.d.ts +8 -0
  144. package/lib/components/eftposPay/aggregatePayment/hooks/usePayment.js +171 -0
  145. package/lib/components/eftposPay/aggregatePayment/index.d.ts +2 -1
  146. package/lib/components/eftposPay/aggregatePayment/index.js +5 -2
  147. package/lib/components/eftposPay/aggregatePayment/mock.d.ts +495 -0
  148. package/lib/components/eftposPay/aggregatePayment/mock.js +679 -0
  149. package/lib/components/eftposPay/aggregatePayment/types.d.ts +12 -12
  150. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +13 -13
  151. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +173 -123
  152. package/lib/components/eftposPay/amount.js +13 -1
  153. package/lib/components/eftposPay/app.js +4 -5
  154. package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
  155. package/lib/components/eftposPay/component/fail/index.js +10 -2
  156. package/lib/components/eftposPay/component/fail/network.js +3 -0
  157. package/lib/components/eftposPay/component/fail/unknow.js +8 -0
  158. package/lib/components/eftposPay/component/manual/index.js +16 -2
  159. package/lib/components/eftposPay/component/signature/index.js +3 -0
  160. package/lib/components/eftposPay/const.d.ts +8 -3
  161. package/lib/components/eftposPay/const.js +2 -0
  162. package/lib/components/eftposPay/device.js +114 -25
  163. package/lib/components/eftposPay/helper.d.ts +3 -0
  164. package/lib/components/eftposPay/helper.js +2 -1
  165. package/lib/components/eftposPay/hooks.d.ts +1 -1
  166. package/lib/components/eftposPay/index.js +38 -13
  167. package/lib/components/eftposPay/linkly/const.js +1 -1
  168. package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
  169. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
  170. package/lib/components/eftposPay/linkly/index.js +8 -10
  171. package/lib/components/eftposPay/locales.d.ts +15 -0
  172. package/lib/components/eftposPay/locales.js +30 -15
  173. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  174. package/lib/components/eftposPay/manufacturer.js +6 -0
  175. package/lib/components/eftposPay/mx51/Action.d.ts +6 -0
  176. package/lib/components/eftposPay/mx51/Action.js +154 -0
  177. package/lib/components/eftposPay/mx51/const.d.ts +5 -0
  178. package/lib/components/eftposPay/mx51/const.js +85 -0
  179. package/lib/components/eftposPay/mx51/index.d.ts +6 -0
  180. package/lib/components/eftposPay/mx51/index.js +433 -0
  181. package/lib/components/eftposPay/mx51/types.d.ts +142 -0
  182. package/lib/components/eftposPay/mx51/types.js +43 -0
  183. package/lib/components/eftposPay/mx51/utils.d.ts +10 -0
  184. package/lib/components/eftposPay/mx51/utils.js +115 -0
  185. package/lib/components/eftposPay/pay.js +13 -3
  186. package/lib/components/eftposPay/payo/config.js +16 -8
  187. package/lib/components/eftposPay/payo/const.js +1 -1
  188. package/lib/components/eftposPay/payo/hooks.js +12 -10
  189. package/lib/components/eftposPay/payo/payment.js +31 -65
  190. package/lib/components/eftposPay/store/index.d.ts +4 -8
  191. package/lib/components/eftposPay/tip.js +5 -0
  192. package/lib/components/eftposPay/tyro/const.js +1 -1
  193. package/lib/components/eftposPay/tyro/index.js +21 -17
  194. package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
  195. package/lib/components/eftposPay/utils/payLog.js +321 -0
  196. package/lib/components/eftposPay/windcave/const.js +1 -1
  197. package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
  198. package/lib/components/eftposPay/windcave/windcave.js +27 -29
  199. package/package.json +2 -2
  200. package/es/components/eftposPay/utils/log/index.d.ts +0 -110
  201. package/es/components/eftposPay/utils/log/index.js +0 -371
  202. package/lib/components/eftposPay/utils/log/index.d.ts +0 -110
  203. package/lib/components/eftposPay/utils/log/index.js +0 -294
@@ -33,16 +33,16 @@ export interface PaymentMethodOptions {
33
33
  orderId?: string | number;
34
34
  /** 设备ID */
35
35
  deviceId?: string | number;
36
+ /** 配置 */
37
+ config?: PaymentMethodConfig;
36
38
  /** 统一回调函数 */
37
39
  callback: PaymentCallback;
38
40
  /** 检查是否应该继续处理结果 */
39
41
  shouldContinue?: () => boolean;
40
- /** 配置 */
41
- config?: PaymentMethodConfig;
42
42
  }
43
43
  /**
44
44
  * 聚合支付操作类型
45
- */
45
+ */
46
46
  export declare enum ActionType {
47
47
  /** 支付 */
48
48
  Pay = "pay",
@@ -76,6 +76,11 @@ export interface RunOptions {
76
76
  actionType: ActionType;
77
77
  /** 请求参数 */
78
78
  params?: Record<string, any>;
79
+ /** 配置 */
80
+ config?: {
81
+ /** 是否需要返回结果 */
82
+ needResponse?: boolean;
83
+ };
79
84
  }
80
85
  /**
81
86
  * 聚合支付配置参数
@@ -83,6 +88,10 @@ export interface RunOptions {
83
88
  export interface PaymentMethodConfig {
84
89
  /** 是否需要轮询间隔 */
85
90
  hasQueryInterval?: boolean;
91
+ /** 全局轮询超时时间 */
92
+ globalQueryTimeout?: number;
93
+ /** 接口兜底查询时间 */
94
+ requestDelaySeconds?: number;
86
95
  }
87
96
  /**
88
97
  * 支付状态
@@ -95,12 +104,3 @@ export declare enum EPaymentStatus {
95
104
  /** 支付失败 */
96
105
  Failed = "failed"
97
106
  }
98
- /**
99
- * 执行操作参数
100
- */
101
- export interface HooksRunParams {
102
- /** 付款码 */
103
- authCode?: string | number;
104
- /** 订单支付ID */
105
- orderPaymentId?: string | number;
106
- }
@@ -1,17 +1,9 @@
1
- /**
2
- * 聚合支付方法类
3
- * 核心点:
4
- * 1.发起支付/退款,在十秒钟后发起轮询操作,两个接口谁先返回成功用谁的结果,如果返回的失败是存在明确code信息的则全部失败
5
- * 2.轮询操作总查询时间2分钟,超时直接失败,单次轮询超时时间5秒,超时直接abort本次请求,间隔两秒后发起新的请求
6
- * 3.最终成功或者失败都需要把定时器给清理掉,并将未完成的接口abort掉
7
- */
8
1
  import { PaymentMethodOptions } from '../types';
9
2
  declare class PaymentMethod {
10
3
  /** 初始化参数 */
11
4
  private initOptions;
12
5
  private paymentNum;
13
6
  private orderId?;
14
- private deviceId?;
15
7
  private callback;
16
8
  private shouldContinue;
17
9
  private config;
@@ -33,7 +25,15 @@ declare class PaymentMethod {
33
25
  * 1. 有明确错误code且不是超时和支付超时,则直接失败
34
26
  * @param code 错误码
35
27
  */
36
- private isRequestFailed;
28
+ private isBusinessFailed;
29
+ /**
30
+ * 判断业务是否成功
31
+ */
32
+ private isBusinessSuccess;
33
+ /**
34
+ * 判断最外层code是否是超时错误
35
+ */
36
+ private isOuterCodeTimeout;
37
37
  /**
38
38
  * 清理定时器和请求控制器
39
39
  */
@@ -102,22 +102,22 @@ declare class PaymentMethod {
102
102
  * 支付
103
103
  * @param params 支付参数
104
104
  */
105
- pay(params: Record<string, any>): void;
105
+ pay(params: Record<string, any>, config?: Record<string, any>): void;
106
106
  /**
107
107
  * 支付取消
108
108
  * @param params 取消参数
109
109
  */
110
- payAction(params: Record<string, any>): void;
110
+ payAction(params: Record<string, any>, config?: Record<string, any>): void;
111
111
  /**
112
112
  * 退款
113
113
  * @param params 退款参数
114
114
  */
115
- refund(params: Record<string, any>): void;
115
+ refund(params: Record<string, any>, config?: Record<string, any>): void;
116
116
  /**
117
117
  * 退款取消
118
118
  * @param params 取消参数
119
119
  */
120
- refundAction(params: Record<string, any>): void;
120
+ refundAction(params: Record<string, any>, config?: Record<string, any>): void;
121
121
  /**
122
122
  * 支付查询(直接查询,带2分钟超时和轮询机制)
123
123
  */