@pisell/private-materials 6.3.22 → 6.3.24

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 (123) 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 +146 -146
  7. package/build/lowcode/render/default/view.js +2 -2
  8. package/build/lowcode/view.js +8 -8
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  12. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  13. package/es/components/booking/deposit/index.d.ts +0 -1
  14. package/es/components/booking/editBookingModal/index.js +8 -2
  15. package/es/components/booking/forms/footer.d.ts +0 -1
  16. package/es/components/booking/forms/footer.js +4 -13
  17. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  18. package/es/components/booking/info/header/index.d.ts +0 -1
  19. package/es/components/booking/info/index.d.ts +0 -1
  20. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  21. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  22. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  23. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  24. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  25. package/es/components/booking/info/service2/utils.d.ts +1 -1
  26. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  27. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  28. package/es/components/booking/utils.d.ts +2 -2
  29. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  30. package/es/components/eftposPay/amount.d.ts +1 -1
  31. package/es/components/eftposPay/app.d.ts +0 -1
  32. package/es/components/eftposPay/device.d.ts +1 -2
  33. package/es/components/eftposPay/hooks.d.ts +2 -2
  34. package/es/components/eftposPay/index.d.ts +0 -1
  35. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +35 -13
  36. package/es/components/eftposPay/linkly/index.d.ts +0 -1
  37. package/es/components/eftposPay/payo/config.js +10 -10
  38. package/es/components/eftposPay/store/index.d.ts +6 -6
  39. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  40. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  41. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  42. package/es/components/eventBooking/index.d.ts +0 -1
  43. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  44. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +6 -3
  45. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  46. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  47. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  48. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  49. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  50. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  51. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  52. package/es/components/productExtension/index.d.ts +0 -1
  53. package/es/components/ruleSetting/index.d.ts +0 -1
  54. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  55. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  56. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  57. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  58. package/es/components/taxSelect/index.d.ts +0 -1
  59. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  60. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  61. package/es/components/ticketBooking/components/ticketBooking/index.js +2 -3
  62. package/es/components/ticketBooking/components/timeBar/index.js +2 -1
  63. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  64. package/es/hooks/usePaymentLogger.d.ts +1 -0
  65. package/es/plus/saasCreateOrganization/index.d.ts +0 -1
  66. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  67. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  68. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  69. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  70. package/lib/components/booking/deposit/index.d.ts +0 -1
  71. package/lib/components/booking/editBookingModal/index.js +6 -1
  72. package/lib/components/booking/forms/footer.d.ts +0 -1
  73. package/lib/components/booking/forms/footer.js +7 -13
  74. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  75. package/lib/components/booking/info/header/index.d.ts +0 -1
  76. package/lib/components/booking/info/index.d.ts +0 -1
  77. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  78. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  79. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  80. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  81. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  82. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  83. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  84. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  85. package/lib/components/booking/utils.d.ts +2 -2
  86. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  87. package/lib/components/eftposPay/amount.d.ts +1 -1
  88. package/lib/components/eftposPay/app.d.ts +0 -1
  89. package/lib/components/eftposPay/device.d.ts +1 -2
  90. package/lib/components/eftposPay/hooks.d.ts +2 -2
  91. package/lib/components/eftposPay/index.d.ts +0 -1
  92. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +43 -11
  93. package/lib/components/eftposPay/linkly/index.d.ts +0 -1
  94. package/lib/components/eftposPay/payo/config.js +9 -9
  95. package/lib/components/eftposPay/store/index.d.ts +6 -6
  96. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  97. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  98. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  99. package/lib/components/eventBooking/index.d.ts +0 -1
  100. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  101. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
  102. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  103. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  104. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  105. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  106. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  107. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  108. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  109. package/lib/components/productExtension/index.d.ts +0 -1
  110. package/lib/components/ruleSetting/index.d.ts +0 -1
  111. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  112. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  113. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  114. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  115. package/lib/components/taxSelect/index.d.ts +0 -1
  116. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  117. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  118. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -2
  119. package/lib/components/ticketBooking/components/timeBar/index.js +2 -1
  120. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  121. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  122. package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
  123. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
3
2
  export * from './Sales';
4
3
  export default SalesModel;
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: () => JSX.Element;
4
3
  export default Header;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Deposit: (props: any) => JSX.Element;
4
3
  export default Deposit;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Deposit: (props: any) => JSX.Element;
3
2
  export default Deposit;
@@ -71,7 +71,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
71
71
  var getInitData = /*#__PURE__*/function () {
72
72
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
73
73
  var _data$fromResource, _data$toResource;
74
- var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
74
+ var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource, _targetIdx;
75
75
  return _regeneratorRuntime().wrap(function _callee$(_context) {
76
76
  while (1) switch (_context.prev = _context.next) {
77
77
  case 0:
@@ -129,7 +129,13 @@ var EditBookingModal = function EditBookingModal(props, ref) {
129
129
  _cloned[_idx] = _targetResource; // 替换现有对象
130
130
  }
131
131
  } else {
132
- _cloned.push(_targetResource); // 添加新对象
132
+ // 未发现原资源位置(短时间内通过其它渠道修改过资源)
133
+ _targetIdx = _cloned.findIndex(function (rs) {
134
+ return rs.relation_id == (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
135
+ }); // 判断是否已经包含了目标资源,不包含则加入进来
136
+ if (_targetIdx === -1) {
137
+ _cloned.push(_targetResource); // 添加新对象
138
+ }
133
139
  }
134
140
  _initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
135
141
  } else {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FooterProps {
3
2
  state: any;
4
3
  reload: () => void;
@@ -9,7 +9,7 @@ import useSendModal from "./sendModal/useSendModal";
9
9
  import SendModal from "./sendModal";
10
10
  import { locales } from '@pisell/utils';
11
11
  var Footer = function Footer(_ref) {
12
- var _state$form2, _state$client6, _state$form3, _state$client7;
12
+ var _state$client6, _state$form, _state$client7;
13
13
  var state = _ref.state,
14
14
  reload = _ref.reload;
15
15
  var _useSendModal = useSendModal(state === null || state === void 0 ? void 0 : state.bookingId),
@@ -37,14 +37,6 @@ var Footer = function Footer(_ref) {
37
37
  return _ref2.apply(this, arguments);
38
38
  };
39
39
  }();
40
-
41
- // 是否都填写完成
42
- var isAllCompleted = useMemo(function () {
43
- var _state$form;
44
- return Object.values((state === null || state === void 0 || (_state$form = state.form) === null || _state$form === void 0 ? void 0 : _state$form.value) || {}).every(function (item) {
45
- return item.length > 0;
46
- });
47
- }, [state === null || state === void 0 || (_state$form2 = state.form) === null || _state$form2 === void 0 ? void 0 : _state$form2.value]);
48
40
  var defaultValues = useMemo(function () {
49
41
  var _state$client, _state$client2, _state$client3, _state$client4, _state$client5;
50
42
  return {
@@ -57,7 +49,7 @@ var Footer = function Footer(_ref) {
57
49
  }
58
50
  };
59
51
  }, [(_state$client6 = state.client) === null || _state$client6 === void 0 ? void 0 : _state$client6.value]);
60
- if (!state.bookingId || !(state !== null && state !== void 0 && (_state$form3 = state.form) !== null && _state$form3 !== void 0 && _state$form3.forms.length)) {
52
+ if (!state.bookingId || !(state !== null && state !== void 0 && (_state$form = state.form) !== null && _state$form !== void 0 && _state$form.forms.length)) {
61
53
  return null;
62
54
  }
63
55
  return /*#__PURE__*/React.createElement("div", {
@@ -72,9 +64,8 @@ var Footer = function Footer(_ref) {
72
64
  size: "large",
73
65
  block: true,
74
66
  type: "primary",
75
- onClick: handleOpen,
76
- disabled: isAllCompleted
77
- }, !isAllCompleted ? locales.getText('pisell2.text.send-form-reminder') : locales.getText('pisell2.text.send-form-reminder-completed')), /*#__PURE__*/React.createElement(SendModal, {
67
+ onClick: handleOpen
68
+ }, locales.getText('pisell2.text.send-form-reminder')), /*#__PURE__*/React.createElement(SendModal, {
78
69
  refreshKey: (_state$client7 = state.client) === null || _state$client7 === void 0 || (_state$client7 = _state$client7.value) === null || _state$client7 === void 0 ? void 0 : _state$client7.id,
79
70
  open: open,
80
71
  onCancel: function onCancel() {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const header: ({ state, dispatch }: any) => JSX.Element;
4
3
  export default header;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import './index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
247
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import '../../../info/service/addService/index.less';
4
3
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | {
168
+ }) => number | "flexible" | {
169
169
  type: string;
170
170
  value: number;
171
- } | "flexible";
171
+ };
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.css';
3
2
  /**
4
3
  * @title: 自定义组件设置
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps, RouteType } from './const';
3
2
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
4
3
  action: RouteType;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PayProps, PosProps } from './const';
3
2
  import './device.less';
4
3
  /**
@@ -11,7 +10,7 @@ import './device.less';
11
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
11
  api: PayProps['api'];
13
12
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
14
  [keys: string]: unknown;
16
15
  } | undefined, other?: any) => void) | undefined;
17
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps } from './const';
3
2
  import './index.less';
4
3
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -4,13 +4,14 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
5
  import { useRef } from 'react';
6
6
  import { getUniqueId, locales, sendWarningLog } from '@pisell/utils';
7
+ import dayjs from 'dayjs';
7
8
  import { useDispatch, updateCustom, updateStatus, updateState } from "../../store";
8
9
  import { useFail, useStoreRef } from "../../hooks";
9
10
  import { ModeEnum, PayStatus, StatusEnum } from "../../const";
10
11
  import { LinklyActionStatus } from "../const";
11
12
 
12
13
  // 全局超时时间
13
- var GlobalTimeout = 1000 * 60;
14
+ var GlobalTimeout = 1000 * 60 * 2;
14
15
  // 单次请求超时时间
15
16
  var RequestTimeout = 1000 * 5;
16
17
  export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, handleLinklySuccess) {
@@ -18,7 +19,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
18
19
  var _useStoreRef = useStoreRef(),
19
20
  numRef = _useStoreRef.numRef,
20
21
  modeRef = _useStoreRef.modeRef,
21
- deviceRef = _useStoreRef.deviceRef;
22
+ deviceRef = _useStoreRef.deviceRef,
23
+ orderIdRef = _useStoreRef.orderIdRef;
22
24
  var fail = useFail(0);
23
25
  var failRef = useRef(fail);
24
26
  var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
@@ -82,7 +84,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
82
84
  console.log('Success: 全局超时或不需要处理结果,终止查询');
83
85
  return;
84
86
  }
85
- _log("Success", result);
86
87
  isQueryFinishedRef.current = true;
87
88
  var data = (result === null || result === void 0 ? void 0 : result.data) || {};
88
89
  // 交易成功,终止查询
@@ -103,8 +104,11 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
103
104
  // 交易状态为0,且不需要签名,则继续查询
104
105
  if ((data === null || data === void 0 ? void 0 : data.status) == 0 && (data === null || data === void 0 ? void 0 : data.signature_flag) != 1) {
105
106
  console.log('交易状态为0需要继续查询');
107
+ _log("Querying", result);
106
108
  isQueryFinishedRef.current = false;
107
- _resultQuery();
109
+ setTimeout(function () {
110
+ _resultQuery();
111
+ }, 1500);
108
112
  return;
109
113
  }
110
114
 
@@ -153,7 +157,20 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
153
157
  _log("AbortError");
154
158
  console.log('Error: 请求被取消,将继续查询');
155
159
  isQueryFinishedRef.current = false;
156
- _resultQuery();
160
+ setTimeout(function () {
161
+ _resultQuery();
162
+ }, 1500);
163
+ return;
164
+ }
165
+
166
+ // 网关类报错,继续查询
167
+ if (!(error !== null && error !== void 0 && error.code) || "".concat(error.code) === PayStatus.Timeout) {
168
+ _log("NetworkError");
169
+ console.log('Error: 网关类报错,将继续查询');
170
+ isQueryFinishedRef.current = false;
171
+ setTimeout(function () {
172
+ _resultQuery();
173
+ }, 1500);
157
174
  return;
158
175
  }
159
176
  _log("Error", error);
@@ -243,20 +260,25 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
243
260
  session_id: numRef.current
244
261
  };
245
262
  var content = [{
246
- key: 'queryId',
247
- value: JSON.stringify(queryIdRef.current)
263
+ key: 'description',
264
+ value: JSON.stringify({
265
+ queryId: queryIdRef.current,
266
+ orderId: orderIdRef.current,
267
+ type: type,
268
+ date: dayjs().format('YYYY-MM-DD HH:mm:ss')
269
+ })
248
270
  }, {
249
271
  key: 'params',
250
272
  value: JSON.stringify(params)
251
273
  }];
252
- if (type === "Success") {
274
+ if (type === "Error") {
253
275
  content.push({
254
- key: 'response',
276
+ key: 'error',
255
277
  value: JSON.stringify(res)
256
278
  });
257
- } else if (type === "Error") {
279
+ } else {
258
280
  content.push({
259
- key: 'error',
281
+ key: 'response',
260
282
  value: JSON.stringify(res)
261
283
  });
262
284
  }
@@ -268,8 +290,6 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
268
290
  var run = function run() {
269
291
  // 重置状态
270
292
  reset();
271
- console.log('开始查询linkly结果---->>>>>>>');
272
- _log("Start");
273
293
 
274
294
  // 设置全局超时定时器
275
295
  globalTimeoutIdRef.current = setTimeout(function () {
@@ -285,6 +305,8 @@ export var useTimeResultQuery = function useTimeResultQuery(api, resultCheck, ha
285
305
  startTimeRef.current = Date.now();
286
306
  isQueryFinishedRef.current = false;
287
307
  queryIdRef.current = getUniqueId();
308
+ console.log('开始查询linkly结果---->>>>>>>');
309
+ _log("Start");
288
310
  return _resultQuery();
289
311
  };
290
312
  return {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Linkly: ({ api, onChange }: any) => JSX.Element;
3
2
  export default Linkly;
@@ -152,15 +152,15 @@ export var POS = function POS(_ref) {
152
152
  controllerRef.current = new AbortController();
153
153
  // 支付 or 退款
154
154
  var resultPromise = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay ? api.pay(_objectSpread(_objectSpread({}, custom !== null && custom !== void 0 && custom.platform ? {
155
- "operator_id": custom.operator_id,
156
- "operator_type": custom.operator_type,
157
- "platform": custom.platform,
158
- "custom_payment_id": custom.custom_payment_id,
159
- "service_charge": {
160
- "amount": payRef.current.surMoney,
161
- "percentage": payRef.current.surPercentRate
155
+ operator_id: custom.operator_id,
156
+ operator_type: custom.operator_type,
157
+ platform: custom.platform,
158
+ custom_payment_id: custom.custom_payment_id,
159
+ service_charge: {
160
+ amount: payRef.current.surMoney,
161
+ percentage: payRef.current.surPercentRate
162
162
  },
163
- "original_amount": payRef.current.amount
163
+ original_amount: payRef.current.amount
164
164
  } : {}), {}, {
165
165
  order_id: orderIdRef.current,
166
166
  amount: payRef.current.total,
@@ -199,8 +199,8 @@ export var POS = function POS(_ref) {
199
199
  if (unloadRef.current || !netRef.current) {
200
200
  return;
201
201
  }
202
- // 支付接口超时 进行支付状态查询
203
- if (err && "".concat(err.code) === PayStatus.Timeout) {
202
+ // 支付接口超时 进行支付状态查询(超时或者其它错误)
203
+ if (!(err !== null && err !== void 0 && err.code) || "".concat(err.code) === PayStatus.Timeout) {
204
204
  checkApi();
205
205
  return;
206
206
  }
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | undefined;
301
+ action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
4
3
  export default Total;
@@ -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 { CalendarDataItem } from '../../type';
3
2
  declare type CalendarItemProps = {
4
3
  month: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const EventBooking: () => JSX.Element;
4
3
  export default EventBooking;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ThreedsLoading: ({ title, showSuccessBackButton, onSuccessBack }: any) => JSX.Element;
4
3
  export default ThreedsLoading;
@@ -262,7 +262,9 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
262
262
  }
263
263
  return _context3.abrupt("return", defaultReturnParams);
264
264
  case 5:
265
- displayBox = document.getElementById('threeds-container'); // 创建iframe
265
+ displayBox = document.getElementById('threeds-container'); // 清空dom中的内容
266
+ displayBox.innerHTML = '';
267
+ // 创建iframe
266
268
  iframe = document.createElement('iframe'); // iframe.src = "about:blank";
267
269
  iframe.classList.add('hidden_TDS_From');
268
270
  iframe.name = 'threeDSMethodIframe';
@@ -315,7 +317,7 @@ export var createThreeDSMethodIframe = /*#__PURE__*/function () {
315
317
  }
316
318
  }, false);
317
319
  }));
318
- case 27:
320
+ case 28:
319
321
  case "end":
320
322
  return _context3.stop();
321
323
  }
@@ -436,7 +438,8 @@ export var checkTDSAuth = /*#__PURE__*/function () {
436
438
  */
437
439
  export var createChallengeIframe = function createChallengeIframe(challengeData, callback) {
438
440
  var displayBox = document.getElementById('threeds-container');
439
-
441
+ // 清空dom中的内容
442
+ displayBox.innerHTML = '';
440
443
  // 创建iframe
441
444
  var iframe = document.createElement('iframe');
442
445
  iframe.classList.add('tdsv2challengeIframe');
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const StripePayment: () => 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: () => JSX.Element;
3
2
  export default PageLoading;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PaymentRequestForm: () => JSX.Element | null;
3
2
  export default PaymentRequestForm;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
3
2
  export default PhoneField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface RightPanelProps {
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PopoverProps } from 'antd';
3
2
  import { CustomerCardProps } from './CustomerCard';
4
3
  import './index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface ProductExtensionProps {
4
3
  onDataChange: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface RuleSettingProps {
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { ScheduleItem } from '../../../type';
4
3
  declare type Item = any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const AddSchedules: ({ value, onChange, drawerContainer, isSelf }: any) => JSX.Element;
4
3
  export default AddSchedules;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare type Value = number[];
4
3
  declare const SchedulesModule: ({ value, onChange, drawerContainer, ruleFn, tabKey, previewItemChange, isSelf, isTitle, }: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: () => JSX.Element;
4
3
  export default Cart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  import "./index.less";
4
3
  interface TaxSelectProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const index: () => JSX.Element;
4
3
  export default index;