@pisell/private-materials 6.3.177 → 6.3.178

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 (191) 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 +91 -24
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
  12. package/es/components/appointmentBooking/components/Header/index.js +4 -24
  13. package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
  14. package/es/components/appointmentBooking/hooks.d.ts +1 -17
  15. package/es/components/appointmentBooking/hooks.js +54 -128
  16. package/es/components/appointmentBooking/utils.d.ts +1 -0
  17. package/es/components/appointmentBooking/utils.js +54 -33
  18. package/es/components/booking/addons/model.d.ts +1 -10
  19. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  20. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  21. package/es/components/booking/deposit/index.d.ts +1 -0
  22. package/es/components/booking/forms/model.d.ts +1 -10
  23. package/es/components/booking/forms/single/index.d.ts +1 -0
  24. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  25. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  26. package/es/components/booking/info/date/index.d.ts +1 -0
  27. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  28. package/es/components/booking/info/index.d.ts +1 -0
  29. package/es/components/booking/info/model.d.ts +1 -10
  30. package/es/components/booking/info/notes/index.d.ts +1 -0
  31. package/es/components/booking/info/service/Lists.d.ts +1 -0
  32. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  33. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  34. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  35. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  36. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  37. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  38. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  39. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  40. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  41. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  42. package/es/components/booking/model.d.ts +1 -9
  43. package/es/components/booking/notes/model.d.ts +1 -10
  44. package/es/components/booking/payments/model.d.ts +1 -10
  45. package/es/components/booking/utils.d.ts +2 -2
  46. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  47. package/es/components/eftposPay/amount.d.ts +1 -0
  48. package/es/components/eftposPay/app.d.ts +1 -0
  49. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  50. package/es/components/eftposPay/device.js +4 -11
  51. package/es/components/eftposPay/hooks.d.ts +1 -1
  52. package/es/components/eftposPay/index.d.ts +1 -0
  53. package/es/components/eftposPay/linkly/index.d.ts +1 -0
  54. package/es/components/eftposPay/pay.d.ts +1 -0
  55. package/es/components/eftposPay/store/index.d.ts +1 -1
  56. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  57. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  58. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  59. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  60. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  61. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  62. package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
  63. package/es/components/eventBooking/components/progressBar/index.js +10 -30
  64. package/es/components/eventBooking/index.d.ts +1 -0
  65. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  66. package/es/components/pay/toC/model.d.ts +1 -9
  67. package/es/components/pisellCashCounting/hooks.d.ts +1 -0
  68. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  69. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  70. package/es/components/pisellSelectCustomerModal/RightPanel/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/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  74. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  75. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  76. package/es/components/productExtension/index.d.ts +1 -0
  77. package/es/components/ruleSetting/index.d.ts +1 -0
  78. package/es/components/scanOrder/components/Check/index.js +46 -187
  79. package/es/components/scanOrder/components/Check/index.less +0 -39
  80. package/es/components/scanOrder/components/Content/index.js +72 -189
  81. package/es/components/scanOrder/components/Menu/index.js +5 -11
  82. package/es/components/scanOrder/hooks.js +0 -7
  83. package/es/components/scanOrder/locales.d.ts +0 -75
  84. package/es/components/scanOrder/locales.js +0 -75
  85. package/es/components/schedules/model.d.ts +1 -9
  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/shoppingCart/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 +159 -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/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  96. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  97. package/es/pro/Login2.0/locales.js +1 -1
  98. package/es/utils/buildCartHolderParams.d.ts +92 -0
  99. package/es/utils/buildCartHolderParams.js +191 -0
  100. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  101. package/lib/components/appointmentBooking/components/Cart/Item/index.js +71 -9
  102. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
  103. package/lib/components/appointmentBooking/components/Header/index.js +1 -13
  104. package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
  105. package/lib/components/appointmentBooking/hooks.d.ts +1 -17
  106. package/lib/components/appointmentBooking/hooks.js +16 -91
  107. package/lib/components/appointmentBooking/utils.d.ts +1 -0
  108. package/lib/components/appointmentBooking/utils.js +24 -13
  109. package/lib/components/booking/addons/model.d.ts +1 -10
  110. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  111. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  112. package/lib/components/booking/deposit/index.d.ts +1 -0
  113. package/lib/components/booking/forms/model.d.ts +1 -10
  114. package/lib/components/booking/forms/single/index.d.ts +1 -0
  115. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  116. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  117. package/lib/components/booking/info/date/index.d.ts +1 -0
  118. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  119. package/lib/components/booking/info/index.d.ts +1 -0
  120. package/lib/components/booking/info/model.d.ts +1 -10
  121. package/lib/components/booking/info/notes/index.d.ts +1 -0
  122. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  123. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  124. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  125. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  126. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  127. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  128. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  129. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  130. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  131. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  132. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  133. package/lib/components/booking/model.d.ts +1 -9
  134. package/lib/components/booking/notes/model.d.ts +1 -10
  135. package/lib/components/booking/payments/model.d.ts +1 -10
  136. package/lib/components/booking/utils.d.ts +2 -2
  137. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
  138. package/lib/components/eftposPay/amount.d.ts +1 -0
  139. package/lib/components/eftposPay/app.d.ts +1 -0
  140. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  141. package/lib/components/eftposPay/device.js +4 -6
  142. package/lib/components/eftposPay/hooks.d.ts +1 -1
  143. package/lib/components/eftposPay/index.d.ts +1 -0
  144. package/lib/components/eftposPay/linkly/index.d.ts +1 -0
  145. package/lib/components/eftposPay/pay.d.ts +1 -0
  146. package/lib/components/eftposPay/store/index.d.ts +1 -1
  147. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  148. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  149. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  150. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  151. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  152. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  153. package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
  154. package/lib/components/eventBooking/components/progressBar/index.js +9 -29
  155. package/lib/components/eventBooking/index.d.ts +1 -0
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  157. package/lib/components/pay/toC/model.d.ts +1 -9
  158. package/lib/components/pisellCashCounting/hooks.d.ts +1 -0
  159. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  160. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  161. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  162. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  163. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  164. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  165. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  166. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  167. package/lib/components/productExtension/index.d.ts +1 -0
  168. package/lib/components/ruleSetting/index.d.ts +1 -0
  169. package/lib/components/scanOrder/components/Check/index.js +3 -116
  170. package/lib/components/scanOrder/components/Check/index.less +0 -39
  171. package/lib/components/scanOrder/components/Content/index.js +25 -106
  172. package/lib/components/scanOrder/components/Menu/index.js +0 -2
  173. package/lib/components/scanOrder/hooks.js +0 -7
  174. package/lib/components/scanOrder/locales.d.ts +0 -75
  175. package/lib/components/scanOrder/locales.js +0 -75
  176. package/lib/components/schedules/model.d.ts +1 -9
  177. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  178. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  179. package/lib/components/shoppingCart/index.d.ts +1 -0
  180. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  181. package/lib/components/venueBooking/components/Cart/index.js +92 -14
  182. package/lib/components/venueBooking/components/Voucher/index.js +1 -5
  183. package/lib/components/venueBooking/context.js +12 -2
  184. package/lib/components/venueBooking/locales.d.ts +5 -0
  185. package/lib/components/venueBooking/locales.js +10 -5
  186. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
  187. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  188. package/lib/pro/Login2.0/locales.js +1 -1
  189. package/lib/utils/buildCartHolderParams.d.ts +92 -0
  190. package/lib/utils/buildCartHolderParams.js +167 -0
  191. package/package.json +1 -1
@@ -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
@@ -321,6 +320,9 @@ var useAppointmentBookingStep = () => {
321
320
  if (hasError) {
322
321
  return;
323
322
  }
323
+ if (isLoginTrigger && isEnableSkuHolderRule) {
324
+ return;
325
+ }
324
326
  if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
325
327
  openPolicy({ id: renderItem == null ? void 0 : renderItem.policy_id }, () => {
326
328
  return appointmentBooking.next();
@@ -352,7 +354,13 @@ var useAppointmentBookingStep = () => {
352
354
  ]);
353
355
  }
354
356
  if (res === "success") {
355
- checkHolder();
357
+ if (isFormSubject && !isRetailTemplate && !(appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
358
+ const customer = (0, import_utils2.getCustomer)(utils);
359
+ appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
360
+ customer_id: customer == null ? void 0 : customer.id
361
+ });
362
+ }
363
+ checkHolder(true);
356
364
  }
357
365
  if (res === "close") {
358
366
  setLoading(false);
@@ -434,13 +442,13 @@ var useAppointmentBookingCart = () => {
434
442
  var _a3;
435
443
  return {
436
444
  ...item,
437
- addHolderButtonText: utils == null ? void 0 : utils.translation(bookingSubject == null ? void 0 : bookingSubject.form_name),
445
+ // addHolderButtonText: utils?.translation(formMap?.[formId]?.form?.form?.setting?.title),
438
446
  format: ["HH:mm", "HH:mm"],
439
447
  show_time: true,
440
448
  duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
441
449
  locale,
442
450
  symbol,
443
- holders: (0, import_utils2.formatHolder)(accountLists),
451
+ // holders: formatHolder(accountLists),
444
452
  allowClearHolder: true,
445
453
  allowClearResource: true,
446
454
  isMultipleResource: true
@@ -465,10 +473,11 @@ var useAppointmentBookingLogin = () => {
465
473
  const utils = contextUtils();
466
474
  const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
467
475
  const openLoginModal = (params) => {
468
- const { callback } = params || {};
476
+ const { callback, data = {} } = params || {};
469
477
  utils.action({
470
478
  type: "pisell1.login",
471
479
  data: {
480
+ ...data
472
481
  // type: 'plugin'
473
482
  },
474
483
  callback
@@ -632,89 +641,6 @@ var useAppointmentBookingSetting = () => {
632
641
  bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
633
642
  };
634
643
  };
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
644
  // Annotate the CommonJS export names for ESM import in node:
719
645
  0 && (module.exports = {
720
646
  contextUtils,
@@ -726,7 +652,6 @@ var useInterceptBrowserBack = ({
726
652
  useAppointmentBookingResource,
727
653
  useAppointmentBookingSetting,
728
654
  useAppointmentBookingStep,
729
- useInterceptBrowserBack,
730
655
  useIsSkipResourceStep,
731
656
  useShopDiscount
732
657
  });
@@ -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) && 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,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Deposit: (props: any) => JSX.Element;
2
3
  export default Deposit;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -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
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -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,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Notes: () => JSX.Element | null;
2
3
  export default Notes;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
4
  interface AddServiceProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/actions/index.less';
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/addTimeModal/index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ContactInfoMode: () => JSX.Element;
2
3
  export default ContactInfoMode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ServiceList: ({ onEdit }: {
3
4
  onEdit: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -110,11 +109,4 @@ export declare const walkInData: {
110
109
  id: number;
111
110
  nickname: string;
112
111
  };
113
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
- state: FormState;
115
- } & {
116
- dispatch: (params: {
117
- type: string;
118
- payload: any;
119
- }) => void;
120
- }>;
112
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
166
166
  export declare const getDuration: (duration: number | {
167
167
  type: string;
168
168
  value: number;
169
- }) => number | "flexible" | {
169
+ }) => number | {
170
170
  type: string;
171
171
  value: number;
172
- };
172
+ } | "flexible";
173
173
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
174
174
  export declare const getIsEdit: (state: any) => boolean;
175
175
  export declare type DiscountFilterRejectKey = 'total_credits' | 'per_user_limit' | 'max_per_day' | 'max_per_week' | 'max_per_month';
@@ -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 } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -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" | "stripe" | "payo" | "windcave" | "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 { PosProps } from './const';
2
3
  import './index.less';
3
4
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Linkly: ({ api, onChange }: any) => JSX.Element;
2
3
  export default Linkly;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -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" | "stripe" | "payo" | "windcave" | "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
  interface DepositProps {
2
3
  showTitle?: boolean;
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: () => JSX.Element;
3
4
  export default Header;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectHolderModal: (props: any) => JSX.Element;
2
3
  export default SelectHolderModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Resource: (props: any) => JSX.Element;
2
3
  export default Resource;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Schedule: () => JSX.Element;
2
3
  export default Schedule;
@@ -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;