@pisell/private-materials 6.3.123 → 6.3.125

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 (129) 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 +4 -4
  8. package/build/lowcode/view.js +4 -4
  9. package/es/components/booking/addons/model.d.ts +10 -1
  10. package/es/components/booking/forms/model.d.ts +10 -1
  11. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  12. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  13. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  14. package/es/components/booking/info/model.d.ts +10 -1
  15. package/es/components/booking/model.d.ts +9 -1
  16. package/es/components/booking/notes/model.d.ts +10 -1
  17. package/es/components/booking/payments/model.d.ts +10 -1
  18. package/es/components/eftposPay/amount.js +15 -1
  19. package/es/components/eftposPay/app.js +2 -1
  20. package/es/components/eftposPay/component/fail/failCustom.js +12 -4
  21. package/es/components/eftposPay/component/fail/index.js +14 -6
  22. package/es/components/eftposPay/component/fail/network.js +3 -0
  23. package/es/components/eftposPay/component/fail/unknow.js +8 -0
  24. package/es/components/eftposPay/component/manual/index.js +13 -1
  25. package/es/components/eftposPay/component/signature/index.js +3 -0
  26. package/es/components/eftposPay/device.js +33 -22
  27. package/es/components/eftposPay/index.js +48 -11
  28. package/es/components/eftposPay/linkly/hooks/normal.js +21 -68
  29. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +20 -81
  30. package/es/components/eftposPay/linkly/index.js +10 -23
  31. package/es/components/eftposPay/pay.js +14 -7
  32. package/es/components/eftposPay/payo/config.js +38 -5
  33. package/es/components/eftposPay/payo/hooks.js +3 -12
  34. package/es/components/eftposPay/payo/payment.js +69 -136
  35. package/es/components/eftposPay/tip.js +5 -0
  36. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  37. package/es/components/eftposPay/tyro/index.js +44 -11
  38. package/es/components/eftposPay/utils/payLog.d.ts +81 -0
  39. package/es/components/eftposPay/utils/payLog.js +430 -0
  40. package/es/components/eftposPay/windcave/receiptAction.js +5 -0
  41. package/es/components/eftposPay/windcave/windcave.js +28 -29
  42. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  43. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  44. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  45. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  46. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  47. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  48. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  49. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  50. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  51. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  52. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  53. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  54. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +142 -165
  55. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  56. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  57. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  58. package/es/components/pay/toC/index.js +31 -65
  59. package/es/components/pay/toC/model.d.ts +9 -2
  60. package/es/components/pay/toC/serve.d.ts +0 -18
  61. package/es/components/pay/toC/serve.js +15 -42
  62. package/es/components/pay/toC/utils.d.ts +2 -2
  63. package/es/components/pay/toC/utils.js +0 -4
  64. package/es/components/schedules/model.d.ts +9 -1
  65. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  66. package/es/hooks/usePaymentLogger.d.ts +0 -1
  67. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  68. package/es/pro/Login2.0/components/phoneValidation.js +65 -58
  69. package/lib/components/booking/addons/model.d.ts +10 -1
  70. package/lib/components/booking/forms/model.d.ts +10 -1
  71. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  72. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  73. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  74. package/lib/components/booking/info/model.d.ts +10 -1
  75. package/lib/components/booking/model.d.ts +9 -1
  76. package/lib/components/booking/notes/model.d.ts +10 -1
  77. package/lib/components/booking/payments/model.d.ts +10 -1
  78. package/lib/components/eftposPay/amount.js +13 -1
  79. package/lib/components/eftposPay/app.js +2 -1
  80. package/lib/components/eftposPay/component/fail/failCustom.js +10 -2
  81. package/lib/components/eftposPay/component/fail/index.js +10 -2
  82. package/lib/components/eftposPay/component/fail/network.js +3 -0
  83. package/lib/components/eftposPay/component/fail/unknow.js +8 -0
  84. package/lib/components/eftposPay/component/manual/index.js +10 -0
  85. package/lib/components/eftposPay/component/signature/index.js +3 -0
  86. package/lib/components/eftposPay/device.js +11 -10
  87. package/lib/components/eftposPay/index.js +36 -11
  88. package/lib/components/eftposPay/linkly/hooks/normal.js +22 -43
  89. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +13 -65
  90. package/lib/components/eftposPay/linkly/index.js +7 -10
  91. package/lib/components/eftposPay/pay.js +9 -1
  92. package/lib/components/eftposPay/payo/config.js +15 -8
  93. package/lib/components/eftposPay/payo/hooks.js +12 -10
  94. package/lib/components/eftposPay/payo/payment.js +31 -65
  95. package/lib/components/eftposPay/tip.js +5 -0
  96. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  97. package/lib/components/eftposPay/tyro/index.js +21 -17
  98. package/lib/components/eftposPay/utils/payLog.d.ts +81 -0
  99. package/lib/components/eftposPay/utils/payLog.js +320 -0
  100. package/lib/components/eftposPay/windcave/receiptAction.js +5 -0
  101. package/lib/components/eftposPay/windcave/windcave.js +18 -20
  102. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  103. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  104. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  105. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  106. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  107. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  108. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  109. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  110. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  111. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  112. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  113. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  114. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +100 -90
  115. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  116. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  117. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  118. package/lib/components/pay/toC/index.js +19 -52
  119. package/lib/components/pay/toC/model.d.ts +9 -2
  120. package/lib/components/pay/toC/serve.d.ts +0 -18
  121. package/lib/components/pay/toC/serve.js +0 -6
  122. package/lib/components/pay/toC/utils.d.ts +2 -2
  123. package/lib/components/pay/toC/utils.js +2 -6
  124. package/lib/components/schedules/model.d.ts +9 -1
  125. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  126. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  127. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +0 -1
  128. package/lib/pro/Login2.0/components/phoneValidation.js +4 -2
  129. package/package.json +2 -2
@@ -18,6 +18,7 @@ import { StatusEnum } from "../const";
18
18
  import { useContextData, useDispatch, updateState, updateCustom, updateStatus } from "../store";
19
19
  import { useStoreRef } from "../hooks";
20
20
  import { StemTypeEnum, StepStatusEnum, getStepMapping } from "./const";
21
+ import payLog from "../utils/payLog";
21
22
 
22
23
  /**
23
24
  * @title: 按钮操作区
@@ -60,6 +61,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
60
61
  * @Date: 2024-08-12 11:30
61
62
  */
62
63
  var onAccept = function onAccept() {
64
+ payLog.log('Windcave:签名-点击确认');
63
65
  // 确认签名
64
66
  dispatch(updateStatus(StatusEnum.Loading));
65
67
  dispatch(updateCustom({
@@ -138,6 +140,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
138
140
  * @Date: 2024-08-20 12:34
139
141
  */
140
142
  var onBack = function onBack() {
143
+ payLog.log('Windcave:签名-点击后退');
141
144
  dispatch(updateState({
142
145
  title: locales.getText('page.eftpos-pay.text.waiting.signature'),
143
146
  // ''), // 等待签名
@@ -156,6 +159,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
156
159
  * @Date: 2024-08-12 11:30
157
160
  */
158
161
  var onConfirm = function onConfirm() {
162
+ payLog.log('Windcave:签名-点击取消');
159
163
  // 取消签名
160
164
  dispatch(updateState({
161
165
  title: locales.getText('page.eftpos-pay.text.processing'),
@@ -244,6 +248,7 @@ export var ReceiptAction = function ReceiptAction(_ref) {
244
248
  * @Date: 2024-08-20 12:40
245
249
  */
246
250
  var onDecline = function onDecline() {
251
+ payLog.log('Windcave:签名-点击取消');
247
252
  dispatch(updateState({
248
253
  title: locales.getText('page.eftpos-pay.text.signature.title'),
249
254
  // 'page.eftpos-pay.text.waiting.signature'), // 等待签名
@@ -17,7 +17,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
17
  /* eslint-disable consistent-return */
18
18
  /* eslint-disable react/no-array-index-key */
19
19
  /* eslint-disable array-callback-return */
20
- import { locales, sendWarningLog } from '@pisell/utils';
20
+ import { locales } from '@pisell/utils';
21
21
  import React, { useEffect, useMemo, useRef, useState } from 'react';
22
22
  import Step from "../component/step/step";
23
23
  import { ModeEnum, StatusEnum } from "../const";
@@ -26,6 +26,7 @@ import { useStoreRef } from "../hooks";
26
26
  import { updateCustom, updateState, useContextData, useDispatch } from "../store";
27
27
  import { StemTypeEnum, StepStatusEnum, getStepMapping } from "./const";
28
28
  import { useFail, useValidate } from "./helper";
29
+ import payLog from "../utils/payLog";
29
30
  import Action, { ReceiptAction } from "./receiptAction";
30
31
  var Minute = 1000 * 60;
31
32
 
@@ -59,7 +60,7 @@ export default (function (_ref) {
59
60
  var stepRef = useRef(custom === null || custom === void 0 ? void 0 : custom.step);
60
61
  var listRef = useRef(custom === null || custom === void 0 ? void 0 : custom.list);
61
62
  var initRef = useRef(false);
62
- var clearRef = useRef();
63
+ var clearRef = useRef(null);
63
64
 
64
65
  /** 是否是签名页面 */
65
66
  var isReceiptPage = useMemo(function () {
@@ -146,9 +147,11 @@ export default (function (_ref) {
146
147
  // 是否在签名步骤
147
148
  if (stepRef.current === StepStatusEnum.Receipt) {
148
149
  if (StatusEnum.Loading === statusRef.current) {
150
+ payLog.log('Windcave:签名页面处于运行中(已发送签名,或取消签名接口),进行计时查询');
149
151
  // 签名页面处于运行中(已发送签名,或取消签名接口),则进行计时查询
150
152
  run();
151
153
  } else {
154
+ payLog.log('Windcave:签名页面处于未加载中,进行无限查询');
152
155
  // 签名页面处于未加载中,则进行无限查询
153
156
  run(-1);
154
157
  }
@@ -162,9 +165,6 @@ export default (function (_ref) {
162
165
  run();
163
166
  return;
164
167
  }
165
-
166
- // 不存在支付流水号 则去创建支付
167
- console.log('modeRef.current = ', modeRef.current);
168
168
  numRef.current = getUuid();
169
169
  dispatch(updateState({
170
170
  number: numRef.current
@@ -206,6 +206,18 @@ export default (function (_ref) {
206
206
  })))))
207
207
  };
208
208
  }
209
+ payLog.setContext({
210
+ transactionNumber: numRef.current
211
+ });
212
+ if (isPay) {
213
+ payLog.log('Windcave:发起支付', {
214
+ number: numRef.current
215
+ });
216
+ } else {
217
+ payLog.log('Windcave:发起退款', {
218
+ number: numRef.current
219
+ });
220
+ }
209
221
  var resultPromise = isPay ? api.pay(_params, {
210
222
  signal: controllerRef.current.signal
211
223
  }) : api.refund(_params, {
@@ -218,39 +230,24 @@ export default (function (_ref) {
218
230
  return;
219
231
  }
220
232
  if (res && "".concat(res.code) === '200' && res.data && res.data.txn_status_id) {
221
- var _validateRef$current;
233
+ var _res$data, _validateRef$current;
234
+ payLog.log('Windcave:接口成功,进入轮询', {
235
+ txn_status_id: res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.txn_status_id
236
+ });
222
237
  (_validateRef$current = validateRef.current) === null || _validateRef$current === void 0 || _validateRef$current.call(validateRef, res, true);
223
238
  return;
224
239
  }
225
- sendWarningLog({
226
- title: 'windcave支付失败',
227
- content: [{
228
- key: 'res',
229
- value: JSON.stringify(res)
230
- }, {
231
- key: 'params',
232
- value: JSON.stringify(_params)
233
- }]
240
+ payLog.log('Windcave:支付接口返回失败', {
241
+ code: res === null || res === void 0 ? void 0 : res.code
234
242
  });
235
243
  (_failRef$current = failRef.current) === null || _failRef$current === void 0 || _failRef$current.call(failRef, res, stepRef.current >= StepStatusEnum.Account);
236
244
  }).catch(function (res) {
237
245
  var _failRef$current2;
238
246
  var isNoNet = unloadRef.current || !netRef.current;
239
- sendWarningLog({
240
- title: 'windcave支付失败',
241
- content: [{
242
- key: 'error',
243
- value: JSON.stringify(res)
244
- }, {
245
- key: 'params',
246
- value: JSON.stringify(_params)
247
- }, {
248
- key: 'isNoNet',
249
- value: isNoNet ? '1' : '0'
250
- }]
247
+ payLog.log('Windcave:支付接口异常', {
248
+ error: res === null || res === void 0 ? void 0 : res.message,
249
+ isNoNet: isNoNet
251
250
  });
252
-
253
- // 无网 或 已卸载 则不进行处理
254
251
  if (isNoNet) {
255
252
  return;
256
253
  }
@@ -265,6 +262,7 @@ export default (function (_ref) {
265
262
  * @Date: 2024-08-20 12:51
266
263
  */
267
264
  var onCancel = function onCancel() {
265
+ payLog.log('Windcave:点击取消支付');
268
266
  setDisabled(true);
269
267
  api.update({
270
268
  type: 'CANCEL',
@@ -290,6 +288,7 @@ export default (function (_ref) {
290
288
  */
291
289
  var onChangeReceipt = function onChangeReceipt(status) {
292
290
  if (status) {
291
+ payLog.log('Windcave:签名状态');
293
292
  // 签名,取消签名接口执行成功, 进行计时查询
294
293
  run();
295
294
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => import("react").JSX.Element;
4
3
  export default ErrorTip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => import("react").JSX.Element;
4
3
  export default Status;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const WeekItem: (props: any) => import("react").JSX.Element;
4
3
  export default WeekItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CalenDateWeekProps = {
4
3
  currentDate: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const DayItem: (props: any) => import("react").JSX.Element;
4
3
  export default DayItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { CalendarItemProps } from '../../../../../type';
4
3
  declare const Item: (props: CalendarItemProps) => import("react").JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Status: (props: any) => import("react").JSX.Element;
4
3
  export default Status;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => import("react").JSX.Element;
3
2
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const StripeSDK: ({ public_key, client_secret, children, lang, }: {
3
2
  public_key: string;
4
3
  client_secret?: string | undefined;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PageLoading: () => import("react").JSX.Element;
3
2
  export default PageLoading;
@@ -15,16 +15,11 @@ export interface WalletPassProps {
15
15
  walletPass: {
16
16
  cards: WalletPassDataType[];
17
17
  amount: number;
18
- recommended?: WalletPassDataType[];
19
- transformList?: WalletPassDataType[];
20
- noApplicableVoucher?: WalletPassDataType[];
21
18
  };
22
19
  walletSetting: {
23
20
  name: string;
24
21
  popup_status: 0 | 1;
25
22
  };
26
- orderDetail: any;
27
- total_amount: number;
28
23
  }
29
24
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<WalletPassProps & React.RefAttributes<WalletPassRef>>>;
30
25
  export default _default;