@pisell/private-materials 3.4.5 → 3.4.6

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 (187) 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 +2 -2
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +2 -2
  9. package/es/businessModel/SalesModel/index.d.ts +0 -1
  10. package/es/components/Sales/Summary/utils.d.ts +1 -1
  11. package/es/components/appointmentBooking/components/Cart/utils.js +8 -13
  12. package/es/components/appointmentBooking/components/Content/index.js +105 -19
  13. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  15. package/es/components/appointmentBooking/components/Services/index.js +7 -2
  16. package/es/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
  17. package/es/components/appointmentBooking/components/Voucher/index.js +10 -10
  18. package/es/components/appointmentBooking/hooks.js +28 -30
  19. package/es/components/booking/addons/model.d.ts +1 -10
  20. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  21. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  22. package/es/components/booking/forms/model.d.ts +1 -10
  23. package/es/components/booking/forms/table/index.d.ts +0 -1
  24. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  25. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  26. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  27. package/es/components/booking/info/index.d.ts +0 -1
  28. package/es/components/booking/info/model.d.ts +1 -10
  29. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  30. package/es/components/booking/info/service/like/index.d.ts +0 -1
  31. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  32. package/es/components/booking/model.d.ts +1 -9
  33. package/es/components/booking/notes/model.d.ts +1 -10
  34. package/es/components/booking/payments/model.d.ts +1 -10
  35. package/es/components/booking/utils.d.ts +2 -2
  36. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  37. package/es/components/eftpos/form/index.d.ts +0 -1
  38. package/es/components/eftpos/group/index.d.ts +0 -1
  39. package/es/components/eftpos/hooks.d.ts +0 -1
  40. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  41. package/es/components/eftpos/icon/device.d.ts +0 -1
  42. package/es/components/eftpos/receipt/index.d.ts +0 -1
  43. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  44. package/es/components/eftposPay/amount.d.ts +1 -1
  45. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  46. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  47. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  48. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  49. package/es/components/eftposPay/device.d.ts +1 -1
  50. package/es/components/eftposPay/hooks.d.ts +2 -2
  51. package/es/components/eftposPay/store/index.d.ts +5 -5
  52. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  53. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  54. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  55. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  56. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  57. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  58. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  59. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  60. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  61. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  62. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  63. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  64. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  65. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  66. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  67. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  68. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  69. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  70. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  71. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  72. package/es/components/pay/toC/model.d.ts +1 -9
  73. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  74. package/es/components/productExtension/fields/Actor/index.d.ts +0 -1
  75. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  76. package/es/components/productSelect/components/TabProduct/index.js +103 -39
  77. package/es/components/productSelect/components/TabProduct/tabs/index.less +1 -0
  78. package/es/components/productSelect/index.d.ts +2 -0
  79. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  80. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  81. package/es/components/schedules/model.d.ts +1 -9
  82. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  83. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  84. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  85. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  86. package/es/components/shoppingCart/components/Empty/index.d.ts +0 -1
  87. package/es/components/shoppingCart/components/Render/index.d.ts +0 -1
  88. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  89. package/es/components/wallet/Detail/model.d.ts +1 -13
  90. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  91. package/es/components/wallet/PointCard/model.d.ts +1 -13
  92. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  93. package/es/components/wallet/Voucher/model.d.ts +1 -13
  94. package/es/components/wallet/model.d.ts +1 -9
  95. package/es/components/walletList/index.js +4 -4
  96. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  97. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  98. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  99. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  100. package/lib/components/appointmentBooking/components/Cart/utils.js +0 -10
  101. package/lib/components/appointmentBooking/components/Content/index.js +49 -7
  102. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  103. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  104. package/lib/components/appointmentBooking/components/Services/index.js +6 -1
  105. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -3
  106. package/lib/components/appointmentBooking/components/Voucher/index.js +0 -11
  107. package/lib/components/appointmentBooking/hooks.js +5 -16
  108. package/lib/components/booking/addons/model.d.ts +1 -10
  109. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  110. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  111. package/lib/components/booking/forms/model.d.ts +1 -10
  112. package/lib/components/booking/forms/table/index.d.ts +0 -1
  113. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  114. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  115. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  116. package/lib/components/booking/info/index.d.ts +0 -1
  117. package/lib/components/booking/info/model.d.ts +1 -10
  118. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  119. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  120. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  121. package/lib/components/booking/model.d.ts +1 -9
  122. package/lib/components/booking/notes/model.d.ts +1 -10
  123. package/lib/components/booking/payments/model.d.ts +1 -10
  124. package/lib/components/booking/utils.d.ts +2 -2
  125. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  126. package/lib/components/eftpos/form/index.d.ts +0 -1
  127. package/lib/components/eftpos/group/index.d.ts +0 -1
  128. package/lib/components/eftpos/hooks.d.ts +0 -1
  129. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  130. package/lib/components/eftpos/icon/device.d.ts +0 -1
  131. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  132. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  133. package/lib/components/eftposPay/amount.d.ts +1 -1
  134. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  135. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  136. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  137. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  138. package/lib/components/eftposPay/device.d.ts +1 -1
  139. package/lib/components/eftposPay/hooks.d.ts +2 -2
  140. package/lib/components/eftposPay/store/index.d.ts +5 -5
  141. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  142. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  143. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -1
  144. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  145. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  146. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  147. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  148. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  149. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  150. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  151. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  152. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  153. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  154. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  155. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  156. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  157. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  158. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  159. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  160. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  161. package/lib/components/pay/toC/model.d.ts +1 -9
  162. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  163. package/lib/components/productExtension/fields/Actor/index.d.ts +0 -1
  164. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  165. package/lib/components/productSelect/components/TabProduct/index.js +74 -37
  166. package/lib/components/productSelect/components/TabProduct/tabs/index.less +1 -0
  167. package/lib/components/productSelect/index.d.ts +2 -0
  168. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  169. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  170. package/lib/components/schedules/model.d.ts +1 -9
  171. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  172. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  173. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  174. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  175. package/lib/components/shoppingCart/components/Empty/index.d.ts +0 -1
  176. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -1
  177. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  178. package/lib/components/wallet/Detail/model.d.ts +1 -13
  179. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  180. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  181. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  182. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  183. package/lib/components/wallet/model.d.ts +1 -9
  184. package/lib/components/walletList/index.js +3 -3
  185. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  186. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  187. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
3
2
  export * from './Sales';
4
3
  export default SalesModel;
@@ -30,7 +30,7 @@ export declare const calculateSubtotal: (items: CartItem[]) => string;
30
30
  * @return {*}
31
31
  * @Author: xiangfeng.xue
32
32
  */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
33
+ export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => Decimal | "0.00";
34
34
  /**
35
35
  * 计算所有价格明细
36
36
  * @param items - 购物车商品数组
@@ -13,8 +13,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
13
13
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
14
14
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
15
15
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
16
- import { formatCustomer } from "../../utils";
17
-
18
16
  // 类型声明
19
17
 
20
18
  export var checkLogin = /*#__PURE__*/function () {
@@ -31,17 +29,14 @@ export var checkLogin = /*#__PURE__*/function () {
31
29
  openLoginModal({
32
30
  callback: function callback(status) {
33
31
  if (status === 'success') {
34
- if (!isFormSubject) {
35
- var _utils$storage;
36
- var user = JSON.parse((utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('customer')) || '{}');
37
- var currentUser = formatCustomer(user);
38
- var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
39
- return !(d !== null && d !== void 0 && d.isGuest);
40
- });
41
- appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
42
- } else {
43
- getHolders();
44
- }
32
+ // if (!isFormSubject) {
33
+ // const user = JSON.parse(utils?.storage?.get('customer') || '{}');
34
+ // const currentUser = formatCustomer(user);
35
+ // const meAccount = accountLists?.find((d: any) => !d?.isGuest);
36
+ // appointmentBooking.setLoginAccount(meAccount?.id, currentUser);
37
+ // } else {
38
+ // getHolders();
39
+ // }
45
40
  }
46
41
  }
47
42
  });
@@ -1,9 +1,12 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
1
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
2
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
3
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
4
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
5
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
7
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
8
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
9
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
7
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
11
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -22,12 +25,21 @@ import TimeSlicing from "../TimeSlicing";
22
25
  import Guest from "../Guest";
23
26
  import Form from "../Form";
24
27
  import ConfirmInformation from "../ConfirmInformation";
28
+
29
+ // 创建一个包装组件,将 forwardRef 组件转换为普通组件
30
+ // const Services = (props: any) => {
31
+ // return <ServicesOriginal {...props} />;
32
+ // };
25
33
  import { useAppointmentBookingContext } from "../../context";
26
34
  import PolicyModal from "../../deposit/components/PolicyModal";
27
- import { useAppointmentBookingCart, useAppointmentBookingStep, useAppointmentBookingSetting, useAppointmentBookingLogin, useAppointmentBookingAccount, useShopDiscount } from "../../hooks";
35
+ import { scrollToFirstErrorCard } from "../Resource/utils";
36
+ import { useAppointmentBookingCart, useAppointmentBookingStep, useAppointmentBookingSetting, useAppointmentBookingLogin, useAppointmentBookingAccount, useShopDiscount, contextUtils } from "../../hooks";
28
37
  import "./index.less";
38
+ import useComponents from "../../../../hooks/useComponents";
39
+ import useEngineContext from "../../../../hooks/useEngineContext";
40
+ import { formatCustomer } from "../../utils";
29
41
  var Layout = function Layout() {
30
- var _currentStep$step, _currentStep$step3, _currentStep$step4, _currentStep$step6, _currentStep$step8;
42
+ var _useEngineContext$eng2, _currentStep$step2, _currentStep$step4, _currentStep$step5, _currentStep$step7, _currentStep$step9;
31
43
  var stepRef = useRef();
32
44
  var _ref = useAppointmentBookingContext(),
33
45
  currentStep = _ref.currentStep,
@@ -52,6 +64,16 @@ var Layout = function Layout() {
52
64
  removeStep = _useAppointmentBookin4.removeStep;
53
65
  var _useShopDiscount = useShopDiscount(),
54
66
  shopDiscount = _useShopDiscount.shopDiscount;
67
+ var _useEngineContext$eng = (_useEngineContext$eng2 = useEngineContext().engine) === null || _useEngineContext$eng2 === void 0 ? void 0 : _useEngineContext$eng2.props,
68
+ customPageData = _useEngineContext$eng.customPageData;
69
+ var _useComponents = useComponents({
70
+ components: ['CustomComponent']
71
+ }),
72
+ _useComponents2 = _slicedToArray(_useComponents, 1),
73
+ CustomComponent = _useComponents2[0];
74
+
75
+ // 调试:检查 CustomComponent 是什么
76
+ console.log('CustomComponent:', CustomComponent, _typeof(CustomComponent), CustomComponent === null || CustomComponent === void 0 ? void 0 : CustomComponent.$$typeof);
55
77
 
56
78
  // 不要删除
57
79
  useAppointmentBookingCart();
@@ -60,6 +82,51 @@ var Layout = function Layout() {
60
82
  _useState2 = _slicedToArray(_useState, 2),
61
83
  params = _useState2[0],
62
84
  setParams = _useState2[1];
85
+ var utils = contextUtils();
86
+ var context = useEngineContext();
87
+ var pubsub = context.appHelper.utils.pubsub;
88
+ useEffect(function () {
89
+ var handleLoginSuccess = /*#__PURE__*/function () {
90
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
91
+ var _utils$storage, user, currentUser, accountLists, meAccount;
92
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
93
+ while (1) switch (_context.prev = _context.next) {
94
+ case 0:
95
+ if (isFormSubject) {
96
+ _context.next = 10;
97
+ break;
98
+ }
99
+ user = JSON.parse((utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('customer')) || '{}');
100
+ currentUser = formatCustomer(user);
101
+ _context.next = 5;
102
+ return appointmentBooking.getAccounts();
103
+ case 5:
104
+ accountLists = _context.sent;
105
+ meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
106
+ return !(d !== null && d !== void 0 && d.isGuest);
107
+ });
108
+ appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
109
+ _context.next = 11;
110
+ break;
111
+ case 10:
112
+ if (!isRetailTemplate) {
113
+ getHolders();
114
+ }
115
+ case 11:
116
+ case "end":
117
+ return _context.stop();
118
+ }
119
+ }, _callee);
120
+ }));
121
+ return function handleLoginSuccess() {
122
+ return _ref2.apply(this, arguments);
123
+ };
124
+ }();
125
+ pubsub.subscribe('pisell1.login.success', handleLoginSuccess);
126
+ return function () {
127
+ pubsub.unsubscribe('pisell1.login.success');
128
+ };
129
+ }, []);
63
130
  useEffect(function () {
64
131
  appointmentBooking.removeStep('fill-form');
65
132
  return function () {
@@ -106,6 +173,7 @@ var Layout = function Layout() {
106
173
  }
107
174
  }, [isFormSubject, isLogin, isRetailTemplate]);
108
175
  useEffect(function () {
176
+ var _currentStep$step;
109
177
  if (!(currentStep !== null && currentStep !== void 0 && currentStep.step)) return;
110
178
 
111
179
  // 清空底部按钮的loading
@@ -120,7 +188,12 @@ var Layout = function Layout() {
120
188
  top: 0,
121
189
  behavior: 'smooth'
122
190
  });
123
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key]);
191
+
192
+ // 在确认页,滚动到第一个错误卡片的位置
193
+ if ((currentStep === null || currentStep === void 0 || (_currentStep$step = currentStep.step) === null || _currentStep$step === void 0 ? void 0 : _currentStep$step.key) === 'confirm-information') {
194
+ scrollToFirstErrorCard('.pisell-lowcode-product-card-error');
195
+ }
196
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key]);
124
197
  var components = {
125
198
  // 选择服务
126
199
  'select-service': Services,
@@ -134,8 +207,8 @@ var Layout = function Layout() {
134
207
  'confirm-information': ConfirmInformation
135
208
  };
136
209
  var Com = useMemo(function () {
137
- var _currentStep$step2;
138
- var key = currentStep === null || currentStep === void 0 || (_currentStep$step2 = currentStep.step) === null || _currentStep$step2 === void 0 ? void 0 : _currentStep$step2.key;
210
+ var _currentStep$step3;
211
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key;
139
212
  if (!key) return null;
140
213
  var Com;
141
214
  if (key.startsWith('select-resource')) {
@@ -147,12 +220,25 @@ var Layout = function Layout() {
147
220
  } else {
148
221
  Com = components[key];
149
222
  }
150
- return /*#__PURE__*/React.createElement(Com, {
151
- onChange: setParams,
152
- params: params,
153
- ref: stepRef
154
- });
155
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step3 = currentStep.step) === null || _currentStep$step3 === void 0 ? void 0 : _currentStep$step3.key]);
223
+ if (key === 'select-service') {
224
+ return /*#__PURE__*/React.createElement(CustomComponent, {
225
+ block: customPageData === null || customPageData === void 0 ? void 0 : customPageData.block,
226
+ customComponents: {
227
+ product_list: /*#__PURE__*/React.createElement(Com, {
228
+ onChange: setParams,
229
+ params: params,
230
+ ref: stepRef
231
+ })
232
+ }
233
+ });
234
+ } else {
235
+ return /*#__PURE__*/React.createElement(Com, {
236
+ onChange: setParams,
237
+ params: params,
238
+ ref: stepRef
239
+ });
240
+ }
241
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key]);
156
242
 
157
243
  /**
158
244
  * @title: 动态计算中间内容区域的高度
@@ -176,10 +262,10 @@ var Layout = function Layout() {
176
262
  content.style.overflowY = 'auto';
177
263
  }
178
264
  }
179
- }, [currentStep === null || currentStep === void 0 || (_currentStep$step4 = currentStep.step) === null || _currentStep$step4 === void 0 ? void 0 : _currentStep$step4.key]);
265
+ }, [currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key]);
180
266
  var isShowCartCom = useMemo(function () {
181
- var _currentStep$step5;
182
- var key = currentStep === null || currentStep === void 0 || (_currentStep$step5 = currentStep.step) === null || _currentStep$step5 === void 0 ? void 0 : _currentStep$step5.key;
267
+ var _currentStep$step6;
268
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step6 = currentStep.step) === null || _currentStep$step6 === void 0 ? void 0 : _currentStep$step6.key;
183
269
  if (isMobile()) return null;
184
270
 
185
271
  // 先选择日期,并且当前步骤是选择日期,则不显示购物车
@@ -194,7 +280,7 @@ var Layout = function Layout() {
194
280
  return stepRef === null || stepRef === void 0 || (_stepRef$current = stepRef.current) === null || _stepRef$current === void 0 || (_stepRef$current$next = _stepRef$current.next) === null || _stepRef$current$next === void 0 ? void 0 : _stepRef$current$next.call(_stepRef$current);
195
281
  }
196
282
  }));
197
- }, [isDateSelectedFirst, currentStep === null || currentStep === void 0 || (_currentStep$step6 = currentStep.step) === null || _currentStep$step6 === void 0 ? void 0 : _currentStep$step6.key]);
283
+ }, [isDateSelectedFirst, currentStep === null || currentStep === void 0 || (_currentStep$step7 = currentStep.step) === null || _currentStep$step7 === void 0 ? void 0 : _currentStep$step7.key]);
198
284
 
199
285
  /**
200
286
  * @title: 是否显示底部
@@ -205,14 +291,14 @@ var Layout = function Layout() {
205
291
  * @Date: 2025-05-10 17:42
206
292
  */
207
293
  var isFooter = useMemo(function () {
208
- var _currentStep$step7;
294
+ var _currentStep$step8;
209
295
  if (!isMobile()) return false;
210
- var key = currentStep === null || currentStep === void 0 || (_currentStep$step7 = currentStep.step) === null || _currentStep$step7 === void 0 ? void 0 : _currentStep$step7.key;
296
+ var key = currentStep === null || currentStep === void 0 || (_currentStep$step8 = currentStep.step) === null || _currentStep$step8 === void 0 ? void 0 : _currentStep$step8.key;
211
297
 
212
298
  // 先选日期并且当前步骤是选择日期,则不显示底部
213
299
  if (isDateSelectedFirst && key === 'select-date') return false;
214
300
  return key !== 'confirm-information';
215
- }, [isDateSelectedFirst, currentStep === null || currentStep === void 0 || (_currentStep$step8 = currentStep.step) === null || _currentStep$step8 === void 0 ? void 0 : _currentStep$step8.key]);
301
+ }, [isDateSelectedFirst, currentStep === null || currentStep === void 0 || (_currentStep$step9 = currentStep.step) === null || _currentStep$step9 === void 0 ? void 0 : _currentStep$step9.key]);
216
302
 
217
303
  /**
218
304
  * @title: 获取协议方法需要在组件中定义才能传递给子组件,子组件无法获取到context中的方法
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ onNext, isOpen }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const GuestOptionsModal: (props: any) => JSX.Element;
4
3
  export default GuestOptionsModal;
@@ -183,7 +183,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
183
183
  if (type === 'duration' || appointmentBooking.isCartHasDurationProduct()) {
184
184
  stepList = appointmentBooking.getStepList();
185
185
  hasResourceStep = stepList === null || stepList === void 0 ? void 0 : stepList.find(function (item) {
186
- return (item === null || item === void 0 ? void 0 : item.key) === "select-resource";
186
+ return (item === null || item === void 0 ? void 0 : item.key) === 'select-resource';
187
187
  });
188
188
  if (hasResourceStep) {
189
189
  description = locales.getText('pisell2.appointment.select.time');
@@ -237,12 +237,17 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
237
237
  }
238
238
  return ((_productListBlock = productListBlock) === null || _productListBlock === void 0 ? void 0 : _productListBlock.setting) || {};
239
239
  }, [context]);
240
+ var _isMobile = useMemo(function () {
241
+ if (typeof isMobile === 'function') return isMobile();
242
+ return isMobile;
243
+ }, isMobile);
240
244
  return /*#__PURE__*/React.createElement("div", {
241
245
  className: "appointment-service-wrap"
242
246
  }, /*#__PURE__*/React.createElement(ProductSelect, {
243
247
  dataSource: products,
244
248
  onChange: handleSelectProduct,
245
- scrollDom: isMobile() ? '.parallel-content-wrap' : '.parallel-booking-wrap',
249
+ scrollDom: _isMobile ? '.parallel-content-wrap' : '.parallel-booking-wrap',
250
+ offsetDom: _isMobile ? '' : '.pisell-section-headers',
246
251
  loading: productLoading,
247
252
  emptyDescription: locales.getText('pisell2.appointment.booking.empty.service'),
248
253
  token: {
@@ -12,6 +12,7 @@ import React, { useEffect, useState, forwardRef, useImperativeHandle } from 'rea
12
12
  import { Iconfont, PisellEmpty } from '@pisell/materials';
13
13
  import { locales } from '@pisell/utils';
14
14
  import { useAppointmentBookingContext } from "../../context";
15
+ import { scrollToFirstErrorCard } from "../Resource/utils";
15
16
  import { useAppointmentBookingResource, useAppointmentBookingStep } from "../../hooks";
16
17
  import { Toast } from "../../utils";
17
18
  import "./index.less";
@@ -53,11 +54,14 @@ var TimeSlicing = /*#__PURE__*/forwardRef(function (props, ref) {
53
54
  while (1) switch (_context.prev = _context.next) {
54
55
  case 0:
55
56
  setSelectedTime(val);
56
- _context.next = 3;
57
+
58
+ // 滚动到第一个错误卡片的位置
59
+ scrollToFirstErrorCard('.pisell-lowcode-product-card-error');
60
+ _context.next = 4;
57
61
  return appointmentBooking.submitTimeSlot(val);
58
- case 3:
59
- result = _context.sent;
60
62
  case 4:
63
+ result = _context.sent;
64
+ case 5:
61
65
  case "end":
62
66
  return _context.stop();
63
67
  }
@@ -26,7 +26,6 @@ import { locales } from '@pisell/utils';
26
26
  import useEngineContext from "../../../../hooks/useEngineContext";
27
27
  import { PisellInput, PisellGoodPassCard, PisellText, PisellToast } from '@pisell/materials';
28
28
  import { useAppointmentBooking, useShopDiscount, useAppointmentBookingLogin, useAppointmentBookingAccount } from "../../hooks";
29
- import { formatCustomer } from "../../utils";
30
29
  import "../../../booking/components/voucher/index.less";
31
30
  import "./index.less";
32
31
  var ShopDiscountHooks = {
@@ -179,15 +178,16 @@ var VoucherCard = function VoucherCard(props) {
179
178
  if (!action) return;
180
179
  openLoginModal({
181
180
  callback: function callback(status) {
182
- var _utils$store;
183
- var user = (_utils$store = utils.store) === null || _utils$store === void 0 || (_utils$store = _utils$store.getState()) === null || _utils$store === void 0 || (_utils$store = _utils$store.global) === null || _utils$store === void 0 ? void 0 : _utils$store.userInfo;
184
- var currentUser = formatCustomer(user);
185
- var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
186
- return !(d !== null && d !== void 0 && d.isGuest);
187
- });
188
- if (status === 'success') {
189
- appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
190
- }
181
+ // const user = utils.store?.getState()?.global?.userInfo;
182
+ // const currentUser = formatCustomer(user);
183
+ // const meAccount = accountLists?.find((d: any) => !d?.isGuest);
184
+
185
+ // if (status === 'success') {
186
+ // // appointmentBooking.setLoginAccount(
187
+ // // meAccount?.id,
188
+ // // currentUser
189
+ // // );
190
+ // }
191
191
  }
192
192
  });
193
193
  }
@@ -17,7 +17,7 @@ import { useState, useEffect, useMemo } from 'react';
17
17
  import { locales } from "@pisell/utils";
18
18
  import { usePisellOS } from "../../hooks/useEngineContext";
19
19
  import useEngineContext from "../../hooks/useEngineContext";
20
- import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatCustomer, formatHolder, Toast } from "./utils";
20
+ import { sortResources, getCustomer, currentAppointmentBoard, currentRenderLists, getFormInsertBeforeKey, checkAndGoNext, checkAndMarkCartRenderError, formatHolder, Toast } from "./utils";
21
21
  import { useAppointmentBookingContext } from "./context";
22
22
  import { scrollToFirstErrorCard } from "./components/Resource/utils";
23
23
  export var useAppointmentBooking = function useAppointmentBooking() {
@@ -347,43 +347,41 @@ export var useAppointmentBookingStep = function useAppointmentBookingStep() {
347
347
  // 检测是否登录
348
348
  var checkLogin = /*#__PURE__*/function () {
349
349
  var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
350
- var accountLists;
350
+ var pubsub;
351
351
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
352
352
  while (1) switch (_context3.prev = _context3.next) {
353
353
  case 0:
354
354
  if (isLogin) {
355
- _context3.next = 7;
355
+ _context3.next = 6;
356
356
  break;
357
357
  }
358
- _context3.next = 3;
359
- return appointmentBooking.getAccounts();
360
- case 3:
361
- accountLists = _context3.sent;
358
+ // const accountLists = await appointmentBooking.getAccounts()
359
+ pubsub = utils.pubsub;
360
+ pubsub.once('pisell1.login.success', function () {
361
+ checkHolder();
362
+ });
362
363
  return _context3.abrupt("return", openLoginModal({
363
364
  callback: function callback(status) {
364
- if (status === 'success') {
365
- if (!isFormSubject) {
366
- var _utils$storage;
367
- var user = JSON.parse((utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('customer')) || '{}');
368
- var currentUser = formatCustomer(user);
369
- var meAccount = accountLists === null || accountLists === void 0 ? void 0 : accountLists.find(function (d) {
370
- return !(d !== null && d !== void 0 && d.isGuest);
371
- });
372
- appointmentBooking.setLoginAccount(meAccount === null || meAccount === void 0 ? void 0 : meAccount.id, currentUser);
373
- } else {
374
- if (!isRetailTemplate) {
375
- getHolders();
376
- }
377
- }
378
-
379
- // 继续后续流程
380
- checkHolder();
381
- }
365
+ // if (status === 'success') {
366
+ // // if (!isFormSubject) {
367
+ // // const user = JSON.parse(utils?.storage?.get('customer') || '{}');
368
+ // // const currentUser = formatCustomer(user);
369
+ // // const meAccount = accountLists?.find((d: any) => !d?.isGuest);
370
+ // // appointmentBooking.setLoginAccount(meAccount?.id, currentUser);
371
+ // // } else {
372
+ // // if (!isRetailTemplate) {
373
+ // // getHolders();
374
+ // // }
375
+ // // }
376
+
377
+ // // 继续后续流程
378
+ // checkHolder()
379
+ // }
382
380
  }
383
381
  }));
384
- case 7:
382
+ case 6:
385
383
  return _context3.abrupt("return", checkHolder());
386
- case 8:
384
+ case 7:
387
385
  case "end":
388
386
  return _context3.stop();
389
387
  }
@@ -537,12 +535,12 @@ export var useAppointmentBookingCart = function useAppointmentBookingCart() {
537
535
  bookingSubject = _ref14.bookingSubject;
538
536
  var getCartAndSummary = /*#__PURE__*/function () {
539
537
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
540
- var _utils$storage2;
538
+ var _utils$storage;
541
539
  var locale, symbol, carts, accountLists, newCarts, summary;
542
540
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
543
541
  while (1) switch (_context6.prev = _context6.next) {
544
542
  case 0:
545
- locale = (utils === null || utils === void 0 || (_utils$storage2 = utils.storage) === null || _utils$storage2 === void 0 ? void 0 : _utils$storage2.get('umi_locale')) || 'en-US';
543
+ locale = (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
546
544
  symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
547
545
  _context6.next = 4;
548
546
  return appointmentBooking.getCart();
@@ -621,7 +619,7 @@ export var useAppointmentBookingLogin = function useAppointmentBookingLogin() {
621
619
  utils.action({
622
620
  type: 'pisell1.login',
623
621
  data: {
624
- type: 'plugin'
622
+ // type: 'plugin'
625
623
  },
626
624
  callback: callback
627
625
  });
@@ -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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
3
2
  export default FormItemChildrenWrap;
@@ -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,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
4
3
  export default Table;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface AddServiceVariantProps {
3
2
  globalState: any;
4
3
  setGlobalState: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
3
2
  export default useIsLowSpeedNetwork;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  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;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Like: ({ status, onChange, className, style, }: {
4
3
  style?: any;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;