@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
  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;
@@ -65,7 +65,7 @@ var isOfflinePayment = (type) => {
65
65
  ].includes(type);
66
66
  };
67
67
  var PaymentMethods = (props, ref) => {
68
- var _a, _b, _c;
68
+ var _a;
69
69
  const MWCreditCardRef2 = (0, import_react.useRef)(null);
70
70
  const SuperPayAliPayH5Ref2 = (0, import_react.useRef)(null);
71
71
  const StripePayRef2 = (0, import_react.useRef)(null);
@@ -83,9 +83,9 @@ var PaymentMethods = (props, ref) => {
83
83
  const context = (0, import_useEngineContext.default)();
84
84
  const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
85
85
  const init = async ({ type, payGroup }) => {
86
- var _a2, _b2;
86
+ var _a2, _b;
87
87
  const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
88
- const cards = (_b2 = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b2.length;
88
+ const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.length;
89
89
  if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
90
90
  try {
91
91
  await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
@@ -115,11 +115,10 @@ var PaymentMethods = (props, ref) => {
115
115
  }
116
116
  await onPayByType({ type, payGroup });
117
117
  };
118
- console.log("paymentResult isAppEnv", (_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.isAppEnv) == null ? void 0 : _c.call(_b), interaction, context);
119
118
  (0, import_react.useEffect)(() => {
120
- var _a2, _b2, _c2, _d;
121
- console.log("paymentResult isAppEnv", (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2));
122
- if ((_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.isAppEnv) == null ? void 0 : _d.call(_c2)) {
119
+ var _a2, _b, _c, _d;
120
+ console.log("paymentResult isAppEnv", (_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2));
121
+ if ((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) {
123
122
  interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
124
123
  console.log("paymentResult", strResult);
125
124
  if (!(0, import_utils2.isJson)(strResult)) return;
@@ -135,18 +134,18 @@ var PaymentMethods = (props, ref) => {
135
134
  }
136
135
  }, []);
137
136
  const onPayByType = async ({ type, payGroup }) => {
138
- var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
137
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
139
138
  console.log(type, payGroup);
140
139
  if (type === "mw.apple") {
141
140
  await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
142
141
  return;
143
142
  }
144
143
  if (type === "mw.google") {
145
- await ((_b2 = GooglePayRef2.current) == null ? void 0 : _b2.init({ payGroup }));
144
+ await ((_b = GooglePayRef2.current) == null ? void 0 : _b.init({ payGroup }));
146
145
  return;
147
146
  }
148
147
  if (type === "mw.credit_card") {
149
- (_c2 = MWCreditCardRef2.current) == null ? void 0 : _c2.init({ payGroup });
148
+ (_c = MWCreditCardRef2.current) == null ? void 0 : _c.init({ payGroup });
150
149
  return;
151
150
  }
152
151
  if (type === "superpay.alipay.h5") {
@@ -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;
@@ -45,25 +45,12 @@ var import_utils2 = require("../../utils");
45
45
  var import_addServiceVariant = __toESM(require("../addServiceVariant"));
46
46
  var import_timeBar = __toESM(require("../timeBar"));
47
47
  var import_index = require("./index.less");
48
- var import_utils3 = require("../../../booking/info/service2/utils");
49
- var import_amount = require("../../../booking/components/footer/amount");
50
- var import_formatProductMessage = __toESM(require("../../utils/formatProductMessage"));
51
48
  var TicketBooking = () => {
52
49
  var _a;
53
50
  const [state, setState] = (0, import_miniRedux.useStore)();
54
51
  const engineContext = (0, import_useEngineContext.default)();
55
52
  const { props: engineProps } = engineContext.engine;
56
- const {
57
- action,
58
- isTerminal,
59
- lowcodeRef,
60
- interaction,
61
- store,
62
- storage,
63
- Toast,
64
- getSymbolic,
65
- translation
66
- } = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
53
+ const { action, isTerminal, lowcodeRef, interaction, store, storage, Toast } = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
67
54
  const _persistentRef = (0, import_react.useRef)(false);
68
55
  const _initStateRef = (0, import_react.useRef)({});
69
56
  const _listTimerRef = (0, import_react.useRef)();
@@ -150,112 +137,6 @@ var TicketBooking = () => {
150
137
  intervalSetTime: isInterval
151
138
  });
152
139
  };
153
- (0, import_react.useEffect)(() => {
154
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
155
- const cartItems = (_b = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b.value;
156
- if (!Array.isArray(cartItems) || cartItems.length === 0) {
157
- (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
158
- module: "cds",
159
- key: "cartUpdate",
160
- data: {
161
- currency_symbol: getSymbolic(),
162
- total: "0",
163
- // 小计
164
- products: [],
165
- fees: []
166
- }
167
- });
168
- }
169
- const total = (0, import_amount.getSumTotal)(state.modalState, true);
170
- let formatedProducts = [];
171
- try {
172
- formatedProducts = (0, import_utils3.formatProducts)(
173
- cartItems,
174
- state.modalState,
175
- false,
176
- true,
177
- true
178
- );
179
- } catch (error) {
180
- console.error(error);
181
- }
182
- console.log("formatedProducts", total, formatedProducts);
183
- let fees = [];
184
- let products = [];
185
- for (const item of formatedProducts) {
186
- const { id, name, image, origin_total, total: total2, num, note, _origin } = item;
187
- (_e = _origin == null ? void 0 : _origin.discount_list) == null ? void 0 : _e.forEach((dl) => {
188
- fees.push({
189
- isReduce: dl.type === "good_pass",
190
- title: translation(dl == null ? void 0 : dl.discount.title),
191
- price: dl.amount,
192
- type: dl.type
193
- });
194
- });
195
- let msg = "";
196
- try {
197
- msg = (0, import_formatProductMessage.default)(
198
- {
199
- ...item,
200
- currency_symbol: getSymbolic()
201
- },
202
- (_f = engineContext.appHelper) == null ? void 0 : _f.utils
203
- );
204
- } catch (error) {
205
- console.error(error);
206
- }
207
- let _item = {
208
- productID: id,
209
- title: name,
210
- cover: image,
211
- // 封面图
212
- price: total2,
213
- // 售价
214
- buyCount: num,
215
- // 购买数量
216
- productFormatMessage: msg,
217
- note
218
- };
219
- if (origin_total !== total2) _item.modifyPrice = origin_total;
220
- products.push(_item);
221
- }
222
- console.log(
223
- "formatedProducts",
224
- (_g = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _g(products.length)
225
- );
226
- if (products.length > 0) {
227
- fees.unshift({
228
- title: import_utils.locales.getText("pisell2.product.card.subtotal"),
229
- price: total.productAmount,
230
- type: "subtotal",
231
- message: (_h = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _h(
232
- products.length
233
- )
234
- });
235
- }
236
- console.log("start post message, config:", {
237
- module: "cds",
238
- key: "cartUpdate",
239
- data: {
240
- currency_symbol: getSymbolic(),
241
- total: total.productAmount,
242
- // 小计
243
- products,
244
- fees
245
- }
246
- });
247
- (_j = (_i = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _i.postMessageToApp) == null ? void 0 : _j.call(_i, {
248
- module: "cds",
249
- key: "cartUpdate",
250
- data: {
251
- currency_symbol: getSymbolic(),
252
- total: total.expectAmount,
253
- // 小计
254
- products,
255
- fees
256
- }
257
- });
258
- }, [state.modalState]);
259
140
  const _setModalState = (props) => {
260
141
  var _a2, _b;
261
142
  console.log("同步state到外层", props);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { Dayjs } from 'dayjs';
2
3
  import './index.less';
3
4
  interface ITimeBarProps {