@pisell/private-materials 6.3.177 → 6.3.179

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 (213) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +9 -9
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/businessModel/SalesModel/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/Item/index.js +90 -24
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
  12. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Header/index.js +4 -24
  14. package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
  15. package/es/components/appointmentBooking/hooks.d.ts +1 -17
  16. package/es/components/appointmentBooking/hooks.js +55 -128
  17. package/es/components/appointmentBooking/utils.d.ts +1 -0
  18. package/es/components/appointmentBooking/utils.js +54 -33
  19. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  20. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  21. package/es/components/booking/forms/table/index.d.ts +1 -0
  22. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  23. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  24. package/es/components/booking/info/index.d.ts +1 -0
  25. package/es/components/booking/info/service/like/index.d.ts +1 -0
  26. package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  27. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  28. package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  29. package/es/components/eftpos/SettlementModal/Action.d.ts +1 -0
  30. package/es/components/eftpos/SettlementModal/index.d.ts +1 -0
  31. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  32. package/es/components/eftpos/form/index.d.ts +1 -0
  33. package/es/components/eftpos/group/index.d.ts +1 -0
  34. package/es/components/eftpos/hooks.d.ts +1 -0
  35. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  36. package/es/components/eftpos/icon/device.d.ts +1 -0
  37. package/es/components/eftpos/receipt/index.d.ts +1 -0
  38. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  39. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  40. package/es/components/eftposPay/app.d.ts +1 -0
  41. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  42. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  43. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  44. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  45. package/es/components/eftposPay/device.js +4 -11
  46. package/es/components/eftposPay/hooks.d.ts +1 -1
  47. package/es/components/eftposPay/mx51/Action.d.ts +1 -0
  48. package/es/components/eftposPay/store/index.d.ts +1 -1
  49. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  50. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  51. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  52. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  53. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  54. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  55. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  56. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  57. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  58. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  59. package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
  60. package/es/components/eventBooking/components/progressBar/index.js +10 -30
  61. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  62. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  63. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  64. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  65. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  66. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  67. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  68. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  69. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  70. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  71. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  72. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  73. package/es/components/scanOrder/components/Check/index.js +46 -187
  74. package/es/components/scanOrder/components/Check/index.less +0 -39
  75. package/es/components/scanOrder/components/Content/index.js +72 -189
  76. package/es/components/scanOrder/components/Menu/index.js +5 -11
  77. package/es/components/scanOrder/hooks.js +0 -7
  78. package/es/components/scanOrder/locales.d.ts +0 -75
  79. package/es/components/scanOrder/locales.js +0 -75
  80. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  81. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  82. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  83. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  84. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  85. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  86. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  87. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  88. package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
  89. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  90. package/es/components/venueBooking/components/Cart/index.js +165 -46
  91. package/es/components/venueBooking/components/Voucher/index.js +1 -6
  92. package/es/components/venueBooking/context.js +15 -2
  93. package/es/components/venueBooking/locales.d.ts +5 -0
  94. package/es/components/venueBooking/locales.js +10 -5
  95. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  96. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  97. package/es/plus/clientName/index.d.ts +1 -0
  98. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  99. package/es/plus/orderList/components/HandleActions.d.ts +1 -0
  100. package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
  101. package/es/plus/orderList/components/Reset.d.ts +1 -0
  102. package/es/plus/orderList/components/Toolbar.d.ts +1 -0
  103. package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
  104. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  105. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  106. package/es/pro/Login2.0/locales.js +1 -1
  107. package/es/pro/Selector/demo.d.ts +1 -0
  108. package/es/pro/pisellPaymentList/example.d.ts +1 -0
  109. package/es/utils/buildCartHolderParams.d.ts +97 -0
  110. package/es/utils/buildCartHolderParams.js +200 -0
  111. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  112. package/lib/components/appointmentBooking/components/Cart/Item/index.js +70 -9
  113. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
  114. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  115. package/lib/components/appointmentBooking/components/Header/index.js +1 -13
  116. package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
  117. package/lib/components/appointmentBooking/hooks.d.ts +1 -17
  118. package/lib/components/appointmentBooking/hooks.js +17 -91
  119. package/lib/components/appointmentBooking/utils.d.ts +1 -0
  120. package/lib/components/appointmentBooking/utils.js +24 -13
  121. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  122. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  123. package/lib/components/booking/forms/table/index.d.ts +1 -0
  124. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  125. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  126. package/lib/components/booking/info/index.d.ts +1 -0
  127. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  128. package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  129. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  130. package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  131. package/lib/components/eftpos/SettlementModal/Action.d.ts +1 -0
  132. package/lib/components/eftpos/SettlementModal/index.d.ts +1 -0
  133. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  134. package/lib/components/eftpos/form/index.d.ts +1 -0
  135. package/lib/components/eftpos/group/index.d.ts +1 -0
  136. package/lib/components/eftpos/hooks.d.ts +1 -0
  137. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  138. package/lib/components/eftpos/icon/device.d.ts +1 -0
  139. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  140. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  141. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  142. package/lib/components/eftposPay/app.d.ts +1 -0
  143. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  144. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  145. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  146. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  147. package/lib/components/eftposPay/device.js +4 -6
  148. package/lib/components/eftposPay/hooks.d.ts +1 -1
  149. package/lib/components/eftposPay/mx51/Action.d.ts +1 -0
  150. package/lib/components/eftposPay/store/index.d.ts +1 -1
  151. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  152. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  153. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  154. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  155. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  156. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  157. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  158. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  159. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  160. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  161. package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
  162. package/lib/components/eventBooking/components/progressBar/index.js +9 -29
  163. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  164. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  165. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  166. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  167. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  168. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  169. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  170. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  171. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  172. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  173. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  174. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  175. package/lib/components/scanOrder/components/Check/index.js +3 -116
  176. package/lib/components/scanOrder/components/Check/index.less +0 -39
  177. package/lib/components/scanOrder/components/Content/index.js +25 -106
  178. package/lib/components/scanOrder/components/Menu/index.js +0 -2
  179. package/lib/components/scanOrder/hooks.js +0 -7
  180. package/lib/components/scanOrder/locales.d.ts +0 -75
  181. package/lib/components/scanOrder/locales.js +0 -75
  182. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  183. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  184. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  185. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  186. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  187. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  188. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  189. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  190. package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
  191. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  192. package/lib/components/venueBooking/components/Cart/index.js +93 -14
  193. package/lib/components/venueBooking/components/Voucher/index.js +1 -5
  194. package/lib/components/venueBooking/context.js +12 -2
  195. package/lib/components/venueBooking/locales.d.ts +5 -0
  196. package/lib/components/venueBooking/locales.js +10 -5
  197. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  198. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  199. package/lib/plus/clientName/index.d.ts +1 -0
  200. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  201. package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
  202. package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
  203. package/lib/plus/orderList/components/Reset.d.ts +1 -0
  204. package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
  205. package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
  206. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  207. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  208. package/lib/pro/Login2.0/locales.js +1 -1
  209. package/lib/pro/Selector/demo.d.ts +1 -0
  210. package/lib/pro/pisellPaymentList/example.d.ts +1 -0
  211. package/lib/utils/buildCartHolderParams.d.ts +97 -0
  212. package/lib/utils/buildCartHolderParams.js +172 -0
  213. package/package.json +1 -1
@@ -45,6 +45,7 @@ var import_voucher = require("../../../booking/components/voucher/index.less");
45
45
  var import_utils2 = require("../../../booking/utils");
46
46
  var import_index = require("./index.less");
47
47
  var import_ahooks = require("ahooks");
48
+ var import_utils3 = require("../../utils");
48
49
  var ShopDiscountHooks = {
49
50
  onInited: "shopDiscount:onInited",
50
51
  onDestroy: "shopDiscount:onDestroy",
@@ -268,7 +269,16 @@ var VoucherCard = (props) => {
268
269
  onClick: () => {
269
270
  if (!action) return;
270
271
  openLoginModal({
272
+ data: {
273
+ type: "plugin"
274
+ },
271
275
  callback: (status) => {
276
+ if (status === "success") {
277
+ const customer = (0, import_utils3.getCustomer)(utils);
278
+ appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
279
+ customer_id: customer == null ? void 0 : customer.id
280
+ });
281
+ }
272
282
  }
273
283
  });
274
284
  }
@@ -46,6 +46,7 @@ export declare const useAppointmentBookingLogin: () => {
46
46
  isLogin: boolean;
47
47
  openLoginModal: (params: {
48
48
  callback: any;
49
+ data?: any;
49
50
  }) => void;
50
51
  };
51
52
  /**
@@ -105,20 +106,3 @@ export declare const useAppointmentBookingSetting: () => {
105
106
  formName: any;
106
107
  bookingSetting: any;
107
108
  };
108
- export interface UseInterceptBrowserBackOptions {
109
- /** 是否启用拦截,默认 true */
110
- enabled?: boolean;
111
- /** 当前步骤 index(0-based),用于同步 history 栈深度 */
112
- stepIndex: number;
113
- /** 是否还能在流程内后退(如 currentStep.index > 0) */
114
- canGoBack: () => boolean;
115
- /** 流程内后退,对应 Header.handleBack */
116
- onBack: () => void | Promise<void>;
117
- /** 已在第一步时的退出逻辑,对应 Header.handleClose */
118
- onExit?: () => void;
119
- }
120
- export interface UseInterceptBrowserBackResult {
121
- /** 系统返回触发退出确认但被取消时,补回 history trap */
122
- restoreBackTrap: () => void;
123
- }
124
- export declare const useInterceptBrowserBack: ({ enabled, stepIndex, canGoBack, onBack, onExit, }: UseInterceptBrowserBackOptions) => UseInterceptBrowserBackResult;
@@ -38,7 +38,6 @@ __export(hooks_exports, {
38
38
  useAppointmentBookingResource: () => useAppointmentBookingResource,
39
39
  useAppointmentBookingSetting: () => useAppointmentBookingSetting,
40
40
  useAppointmentBookingStep: () => useAppointmentBookingStep,
41
- useInterceptBrowserBack: () => useInterceptBrowserBack,
42
41
  useIsSkipResourceStep: () => useIsSkipResourceStep,
43
42
  useShopDiscount: () => useShopDiscount
44
43
  });
@@ -290,7 +289,7 @@ var useAppointmentBookingStep = () => {
290
289
  { key: "错误信息", value: msg }
291
290
  ]);
292
291
  };
293
- const checkHolder = async () => {
292
+ const checkHolder = async (isLoginTrigger = false) => {
294
293
  try {
295
294
  setLoading(false);
296
295
  if (isRetailTemplate || (appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
@@ -306,7 +305,7 @@ var useAppointmentBookingStep = () => {
306
305
  const appoimentCarts = cartLists.filter(
307
306
  (n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
308
307
  );
309
- const { hasError } = (0, import_utils2.checkAndGoNext)(
308
+ const { hasError, isEnableSkuHolderRule } = (0, import_utils2.checkAndGoNext)(
310
309
  isFormSubject,
311
310
  checkAccount,
312
311
  appoimentCarts
@@ -319,6 +318,10 @@ var useAppointmentBookingStep = () => {
319
318
  ]);
320
319
  }
321
320
  if (hasError) {
321
+ (0, import_utils3.scrollToFirstErrorCard)(".pisell-lowcode-product-card-select-holder-error");
322
+ return;
323
+ }
324
+ if (isLoginTrigger && isEnableSkuHolderRule) {
322
325
  return;
323
326
  }
324
327
  if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
@@ -352,7 +355,13 @@ var useAppointmentBookingStep = () => {
352
355
  ]);
353
356
  }
354
357
  if (res === "success") {
355
- checkHolder();
358
+ if (isFormSubject && !isRetailTemplate && !(appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
359
+ const customer = (0, import_utils2.getCustomer)(utils);
360
+ appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
361
+ customer_id: customer == null ? void 0 : customer.id
362
+ });
363
+ }
364
+ checkHolder(true);
356
365
  }
357
366
  if (res === "close") {
358
367
  setLoading(false);
@@ -434,13 +443,13 @@ var useAppointmentBookingCart = () => {
434
443
  var _a3;
435
444
  return {
436
445
  ...item,
437
- addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name),
446
+ // addHolderButtonText: utils?.translation(formMap?.[formId]?.form?.form?.setting?.title),
438
447
  format: ["HH:mm", "HH:mm"],
439
448
  show_time: true,
440
449
  duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
441
450
  locale,
442
451
  symbol,
443
- holders: (0, import_utils2.formatHolder)(accountLists),
452
+ // holders: formatHolder(accountLists),
444
453
  allowClearHolder: true,
445
454
  allowClearResource: true,
446
455
  isMultipleResource: true
@@ -465,10 +474,11 @@ var useAppointmentBookingLogin = () => {
465
474
  const utils = contextUtils();
466
475
  const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
467
476
  const openLoginModal = (params) => {
468
- const { callback } = params || {};
477
+ const { callback, data = {} } = params || {};
469
478
  utils.action({
470
479
  type: "pisell1.login",
471
480
  data: {
481
+ ...data
472
482
  // type: 'plugin'
473
483
  },
474
484
  callback
@@ -632,89 +642,6 @@ var useAppointmentBookingSetting = () => {
632
642
  bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
633
643
  };
634
644
  };
635
- var APPOINTMENT_BOOKING_BACK_TRAP_KEY = "__pisellAppointmentBookingBackTrap";
636
- var pushAppointmentBookingBackTrap = () => {
637
- window.history.pushState(
638
- { [APPOINTMENT_BOOKING_BACK_TRAP_KEY]: true },
639
- "",
640
- window.location.href
641
- );
642
- };
643
- var useInterceptBrowserBack = ({
644
- enabled = true,
645
- stepIndex,
646
- canGoBack,
647
- onBack,
648
- onExit
649
- }) => {
650
- const optionsRef = (0, import_react.useRef)({ stepIndex, canGoBack, onBack, onExit });
651
- optionsRef.current = { stepIndex, canGoBack, onBack, onExit };
652
- const syncedStepIndexRef = (0, import_react.useRef)(null);
653
- const trapCountRef = (0, import_react.useRef)(0);
654
- const restoreBackTrap = (0, import_react.useCallback)(() => {
655
- if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
656
- pushAppointmentBookingBackTrap();
657
- trapCountRef.current += 1;
658
- }, [enabled]);
659
- (0, import_react.useEffect)(() => {
660
- if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
661
- const targetTrapCount = Math.max(0, stepIndex) + 1;
662
- if (syncedStepIndexRef.current === null) {
663
- syncedStepIndexRef.current = stepIndex;
664
- while (trapCountRef.current < targetTrapCount) {
665
- pushAppointmentBookingBackTrap();
666
- trapCountRef.current += 1;
667
- }
668
- return;
669
- }
670
- if (stepIndex > syncedStepIndexRef.current) {
671
- while (trapCountRef.current < targetTrapCount) {
672
- pushAppointmentBookingBackTrap();
673
- trapCountRef.current += 1;
674
- }
675
- } else if (stepIndex < syncedStepIndexRef.current) {
676
- trapCountRef.current = targetTrapCount;
677
- }
678
- syncedStepIndexRef.current = stepIndex;
679
- }, [enabled, stepIndex]);
680
- (0, import_react.useEffect)(() => {
681
- if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
682
- let isActive = true;
683
- const handlePopState = () => {
684
- if (!isActive) return;
685
- trapCountRef.current = Math.max(0, trapCountRef.current - 1);
686
- const {
687
- canGoBack: canGoBackFn,
688
- onBack: onBackFn,
689
- onExit: onExitFn
690
- } = optionsRef.current;
691
- if (canGoBackFn()) {
692
- void Promise.resolve(onBackFn());
693
- return;
694
- }
695
- onExitFn == null ? void 0 : onExitFn();
696
- };
697
- const handlePageShow = (event) => {
698
- if (!isActive || !event.persisted) return;
699
- const { stepIndex: currentStepIndex } = optionsRef.current;
700
- const targetTrapCount = Math.max(0, currentStepIndex) + 1;
701
- syncedStepIndexRef.current = currentStepIndex;
702
- trapCountRef.current = 0;
703
- while (trapCountRef.current < targetTrapCount) {
704
- pushAppointmentBookingBackTrap();
705
- trapCountRef.current += 1;
706
- }
707
- };
708
- window.addEventListener("popstate", handlePopState, true);
709
- window.addEventListener("pageshow", handlePageShow);
710
- return () => {
711
- isActive = false;
712
- window.removeEventListener("popstate", handlePopState, true);
713
- window.removeEventListener("pageshow", handlePageShow);
714
- };
715
- }, [enabled]);
716
- return { restoreBackTrap };
717
- };
718
645
  // Annotate the CommonJS export names for ESM import in node:
719
646
  0 && (module.exports = {
720
647
  contextUtils,
@@ -726,7 +653,6 @@ var useInterceptBrowserBack = ({
726
653
  useAppointmentBookingResource,
727
654
  useAppointmentBookingSetting,
728
655
  useAppointmentBookingStep,
729
- useInterceptBrowserBack,
730
656
  useIsSkipResourceStep,
731
657
  useShopDiscount
732
658
  });
@@ -182,6 +182,7 @@ export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[
182
182
  */
183
183
  export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
184
184
  hasError: boolean;
185
+ isEnableSkuHolderRule: boolean;
185
186
  updatedCartList: any[];
186
187
  };
187
188
  export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
@@ -436,23 +436,34 @@ var getFormInsertBeforeKey = (currentKey, stepList) => {
436
436
  }
437
437
  };
438
438
  var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
439
+ if (!isFormSubject) return {
440
+ hasError: false,
441
+ isEnableSkuHolderRule: false,
442
+ updatedCartList: carts
443
+ };
439
444
  let hasError = false;
445
+ let isEnableSkuHolderRule = false;
440
446
  let updatedCartList = [...carts];
441
- if (isFormSubject && !checkAccount("holder")) {
442
- updatedCartList = carts == null ? void 0 : carts.map((item) => {
443
- if (!(item == null ? void 0 : item.holder_id)) {
444
- hasError = true;
445
- return {
446
- ...item,
447
- isErrorHolder: true
448
- };
449
- }
450
- return item;
451
- });
452
- }
447
+ updatedCartList = carts == null ? void 0 : carts.map((item) => {
448
+ var _a;
449
+ const holderConfig = ((_a = item == null ? void 0 : item._productInit) == null ? void 0 : _a.holder_config) || {};
450
+ const { status, required, resource_id } = holderConfig || {};
451
+ if (!(item == null ? void 0 : item.holder_id) && status === "enable" && !required && resource_id) {
452
+ isEnableSkuHolderRule = true;
453
+ }
454
+ if (!(item == null ? void 0 : item.holder_id) && status === "enable" && required) {
455
+ hasError = true;
456
+ return {
457
+ ...item,
458
+ isErrorHolder: true
459
+ };
460
+ }
461
+ return item;
462
+ });
453
463
  return {
454
464
  hasError,
455
- updatedCartList
465
+ updatedCartList,
466
+ isEnableSkuHolderRule
456
467
  };
457
468
  };
458
469
  var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
2
3
  export default FormItemChildrenWrap;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
3
4
  export default Table;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
2
3
  export default useIsLowSpeedNetwork;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Like: ({ status, onChange, className, style, }: {
3
4
  style?: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface MoreDropdownProps {
2
3
  locales: any;
3
4
  onClick?: (key: string) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../index.less';
2
3
  interface IProps {
3
4
  onClickAction: (type: string, record: any) => void;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import '../index.less';
2
3
  export declare const useSummary: (locales: any, staticsData: any, isPartner?: boolean) => () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title 渲染动态内容
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const SettlementModal: ({ open, onClose, data, }: {
3
4
  open: boolean;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ input, ...formItemProps }: any) => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 递归循环表单数据
3
4
  * @Author: hongbing.wang
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { RadioGroupProps } from 'antd';
2
3
  export declare const CheckboxGroup: ({ direction, options, ...props }: any) => JSX.Element;
3
4
  export declare const RadioGroup: ({ direction, options, ...props }: RadioGroupProps & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos } from './const';
2
3
  /**
3
4
  * @title: tyro 设备连接
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ color }: {
2
3
  color?: string | undefined;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ color }: {
2
3
  color?: string | undefined;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 自定义组件设置
3
4
  * @description: 自定义组件设置
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.css';
2
3
  /**
3
4
  * @title: 自定义组件设置
@@ -176,7 +176,6 @@ var PaymentMethod = class {
176
176
  this.isFinished = markAsFinished;
177
177
  this.currentQueryApi = null;
178
178
  this.currentActionType = null;
179
- this.currentQueryId = "";
180
179
  }
181
180
  /**
182
181
  * 开始新的操作流程(统一的流程初始化)
@@ -408,7 +407,7 @@ var PaymentMethod = class {
408
407
  if (this.isFinished || !this.shouldContinue()) {
409
408
  return;
410
409
  }
411
- if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.name) === "CanceledError" || (error == null ? void 0 : error.code) === "ERR_CANCELED" || (error == null ? void 0 : error.message) === "REQUEST_TIMEOUT") {
410
+ if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.message) === "REQUEST_TIMEOUT") {
412
411
  paymentLog.addLog({
413
412
  title: "查询轮询结果:error-请求被取消或超时,继续轮询"
414
413
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps, RouteType } from './const';
2
3
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
4
  action: RouteType;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './titlebar.less';
2
3
  declare enum EPopupTitleBarVariantType {
3
4
  BackTitleClose = "back-title-cancel",
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusType } from '../../const';
2
3
  declare const _default: (props: {
3
4
  status: StatusType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: (props: {
2
3
  status: string;
3
4
  pedding?: string;
@@ -117,18 +117,16 @@ var device_default = ({
117
117
  clearTimer();
118
118
  setLoading(false);
119
119
  if (res && Array.isArray(res.list) && res.list.length > 0) {
120
- import_payLog.default.log("设备列表加载成功", { count: res.list.length, device_number });
120
+ import_payLog.default.log("设备列表加载成功", { count: res.list.length, hasDeviceNumber: !!device_number });
121
121
  if (device_number) {
122
122
  const hostDeviceList = res.list.filter(
123
123
  (item) => {
124
124
  var _a, _b;
125
- return [
126
- ...((_a = item == null ? void 0 : item.setting) == null ? void 0 : _a.devices) || [],
127
- ...((_b = item == null ? void 0 : item.setting) == null ? void 0 : _b.iot_devices) || []
128
- ].some((i) => String(i.number) === String(device_number));
125
+ return (_b = (_a = item == null ? void 0 : item.setting) == null ? void 0 : _a.devices) == null ? void 0 : _b.some(
126
+ (i) => i.number === device_number
127
+ );
129
128
  }
130
129
  );
131
- import_payLog.default.log("匹配到设备", { count: hostDeviceList == null ? void 0 : hostDeviceList.length });
132
130
  if (hostDeviceList.length >= 1) {
133
131
  setDataStaus(true);
134
132
  setList(setDeviceList(hostDeviceList));
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly" | "mx51">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly" | "mx51">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ParsedElement } from './types';
2
3
  /**
3
4
  * @title 渲染动态内容
@@ -299,7 +299,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
299
299
  amount?: string | number | undefined;
300
300
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
301
301
  order_id?: string | number | undefined;
302
- eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | "mx51" | undefined;
302
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | "mx51" | undefined;
303
303
  action?: "amount" | "pay" | "deviceList" | undefined;
304
304
  key?: number | undefined;
305
305
  step?: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 获取 Tyro 资源
3
4
  * @description:
@@ -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 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 Status: (props: any) => JSX.Element;
3
4
  export default Status;
@@ -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
  import './index.less';
2
3
  declare const DayItem: (props: any) => JSX.Element;
3
4
  export default DayItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  import { CalendarItemProps } from '../../../../../type';
3
4
  declare const Item: (props: CalendarItemProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Status: (props: any) => JSX.Element;
3
4
  export default Status;
@@ -1,10 +1,5 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- /** 暴露给父组件调用的方法 */
4
- export interface ProgressBarHandle {
5
- /** 等价于点击右上角关闭按钮,会走二次确认逻辑 */
6
- triggerClose: () => void;
7
- }
8
3
  export interface ProgressBarProps {
9
4
  title?: string | number;
10
5
  description?: string;
@@ -16,8 +11,6 @@ export interface ProgressBarProps {
16
11
  style?: React.CSSProperties;
17
12
  onBack?: () => void;
18
13
  onClose?: () => void;
19
- /** 外部 triggerClose 打开确认弹窗后,用户点「继续」时的回调 */
20
- onConfirmCancel?: () => void;
21
14
  }
22
- declare const ProgressBar: React.ForwardRefExoticComponent<ProgressBarProps & React.RefAttributes<ProgressBarHandle>>;
15
+ declare const ProgressBar: React.FC<ProgressBarProps>;
23
16
  export default ProgressBar;