@pisell/private-materials 3.3.97 → 3.3.99

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 (193) 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 +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/Sales/Cart/index.js +1 -5
  12. package/es/components/Sales/Cart/utils.d.ts +0 -40
  13. package/es/components/Sales/Cart/utils.js +0 -167
  14. package/es/components/Sales/Checkout/index.d.ts +0 -4
  15. package/es/components/Sales/Checkout/index.js +8 -52
  16. package/es/components/Sales/Checkout/serve.d.ts +0 -13
  17. package/es/components/Sales/Checkout/serve.js +2 -16
  18. package/es/components/Sales/Checkout/utils.js +1 -7
  19. package/es/components/Sales/Summary/index.d.ts +0 -10
  20. package/es/components/Sales/Summary/index.js +2 -17
  21. package/es/components/Sales/Summary/serve.d.ts +0 -1
  22. package/es/components/Sales/Summary/serve.js +0 -6
  23. package/es/components/Sales/Summary/utils.d.ts +0 -15
  24. package/es/components/Sales/Summary/utils.js +1 -43
  25. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  26. package/es/components/appointmentBooking/components/Content/index.js +1 -15
  27. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  28. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  29. package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
  30. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  31. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  32. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  33. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
  34. package/es/components/appointmentBooking/deposit/index.js +2 -4
  35. package/es/components/appointmentBooking/index.js +0 -14
  36. package/es/components/appointmentBooking/index.less +1 -1
  37. package/es/components/booking/components/voucher/index.js +2 -2
  38. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  39. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  40. package/es/components/booking/info/index.d.ts +1 -0
  41. package/es/components/booking/info/service/Lists.d.ts +0 -1
  42. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  43. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  44. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  45. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  46. package/es/components/booking/utils.d.ts +2 -2
  47. package/es/components/eftposPay/amount.d.ts +1 -1
  48. package/es/components/eftposPay/app.d.ts +0 -1
  49. package/es/components/eftposPay/const.d.ts +1 -4
  50. package/es/components/eftposPay/const.js +1 -3
  51. package/es/components/eftposPay/device.d.ts +1 -1
  52. package/es/components/eftposPay/hooks.d.ts +2 -2
  53. package/es/components/eftposPay/hooks.js +1 -3
  54. package/es/components/eftposPay/index.js +1 -1
  55. package/es/components/eftposPay/manufacturer.d.ts +0 -1
  56. package/es/components/eftposPay/manufacturer.js +0 -4
  57. package/es/components/eftposPay/pay.d.ts +1 -1
  58. package/es/components/eftposPay/pay.js +2 -6
  59. package/es/components/eftposPay/payo/config.js +1 -1
  60. package/es/components/eftposPay/store/index.d.ts +4 -4
  61. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  62. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
  63. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
  64. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  65. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  66. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  67. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  68. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  69. package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
  70. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  71. package/es/components/eventBooking/locales.d.ts +0 -24
  72. package/es/components/eventBooking/locales.js +3 -27
  73. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  74. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  75. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  76. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  77. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  78. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  79. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
  80. package/es/components/ticketBooking/locales.d.ts +146 -164
  81. package/es/components/ticketBooking/locales.js +147 -195
  82. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  83. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  84. package/lib/components/Sales/Cart/index.js +0 -1
  85. package/lib/components/Sales/Cart/utils.d.ts +0 -40
  86. package/lib/components/Sales/Cart/utils.js +0 -117
  87. package/lib/components/Sales/Checkout/index.d.ts +0 -4
  88. package/lib/components/Sales/Checkout/index.js +7 -39
  89. package/lib/components/Sales/Checkout/serve.d.ts +0 -13
  90. package/lib/components/Sales/Checkout/serve.js +2 -7
  91. package/lib/components/Sales/Checkout/utils.js +0 -2
  92. package/lib/components/Sales/Summary/index.d.ts +0 -10
  93. package/lib/components/Sales/Summary/index.js +1 -7
  94. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  95. package/lib/components/Sales/Summary/serve.js +0 -32
  96. package/lib/components/Sales/Summary/utils.d.ts +0 -15
  97. package/lib/components/Sales/Summary/utils.js +1 -30
  98. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  99. package/lib/components/appointmentBooking/components/Content/index.js +1 -6
  100. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  101. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -6
  102. package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
  103. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  104. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  105. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  106. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
  107. package/lib/components/appointmentBooking/deposit/index.js +2 -4
  108. package/lib/components/appointmentBooking/index.js +0 -11
  109. package/lib/components/appointmentBooking/index.less +1 -1
  110. package/lib/components/booking/components/voucher/index.js +2 -2
  111. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  112. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  113. package/lib/components/booking/info/index.d.ts +1 -0
  114. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  115. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  116. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  117. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  118. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  119. package/lib/components/booking/utils.d.ts +2 -2
  120. package/lib/components/eftposPay/amount.d.ts +1 -1
  121. package/lib/components/eftposPay/app.d.ts +0 -1
  122. package/lib/components/eftposPay/const.d.ts +1 -4
  123. package/lib/components/eftposPay/const.js +0 -2
  124. package/lib/components/eftposPay/device.d.ts +1 -1
  125. package/lib/components/eftposPay/hooks.d.ts +2 -2
  126. package/lib/components/eftposPay/hooks.js +4 -11
  127. package/lib/components/eftposPay/index.js +1 -1
  128. package/lib/components/eftposPay/manufacturer.d.ts +0 -1
  129. package/lib/components/eftposPay/manufacturer.js +0 -6
  130. package/lib/components/eftposPay/pay.d.ts +1 -1
  131. package/lib/components/eftposPay/pay.js +2 -13
  132. package/lib/components/eftposPay/payo/config.js +1 -1
  133. package/lib/components/eftposPay/store/index.d.ts +4 -4
  134. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  135. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
  136. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
  137. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  138. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  139. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  140. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  141. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  142. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  143. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  144. package/lib/components/eventBooking/locales.d.ts +0 -24
  145. package/lib/components/eventBooking/locales.js +3 -27
  146. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  147. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  148. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  149. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  150. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  151. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  152. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
  153. package/lib/components/ticketBooking/locales.d.ts +146 -164
  154. package/lib/components/ticketBooking/locales.js +4 -22
  155. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  156. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  157. package/package.json +4 -4
  158. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  159. package/es/components/eftposPay/linkly/const.js +0 -82
  160. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  161. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  162. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  163. package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
  164. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  165. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  166. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  167. package/es/components/eftposPay/linkly/index.js +0 -197
  168. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  169. package/es/components/eftposPay/linkly/service.js +0 -81
  170. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -3
  171. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
  172. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  173. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  174. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  175. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  176. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  177. package/lib/components/eftposPay/linkly/const.js +0 -102
  178. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  179. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  180. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  181. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
  182. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  183. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  184. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  185. package/lib/components/eftposPay/linkly/index.js +0 -208
  186. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  187. package/lib/components/eftposPay/linkly/service.js +0 -55
  188. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -3
  189. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
  190. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  191. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  192. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  193. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
@@ -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: "loading" | "success" | "warn" | "fail" | "question";
177
+ status: "success" | "loading" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -297,18 +297,18 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
301
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?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ErrorTip: ({ text }: any) => JSX.Element;
3
4
  export default ErrorTip;
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useMemo, useState } from 'react';
17
17
  import { locales } from '@pisell/utils';
18
18
  import { Button, PisellToast } from '@pisell/materials';
19
- import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer, useSummary } from "../../../../../Sales";
19
+ import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
20
20
  import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
21
21
  import OrderProductModal from "../../OrderProductModal/index";
22
22
  import EmptyHolderModal from "../../EmptyHolderModal";
@@ -24,7 +24,6 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
24
24
  import { useRequest } from 'ahooks';
25
25
  import useEngineContext from "../../../../../../hooks/useEngineContext";
26
26
  import "./index.less";
27
- import { Toast } from "../../../../../appointmentBooking/utils";
28
27
  var ContinueButton = function ContinueButton() {
29
28
  var _context$appHelper, _cartData$cartItems;
30
29
  var _useSales = useSales(),
@@ -44,14 +43,10 @@ var ContinueButton = function ContinueButton() {
44
43
  onCheckout = _useCheckout.onCheckout,
45
44
  createBooking = _useCheckout.createBooking,
46
45
  onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
47
- checkBeforeBooking = _useCheckout.checkBeforeBooking,
48
- freePay = _useCheckout.freePay;
46
+ checkBeforeBooking = _useCheckout.checkBeforeBooking;
49
47
  var _useCustomer = useCustomer(),
50
48
  openLoginModal = _useCustomer.openLoginModal,
51
49
  isLogin = _useCustomer.isLogin;
52
- var _useSummary = useSummary(),
53
- deposit = _useSummary.deposit,
54
- isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
55
50
 
56
51
  // 下单之前是否检测失败
57
52
  var _useState = useState(false),
@@ -389,48 +384,41 @@ var ContinueButton = function ContinueButton() {
389
384
  */
390
385
  var handleContinue = /*#__PURE__*/function () {
391
386
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
392
- var _deposit$protocols, value, checkRes, emptyHolders;
387
+ var value, checkRes, emptyHolders;
393
388
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
394
389
  while (1) switch (_context6.prev = _context6.next) {
395
390
  case 0:
396
391
  if (!isLastStep) {
397
- _context6.next = 17;
398
- break;
399
- }
400
- value = formatValues(data); // 如果未同意定金政策,则提示
401
- if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
402
- _context6.next = 5;
392
+ _context6.next = 14;
403
393
  break;
404
394
  }
405
- Toast(locales.getText('pisell2.appointment.deposit.agree.policy'));
406
- return _context6.abrupt("return");
407
- case 5:
408
- _context6.next = 7;
395
+ value = formatValues(data); // 检测商品是否可以下单
396
+ _context6.next = 4;
409
397
  return onCheckBeforeBooking(value);
410
- case 7:
398
+ case 4:
411
399
  checkRes = _context6.sent;
412
400
  if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
413
- _context6.next = 12;
401
+ _context6.next = 9;
414
402
  break;
415
403
  }
416
404
  setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
417
405
  setOpenCheckout(true);
418
406
  return _context6.abrupt("return");
419
- case 12:
407
+ case 9:
420
408
  // 验证holder是否为空
421
409
  emptyHolders = getWithoutCartItemsHolderNames();
422
410
  if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
423
- _context6.next = 15;
411
+ _context6.next = 12;
424
412
  break;
425
413
  }
426
414
  return _context6.abrupt("return", setOpenEmptyHolder(true));
427
- case 15:
415
+ case 12:
428
416
  // 关闭购物车弹窗
429
417
  onCloseCart();
430
418
  return _context6.abrupt("return", handleCheckout());
431
- case 17:
419
+ case 14:
432
420
  if (isLogin()) {
433
- _context6.next = 20;
421
+ _context6.next = 17;
434
422
  break;
435
423
  }
436
424
  onCloseCart();
@@ -460,9 +448,9 @@ var ContinueButton = function ContinueButton() {
460
448
  return callback;
461
449
  }()
462
450
  }));
463
- case 20:
451
+ case 17:
464
452
  handleHolder();
465
- case 21:
453
+ case 18:
466
454
  case "end":
467
455
  return _context6.stop();
468
456
  }
@@ -499,8 +487,8 @@ var ContinueButton = function ContinueButton() {
499
487
  */
500
488
  var confirmLoading = useMemo(function () {
501
489
  if (!isLastStep) return false;
502
- return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading) || (freePay === null || freePay === void 0 ? void 0 : freePay.loading);
503
- }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading, freePay === null || freePay === void 0 ? void 0 : freePay.loading]);
490
+ return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
491
+ }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
504
492
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
505
493
  disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
506
494
  size: "large",
@@ -5,25 +5,21 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
5
5
  import React from 'react';
6
6
  import { locales } from '@pisell/utils';
7
7
  import { PisellText } from '@pisell/materials';
8
- import { useCart, useSummary } from "../../../../../Sales";
8
+ import { useSummary } from "../../../../../Sales";
9
9
  import useEngineContext from "../../../../../../hooks/useEngineContext";
10
10
  import "./index.less";
11
11
  import classNames from 'classnames';
12
12
  var Total = function Total(_ref) {
13
- var _context$appHelper, _context$appHelper$ge, _cartData$cartItems, _cartData$cartItems2, _context$appHelper2, _context$appHelper2$g;
13
+ var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$g;
14
14
  var className = _ref.className,
15
15
  isFooter = _ref.isFooter;
16
- var _useCart = useCart(),
17
- cartData = _useCart.cartData;
18
16
  var _useSummary = useSummary(),
19
17
  taxTitle = _useSummary.taxTitle,
20
18
  totalTaxFee = _useSummary.totalTaxFee,
21
19
  isPriceIncludeTax = _useSummary.isPriceIncludeTax,
22
- total = _useSummary.total,
23
- deposit = _useSummary.deposit;
20
+ total = _useSummary.total;
24
21
  var context = useEngineContext();
25
- console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), deposit, 'wh97978');
26
- var showDeposit = (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && (deposit === null || deposit === void 0 ? void 0 : deposit.hasDeposit);
22
+ console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), 'wh97978');
27
23
  return /*#__PURE__*/React.createElement("div", {
28
24
  className: "event-total-wrap ".concat(className)
29
25
  }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
@@ -35,8 +31,8 @@ var Total = function Total(_ref) {
35
31
  className: classNames('event-total', _defineProperty({}, ['total-gst-wrap'], !isPriceIncludeTax && Number(totalTaxFee) > 0))
36
32
  }, /*#__PURE__*/React.createElement("div", {
37
33
  className: "left"
38
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, isFooter && showDeposit ? locales.getText('pisell2.appointment.deposit') : locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
39
- value: (cartData === null || cartData === void 0 || (_cartData$cartItems2 = cartData.cartItems) === null || _cartData$cartItems2 === void 0 ? void 0 : _cartData$cartItems2.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? deposit === null || deposit === void 0 ? void 0 : deposit.total : total,
34
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
35
+ value: total,
40
36
  showCurrencySymbol: true,
41
37
  className: "event-amount"
42
38
  }) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("span", {
@@ -5,10 +5,8 @@ import { useCart, useHolder, useSummary, useStep } from "../../../../../Sales";
5
5
  import SelectHolderModal from "../../SelectHolderModal";
6
6
  import ContinueButton from "../ContinueButton";
7
7
  import Total from "./Total";
8
- import Deposit from "../Deposit";
9
8
  import "./index.less";
10
9
  var CartItem = function CartItem() {
11
- var _cartData$cartItems;
12
10
  var _useHolder = useHolder(),
13
11
  open = _useHolder.open,
14
12
  holderData = _useHolder.holderData,
@@ -19,7 +17,7 @@ var CartItem = function CartItem() {
19
17
  cartData = _useCart.cartData,
20
18
  addNoteToCartItem = _useCart.addNoteToCartItem;
21
19
  var _useSummary = useSummary(),
22
- deposit = _useSummary.deposit;
20
+ subtotal = _useSummary.subtotal;
23
21
  var _useStep = useStep(),
24
22
  isLastStep = _useStep.isLastStep;
25
23
  var handleClickCard = function handleClickCard(e, type, key) {
@@ -58,7 +56,7 @@ var CartItem = function CartItem() {
58
56
  }
59
57
  })), /*#__PURE__*/React.createElement("div", {
60
58
  className: "event-footer"
61
- }, /*#__PURE__*/React.createElement(Total, null), (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? /*#__PURE__*/React.createElement(Deposit, null) : null, /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
59
+ }, /*#__PURE__*/React.createElement(Total, null), /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
62
60
  open: open
63
61
  }));
64
62
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const InformationOptionsModal: (props: any) => JSX.Element;
3
4
  export default InformationOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare type CallToBookProps = {
2
3
  show: boolean;
3
4
  type: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const WeekItem: (props: any) => JSX.Element;
3
4
  export default WeekItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type CalenDateWeekProps = {
3
4
  currentDate: string;
@@ -304,9 +304,7 @@ var BookingDetailModal = function BookingDetailModal(props) {
304
304
  utils === null || utils === void 0 || utils.action({
305
305
  type: 'pisell1.productDetail',
306
306
  data: {
307
- detail: _objectSpread(_objectSpread({}, (bookingOption === null || bookingOption === void 0 ? void 0 : bookingOption._originData) || {}), {}, {
308
- open_deposit: 1
309
- }),
307
+ detail: _objectSpread({}, (bookingOption === null || bookingOption === void 0 ? void 0 : bookingOption._originData) || {}),
310
308
  isOS: false
311
309
  },
312
310
  callback: function callback(data) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem } from '../../type';
2
3
  declare type CalendarItemProps = {
3
4
  month: string;
@@ -71,14 +71,6 @@ declare const _default: {
71
71
  'pisell2.event.capacity.limit.reached.tip': string;
72
72
  'pisell2.event.schedule.item.expand': string;
73
73
  'pisell2.event.schedule.item.collapse': string;
74
- 'pisell2.appointment.deposit': string;
75
- 'pisell2.appointment.deposit.agreed': string;
76
- 'pisell2.appointment.deposit.agree.policy': string;
77
- 'pisell2.appointment.deposit.and': string;
78
- 'pisell2.appointment.deposit.amount.tip1': string;
79
- 'pisell2.appointment.deposit.amount.tip2': string;
80
- 'pisell2.appointment.deposit.close': string;
81
- 'pisell2.appointment.booking.empty.data': string;
82
74
  };
83
75
  'zh-CN': {
84
76
  'pisell2.event.calendar.limit.unavailable': string;
@@ -152,14 +144,6 @@ declare const _default: {
152
144
  'pisell2.event.capacity.limit.reached.tip': string;
153
145
  'pisell2.event.schedule.item.expand': string;
154
146
  'pisell2.event.schedule.item.collapse': string;
155
- 'pisell2.appointment.deposit': string;
156
- 'pisell2.appointment.deposit.agreed': string;
157
- 'pisell2.appointment.deposit.agree.policy': string;
158
- 'pisell2.appointment.deposit.and': string;
159
- 'pisell2.appointment.deposit.amount.tip1': string;
160
- 'pisell2.appointment.deposit.amount.tip2': string;
161
- 'pisell2.appointment.deposit.close': string;
162
- 'pisell2.appointment.booking.empty.data': string;
163
147
  };
164
148
  'zh-HK': {
165
149
  'pisell2.event.calendar.limit.unavailable': string;
@@ -233,14 +217,6 @@ declare const _default: {
233
217
  'pisell2.event.capacity.limit.reached.tip': string;
234
218
  'pisell2.event.schedule.item.expand': string;
235
219
  'pisell2.event.schedule.item.collapse': string;
236
- 'pisell2.appointment.deposit': string;
237
- 'pisell2.appointment.deposit.agreed': string;
238
- 'pisell2.appointment.deposit.agree.policy': string;
239
- 'pisell2.appointment.deposit.and': string;
240
- 'pisell2.appointment.deposit.amount.tip1': string;
241
- 'pisell2.appointment.deposit.amount.tip2': string;
242
- 'pisell2.appointment.deposit.close': string;
243
- 'pisell2.appointment.booking.empty.data': string;
244
220
  };
245
221
  };
246
222
  export default _default;
@@ -82,15 +82,7 @@ export default {
82
82
  'pisell2.event.capacity.limit.reached.title': 'Capacity limit reached',
83
83
  'pisell2.event.capacity.limit.reached.tip': 'One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.',
84
84
  'pisell2.event.schedule.item.expand': 'See more',
85
- 'pisell2.event.schedule.item.collapse': 'See less',
86
- 'pisell2.appointment.deposit': 'Deposit',
87
- 'pisell2.appointment.deposit.agreed': 'I have read and agree to the ',
88
- 'pisell2.appointment.deposit.agree.policy': 'You need to agree the policy to proceed',
89
- 'pisell2.appointment.deposit.and': ' & ',
90
- 'pisell2.appointment.deposit.amount.tip1': ' needs to be paid as deposit.',
91
- 'pisell2.appointment.deposit.amount.tip2': ' ',
92
- 'pisell2.appointment.deposit.close': 'Close',
93
- 'pisell2.appointment.booking.empty.data': 'No data'
85
+ 'pisell2.event.schedule.item.collapse': 'See less'
94
86
  },
95
87
  'zh-CN': {
96
88
  'pisell2.event.calendar.limit.unavailable': '不可预约',
@@ -175,15 +167,7 @@ export default {
175
167
  'pisell2.event.capacity.limit.reached.title': '活动名额已满',
176
168
  'pisell2.event.capacity.limit.reached.tip': '购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。',
177
169
  'pisell2.event.schedule.item.expand': '查看更多',
178
- 'pisell2.event.schedule.item.collapse': '收起',
179
- 'pisell2.appointment.deposit': '定金',
180
- 'pisell2.appointment.deposit.agreed': '我已阅读并同意 ',
181
- 'pisell2.appointment.deposit.agree.policy': '您需要同意协议才能继续',
182
- 'pisell2.appointment.deposit.and': ' 和 ',
183
- 'pisell2.appointment.deposit.amount.tip1': '请支付 ',
184
- 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
185
- 'pisell2.appointment.deposit.close': '关闭',
186
- 'pisell2.appointment.booking.empty.data': '暂无数据'
170
+ 'pisell2.event.schedule.item.collapse': '收起'
187
171
  },
188
172
  'zh-HK': {
189
173
  'pisell2.event.calendar.limit.unavailable': '不可預約',
@@ -268,14 +252,6 @@ export default {
268
252
  'pisell2.event.capacity.limit.reached.title': '活動名額已滿',
269
253
  'pisell2.event.capacity.limit.reached.tip': '購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。',
270
254
  'pisell2.event.schedule.item.expand': '查看更多',
271
- 'pisell2.event.schedule.item.collapse': '收起',
272
- 'pisell2.appointment.deposit': '定金',
273
- 'pisell2.appointment.deposit.agreed': '我已閱讀並同意 ',
274
- 'pisell2.appointment.deposit.agree.policy': '您需要同意協議才能繼續',
275
- 'pisell2.appointment.deposit.and': ' 和 ',
276
- 'pisell2.appointment.deposit.amount.tip1': '請支付 ',
277
- 'pisell2.appointment.deposit.amount.tip2': ' 定金。',
278
- 'pisell2.appointment.deposit.close': '关闭',
279
- 'pisell2.appointment.booking.empty.data': '暫無數據'
255
+ 'pisell2.event.schedule.item.collapse': '收起'
280
256
  }
281
257
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
3
4
  export default SetupForm;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.module.less';
2
3
  declare const StripePayment: () => JSX.Element;
3
4
  export default StripePayment;
@@ -35,7 +35,7 @@ var isOfflinePayment = function isOfflinePayment(type) {
35
35
  return ['pisell.bank_deposit', 'pisell.offline_payment', 'pisell.other.cashmanual', 'pisell.custom_bank_transfer'].includes(type);
36
36
  };
37
37
  var PaymentMethods = function PaymentMethods(props, ref) {
38
- var _context$appHelper, _interaction$utils, _interaction$utils$is;
38
+ var _context$appHelper;
39
39
  var MWCreditCardRef = useRef(null);
40
40
  var SuperPayAliPayH5Ref = useRef(null);
41
41
  var StripePayRef = useRef(null);
@@ -118,11 +118,10 @@ var PaymentMethods = function PaymentMethods(props, ref) {
118
118
  return _ref2.apply(this, arguments);
119
119
  };
120
120
  }();
121
- console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils), interaction, context);
122
121
  useEffect(function () {
123
- var _interaction$utils2, _interaction$utils2$i, _interaction$utils3, _interaction$utils3$i;
124
- console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$i = _interaction$utils2.isAppEnv) === null || _interaction$utils2$i === void 0 ? void 0 : _interaction$utils2$i.call(_interaction$utils2));
125
- if (interaction !== null && interaction !== void 0 && (_interaction$utils3 = interaction.utils) !== null && _interaction$utils3 !== void 0 && (_interaction$utils3$i = _interaction$utils3.isAppEnv) !== null && _interaction$utils3$i !== void 0 && _interaction$utils3$i.call(_interaction$utils3)) {
122
+ var _interaction$utils, _interaction$utils$is, _interaction$utils2, _interaction$utils2$i;
123
+ console.log('paymentResult isAppEnv', interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils));
124
+ if (interaction !== null && interaction !== void 0 && (_interaction$utils2 = interaction.utils) !== null && _interaction$utils2 !== void 0 && (_interaction$utils2$i = _interaction$utils2.isAppEnv) !== null && _interaction$utils2$i !== void 0 && _interaction$utils2$i.call(_interaction$utils2)) {
126
125
  interaction.utils.mountFunction('global', 'paymentResult', function (strResult) {
127
126
  console.log('paymentResult', strResult);
128
127
  if (!isJson(strResult)) return;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
2
3
  import './index.less';
3
4
  interface WalletUseListProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ProductProps } from '../../type';
2
3
  declare const Product: (props: ProductProps) => JSX.Element;
3
4
  export default Product;
@@ -493,7 +493,7 @@ var AddSerivce = function AddSerivce(props) {
493
493
  isTitle: 1,
494
494
  isSubtitle: 1,
495
495
  isPrice: 1,
496
- isOriginPrice: 0,
496
+ isOriginPrice: 1,
497
497
  isStock: 1
498
498
  }
499
499
  }), /*#__PURE__*/React.createElement(NotAvailable, {
@@ -4,7 +4,6 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
5
5
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
6
6
  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); }); }; }
7
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
8
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
8
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
9
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -31,9 +30,6 @@ import { formatDateToStr, getNextTimeSlice, getDisabledEdit, restoreProductOther
31
30
  import AddServiceVariant from "../addServiceVariant";
32
31
  import TimeBar from "../timeBar";
33
32
  import "./index.less";
34
- import { formatProducts } from "../../../booking/info/service2/utils";
35
- import { getSumTotal } from "../../../booking/components/footer/amount";
36
- import formatProductMessage from "../../utils/formatProductMessage";
37
33
  export var _formatBookingDetail = function _formatBookingDetail(data, modalState) {
38
34
  var _bookings$list, _bookings$list2;
39
35
  var customer_id = data.customer_id,
@@ -178,9 +174,7 @@ var TicketBooking = function TicketBooking() {
178
174
  interaction = _engineContext$appHel.interaction,
179
175
  store = _engineContext$appHel.store,
180
176
  storage = _engineContext$appHel.storage,
181
- Toast = _engineContext$appHel.Toast,
182
- getSymbolic = _engineContext$appHel.getSymbolic,
183
- translation = _engineContext$appHel.translation;
177
+ Toast = _engineContext$appHel.Toast;
184
178
  var _persistentRef = useRef(false);
185
179
  var _initStateRef = useRef({});
186
180
  var _listTimerRef = useRef();
@@ -260,119 +254,6 @@ var TicketBooking = function TicketBooking() {
260
254
  });
261
255
  };
262
256
 
263
- // 商品加购信息发生变化时,需要发送至native端
264
- useEffect(function () {
265
- var _state$modalState, _locales$getText, _interaction$utils5, _interaction$utils5$p;
266
- var cartItems = state === null || state === void 0 || (_state$modalState = state.modalState) === null || _state$modalState === void 0 || (_state$modalState = _state$modalState.service) === null || _state$modalState === void 0 ? void 0 : _state$modalState.value;
267
- if (!Array.isArray(cartItems) || cartItems.length === 0) {
268
- var _interaction$utils4, _interaction$utils4$p;
269
- interaction === null || interaction === void 0 || (_interaction$utils4 = interaction.utils) === null || _interaction$utils4 === void 0 || (_interaction$utils4$p = _interaction$utils4.postMessageToApp) === null || _interaction$utils4$p === void 0 || _interaction$utils4$p.call(_interaction$utils4, {
270
- module: 'cds',
271
- key: 'cartUpdate',
272
- data: {
273
- currency_symbol: getSymbolic(),
274
- total: '0',
275
- // 小计
276
- products: [],
277
- fees: []
278
- }
279
- });
280
- }
281
- var total = getSumTotal(state.modalState, true);
282
- var formatedProducts = [];
283
- try {
284
- formatedProducts = formatProducts(cartItems, state.modalState, false, true, true);
285
- } catch (error) {
286
- console.error(error);
287
- }
288
- console.log('formatedProducts', total, formatedProducts);
289
- var fees = [];
290
- var products = [];
291
- var _iterator = _createForOfIteratorHelper(formatedProducts),
292
- _step;
293
- try {
294
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
295
- var _origin$discount_list;
296
- var item = _step.value;
297
- var id = item.id,
298
- name = item.name,
299
- image = item.image,
300
- origin_total = item.origin_total,
301
- _total = item.total,
302
- num = item.num,
303
- note = item.note,
304
- _origin = item._origin;
305
- _origin === null || _origin === void 0 || (_origin$discount_list = _origin.discount_list) === null || _origin$discount_list === void 0 || _origin$discount_list.forEach(function (dl) {
306
- fees.push({
307
- isReduce: dl.type === 'good_pass',
308
- title: translation(dl === null || dl === void 0 ? void 0 : dl.discount.title),
309
- price: dl.amount,
310
- type: dl.type
311
- });
312
- });
313
- var msg = '';
314
- try {
315
- var _engineContext$appHel3;
316
- msg = formatProductMessage(_objectSpread(_objectSpread({}, item), {}, {
317
- currency_symbol: getSymbolic()
318
- }), (_engineContext$appHel3 = engineContext.appHelper) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.utils);
319
- } catch (error) {
320
- console.error(error);
321
- }
322
- var _item = {
323
- productID: id,
324
- title: name,
325
- cover: image,
326
- // 封面图
327
- price: _total,
328
- // 售价
329
- buyCount: num,
330
- // 购买数量
331
- productFormatMessage: msg,
332
- note: note
333
- };
334
- if (origin_total !== _total) _item.modifyPrice = origin_total; //原价, 注意字段名反了
335
- products.push(_item);
336
- }
337
- } catch (err) {
338
- _iterator.e(err);
339
- } finally {
340
- _iterator.f();
341
- }
342
- console.log('formatedProducts', (_locales$getText = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText === void 0 ? void 0 : _locales$getText(products.length));
343
- if (products.length > 0) {
344
- var _locales$getText2;
345
- fees.unshift({
346
- title: locales.getText('pisell2.product.card.subtotal'),
347
- price: total.productAmount,
348
- type: 'subtotal',
349
- message: (_locales$getText2 = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText2 === void 0 ? void 0 : _locales$getText2(products.length)
350
- });
351
- }
352
- console.log('start post message, config:', {
353
- module: 'cds',
354
- key: 'cartUpdate',
355
- data: {
356
- currency_symbol: getSymbolic(),
357
- total: total.productAmount,
358
- // 小计
359
- products: products,
360
- fees: fees
361
- }
362
- });
363
- interaction === null || interaction === void 0 || (_interaction$utils5 = interaction.utils) === null || _interaction$utils5 === void 0 || (_interaction$utils5$p = _interaction$utils5.postMessageToApp) === null || _interaction$utils5$p === void 0 || _interaction$utils5$p.call(_interaction$utils5, {
364
- module: 'cds',
365
- key: 'cartUpdate',
366
- data: {
367
- currency_symbol: getSymbolic(),
368
- total: total.expectAmount,
369
- // 小计
370
- products: products,
371
- fees: fees
372
- }
373
- });
374
- }, [state.modalState]);
375
-
376
257
  /**
377
258
  * 设置弹窗内的状态
378
259
  */