@pisell/private-materials 3.3.66 → 3.3.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.js +7 -7
  8. package/build/lowcode/view.js +7 -7
  9. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/deposit/index.d.ts +1 -0
  15. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  16. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  17. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  18. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  19. package/es/components/booking/info/service/serviceItem/index.d.ts +1 -0
  20. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  21. package/es/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  22. package/es/components/eftposPay/amount.d.ts +1 -1
  23. package/es/components/eftposPay/device.d.ts +1 -1
  24. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  25. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  26. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  27. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  28. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  29. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  30. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  31. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  32. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  33. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  34. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  35. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  36. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  37. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  38. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  39. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  40. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  41. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  42. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  43. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  44. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  45. package/es/components/pisellSelectCustomerModal/index.d.ts +1 -0
  46. package/es/components/productSelect/components/TabProduct/index.d.ts +1 -0
  47. package/es/components/productSelect/components/productGroup/index.d.ts +1 -0
  48. package/es/components/schedules/utils.d.ts +1 -1
  49. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  50. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  51. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  52. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
  53. package/es/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  54. package/es/components/ticketBooking/locales.d.ts +146 -164
  55. package/es/components/ticketBooking/locales.js +147 -195
  56. package/es/components/walletList/index.js +7 -55
  57. package/es/components/walletList/serve.d.ts +0 -8
  58. package/es/components/walletList/serve.js +0 -38
  59. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  60. package/es/utils/index.d.ts +1 -1
  61. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  62. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  63. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  64. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  65. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  66. package/lib/components/appointmentBooking/deposit/index.d.ts +1 -0
  67. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  68. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  69. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  70. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  71. package/lib/components/booking/info/service/serviceItem/index.d.ts +1 -0
  72. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  73. package/lib/components/booking/info2/service/serviceItem/index.d.ts +1 -0
  74. package/lib/components/eftposPay/amount.d.ts +1 -1
  75. package/lib/components/eftposPay/device.d.ts +1 -1
  76. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  77. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +1 -0
  78. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  79. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  80. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  81. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  82. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  83. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  84. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  85. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  86. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  87. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  88. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  89. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  90. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  91. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  92. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  93. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  94. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  95. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  96. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  97. package/lib/components/pisellSelectCustomerModal/index.d.ts +1 -0
  98. package/lib/components/productSelect/components/TabProduct/index.d.ts +1 -0
  99. package/lib/components/productSelect/components/productGroup/index.d.ts +1 -0
  100. package/lib/components/schedules/utils.d.ts +1 -1
  101. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  102. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  103. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  104. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
  105. package/lib/components/ticketBooking/components/timeBar/index.d.ts +1 -0
  106. package/lib/components/ticketBooking/locales.d.ts +146 -164
  107. package/lib/components/ticketBooking/locales.js +4 -22
  108. package/lib/components/walletList/index.js +14 -42
  109. package/lib/components/walletList/serve.d.ts +0 -8
  110. package/lib/components/walletList/serve.js +2 -15
  111. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  112. package/lib/utils/index.d.ts +1 -1
  113. package/package.json +3 -3
  114. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  115. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -53
  116. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  117. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  118. package/es/components/walletList/locales.d.ts +0 -18
  119. package/es/components/walletList/locales.js +0 -17
  120. package/es/components/walletList/status.d.ts +0 -38
  121. package/es/components/walletList/status.js +0 -47
  122. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  123. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -76
  124. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  125. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  126. package/lib/components/walletList/locales.d.ts +0 -18
  127. package/lib/components/walletList/locales.js +0 -41
  128. package/lib/components/walletList/status.d.ts +0 -38
  129. package/lib/components/walletList/status.js +0 -66
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel, onNext }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: () => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Deposit: (props: any) => JSX.Element;
3
4
  export default Deposit;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
3
4
  export default ServiceItem;
@@ -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: "page" | "success" | "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;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
3
4
  export default Total;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: () => JSX.Element;
3
4
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Event: () => JSX.Element;
3
4
  export default Event;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Footer: () => JSX.Element;
3
4
  export default Footer;
@@ -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
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Resource: () => JSX.Element;
3
4
  export default Resource;
@@ -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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingOptions: (props: {
2
3
  onChangeBookingOption?: ((bookingOption: any) => void) | undefined;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CalendarDataItem } from '../../type';
2
3
  declare type CalendarItemProps = {
3
4
  month: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ScheduleTimeItem: ({ timeList }: any) => JSX.Element;
3
4
  export default ScheduleTimeItem;
@@ -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;
@@ -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 './index.less';
2
3
  interface CustomerListProps {
3
4
  value: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PopoverProps } from 'antd';
2
3
  import { CustomerCardProps } from './CustomerCard';
3
4
  import './index.less';
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const TabProduct: (props: any) => JSX.Element;
2
3
  export default TabProduct;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare type BoolConfigVal = 0 | 1;
3
4
  export interface ProductCardConfig {
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: () => JSX.Element;
3
4
  export default Cart;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
2
3
  export default useAddService;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (key?: number | undefined) => JSX.Element | null;
2
3
  export default useClearCart;
@@ -11,7 +11,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
11
11
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
12
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
13
13
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
- 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; } } }; }
15
14
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
16
15
  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."); }
17
16
  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
  var TicketBooking = function TicketBooking() {
38
34
  var _engineContext$appHel2;
39
35
  var _useStore = useStore(),
@@ -49,9 +45,7 @@ var TicketBooking = function TicketBooking() {
49
45
  interaction = _engineContext$appHel.interaction,
50
46
  store = _engineContext$appHel.store,
51
47
  storage = _engineContext$appHel.storage,
52
- Toast = _engineContext$appHel.Toast,
53
- getSymbolic = _engineContext$appHel.getSymbolic,
54
- translation = _engineContext$appHel.translation;
48
+ Toast = _engineContext$appHel.Toast;
55
49
  var _persistentRef = useRef(false);
56
50
  var _initStateRef = useRef({});
57
51
  var _listTimerRef = useRef();
@@ -131,119 +125,6 @@ var TicketBooking = function TicketBooking() {
131
125
  });
132
126
  };
133
127
 
134
- // 商品加购信息发生变化时,需要发送至native端
135
- useEffect(function () {
136
- var _state$modalState, _locales$getText, _interaction$utils5, _interaction$utils5$p;
137
- 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;
138
- if (!Array.isArray(cartItems) || cartItems.length === 0) {
139
- var _interaction$utils4, _interaction$utils4$p;
140
- 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, {
141
- module: 'cds',
142
- key: 'cartUpdate',
143
- data: {
144
- currency_symbol: getSymbolic(),
145
- total: '0',
146
- // 小计
147
- products: [],
148
- fees: []
149
- }
150
- });
151
- }
152
- var total = getSumTotal(state.modalState, true);
153
- var formatedProducts = [];
154
- try {
155
- formatedProducts = formatProducts(cartItems, state.modalState, false, true, true);
156
- } catch (error) {
157
- console.error(error);
158
- }
159
- console.log('formatedProducts', total, formatedProducts);
160
- var fees = [];
161
- var products = [];
162
- var _iterator = _createForOfIteratorHelper(formatedProducts),
163
- _step;
164
- try {
165
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
166
- var _origin$discount_list;
167
- var item = _step.value;
168
- var id = item.id,
169
- name = item.name,
170
- image = item.image,
171
- origin_total = item.origin_total,
172
- _total = item.total,
173
- num = item.num,
174
- note = item.note,
175
- _origin = item._origin;
176
- _origin === null || _origin === void 0 || (_origin$discount_list = _origin.discount_list) === null || _origin$discount_list === void 0 || _origin$discount_list.forEach(function (dl) {
177
- fees.push({
178
- isReduce: dl.type === 'good_pass',
179
- title: translation(dl === null || dl === void 0 ? void 0 : dl.discount.title),
180
- price: dl.amount,
181
- type: dl.type
182
- });
183
- });
184
- var msg = '';
185
- try {
186
- var _engineContext$appHel3;
187
- msg = formatProductMessage(_objectSpread(_objectSpread({}, item), {}, {
188
- currency_symbol: getSymbolic()
189
- }), (_engineContext$appHel3 = engineContext.appHelper) === null || _engineContext$appHel3 === void 0 ? void 0 : _engineContext$appHel3.utils);
190
- } catch (error) {
191
- console.error(error);
192
- }
193
- var _item = {
194
- productID: id,
195
- title: name,
196
- cover: image,
197
- // 封面图
198
- price: _total,
199
- // 售价
200
- buyCount: num,
201
- // 购买数量
202
- productFormatMessage: msg,
203
- note: note
204
- };
205
- if (origin_total !== _total) _item.modifyPrice = origin_total; //原价, 注意字段名反了
206
- products.push(_item);
207
- }
208
- } catch (err) {
209
- _iterator.e(err);
210
- } finally {
211
- _iterator.f();
212
- }
213
- console.log('formatedProducts', (_locales$getText = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText === void 0 ? void 0 : _locales$getText(products.length));
214
- if (products.length > 0) {
215
- var _locales$getText2;
216
- fees.unshift({
217
- title: locales.getText('pisell2.product.card.subtotal'),
218
- price: total.productAmount,
219
- type: 'subtotal',
220
- message: (_locales$getText2 = locales.getText('pisell2.product.card.cart-items')) === null || _locales$getText2 === void 0 ? void 0 : _locales$getText2(products.length)
221
- });
222
- }
223
- console.log('start post message, config:', {
224
- module: 'cds',
225
- key: 'cartUpdate',
226
- data: {
227
- currency_symbol: getSymbolic(),
228
- total: total.productAmount,
229
- // 小计
230
- products: products,
231
- fees: fees
232
- }
233
- });
234
- 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, {
235
- module: 'cds',
236
- key: 'cartUpdate',
237
- data: {
238
- currency_symbol: getSymbolic(),
239
- total: total.expectAmount,
240
- // 小计
241
- products: products,
242
- fees: fees
243
- }
244
- });
245
- }, [state.modalState]);
246
-
247
128
  /**
248
129
  * 设置弹窗内的状态
249
130
  */
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Dayjs } from 'dayjs';
2
3
  import './index.less';
3
4
  interface ITimeBarProps {