@pisell/private-materials 6.3.139 → 6.3.141

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 (153) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +5 -5
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +6 -6
  11. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  12. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  15. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  16. package/es/components/booking/forms/footer.d.ts +1 -0
  17. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  18. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  19. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  20. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  21. package/es/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
  22. package/es/components/ecocup/components/CupActionList/index.d.ts +1 -0
  23. package/es/components/ecocup/components/CupActionModal/index.d.ts +1 -0
  24. package/es/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
  25. package/es/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
  26. package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  27. package/es/components/ecocup/components/SearchBar/index.d.ts +1 -0
  28. package/es/components/ecocup/components/SettingModal/index.d.ts +1 -0
  29. package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  30. package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  31. package/es/components/ecocup/cupList/index.d.ts +1 -0
  32. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  33. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  34. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  35. package/es/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  36. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  37. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  38. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  39. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  40. package/es/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  41. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  42. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  43. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  44. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  45. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  46. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  47. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  48. package/es/components/scanOrder/components/Cart/index.js +127 -56
  49. package/es/components/scanOrder/components/Cart/index.less +11 -5
  50. package/es/components/scanOrder/components/Check/index.js +85 -80
  51. package/es/components/scanOrder/components/Content/index.js +356 -164
  52. package/es/components/scanOrder/components/Menu/index.d.ts +11 -0
  53. package/es/components/scanOrder/components/Menu/index.js +140 -169
  54. package/es/components/scanOrder/components/Voucher/index.d.ts +8 -0
  55. package/es/components/scanOrder/components/Voucher/index.js +250 -0
  56. package/es/components/scanOrder/context.js +38 -13
  57. package/es/components/scanOrder/hooks.js +4 -1
  58. package/es/components/scanOrder/locales.d.ts +65 -0
  59. package/es/components/scanOrder/locales.js +65 -0
  60. package/es/components/scanOrder/types.d.ts +10 -0
  61. package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  62. package/es/components/scanOrder/utils/toShoppingCartProducts.js +137 -9
  63. package/es/components/scanOrder/utils/transformProductDetail.js +21 -4
  64. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  65. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  66. package/es/components/venueBooking/components/Addons/index.js +42 -33
  67. package/es/components/venueBooking/components/Cart/index.js +26 -14
  68. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  69. package/es/plus/orderList/components/HandleActions.d.ts +1 -0
  70. package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
  71. package/es/plus/orderList/components/Reset.d.ts +1 -0
  72. package/es/plus/orderList/components/Toolbar.d.ts +1 -0
  73. package/es/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
  74. package/es/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
  75. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  76. package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  77. package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  78. package/es/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  79. package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  80. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  81. package/es/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  82. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  83. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  84. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +1 -0
  85. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  86. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  87. package/lib/components/booking/forms/footer.d.ts +1 -0
  88. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  89. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  90. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  91. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  92. package/lib/components/ecocup/components/AddCustomerModal/index.d.ts +1 -0
  93. package/lib/components/ecocup/components/CupActionList/index.d.ts +1 -0
  94. package/lib/components/ecocup/components/CupActionModal/index.d.ts +1 -0
  95. package/lib/components/ecocup/components/CupStatusModal/index.d.ts +1 -0
  96. package/lib/components/ecocup/components/CustomerAndCupModal/index.d.ts +1 -0
  97. package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
  98. package/lib/components/ecocup/components/SearchBar/index.d.ts +1 -0
  99. package/lib/components/ecocup/components/SettingModal/index.d.ts +1 -0
  100. package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
  101. package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
  102. package/lib/components/ecocup/cupList/index.d.ts +1 -0
  103. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  104. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  105. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  106. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +1 -0
  107. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +1 -0
  108. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  109. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  110. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  111. package/lib/components/eventBooking/components/Provider/Resource/index.d.ts +1 -0
  112. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  113. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  114. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +1 -0
  115. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  116. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  117. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  118. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  119. package/lib/components/scanOrder/components/Cart/index.js +79 -24
  120. package/lib/components/scanOrder/components/Cart/index.less +11 -5
  121. package/lib/components/scanOrder/components/Check/index.js +28 -23
  122. package/lib/components/scanOrder/components/Content/index.js +136 -42
  123. package/lib/components/scanOrder/components/Menu/index.d.ts +11 -0
  124. package/lib/components/scanOrder/components/Menu/index.js +23 -36
  125. package/lib/components/scanOrder/components/Voucher/index.d.ts +8 -0
  126. package/lib/components/scanOrder/components/Voucher/index.js +162 -0
  127. package/lib/components/scanOrder/context.js +21 -10
  128. package/lib/components/scanOrder/hooks.js +4 -1
  129. package/lib/components/scanOrder/locales.d.ts +65 -0
  130. package/lib/components/scanOrder/locales.js +65 -0
  131. package/lib/components/scanOrder/types.d.ts +10 -0
  132. package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  133. package/lib/components/scanOrder/utils/toShoppingCartProducts.js +88 -6
  134. package/lib/components/scanOrder/utils/transformProductDetail.js +10 -3
  135. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  136. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  137. package/lib/components/venueBooking/components/Addons/index.js +15 -8
  138. package/lib/components/venueBooking/components/Cart/index.js +8 -2
  139. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  140. package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
  141. package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
  142. package/lib/plus/orderList/components/Reset.d.ts +1 -0
  143. package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
  144. package/lib/plus/pisellReservation/floorMap/useReservationFloorPlan.d.ts +1 -0
  145. package/lib/plus/saasAttendance/settings/components/membersField/index.d.ts +1 -0
  146. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  147. package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
  148. package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +1 -0
  149. package/lib/plus/skuOptionsSelection/components/OptionsCard/index.d.ts +1 -0
  150. package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +1 -0
  151. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  152. package/lib/pro/pisellPhoneKeyboard/index.d.ts +1 -0
  153. package/package.json +1 -1
@@ -0,0 +1,250 @@
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
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
3
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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 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; }
10
+ 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; }
11
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
13
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
18
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
19
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
+ /**
21
+ * scanOrder 优惠券/Promotion 组件
22
+ * 参照 venueBooking/Voucher 实现,适配 scanOrder 模块的 scanCode / getDiscountList / setDiscountSelected
23
+ * 包含:标题行折叠、PisellGoodPassCard 券列表、未登录登录卡片、Code 输入 + Apply
24
+ */
25
+ import React, { useCallback, useMemo, useState } from 'react';
26
+ import ChevronDown from '@pisell/icon/es/ChevronDown';
27
+ import UserCircle from '@pisell/icon/es/UserCircle';
28
+ import classNames from 'classnames';
29
+ import { Button, message } from 'antd';
30
+ import { locales } from '@pisell/utils';
31
+ import { PisellInput, PisellGoodPassCard, PisellText } from '@pisell/materials';
32
+ import { useScanOrderContext } from "../../context";
33
+ import { useScanOrderLogin } from "../../hooks";
34
+ import "../../../booking/components/voucher/index.less";
35
+ import "../../../appointmentBooking/components/Voucher/index.less";
36
+ /**
37
+ * VoucherCard -- 优惠券/Promotion 区块
38
+ * 嵌入购物车底部,提供券列表展示、勾选、扫码兑码、未登录引导等能力
39
+ */
40
+ export default function VoucherCard() {
41
+ var _useScanOrderContext = useScanOrderContext(),
42
+ discountList = _useScanOrderContext.discountList,
43
+ runModuleAction = _useScanOrderContext.runModuleAction,
44
+ refreshViewModel = _useScanOrderContext.refreshViewModel,
45
+ scanOrderModule = _useScanOrderContext.scanOrderModule;
46
+ var _useScanOrderLogin = useScanOrderLogin(),
47
+ isLogin = _useScanOrderLogin.isLogin,
48
+ openLoginModal = _useScanOrderLogin.openLoginModal;
49
+ var _useState = useState(true),
50
+ _useState2 = _slicedToArray(_useState, 2),
51
+ showDetail = _useState2[0],
52
+ setShowDetail = _useState2[1];
53
+ var _useState3 = useState(''),
54
+ _useState4 = _slicedToArray(_useState3, 2),
55
+ code = _useState4[0],
56
+ setCode = _useState4[1];
57
+
58
+ // 每次 discountList 变化时同步本地可用列表
59
+ var availableData = useMemo(function () {
60
+ return (discountList || []).filter(function (item) {
61
+ return !!item.isAvailable;
62
+ }).map(function (discount) {
63
+ return _objectSpread(_objectSpread({}, discount), {}, {
64
+ isDisabled: discount.isDisabled || discount.isDisabledForProductUsed
65
+ });
66
+ });
67
+ }, [discountList]);
68
+
69
+ /** 从 OS 模块同步最新折扣列表并刷新购物车视图 */
70
+ var syncAfterDiscountChange = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
71
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
72
+ while (1) switch (_context.prev = _context.next) {
73
+ case 0:
74
+ _context.next = 2;
75
+ return refreshViewModel();
76
+ case 2:
77
+ case "end":
78
+ return _context.stop();
79
+ }
80
+ }, _callee);
81
+ })), [refreshViewModel]);
82
+
83
+ /** 扫码/兑码 Apply */
84
+ var onScanCode = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
85
+ var _scanOrderModule$getT, tempOrder, customerId, result, content;
86
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
87
+ while (1) switch (_context2.prev = _context2.next) {
88
+ case 0:
89
+ if (code.trim()) {
90
+ _context2.next = 2;
91
+ break;
92
+ }
93
+ return _context2.abrupt("return");
94
+ case 2:
95
+ _context2.prev = 2;
96
+ tempOrder = scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$getT = scanOrderModule.getTempOrder) === null || _scanOrderModule$getT === void 0 ? void 0 : _scanOrderModule$getT.call(scanOrderModule);
97
+ customerId = (tempOrder === null || tempOrder === void 0 ? void 0 : tempOrder.customer_id) || undefined;
98
+ _context2.next = 7;
99
+ return runModuleAction('scanCode', code, customerId);
100
+ case 7:
101
+ result = _context2.sent;
102
+ if (!(result !== null && result !== void 0 && result.isAvailable)) {
103
+ _context2.next = 14;
104
+ break;
105
+ }
106
+ setCode('');
107
+ _context2.next = 12;
108
+ return syncAfterDiscountChange();
109
+ case 12:
110
+ _context2.next = 16;
111
+ break;
112
+ case 14:
113
+ content = {
114
+ time_limit: locales.getText('pisell2.text.goodpass.code-invalid-expired')
115
+ };
116
+ message.error({
117
+ content: String((result === null || result === void 0 ? void 0 : result.type) === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : content[result === null || result === void 0 ? void 0 : result.unavailableReason] || locales.getText('pisell2.text.goodpass.code-invalid-cart'))
118
+ });
119
+ case 16:
120
+ _context2.next = 22;
121
+ break;
122
+ case 18:
123
+ _context2.prev = 18;
124
+ _context2.t0 = _context2["catch"](2);
125
+ console.warn('[scanOrder] scanCode failed', _context2.t0);
126
+ message.error({
127
+ content: String(locales.getText('pisell2.text.goodpass.code-invalid') || '兑换码无效')
128
+ });
129
+ case 22:
130
+ case "end":
131
+ return _context2.stop();
132
+ }
133
+ }, _callee2, null, [[2, 18]]);
134
+ })), [code, scanOrderModule, runModuleAction, syncAfterDiscountChange]);
135
+
136
+ /** 勾选/取消勾选某张券 */
137
+ var onDiscountChange = useCallback( /*#__PURE__*/function () {
138
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(val) {
139
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
140
+ while (1) switch (_context3.prev = _context3.next) {
141
+ case 0:
142
+ _context3.prev = 0;
143
+ _context3.next = 3;
144
+ return runModuleAction('setDiscountSelected', {
145
+ discountId: val.id,
146
+ isSelected: val.isSelected
147
+ });
148
+ case 3:
149
+ _context3.next = 5;
150
+ return syncAfterDiscountChange();
151
+ case 5:
152
+ _context3.next = 10;
153
+ break;
154
+ case 7:
155
+ _context3.prev = 7;
156
+ _context3.t0 = _context3["catch"](0);
157
+ console.warn('[scanOrder] setDiscountSelected failed', _context3.t0);
158
+ case 10:
159
+ case "end":
160
+ return _context3.stop();
161
+ }
162
+ }, _callee3, null, [[0, 7]]);
163
+ }));
164
+ return function (_x) {
165
+ return _ref3.apply(this, arguments);
166
+ };
167
+ }(), [runModuleAction, syncAfterDiscountChange]);
168
+
169
+ /** 排序:选中的券排前面 */
170
+ var mixedSort = useCallback(function (val) {
171
+ return _toConsumableArray(val).sort(function (a, b) {
172
+ return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
173
+ });
174
+ }, []);
175
+
176
+ /** 未登录时展示的登录引导卡片 */
177
+ var renderLoginCard = function renderLoginCard() {
178
+ if (isLogin) return null;
179
+ return /*#__PURE__*/React.createElement("div", {
180
+ className: "login-card"
181
+ }, /*#__PURE__*/React.createElement(UserCircle, {
182
+ style: {
183
+ fontSize: 28
184
+ }
185
+ }), /*#__PURE__*/React.createElement("div", {
186
+ className: "text-wrapper",
187
+ style: {
188
+ maxWidth: 'none'
189
+ }
190
+ }, /*#__PURE__*/React.createElement(PisellText, {
191
+ className: "login-btn",
192
+ onClick: function onClick() {
193
+ openLoginModal({
194
+ callback: function callback() {}
195
+ });
196
+ }
197
+ }, locales.getText('pisell2.text.goodpass.login')), ' ', /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.text.goodpass.login-tip'))));
198
+ };
199
+ return /*#__PURE__*/React.createElement("div", {
200
+ className: "pisell-lowcode__appointment-booking-voucher-container",
201
+ style: {
202
+ marginTop: '10px'
203
+ }
204
+ }, /*#__PURE__*/React.createElement("div", {
205
+ className: "voucher-title"
206
+ }, /*#__PURE__*/React.createElement("span", {
207
+ className: "voucher-title-left"
208
+ }, locales.getText('pisell2.text.goodpass')), /*#__PURE__*/React.createElement("span", {
209
+ className: "voucher-title-right",
210
+ onClick: function onClick() {
211
+ return setShowDetail(!showDetail);
212
+ }
213
+ }, locales.getText('pisell2.text.details'), ' ', /*#__PURE__*/React.createElement(ChevronDown, {
214
+ className: classNames('voucher-right-icon', {
215
+ show: showDetail
216
+ })
217
+ }))), /*#__PURE__*/React.createElement("div", {
218
+ className: classNames('voucher-detail', {
219
+ show: showDetail
220
+ })
221
+ }, availableData.length > 0 ? /*#__PURE__*/React.createElement(PisellGoodPassCard, {
222
+ style: {
223
+ width: '100%'
224
+ },
225
+ dataSource: availableData,
226
+ mixedSort: mixedSort,
227
+ onChange: onDiscountChange
228
+ }) : null, renderLoginCard(), /*#__PURE__*/React.createElement("div", {
229
+ className: "voucher-code-input-wrapper"
230
+ }, /*#__PURE__*/React.createElement("div", {
231
+ className: "voucher-code-input"
232
+ }, /*#__PURE__*/React.createElement("div", {
233
+ style: {
234
+ whiteSpace: 'nowrap'
235
+ }
236
+ }, locales.getText('pisell2.text.goodpass.code'), ":"), /*#__PURE__*/React.createElement(PisellInput, {
237
+ value: code,
238
+ allowClear: true,
239
+ onChange: function onChange(e) {
240
+ var _e$target;
241
+ return setCode(((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '');
242
+ },
243
+ size: "small",
244
+ placeholder: locales.getText('pisell2.text.goodpass.enter-code')
245
+ })), /*#__PURE__*/React.createElement(Button, {
246
+ size: "small",
247
+ onClick: onScanCode,
248
+ disabled: !code.trim()
249
+ }, locales.getText('pisell2.text.apply')))));
250
+ }
@@ -76,6 +76,10 @@ export function ScanOrderProvider(_ref) {
76
76
  _useState20 = _slicedToArray(_useState19, 2),
77
77
  isCacheHydrated = _useState20[0],
78
78
  setIsCacheHydrated = _useState20[1];
79
+ var _useState21 = useState(null),
80
+ _useState22 = _slicedToArray(_useState21, 2),
81
+ resumeStep = _useState22[0],
82
+ setResumeStep = _useState22[1];
79
83
  var hydratedRef = useRef(false);
80
84
  var stepList = _toConsumableArray(SCAN_ORDER_STEPS);
81
85
 
@@ -94,7 +98,11 @@ export function ScanOrderProvider(_ref) {
94
98
  var clearStepCache = useCallback(function () {
95
99
  var _scanOrderModule$clea;
96
100
  scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$clea = scanOrderModule.clearUIState) === null || _scanOrderModule$clea === void 0 || _scanOrderModule$clea.call(scanOrderModule);
101
+ setResumeStep(null);
97
102
  }, [scanOrderModule]);
103
+ var consumeResumeStep = useCallback(function () {
104
+ setResumeStep(null);
105
+ }, []);
98
106
  var refreshViewModel = /*#__PURE__*/function () {
99
107
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
100
108
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -192,46 +200,61 @@ export function ScanOrderProvider(_ref) {
192
200
  /**
193
201
  * 步骤缓存 hydrate:首次 module 就绪时读取 SDK UI 缓存
194
202
  * - 若缓存里的 entryContext.resourceId 与本次入参不一致,整桶作废(clearUIState)后仅写入新 entryContext
195
- * - 一致则按 pendingStep > step 的顺序恢复 currentStep;pendingStep 命中后立即消费
203
+ * - 一致:按 pendingStep > step 顺序挑恢复目标写入 resumeStep;pendingStep 命中后立即消费
204
+ * - 注意不直接 setCurrentStep,避免 <Menu>/<Check> 在 checkResourceAvailable 装载
205
+ * dineInConfig(含 menu_list_ids)之前 mount 发请求
196
206
  * - 基于 cacheId 分桶,无 cacheId 时 SDK 层降级为 no-op
197
207
  */
198
208
  useEffect(function () {
199
- var _scanOrderModule$getU3, _scanOrderModule$getU4, _scanOrderModule$getU5;
209
+ var _entryContext$resourc, _entryContext$biz, _scanOrderModule$getU3, _cachedEntry$resource, _cachedEntry$biz, _scanOrderModule$getU4, _scanOrderModule$getU5;
200
210
  if (hydratedRef.current || !scanOrderModule) return;
201
211
  hydratedRef.current = true;
202
- var currentResourceId = entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id;
212
+
213
+ // 归一化:宿主侧 resource_id / biz 可能是 number | string | undefined,
214
+ // 严格 === 会让同一桌子因类型差异被误判为「换资源」而清桶(连带 gate 标记一起丢)。
215
+ var normalizedResourceId = String((_entryContext$resourc = entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id) !== null && _entryContext$resourc !== void 0 ? _entryContext$resourc : '');
216
+ var normalizedBiz = String((_entryContext$biz = entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz) !== null && _entryContext$biz !== void 0 ? _entryContext$biz : '');
203
217
  var currentHasOrderId = Boolean(entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id);
204
- var currentBiz = entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz;
205
218
  var cachedEntry = (_scanOrderModule$getU3 = scanOrderModule.getUIState) === null || _scanOrderModule$getU3 === void 0 ? void 0 : _scanOrderModule$getU3.call(scanOrderModule, 'entryContext');
206
- var entrySame = cachedEntry && cachedEntry.resourceId === currentResourceId && cachedEntry.biz === currentBiz;
219
+ var entrySame = Boolean(cachedEntry) && String((_cachedEntry$resource = cachedEntry === null || cachedEntry === void 0 ? void 0 : cachedEntry.resourceId) !== null && _cachedEntry$resource !== void 0 ? _cachedEntry$resource : '') === normalizedResourceId && String((_cachedEntry$biz = cachedEntry === null || cachedEntry === void 0 ? void 0 : cachedEntry.biz) !== null && _cachedEntry$biz !== void 0 ? _cachedEntry$biz : '') === normalizedBiz;
207
220
  if (!entrySame) {
208
221
  var _scanOrderModule$clea2, _scanOrderModule$setU;
209
222
  (_scanOrderModule$clea2 = scanOrderModule.clearUIState) === null || _scanOrderModule$clea2 === void 0 || _scanOrderModule$clea2.call(scanOrderModule);
210
223
  (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'entryContext', {
211
- resourceId: currentResourceId,
224
+ resourceId: normalizedResourceId,
212
225
  hasOrderId: currentHasOrderId,
213
- biz: currentBiz
226
+ biz: normalizedBiz
214
227
  });
215
228
  setIsCacheHydrated(true);
216
229
  return;
217
230
  }
231
+
232
+ // 只有 product / check 才是有效的恢复目标(init 与 error 不恢复)
233
+ var isResumable = function isResumable(s) {
234
+ return s === 'product' || s === 'check';
235
+ };
218
236
  var pending = (_scanOrderModule$getU4 = scanOrderModule.getUIState) === null || _scanOrderModule$getU4 === void 0 ? void 0 : _scanOrderModule$getU4.call(scanOrderModule, 'pendingStep');
219
- if (pending && stepList.includes(pending)) {
237
+ if (isResumable(pending)) {
220
238
  var _scanOrderModule$dele;
221
239
  (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
222
- setCurrentStep(pending);
240
+ setResumeStep(pending);
223
241
  setIsCacheHydrated(true);
224
242
  return;
225
243
  }
226
244
  var cached = (_scanOrderModule$getU5 = scanOrderModule.getUIState) === null || _scanOrderModule$getU5 === void 0 ? void 0 : _scanOrderModule$getU5.call(scanOrderModule, 'step');
227
- if (cached && stepList.includes(cached)) setCurrentStep(cached);
245
+ if (isResumable(cached)) setResumeStep(cached);
228
246
  setIsCacheHydrated(true);
229
247
  }, [scanOrderModule, entryContext === null || entryContext === void 0 ? void 0 : entryContext.resource_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id, entryContext === null || entryContext === void 0 ? void 0 : entryContext.biz]);
230
248
 
231
- /** hydrate 完成后,currentStep 变化即写回缓存 */
249
+ /**
250
+ * hydrate 完成后写回 step 缓存。
251
+ * 注意跳过 `currentStep === 'init'`:hydrate 刚完成时 currentStep 依然是初始 'init',
252
+ * 直接写回会覆盖掉 sessionStorage 里真正有用的 'product' / 'check'。
253
+ */
232
254
  useEffect(function () {
233
255
  var _scanOrderModule$setU2;
234
256
  if (!hydratedRef.current || !isCacheHydrated || !scanOrderModule) return;
257
+ if (currentStep === 'init') return;
235
258
  (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'step', currentStep);
236
259
  }, [currentStep, isCacheHydrated, scanOrderModule]);
237
260
  useEffect(function () {
@@ -395,9 +418,11 @@ export function ScanOrderProvider(_ref) {
395
418
  isCacheHydrated: isCacheHydrated,
396
419
  markGate: markGate,
397
420
  isGatePassed: isGatePassed,
398
- clearStepCache: clearStepCache
421
+ clearStepCache: clearStepCache,
422
+ resumeStep: resumeStep,
423
+ consumeResumeStep: consumeResumeStep
399
424
  };
400
- }, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText, tableName, entryMode, submitDisabledTips, isCacheHydrated, markGate, isGatePassed, clearStepCache]);
425
+ }, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText, tableName, entryMode, submitDisabledTips, isCacheHydrated, markGate, isGatePassed, clearStepCache, resumeStep, consumeResumeStep]);
401
426
  return /*#__PURE__*/React.createElement(ScanOrderContext.Provider, {
402
427
  value: value
403
428
  }, children);
@@ -101,7 +101,10 @@ export var useScanOrderLogin = function useScanOrderLogin() {
101
101
  callback = _ref.callback;
102
102
  utils.action({
103
103
  type: 'pisell1.login',
104
- data: {},
104
+ data: {
105
+ notReload: true,
106
+ type: 'plugin'
107
+ },
105
108
  callback: callback
106
109
  });
107
110
  };
@@ -27,7 +27,20 @@ declare const _default: {
27
27
  'pisell2.scan.order.pickup.ref.placeholder': string;
28
28
  'pisell2.scan.order.products.title': string;
29
29
  'pisell2.scan.order.products.empty.tip': string;
30
+ 'pisell2.scan.order.check.cart.empty.tip': string;
30
31
  'pisell2.scan.order.submit.disabled.default': string;
32
+ 'pisell2.text.goodpass': string;
33
+ 'pisell2.text.goodpass.product-vouchers': string;
34
+ 'pisell2.text.goodpass.view-more': string;
35
+ 'pisell2.text.goodpass.code': string;
36
+ 'pisell2.text.goodpass.enter-code': string;
37
+ 'pisell2.text.goodpass.code-invalid': string;
38
+ 'pisell2.text.goodpass.code-invalid-cart': string;
39
+ 'pisell2.text.goodpass.code-invalid-expired': string;
40
+ 'pisell2.text.goodpass.login': string;
41
+ 'pisell2.text.goodpass.login-tip': string;
42
+ 'pisell2.text.apply': string;
43
+ 'pisell2.text.details': string;
31
44
  'pisell2.appointment.booking.empty.data': string;
32
45
  'pisell2.appointment.deposit.close': string;
33
46
  'pisell2.appointment.policy': string;
@@ -62,7 +75,20 @@ declare const _default: {
62
75
  'pisell2.scan.order.pickup.ref.placeholder': string;
63
76
  'pisell2.scan.order.products.title': string;
64
77
  'pisell2.scan.order.products.empty.tip': string;
78
+ 'pisell2.scan.order.check.cart.empty.tip': string;
65
79
  'pisell2.scan.order.submit.disabled.default': string;
80
+ 'pisell2.text.goodpass': string;
81
+ 'pisell2.text.goodpass.product-vouchers': string;
82
+ 'pisell2.text.goodpass.view-more': string;
83
+ 'pisell2.text.goodpass.code': string;
84
+ 'pisell2.text.goodpass.enter-code': string;
85
+ 'pisell2.text.goodpass.code-invalid': string;
86
+ 'pisell2.text.goodpass.code-invalid-cart': string;
87
+ 'pisell2.text.goodpass.code-invalid-expired': string;
88
+ 'pisell2.text.goodpass.login': string;
89
+ 'pisell2.text.goodpass.login-tip': string;
90
+ 'pisell2.text.apply': string;
91
+ 'pisell2.text.details': string;
66
92
  'pisell2.appointment.booking.empty.data': string;
67
93
  'pisell2.appointment.deposit.close': string;
68
94
  'pisell2.appointment.policy': string;
@@ -97,7 +123,20 @@ declare const _default: {
97
123
  'pisell2.scan.order.pickup.ref.placeholder': string;
98
124
  'pisell2.scan.order.products.title': string;
99
125
  'pisell2.scan.order.products.empty.tip': string;
126
+ 'pisell2.scan.order.check.cart.empty.tip': string;
100
127
  'pisell2.scan.order.submit.disabled.default': string;
128
+ 'pisell2.text.goodpass': string;
129
+ 'pisell2.text.goodpass.product-vouchers': string;
130
+ 'pisell2.text.goodpass.view-more': string;
131
+ 'pisell2.text.goodpass.code': string;
132
+ 'pisell2.text.goodpass.enter-code': string;
133
+ 'pisell2.text.goodpass.code-invalid': string;
134
+ 'pisell2.text.goodpass.code-invalid-cart': string;
135
+ 'pisell2.text.goodpass.code-invalid-expired': string;
136
+ 'pisell2.text.goodpass.login': string;
137
+ 'pisell2.text.goodpass.login-tip': string;
138
+ 'pisell2.text.apply': string;
139
+ 'pisell2.text.details': string;
101
140
  'pisell2.appointment.booking.empty.data': string;
102
141
  'pisell2.appointment.deposit.close': string;
103
142
  'pisell2.appointment.policy': string;
@@ -132,7 +171,20 @@ declare const _default: {
132
171
  'pisell2.scan.order.pickup.ref.placeholder': string;
133
172
  'pisell2.scan.order.products.title': string;
134
173
  'pisell2.scan.order.products.empty.tip': string;
174
+ 'pisell2.scan.order.check.cart.empty.tip': string;
135
175
  'pisell2.scan.order.submit.disabled.default': string;
176
+ 'pisell2.text.goodpass': string;
177
+ 'pisell2.text.goodpass.product-vouchers': string;
178
+ 'pisell2.text.goodpass.view-more': string;
179
+ 'pisell2.text.goodpass.code': string;
180
+ 'pisell2.text.goodpass.enter-code': string;
181
+ 'pisell2.text.goodpass.code-invalid': string;
182
+ 'pisell2.text.goodpass.code-invalid-cart': string;
183
+ 'pisell2.text.goodpass.code-invalid-expired': string;
184
+ 'pisell2.text.goodpass.login': string;
185
+ 'pisell2.text.goodpass.login-tip': string;
186
+ 'pisell2.text.apply': string;
187
+ 'pisell2.text.details': string;
136
188
  'pisell2.appointment.booking.empty.data': string;
137
189
  'pisell2.appointment.deposit.close': string;
138
190
  'pisell2.appointment.policy': string;
@@ -167,7 +219,20 @@ declare const _default: {
167
219
  'pisell2.scan.order.pickup.ref.placeholder': string;
168
220
  'pisell2.scan.order.products.title': string;
169
221
  'pisell2.scan.order.products.empty.tip': string;
222
+ 'pisell2.scan.order.check.cart.empty.tip': string;
170
223
  'pisell2.scan.order.submit.disabled.default': string;
224
+ 'pisell2.text.goodpass': string;
225
+ 'pisell2.text.goodpass.product-vouchers': string;
226
+ 'pisell2.text.goodpass.view-more': string;
227
+ 'pisell2.text.goodpass.code': string;
228
+ 'pisell2.text.goodpass.enter-code': string;
229
+ 'pisell2.text.goodpass.code-invalid': string;
230
+ 'pisell2.text.goodpass.code-invalid-cart': string;
231
+ 'pisell2.text.goodpass.code-invalid-expired': string;
232
+ 'pisell2.text.goodpass.login': string;
233
+ 'pisell2.text.goodpass.login-tip': string;
234
+ 'pisell2.text.apply': string;
235
+ 'pisell2.text.details': string;
171
236
  'pisell2.appointment.booking.empty.data': string;
172
237
  'pisell2.appointment.deposit.close': string;
173
238
  'pisell2.appointment.policy': string;
@@ -27,7 +27,20 @@ export default {
27
27
  'pisell2.scan.order.pickup.ref.placeholder': 'e.g. John',
28
28
  'pisell2.scan.order.products.title': 'Products',
29
29
  'pisell2.scan.order.products.empty.tip': 'Please select products',
30
+ 'pisell2.scan.order.check.cart.empty.tip': 'Please go back to add products',
30
31
  'pisell2.scan.order.submit.disabled.default': 'Order submission is currently disabled.',
32
+ 'pisell2.text.goodpass': 'Promotion',
33
+ 'pisell2.text.goodpass.product-vouchers': 'Product Vouchers',
34
+ 'pisell2.text.goodpass.view-more': 'View More',
35
+ 'pisell2.text.goodpass.code': 'Code',
36
+ 'pisell2.text.goodpass.enter-code': 'Enter Code',
37
+ 'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
38
+ 'pisell2.text.goodpass.code-invalid-cart': 'No eligible items in the cart',
39
+ 'pisell2.text.goodpass.code-invalid-expired': 'Current coupon is not valid in use',
40
+ 'pisell2.text.goodpass.login': 'Login',
41
+ 'pisell2.text.goodpass.login-tip': 'to access your promotions',
42
+ 'pisell2.text.apply': 'Apply',
43
+ 'pisell2.text.details': 'Details',
31
44
  'pisell2.appointment.booking.empty.data': 'No data',
32
45
  'pisell2.appointment.deposit.close': 'Close',
33
46
  'pisell2.appointment.policy': 'You have read and agreed to this policy',
@@ -62,7 +75,20 @@ export default {
62
75
  'pisell2.scan.order.pickup.ref.placeholder': '例如:小明',
63
76
  'pisell2.scan.order.products.title': '商品',
64
77
  'pisell2.scan.order.products.empty.tip': '请选择商品',
78
+ 'pisell2.scan.order.check.cart.empty.tip': '请返回添加商品',
65
79
  'pisell2.scan.order.submit.disabled.default': '当前暂不可下单',
80
+ 'pisell2.text.goodpass': '促销',
81
+ 'pisell2.text.goodpass.product-vouchers': '商品兑换券',
82
+ 'pisell2.text.goodpass.view-more': '查看更多',
83
+ 'pisell2.text.goodpass.code': '券码',
84
+ 'pisell2.text.goodpass.enter-code': '请输入券码',
85
+ 'pisell2.text.goodpass.code-invalid': '当前券码不可用',
86
+ 'pisell2.text.goodpass.code-invalid-cart': '当前购物车中无可用商品',
87
+ 'pisell2.text.goodpass.code-invalid-expired': '当前优惠券不在使用期限内',
88
+ 'pisell2.text.goodpass.login': '登录',
89
+ 'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分',
90
+ 'pisell2.text.apply': '应用',
91
+ 'pisell2.text.details': '详情',
66
92
  'pisell2.appointment.booking.empty.data': '暂无数据',
67
93
  'pisell2.appointment.deposit.close': '关闭',
68
94
  'pisell2.appointment.policy': '您已仔细阅读并同意此协议',
@@ -97,7 +123,20 @@ export default {
97
123
  'pisell2.scan.order.pickup.ref.placeholder': '例如:小明',
98
124
  'pisell2.scan.order.products.title': '商品',
99
125
  'pisell2.scan.order.products.empty.tip': '請選擇商品',
126
+ 'pisell2.scan.order.check.cart.empty.tip': '請返回添加商品',
100
127
  'pisell2.scan.order.submit.disabled.default': '當前暫不可下單',
128
+ 'pisell2.text.goodpass': '促銷',
129
+ 'pisell2.text.goodpass.product-vouchers': '商品兌換券',
130
+ 'pisell2.text.goodpass.view-more': '查看更多',
131
+ 'pisell2.text.goodpass.code': '券碼',
132
+ 'pisell2.text.goodpass.enter-code': '請輸入券碼',
133
+ 'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
134
+ 'pisell2.text.goodpass.code-invalid-cart': '當前購物車中無可用商品',
135
+ 'pisell2.text.goodpass.code-invalid-expired': '當前優惠券不在使用期限內',
136
+ 'pisell2.text.goodpass.login': '登錄',
137
+ 'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分',
138
+ 'pisell2.text.apply': '應用',
139
+ 'pisell2.text.details': '詳情',
101
140
  'pisell2.appointment.booking.empty.data': '暫無數據',
102
141
  'pisell2.appointment.deposit.close': '关闭',
103
142
  'pisell2.appointment.policy': '您已仔細閱讀並同意此協議',
@@ -132,7 +171,20 @@ export default {
132
171
  'pisell2.scan.order.pickup.ref.placeholder': '例: ジョン',
133
172
  'pisell2.scan.order.products.title': '商品',
134
173
  'pisell2.scan.order.products.empty.tip': '商品を選択してください',
174
+ 'pisell2.scan.order.check.cart.empty.tip': '商品を追加するには、前の画面に戻ってください',
135
175
  'pisell2.scan.order.submit.disabled.default': '現在、注文を送信できません。',
176
+ 'pisell2.text.goodpass': 'プロモーション',
177
+ 'pisell2.text.goodpass.product-vouchers': '商品バウチャー',
178
+ 'pisell2.text.goodpass.view-more': 'もっと見る',
179
+ 'pisell2.text.goodpass.code': 'コード',
180
+ 'pisell2.text.goodpass.enter-code': 'コードを入力',
181
+ 'pisell2.text.goodpass.code-invalid': '現在のコードは無効です',
182
+ 'pisell2.text.goodpass.code-invalid-cart': 'カートに適格な項目がありません',
183
+ 'pisell2.text.goodpass.code-invalid-expired': '現在のクーポンは使用期限外です',
184
+ 'pisell2.text.goodpass.login': 'ログイン',
185
+ 'pisell2.text.goodpass.login-tip': 'プロモーションにアクセスするため',
186
+ 'pisell2.text.apply': '適用',
187
+ 'pisell2.text.details': '詳細',
136
188
  'pisell2.appointment.booking.empty.data': 'データなし',
137
189
  'pisell2.appointment.deposit.close': '閉じる',
138
190
  'pisell2.appointment.policy': 'このポリシーを読み、同意しました',
@@ -167,7 +219,20 @@ export default {
167
219
  'pisell2.scan.order.pickup.ref.placeholder': 'Ex.: João',
168
220
  'pisell2.scan.order.products.title': 'Produtos',
169
221
  'pisell2.scan.order.products.empty.tip': 'Selecione produtos',
222
+ 'pisell2.scan.order.check.cart.empty.tip': 'Volte para adicionar produtos',
170
223
  'pisell2.scan.order.submit.disabled.default': 'No momento, não é possível enviar pedidos.',
224
+ 'pisell2.text.goodpass': 'Promoção',
225
+ 'pisell2.text.goodpass.product-vouchers': 'Vales de Produto',
226
+ 'pisell2.text.goodpass.view-more': 'Ver Mais',
227
+ 'pisell2.text.goodpass.code': 'Código',
228
+ 'pisell2.text.goodpass.enter-code': 'Digite o Código',
229
+ 'pisell2.text.goodpass.code-invalid': 'Código atual é inválido',
230
+ 'pisell2.text.goodpass.code-invalid-cart': 'Nenhum item elegível no carrinho',
231
+ 'pisell2.text.goodpass.code-invalid-expired': 'Cupom atual não está no período de uso',
232
+ 'pisell2.text.goodpass.login': 'Entrar',
233
+ 'pisell2.text.goodpass.login-tip': 'para acessar suas promoções',
234
+ 'pisell2.text.apply': 'Aplicar',
235
+ 'pisell2.text.details': 'Detalhes',
171
236
  'pisell2.appointment.booking.empty.data': 'Sem dados',
172
237
  'pisell2.appointment.deposit.close': 'Fechar',
173
238
  'pisell2.appointment.policy': 'Você leu e concordou com esta política',
@@ -42,6 +42,8 @@ export interface ScanOrderContextValue {
42
42
  tableName: string;
43
43
  entryMode: ScanOrderEntryMode;
44
44
  submitDisabledTips: string;
45
+ /** 折扣/优惠券列表(来自 scanOrder 模块 getDiscountList) */
46
+ discountList: any[];
45
47
  isReady: boolean;
46
48
  setCurrentStep: (step: ScanOrderStepKey) => void;
47
49
  setTableName: (name: string) => void;
@@ -62,6 +64,14 @@ export interface ScanOrderContextValue {
62
64
  isGatePassed: (flag: ScanOrderGateKey) => boolean;
63
65
  /** 整桶清空(提交成功 / restoreOrder 等场景) */
64
66
  clearStepCache: () => void;
67
+ /**
68
+ * bootstrap 结束后要恢复到的目标 step(仅记录 `'product' | 'check'`)。
69
+ * hydrate 阶段不直接 `setCurrentStep`,避免在 checkResourceAvailable 之前让
70
+ * `<Menu>` / `<Check>` mount、提前发出缺 menu_list_ids 的请求。
71
+ */
72
+ resumeStep: ScanOrderStepKey | null;
73
+ /** 消费并清空 resumeStep;建议在完成 goToStep 后立刻调用 */
74
+ consumeResumeStep: () => void;
65
75
  }
66
76
  export interface ScanOrderProviderProps {
67
77
  entryContext: ScanOrderEntryContext;
@@ -9,6 +9,7 @@ interface ScanOrderOrderProduct {
9
9
  product_option_item?: any[];
10
10
  product_bundle?: any[];
11
11
  identity_key?: string;
12
+ note?: string;
12
13
  metadata?: Record<string, any>;
13
14
  _origin?: Record<string, any>;
14
15
  [key: string]: any;