@pisell/private-materials 6.3.138 → 6.3.140

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 (329) 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 +2 -2
  6. package/build/lowcode/preview.js +153 -426
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +10 -10
  11. package/es/businessModel/SalesModel/index.d.ts +0 -1
  12. package/es/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +24 -5
  13. package/es/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
  14. package/es/components/booking/addons/model.d.ts +10 -1
  15. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  16. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  17. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  18. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  19. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  20. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  21. package/es/components/booking/deposit/index.d.ts +0 -1
  22. package/es/components/booking/forms/model.d.ts +10 -1
  23. package/es/components/booking/forms/table/index.d.ts +1 -0
  24. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  25. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  26. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  27. package/es/components/booking/info/index.d.ts +0 -1
  28. package/es/components/booking/info/model.d.ts +10 -1
  29. package/es/components/booking/info/service/Lists.d.ts +0 -1
  30. package/es/components/booking/info/service/addService/index.d.ts +0 -1
  31. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  32. package/es/components/booking/info/service/like/index.d.ts +1 -0
  33. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  34. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  35. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  36. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  37. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  38. package/es/components/booking/model.d.ts +9 -1
  39. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  40. package/es/components/booking/notes/model.d.ts +10 -1
  41. package/es/components/booking/payments/model.d.ts +10 -1
  42. package/es/components/booking/utils.d.ts +2 -2
  43. package/es/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
  44. package/es/components/ecocup/components/CustomerCard/index.d.ts +1 -0
  45. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  46. package/es/components/eftpos/form/index.d.ts +1 -0
  47. package/es/components/eftpos/group/index.d.ts +1 -0
  48. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  49. package/es/components/eftpos/icon/device.d.ts +1 -0
  50. package/es/components/eftpos/pos.d.ts +1 -0
  51. package/es/components/eftpos/receipt/index.d.ts +1 -0
  52. package/es/components/eftposPay/app.d.ts +0 -1
  53. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  54. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  55. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  56. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  57. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  58. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  59. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  60. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  61. package/es/components/eftposPay/device.d.ts +0 -1
  62. package/es/components/eftposPay/index.d.ts +0 -1
  63. package/es/components/eftposPay/linkly/index.d.ts +0 -1
  64. package/es/components/eftposPay/pay.d.ts +0 -1
  65. package/es/components/eftposPay/payo/config.d.ts +1 -0
  66. package/es/components/eftposPay/tip.d.ts +1 -0
  67. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  68. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  69. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  70. package/es/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  72. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  76. package/es/components/eventBooking/index.d.ts +0 -1
  77. package/es/components/login/index.d.ts +1 -0
  78. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -5
  79. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  80. package/es/components/pay/toC/model.d.ts +9 -1
  81. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  82. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  83. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  84. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  85. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  86. package/es/components/productExtension/index.d.ts +0 -1
  87. package/es/components/ruleSetting/index.d.ts +0 -1
  88. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  89. package/es/components/scanOrder/components/Cart/index.d.ts +2 -0
  90. package/es/components/scanOrder/components/Cart/index.js +181 -76
  91. package/es/components/scanOrder/components/Cart/index.less +72 -13
  92. package/es/components/scanOrder/components/Check/index.js +261 -75
  93. package/es/components/scanOrder/components/Check/index.less +30 -0
  94. package/es/components/scanOrder/components/Content/index.js +382 -144
  95. package/es/components/scanOrder/components/Footer/index.d.ts +2 -0
  96. package/es/components/scanOrder/components/Footer/index.js +4 -2
  97. package/es/components/scanOrder/components/Footer/index.less +16 -7
  98. package/es/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
  99. package/es/components/scanOrder/components/FulfillmentMode/index.js +90 -0
  100. package/es/components/scanOrder/components/FulfillmentMode/index.less +40 -0
  101. package/es/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
  102. package/es/components/scanOrder/components/ManualPickupRefModal/index.js +87 -0
  103. package/es/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
  104. package/es/components/scanOrder/components/Menu/index.d.ts +11 -0
  105. package/es/components/scanOrder/components/Menu/index.js +140 -169
  106. package/es/components/scanOrder/components/Voucher/index.d.ts +8 -0
  107. package/es/components/scanOrder/components/Voucher/index.js +250 -0
  108. package/es/components/scanOrder/context.js +123 -3
  109. package/es/components/scanOrder/hooks.js +4 -1
  110. package/es/components/scanOrder/locales.d.ts +120 -0
  111. package/es/components/scanOrder/locales.js +120 -0
  112. package/es/components/scanOrder/types.d.ts +33 -0
  113. package/es/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  114. package/es/components/scanOrder/utils/toShoppingCartProducts.js +137 -9
  115. package/es/components/scanOrder/utils/transformProductDetail.js +21 -4
  116. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  117. package/es/components/schedules/calendar/index.d.ts +1 -0
  118. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  119. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  120. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  121. package/es/components/schedules/model.d.ts +9 -1
  122. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  123. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  124. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  125. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  126. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  127. package/es/components/schedules/products/index.d.ts +1 -0
  128. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  129. package/es/components/schedules/products/list/index.d.ts +1 -0
  130. package/es/components/schedules/resources/index.d.ts +1 -0
  131. package/es/components/schedules/resources/list/index.d.ts +1 -0
  132. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  133. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  134. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  135. package/es/components/schedules/schedules/index.d.ts +1 -0
  136. package/es/components/systemSettings/registry/components/GroupModal.js +8 -1
  137. package/es/components/systemSettings/registry/components/ItemModal.js +3 -0
  138. package/es/components/systemSettings/registry/index.js +3 -1
  139. package/es/components/systemSettings/registry/services.d.ts +2 -0
  140. package/es/components/systemSettings/registry/types.d.ts +3 -0
  141. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  142. package/es/components/venueBooking/components/Addons/index.js +42 -33
  143. package/es/components/venueBooking/components/Cart/index.js +26 -14
  144. package/es/components/venueBooking/components/VenueSelection/components/TimeGrid.js +129 -17
  145. package/es/components/venueBooking/context.js +6 -6
  146. package/es/components/venueBooking/hooks.d.ts +16 -3
  147. package/es/components/venueBooking/hooks.js +16 -4
  148. package/es/components/venueBooking/types.d.ts +19 -2
  149. package/es/hooks/usePaymentLogger.d.ts +1 -0
  150. package/es/index.d.ts +1 -1
  151. package/es/index.js +1 -1
  152. package/es/plus/clientName/index.d.ts +1 -0
  153. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  154. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  155. package/es/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
  156. package/es/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  157. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  158. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  159. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  160. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  161. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  162. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  163. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  164. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  165. package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
  166. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  167. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  168. package/es/pro/Selector/demo.d.ts +1 -0
  169. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  170. package/lib/components/authentication/admin/ChannelAuthSetting/OnlineShopAuth/index.js +19 -4
  171. package/lib/components/authentication/admin/ChannelAuthSetting/index.js +1 -1
  172. package/lib/components/booking/addons/model.d.ts +10 -1
  173. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  174. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  175. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  176. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  177. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  178. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  179. package/lib/components/booking/deposit/index.d.ts +0 -1
  180. package/lib/components/booking/forms/model.d.ts +10 -1
  181. package/lib/components/booking/forms/table/index.d.ts +1 -0
  182. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  183. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  184. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  185. package/lib/components/booking/info/index.d.ts +0 -1
  186. package/lib/components/booking/info/model.d.ts +10 -1
  187. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  188. package/lib/components/booking/info/service/addService/index.d.ts +0 -1
  189. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  190. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  191. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  192. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  193. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  194. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  195. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  196. package/lib/components/booking/model.d.ts +9 -1
  197. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  198. package/lib/components/booking/notes/model.d.ts +10 -1
  199. package/lib/components/booking/payments/model.d.ts +10 -1
  200. package/lib/components/booking/utils.d.ts +2 -2
  201. package/lib/components/ecocup/components/CupInfoCard/index.d.ts +1 -0
  202. package/lib/components/ecocup/components/CustomerCard/index.d.ts +1 -0
  203. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  204. package/lib/components/eftpos/form/index.d.ts +1 -0
  205. package/lib/components/eftpos/group/index.d.ts +1 -0
  206. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  207. package/lib/components/eftpos/icon/device.d.ts +1 -0
  208. package/lib/components/eftpos/pos.d.ts +1 -0
  209. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  210. package/lib/components/eftposPay/app.d.ts +0 -1
  211. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  212. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -1
  213. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  214. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  215. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  216. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  217. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  218. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  219. package/lib/components/eftposPay/device.d.ts +0 -1
  220. package/lib/components/eftposPay/index.d.ts +0 -1
  221. package/lib/components/eftposPay/linkly/index.d.ts +0 -1
  222. package/lib/components/eftposPay/pay.d.ts +0 -1
  223. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  224. package/lib/components/eftposPay/tip.d.ts +1 -0
  225. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  226. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  227. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  228. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +0 -1
  229. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  230. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  231. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  232. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  233. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  234. package/lib/components/eventBooking/index.d.ts +0 -1
  235. package/lib/components/login/index.d.ts +1 -0
  236. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +2 -0
  237. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  238. package/lib/components/pay/toC/model.d.ts +9 -1
  239. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  240. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  241. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  242. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +0 -1
  243. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  244. package/lib/components/productExtension/index.d.ts +0 -1
  245. package/lib/components/ruleSetting/index.d.ts +0 -1
  246. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  247. package/lib/components/scanOrder/components/Cart/index.d.ts +2 -0
  248. package/lib/components/scanOrder/components/Cart/index.js +117 -28
  249. package/lib/components/scanOrder/components/Cart/index.less +72 -13
  250. package/lib/components/scanOrder/components/Check/index.js +109 -15
  251. package/lib/components/scanOrder/components/Check/index.less +30 -0
  252. package/lib/components/scanOrder/components/Content/index.js +175 -48
  253. package/lib/components/scanOrder/components/Footer/index.d.ts +2 -0
  254. package/lib/components/scanOrder/components/Footer/index.js +2 -2
  255. package/lib/components/scanOrder/components/Footer/index.less +16 -7
  256. package/lib/components/scanOrder/components/FulfillmentMode/index.d.ts +11 -0
  257. package/lib/components/scanOrder/components/FulfillmentMode/index.js +96 -0
  258. package/lib/components/scanOrder/components/FulfillmentMode/index.less +40 -0
  259. package/lib/components/scanOrder/components/ManualPickupRefModal/index.d.ts +16 -0
  260. package/lib/components/scanOrder/components/ManualPickupRefModal/index.js +116 -0
  261. package/lib/components/scanOrder/components/ManualPickupRefModal/index.less +61 -0
  262. package/lib/components/scanOrder/components/Menu/index.d.ts +11 -0
  263. package/lib/components/scanOrder/components/Menu/index.js +23 -36
  264. package/lib/components/scanOrder/components/Voucher/index.d.ts +8 -0
  265. package/lib/components/scanOrder/components/Voucher/index.js +162 -0
  266. package/lib/components/scanOrder/context.js +91 -2
  267. package/lib/components/scanOrder/hooks.js +4 -1
  268. package/lib/components/scanOrder/locales.d.ts +120 -0
  269. package/lib/components/scanOrder/locales.js +120 -0
  270. package/lib/components/scanOrder/types.d.ts +33 -0
  271. package/lib/components/scanOrder/utils/toShoppingCartProducts.d.ts +1 -0
  272. package/lib/components/scanOrder/utils/toShoppingCartProducts.js +88 -6
  273. package/lib/components/scanOrder/utils/transformProductDetail.js +10 -3
  274. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  275. package/lib/components/schedules/calendar/index.d.ts +1 -0
  276. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  277. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  278. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  279. package/lib/components/schedules/model.d.ts +9 -1
  280. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  281. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  282. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  283. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  284. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  285. package/lib/components/schedules/products/index.d.ts +1 -0
  286. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  287. package/lib/components/schedules/products/list/index.d.ts +1 -0
  288. package/lib/components/schedules/resources/index.d.ts +1 -0
  289. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  290. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  291. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  292. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  293. package/lib/components/schedules/schedules/index.d.ts +1 -0
  294. package/lib/components/systemSettings/registry/components/GroupModal.js +71 -72
  295. package/lib/components/systemSettings/registry/components/ItemModal.js +2 -1
  296. package/lib/components/systemSettings/registry/index.js +3 -1
  297. package/lib/components/systemSettings/registry/services.d.ts +2 -0
  298. package/lib/components/systemSettings/registry/types.d.ts +3 -0
  299. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  300. package/lib/components/venueBooking/components/Addons/index.js +15 -8
  301. package/lib/components/venueBooking/components/Cart/index.js +8 -2
  302. package/lib/components/venueBooking/components/VenueSelection/components/TimeGrid.js +118 -18
  303. package/lib/components/venueBooking/context.js +2 -1
  304. package/lib/components/venueBooking/hooks.d.ts +16 -3
  305. package/lib/components/venueBooking/hooks.js +8 -2
  306. package/lib/components/venueBooking/types.d.ts +19 -2
  307. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  308. package/lib/index.d.ts +1 -1
  309. package/lib/index.js +2 -0
  310. package/lib/plus/clientName/index.d.ts +1 -0
  311. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +1 -0
  312. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +1 -0
  313. package/lib/plus/pisellReservation/floorRoomCard/views/RoomCardIcons.d.ts +1 -0
  314. package/lib/plus/pisellSalesManagement/hooks/useSalesGridData.d.ts +1 -0
  315. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  316. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  317. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  318. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  319. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  320. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  321. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  322. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
  323. package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +1 -0
  324. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  325. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  326. package/lib/pro/Selector/demo.d.ts +1 -0
  327. package/lowcode/admin-auth-channel-auth/meta.ts +116 -0
  328. package/lowcode/admin-auth-online-shop-auth/meta.ts +81 -5
  329. 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
+ }
@@ -2,6 +2,11 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  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; }
3
3
  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); } }
4
4
  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); }); }; }
5
+ 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; }
6
+ 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; }
7
+ 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; }
8
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
+ 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); }
5
10
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
11
  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."); }
7
12
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
@@ -12,7 +17,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
12
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; }
13
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; } }
14
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
- import React, { createContext, useContext, useEffect, useMemo, useState } from 'react';
20
+ import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
16
21
  import { locales } from '@pisell/utils';
17
22
  import { useScanOrderModule, safeRunModuleAction, SCAN_ORDER_STEPS, createScanOrderViewModel } from "./hooks";
18
23
  import { usePisellOS } from "../../hooks/useEngineContext";
@@ -55,7 +60,49 @@ export function ScanOrderProvider(_ref) {
55
60
  _useState12 = _slicedToArray(_useState11, 2),
56
61
  footerActionText = _useState12[0],
57
62
  setFooterActionText = _useState12[1];
63
+ var _useState13 = useState(''),
64
+ _useState14 = _slicedToArray(_useState13, 2),
65
+ tableName = _useState14[0],
66
+ setTableName = _useState14[1];
67
+ var _useState15 = useState('default'),
68
+ _useState16 = _slicedToArray(_useState15, 2),
69
+ entryMode = _useState16[0],
70
+ setEntryMode = _useState16[1];
71
+ var _useState17 = useState(''),
72
+ _useState18 = _slicedToArray(_useState17, 2),
73
+ submitDisabledTips = _useState18[0],
74
+ setSubmitDisabledTips = _useState18[1];
75
+ var _useState19 = useState(false),
76
+ _useState20 = _slicedToArray(_useState19, 2),
77
+ isCacheHydrated = _useState20[0],
78
+ setIsCacheHydrated = _useState20[1];
79
+ var _useState21 = useState(null),
80
+ _useState22 = _slicedToArray(_useState21, 2),
81
+ resumeStep = _useState22[0],
82
+ setResumeStep = _useState22[1];
83
+ var hydratedRef = useRef(false);
58
84
  var stepList = _toConsumableArray(SCAN_ORDER_STEPS);
85
+
86
+ // ─── 步骤缓存:gate 标记读写 ───
87
+ var isGatePassed = useCallback(function (flag) {
88
+ var _scanOrderModule$getU;
89
+ var gate = scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$getU = scanOrderModule.getUIState) === null || _scanOrderModule$getU === void 0 ? void 0 : _scanOrderModule$getU.call(scanOrderModule, 'gate');
90
+ return Boolean(gate === null || gate === void 0 ? void 0 : gate[flag]);
91
+ }, [scanOrderModule]);
92
+ var markGate = useCallback(function (flag) {
93
+ var _scanOrderModule$getU2;
94
+ if (!(scanOrderModule !== null && scanOrderModule !== void 0 && scanOrderModule.setUIState)) return;
95
+ var prev = ((_scanOrderModule$getU2 = scanOrderModule.getUIState) === null || _scanOrderModule$getU2 === void 0 ? void 0 : _scanOrderModule$getU2.call(scanOrderModule, 'gate')) || {};
96
+ scanOrderModule.setUIState('gate', _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, flag, true)));
97
+ }, [scanOrderModule]);
98
+ var clearStepCache = useCallback(function () {
99
+ var _scanOrderModule$clea;
100
+ scanOrderModule === null || scanOrderModule === void 0 || (_scanOrderModule$clea = scanOrderModule.clearUIState) === null || _scanOrderModule$clea === void 0 || _scanOrderModule$clea.call(scanOrderModule);
101
+ setResumeStep(null);
102
+ }, [scanOrderModule]);
103
+ var consumeResumeStep = useCallback(function () {
104
+ setResumeStep(null);
105
+ }, []);
59
106
  var refreshViewModel = /*#__PURE__*/function () {
60
107
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
61
108
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -149,6 +196,67 @@ export function ScanOrderProvider(_ref) {
149
196
  return _ref4.apply(this, arguments);
150
197
  };
151
198
  }();
199
+
200
+ /**
201
+ * 步骤缓存 hydrate:首次 module 就绪时读取 SDK UI 缓存
202
+ * - 若缓存里的 entryContext.resourceId 与本次入参不一致,整桶作废(clearUIState)后仅写入新 entryContext
203
+ * - 一致:按 pendingStep > step 顺序挑恢复目标写入 resumeStep;pendingStep 命中后立即消费
204
+ * - 注意不直接 setCurrentStep,避免 <Menu>/<Check> 在 checkResourceAvailable 装载
205
+ * dineInConfig(含 menu_list_ids)之前 mount 发请求
206
+ * - 基于 cacheId 分桶,无 cacheId 时 SDK 层降级为 no-op
207
+ */
208
+ useEffect(function () {
209
+ var _entryContext$resourc, _entryContext$biz, _scanOrderModule$getU3, _cachedEntry$resource, _cachedEntry$biz, _scanOrderModule$getU4, _scanOrderModule$getU5;
210
+ if (hydratedRef.current || !scanOrderModule) return;
211
+ hydratedRef.current = true;
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 : '');
217
+ var currentHasOrderId = Boolean(entryContext === null || entryContext === void 0 ? void 0 : entryContext.order_id);
218
+ var cachedEntry = (_scanOrderModule$getU3 = scanOrderModule.getUIState) === null || _scanOrderModule$getU3 === void 0 ? void 0 : _scanOrderModule$getU3.call(scanOrderModule, 'entryContext');
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;
220
+ if (!entrySame) {
221
+ var _scanOrderModule$clea2, _scanOrderModule$setU;
222
+ (_scanOrderModule$clea2 = scanOrderModule.clearUIState) === null || _scanOrderModule$clea2 === void 0 || _scanOrderModule$clea2.call(scanOrderModule);
223
+ (_scanOrderModule$setU = scanOrderModule.setUIState) === null || _scanOrderModule$setU === void 0 || _scanOrderModule$setU.call(scanOrderModule, 'entryContext', {
224
+ resourceId: normalizedResourceId,
225
+ hasOrderId: currentHasOrderId,
226
+ biz: normalizedBiz
227
+ });
228
+ setIsCacheHydrated(true);
229
+ return;
230
+ }
231
+
232
+ // 只有 product / check 才是有效的恢复目标(init 与 error 不恢复)
233
+ var isResumable = function isResumable(s) {
234
+ return s === 'product' || s === 'check';
235
+ };
236
+ var pending = (_scanOrderModule$getU4 = scanOrderModule.getUIState) === null || _scanOrderModule$getU4 === void 0 ? void 0 : _scanOrderModule$getU4.call(scanOrderModule, 'pendingStep');
237
+ if (isResumable(pending)) {
238
+ var _scanOrderModule$dele;
239
+ (_scanOrderModule$dele = scanOrderModule.deleteUIState) === null || _scanOrderModule$dele === void 0 || _scanOrderModule$dele.call(scanOrderModule, 'pendingStep');
240
+ setResumeStep(pending);
241
+ setIsCacheHydrated(true);
242
+ return;
243
+ }
244
+ var cached = (_scanOrderModule$getU5 = scanOrderModule.getUIState) === null || _scanOrderModule$getU5 === void 0 ? void 0 : _scanOrderModule$getU5.call(scanOrderModule, 'step');
245
+ if (isResumable(cached)) setResumeStep(cached);
246
+ setIsCacheHydrated(true);
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]);
248
+
249
+ /**
250
+ * hydrate 完成后写回 step 缓存。
251
+ * 注意跳过 `currentStep === 'init'`:hydrate 刚完成时 currentStep 依然是初始 'init',
252
+ * 直接写回会覆盖掉 sessionStorage 里真正有用的 'product' / 'check'。
253
+ */
254
+ useEffect(function () {
255
+ var _scanOrderModule$setU2;
256
+ if (!hydratedRef.current || !isCacheHydrated || !scanOrderModule) return;
257
+ if (currentStep === 'init') return;
258
+ (_scanOrderModule$setU2 = scanOrderModule.setUIState) === null || _scanOrderModule$setU2 === void 0 || _scanOrderModule$setU2.call(scanOrderModule, 'step', currentStep);
259
+ }, [currentStep, isCacheHydrated, scanOrderModule]);
152
260
  useEffect(function () {
153
261
  var _pisellOS$effects, _pisellOS$effects$on;
154
262
  if (!scanOrderModule) return;
@@ -292,6 +400,9 @@ export function ScanOrderProvider(_ref) {
292
400
  stepList: stepList,
293
401
  viewModel: viewModel,
294
402
  footerActionText: footerActionText,
403
+ tableName: tableName,
404
+ entryMode: entryMode,
405
+ submitDisabledTips: submitDisabledTips,
295
406
  isReady: !isLoading && !errorMessage,
296
407
  setCurrentStep: setCurrentStep,
297
408
  goToStep: goToStep,
@@ -300,9 +411,18 @@ export function ScanOrderProvider(_ref) {
300
411
  refreshViewModel: refreshViewModel,
301
412
  runModuleAction: runModuleAction,
302
413
  setFooterActionText: setFooterActionText,
303
- updateOrderNote: updateOrderNote
414
+ setTableName: setTableName,
415
+ setEntryMode: setEntryMode,
416
+ setSubmitDisabledTips: setSubmitDisabledTips,
417
+ updateOrderNote: updateOrderNote,
418
+ isCacheHydrated: isCacheHydrated,
419
+ markGate: markGate,
420
+ isGatePassed: isGatePassed,
421
+ clearStepCache: clearStepCache,
422
+ resumeStep: resumeStep,
423
+ consumeResumeStep: consumeResumeStep
304
424
  };
305
- }, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText]);
425
+ }, [entryContext, scanOrderModule, cartValidation, isLoading, errorMessage, currentStep, stepList, viewModel, footerActionText, tableName, entryMode, submitDisabledTips, isCacheHydrated, markGate, isGatePassed, clearStepCache, resumeStep, consumeResumeStep]);
306
426
  return /*#__PURE__*/React.createElement(ScanOrderContext.Provider, {
307
427
  value: value
308
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
  };
@@ -17,6 +17,30 @@ declare const _default: {
17
17
  'pisell2.scan.order.store.status.exception': string;
18
18
  'pisell2.scan.order.note.title': string;
19
19
  'pisell2.scan.order.note.placeholder': string;
20
+ 'pisell2.scan.order.fulfillment.title': string;
21
+ 'pisell2.scan.order.fulfillment.table_service': string;
22
+ 'pisell2.scan.order.fulfillment.pickup': string;
23
+ 'pisell2.scan.order.current.table': string;
24
+ 'pisell2.scan.order.pickup.ref.title': string;
25
+ 'pisell2.scan.order.pickup.ref.heading': string;
26
+ 'pisell2.scan.order.pickup.ref.description': string;
27
+ 'pisell2.scan.order.pickup.ref.placeholder': string;
28
+ 'pisell2.scan.order.products.title': string;
29
+ 'pisell2.scan.order.products.empty.tip': string;
30
+ 'pisell2.scan.order.check.cart.empty.tip': string;
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;
20
44
  'pisell2.appointment.booking.empty.data': string;
21
45
  'pisell2.appointment.deposit.close': string;
22
46
  'pisell2.appointment.policy': string;
@@ -41,6 +65,30 @@ declare const _default: {
41
65
  'pisell2.scan.order.store.status.exception': string;
42
66
  'pisell2.scan.order.note.title': string;
43
67
  'pisell2.scan.order.note.placeholder': string;
68
+ 'pisell2.scan.order.fulfillment.title': string;
69
+ 'pisell2.scan.order.fulfillment.table_service': string;
70
+ 'pisell2.scan.order.fulfillment.pickup': string;
71
+ 'pisell2.scan.order.current.table': string;
72
+ 'pisell2.scan.order.pickup.ref.title': string;
73
+ 'pisell2.scan.order.pickup.ref.heading': string;
74
+ 'pisell2.scan.order.pickup.ref.description': string;
75
+ 'pisell2.scan.order.pickup.ref.placeholder': string;
76
+ 'pisell2.scan.order.products.title': string;
77
+ 'pisell2.scan.order.products.empty.tip': string;
78
+ 'pisell2.scan.order.check.cart.empty.tip': string;
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;
44
92
  'pisell2.appointment.booking.empty.data': string;
45
93
  'pisell2.appointment.deposit.close': string;
46
94
  'pisell2.appointment.policy': string;
@@ -65,6 +113,30 @@ declare const _default: {
65
113
  'pisell2.scan.order.store.status.exception': string;
66
114
  'pisell2.scan.order.note.title': string;
67
115
  'pisell2.scan.order.note.placeholder': string;
116
+ 'pisell2.scan.order.fulfillment.title': string;
117
+ 'pisell2.scan.order.fulfillment.table_service': string;
118
+ 'pisell2.scan.order.fulfillment.pickup': string;
119
+ 'pisell2.scan.order.current.table': string;
120
+ 'pisell2.scan.order.pickup.ref.title': string;
121
+ 'pisell2.scan.order.pickup.ref.heading': string;
122
+ 'pisell2.scan.order.pickup.ref.description': string;
123
+ 'pisell2.scan.order.pickup.ref.placeholder': string;
124
+ 'pisell2.scan.order.products.title': string;
125
+ 'pisell2.scan.order.products.empty.tip': string;
126
+ 'pisell2.scan.order.check.cart.empty.tip': string;
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;
68
140
  'pisell2.appointment.booking.empty.data': string;
69
141
  'pisell2.appointment.deposit.close': string;
70
142
  'pisell2.appointment.policy': string;
@@ -89,6 +161,30 @@ declare const _default: {
89
161
  'pisell2.scan.order.store.status.exception': string;
90
162
  'pisell2.scan.order.note.title': string;
91
163
  'pisell2.scan.order.note.placeholder': string;
164
+ 'pisell2.scan.order.fulfillment.title': string;
165
+ 'pisell2.scan.order.fulfillment.table_service': string;
166
+ 'pisell2.scan.order.fulfillment.pickup': string;
167
+ 'pisell2.scan.order.current.table': string;
168
+ 'pisell2.scan.order.pickup.ref.title': string;
169
+ 'pisell2.scan.order.pickup.ref.heading': string;
170
+ 'pisell2.scan.order.pickup.ref.description': string;
171
+ 'pisell2.scan.order.pickup.ref.placeholder': string;
172
+ 'pisell2.scan.order.products.title': string;
173
+ 'pisell2.scan.order.products.empty.tip': string;
174
+ 'pisell2.scan.order.check.cart.empty.tip': string;
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;
92
188
  'pisell2.appointment.booking.empty.data': string;
93
189
  'pisell2.appointment.deposit.close': string;
94
190
  'pisell2.appointment.policy': string;
@@ -113,6 +209,30 @@ declare const _default: {
113
209
  'pisell2.scan.order.store.status.exception': string;
114
210
  'pisell2.scan.order.note.title': string;
115
211
  'pisell2.scan.order.note.placeholder': string;
212
+ 'pisell2.scan.order.fulfillment.title': string;
213
+ 'pisell2.scan.order.fulfillment.table_service': string;
214
+ 'pisell2.scan.order.fulfillment.pickup': string;
215
+ 'pisell2.scan.order.current.table': string;
216
+ 'pisell2.scan.order.pickup.ref.title': string;
217
+ 'pisell2.scan.order.pickup.ref.heading': string;
218
+ 'pisell2.scan.order.pickup.ref.description': string;
219
+ 'pisell2.scan.order.pickup.ref.placeholder': string;
220
+ 'pisell2.scan.order.products.title': string;
221
+ 'pisell2.scan.order.products.empty.tip': string;
222
+ 'pisell2.scan.order.check.cart.empty.tip': string;
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;
116
236
  'pisell2.appointment.booking.empty.data': string;
117
237
  'pisell2.appointment.deposit.close': string;
118
238
  'pisell2.appointment.policy': string;