@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
@@ -192,6 +192,7 @@ var TicketBooking = function TicketBooking() {
192
192
  try {
193
193
  var _store$getState;
194
194
  _initFn(function () {});
195
+ _setIntervalTime(true);
195
196
  setState({
196
197
  createCount: state.createCount + 1
197
198
  });
@@ -483,11 +484,10 @@ var TicketBooking = function TicketBooking() {
483
484
  });
484
485
  case 2:
485
486
  data = _context.sent;
486
- console.log('wwww', data);
487
487
  setState({
488
488
  addTimeProducts: (data === null || data === void 0 ? void 0 : data.list) || []
489
489
  });
490
- case 5:
490
+ case 4:
491
491
  case "end":
492
492
  return _context.stop();
493
493
  }
@@ -850,7 +850,6 @@ var TicketBooking = function TicketBooking() {
850
850
  isShowDeposit: state.isShowDeposit,
851
851
  disableEventBookingEdit: state.disableEventBookingEdit,
852
852
  list: state.list,
853
- intervalSetTime: state.intervalSetTime,
854
853
  createCount: state.createCount,
855
854
  bookingFunctions: state.bookingFunctions
856
855
  })), {}, {
@@ -9,6 +9,7 @@ import { LeftOutlined, RightOutlined } from '@ant-design/icons';
9
9
  import { DatePicker, SelectTime } from '@pisell/materials';
10
10
  import { useMemoizedFn } from "ahooks";
11
11
  import { Button } from 'antd';
12
+ import dayjs from 'dayjs';
12
13
  import classNames from 'classnames';
13
14
  import { locales } from '@pisell/utils';
14
15
  import "./index.less";
@@ -56,7 +57,7 @@ var TimeBar = function TimeBar(props) {
56
57
  setGlobalState({
57
58
  isTimeChange: true
58
59
  });
59
- (_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, false);
60
+ (_props$setIntervalTim5 = props.setIntervalTime) === null || _props$setIntervalTim5 === void 0 || _props$setIntervalTim5.call(props, timeString === dayjs().format('HH:mm'));
60
61
  });
61
62
  return useMemo(function () {
62
63
  var _state$modalState5, _state$modalState6;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './../../index.less';
3
2
  declare const Search: () => JSX.Element;
4
3
  export default Search;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface LogData {
2
3
  key: string;
3
4
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SCOProps } from './types';
3
2
  import './index.less';
4
3
  declare const SaasCreateOrganization: (props: SCOProps) => JSX.Element;
@@ -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;
@@ -113,7 +113,12 @@ var EditBookingModal = (props, ref) => {
113
113
  _cloned[_idx] = _targetResource;
114
114
  }
115
115
  } else {
116
- _cloned.push(_targetResource);
116
+ const _targetIdx = _cloned.findIndex((rs) => {
117
+ return rs.relation_id == (_targetResource == null ? void 0 : _targetResource.relation_id);
118
+ });
119
+ if (_targetIdx === -1) {
120
+ _cloned.push(_targetResource);
121
+ }
117
122
  }
118
123
  _initResourceVal = {
119
124
  ..._initResourceVal,
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface FooterProps {
3
2
  state: any;
4
3
  reload: () => void;
@@ -39,37 +39,31 @@ var import_useSendModal = __toESM(require("./sendModal/useSendModal"));
39
39
  var import_sendModal = __toESM(require("./sendModal"));
40
40
  var import_utils = require("@pisell/utils");
41
41
  var Footer = ({ state, reload }) => {
42
- var _a, _b, _c, _d, _e;
42
+ var _a, _b, _c, _d;
43
43
  const { open, setOpen, handleOpen, handleValuesChange, handleOk } = (0, import_useSendModal.default)(state == null ? void 0 : state.bookingId);
44
44
  const handleReload = async () => {
45
45
  await reload();
46
46
  import_materials.message.success(import_utils.locales.getText("pisell2.text.send-form-reminder-refresh"));
47
47
  };
48
- const isAllCompleted = (0, import_react.useMemo)(() => {
49
- var _a2;
50
- return Object.values(((_a2 = state == null ? void 0 : state.form) == null ? void 0 : _a2.value) || {}).every(
51
- (item) => item.length > 0
52
- );
53
- }, [(_a = state == null ? void 0 : state.form) == null ? void 0 : _a.value]);
54
48
  const defaultValues = (0, import_react.useMemo)(() => {
55
- var _a2, _b2, _c2, _d2, _e2, _f, _g, _h, _i, _j;
49
+ var _a2, _b2, _c2, _d2, _e, _f, _g, _h, _i, _j;
56
50
  return {
57
51
  sendSms: !!((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.phone),
58
52
  sendEmail: !!((_d2 = (_c2 = state.client) == null ? void 0 : _c2.value) == null ? void 0 : _d2.email),
59
- email: (_f = (_e2 = state.client) == null ? void 0 : _e2.value) == null ? void 0 : _f.email,
53
+ email: (_f = (_e = state.client) == null ? void 0 : _e.value) == null ? void 0 : _f.email,
60
54
  phone: {
61
55
  code: (_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.country_calling_code,
62
56
  phone: (_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.phone
63
57
  }
64
58
  };
65
- }, [(_b = state.client) == null ? void 0 : _b.value]);
66
- if (!state.bookingId || !((_c = state == null ? void 0 : state.form) == null ? void 0 : _c.forms.length)) {
59
+ }, [(_a = state.client) == null ? void 0 : _a.value]);
60
+ if (!state.bookingId || !((_b = state == null ? void 0 : state.form) == null ? void 0 : _b.forms.length)) {
67
61
  return null;
68
62
  }
69
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Tooltip, { title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip") }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen, disabled: isAllCompleted }, !isAllCompleted ? import_utils.locales.getText("pisell2.text.send-form-reminder") : import_utils.locales.getText("pisell2.text.send-form-reminder-completed")), /* @__PURE__ */ import_react.default.createElement(
63
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-form-footer" }, /* @__PURE__ */ import_react.default.createElement(import_materials.Tooltip, { title: import_utils.locales.getText("pisell2.text.send-form-reminder-tooltip") }, /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, null), onClick: handleReload })), /* @__PURE__ */ import_react.default.createElement(import_materials.Button, { size: "large", block: true, type: "primary", onClick: handleOpen }, import_utils.locales.getText("pisell2.text.send-form-reminder")), /* @__PURE__ */ import_react.default.createElement(
70
64
  import_sendModal.default,
71
65
  {
72
- refreshKey: (_e = (_d = state.client) == null ? void 0 : _d.value) == null ? void 0 : _e.id,
66
+ refreshKey: (_d = (_c = state.client) == null ? void 0 : _c.value) == null ? void 0 : _d.id,
73
67
  open,
74
68
  onCancel: () => setOpen(false),
75
69
  onOk: handleOk,
@@ -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;
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all)
@@ -14,6 +16,14 @@ var __copyProps = (to, from, except, desc) => {
14
16
  }
15
17
  return to;
16
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
+ ));
17
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
28
 
19
29
  // src/components/eftposPay/linkly/hooks/useTimeQuery.ts
@@ -24,15 +34,16 @@ __export(useTimeQuery_exports, {
24
34
  module.exports = __toCommonJS(useTimeQuery_exports);
25
35
  var import_react = require("react");
26
36
  var import_utils = require("@pisell/utils");
37
+ var import_dayjs = __toESM(require("dayjs"));
27
38
  var import_store = require("../../store");
28
39
  var import_hooks = require("../../hooks");
29
40
  var import_const = require("../../const");
30
41
  var import_const2 = require("../const");
31
- var GlobalTimeout = 1e3 * 60;
42
+ var GlobalTimeout = 1e3 * 60 * 2;
32
43
  var RequestTimeout = 1e3 * 5;
33
44
  var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
34
45
  const dispatch = (0, import_store.useDispatch)();
35
- const { numRef, modeRef, deviceRef } = (0, import_hooks.useStoreRef)();
46
+ const { numRef, modeRef, deviceRef, orderIdRef } = (0, import_hooks.useStoreRef)();
36
47
  const fail = (0, import_hooks.useFail)(0);
37
48
  const failRef = (0, import_react.useRef)(fail);
38
49
  const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
@@ -80,7 +91,6 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
80
91
  console.log("Success: 全局超时或不需要处理结果,终止查询");
81
92
  return;
82
93
  }
83
- _log("Success" /* Success */, result);
84
94
  isQueryFinishedRef.current = true;
85
95
  const data = (result == null ? void 0 : result.data) || {};
86
96
  if (data.status == 1) {
@@ -95,8 +105,11 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
95
105
  }
96
106
  if ((data == null ? void 0 : data.status) == 0 && (data == null ? void 0 : data.signature_flag) != 1) {
97
107
  console.log("交易状态为0需要继续查询");
108
+ _log("Querying" /* Querying */, result);
98
109
  isQueryFinishedRef.current = false;
99
- _resultQuery();
110
+ setTimeout(() => {
111
+ _resultQuery();
112
+ }, 1500);
100
113
  return;
101
114
  }
102
115
  if (data.status < 0) {
@@ -132,7 +145,18 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
132
145
  _log("AbortError" /* AbortError */);
133
146
  console.log("Error: 请求被取消,将继续查询");
134
147
  isQueryFinishedRef.current = false;
135
- _resultQuery();
148
+ setTimeout(() => {
149
+ _resultQuery();
150
+ }, 1500);
151
+ return;
152
+ }
153
+ if (!(error == null ? void 0 : error.code) || `${error.code}` === import_const.PayStatus.Timeout) {
154
+ _log("NetworkError" /* NetworkError */);
155
+ console.log("Error: 网关类报错,将继续查询");
156
+ isQueryFinishedRef.current = false;
157
+ setTimeout(() => {
158
+ _resultQuery();
159
+ }, 1500);
136
160
  return;
137
161
  }
138
162
  _log("Error" /* Error */, error);
@@ -197,13 +221,21 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
197
221
  session_id: numRef.current
198
222
  };
199
223
  const content = [
200
- { key: "queryId", value: JSON.stringify(queryIdRef.current) },
224
+ {
225
+ key: "description",
226
+ value: JSON.stringify({
227
+ queryId: queryIdRef.current,
228
+ orderId: orderIdRef.current,
229
+ type,
230
+ date: (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss")
231
+ })
232
+ },
201
233
  { key: "params", value: JSON.stringify(params) }
202
234
  ];
203
- if (type === "Success" /* Success */) {
204
- content.push({ key: "response", value: JSON.stringify(res) });
205
- } else if (type === "Error" /* Error */) {
235
+ if (type === "Error" /* Error */) {
206
236
  content.push({ key: "error", value: JSON.stringify(res) });
237
+ } else {
238
+ content.push({ key: "response", value: JSON.stringify(res) });
207
239
  }
208
240
  (0, import_utils.sendWarningLog)({
209
241
  title: `Linkly-${isPay ? "Pay" : "Refund"}-交易结果轮询`,
@@ -212,8 +244,6 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
212
244
  };
213
245
  const run = () => {
214
246
  reset();
215
- console.log("开始查询linkly结果---->>>>>>>");
216
- _log("Start" /* Start */);
217
247
  globalTimeoutIdRef.current = setTimeout(() => {
218
248
  var _a;
219
249
  console.log("全局超时,终止所有重试");
@@ -224,6 +254,8 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
224
254
  startTimeRef.current = Date.now();
225
255
  isQueryFinishedRef.current = false;
226
256
  queryIdRef.current = (0, import_utils.getUniqueId)();
257
+ console.log("开始查询linkly结果---->>>>>>>");
258
+ _log("Start" /* Start */);
227
259
  return _resultQuery();
228
260
  };
229
261
  return { run, stop: reset };
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Linkly: ({ api, onChange }: any) => JSX.Element;
3
2
  export default Linkly;
@@ -148,15 +148,15 @@ var POS = ({
148
148
  const resultPromise = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay ? api.pay(
149
149
  {
150
150
  ...(custom == null ? void 0 : custom.platform) ? {
151
- "operator_id": custom.operator_id,
152
- "operator_type": custom.operator_type,
153
- "platform": custom.platform,
154
- "custom_payment_id": custom.custom_payment_id,
155
- "service_charge": {
156
- "amount": payRef.current.surMoney,
157
- "percentage": payRef.current.surPercentRate
151
+ operator_id: custom.operator_id,
152
+ operator_type: custom.operator_type,
153
+ platform: custom.platform,
154
+ custom_payment_id: custom.custom_payment_id,
155
+ service_charge: {
156
+ amount: payRef.current.surMoney,
157
+ percentage: payRef.current.surPercentRate
158
158
  },
159
- "original_amount": payRef.current.amount
159
+ original_amount: payRef.current.amount
160
160
  } : {},
161
161
  order_id: orderIdRef.current,
162
162
  amount: payRef.current.total,
@@ -215,7 +215,7 @@ var POS = ({
215
215
  if (unloadRef.current || !netRef.current) {
216
216
  return;
217
217
  }
218
- if (err && `${err.code}` === import_const.PayStatus.Timeout) {
218
+ if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
219
219
  checkApi();
220
220
  return;
221
221
  }
@@ -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;
@@ -171,6 +171,7 @@ var createThreeDSMethodIframe = async (threeDSMethodData, callback) => {
171
171
  return defaultReturnParams;
172
172
  }
173
173
  const displayBox = document.getElementById("threeds-container");
174
+ displayBox.innerHTML = "";
174
175
  let iframe = document.createElement("iframe");
175
176
  iframe.classList.add("hidden_TDS_From");
176
177
  iframe.name = "threeDSMethodIframe";
@@ -286,6 +287,7 @@ var checkTDSAuth = async (step2, step3, callback) => {
286
287
  };
287
288
  var createChallengeIframe = (challengeData, callback) => {
288
289
  const displayBox = document.getElementById("threeds-container");
290
+ displayBox.innerHTML = "";
289
291
  let iframe = document.createElement("iframe");
290
292
  iframe.classList.add("tdsv2challengeIframe");
291
293
  iframe.name = "challengeIframe";
@@ -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;