@pisell/pisellos 2.2.242 → 2.2.244

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 (314) hide show
  1. package/dist/model/strategy/adapter/promotion/evaluator.js +2 -3
  2. package/dist/model/strategy/adapter/promotion/index.js +9 -0
  3. package/dist/model/strategy/adapter/walletPass/utils.js +4 -7
  4. package/dist/modules/Cart/utils/cartProduct.js +3 -24
  5. package/dist/modules/Cart/utils/changePrice.js +11 -11
  6. package/dist/modules/Customer/index.d.ts +0 -20
  7. package/dist/modules/Customer/index.js +83 -172
  8. package/dist/modules/Customer/types.d.ts +0 -2
  9. package/dist/modules/Discount/index.js +3 -4
  10. package/dist/modules/Discount/types.d.ts +0 -1
  11. package/dist/modules/OpenData/index.d.ts +0 -8
  12. package/dist/modules/OpenData/index.js +17 -37
  13. package/dist/modules/Order/index.d.ts +18 -268
  14. package/dist/modules/Order/index.js +757 -3306
  15. package/dist/modules/Order/types.d.ts +31 -279
  16. package/dist/modules/Order/types.js +0 -38
  17. package/dist/modules/Order/utils.d.ts +5 -147
  18. package/dist/modules/Order/utils.js +103 -746
  19. package/dist/modules/Payment/index.d.ts +13 -10
  20. package/dist/modules/Payment/index.js +837 -467
  21. package/dist/modules/Payment/types.d.ts +0 -2
  22. package/dist/modules/Payment/utils.js +1 -2
  23. package/dist/modules/Payment/walletpass.js +7 -14
  24. package/dist/modules/ProductList/index.d.ts +12 -16
  25. package/dist/modules/ProductList/index.js +59 -133
  26. package/dist/modules/ProductList/types.d.ts +0 -14
  27. package/dist/modules/Quotation/index.d.ts +1 -0
  28. package/dist/modules/Quotation/index.js +22 -25
  29. package/dist/modules/Rules/index.d.ts +0 -4
  30. package/dist/modules/Rules/index.js +69 -93
  31. package/dist/modules/Rules/types.d.ts +0 -1
  32. package/dist/modules/SalesSummary/index.d.ts +25 -8
  33. package/dist/modules/SalesSummary/index.js +35 -86
  34. package/dist/modules/SalesSummary/types.d.ts +1 -4
  35. package/dist/modules/SalesSummary/utils.d.ts +25 -2
  36. package/dist/modules/SalesSummary/utils.js +162 -794
  37. package/dist/modules/Schedule/index.d.ts +0 -7
  38. package/dist/modules/Schedule/index.js +2 -24
  39. package/dist/modules/Summary/index.js +3 -4
  40. package/dist/modules/index.d.ts +0 -2
  41. package/dist/modules/index.js +1 -3
  42. package/dist/plugins/request.d.ts +0 -1
  43. package/dist/server/index.d.ts +1 -204
  44. package/dist/server/index.js +928 -3659
  45. package/dist/server/modules/index.d.ts +0 -2
  46. package/dist/server/modules/index.js +0 -2
  47. package/dist/server/modules/order/index.d.ts +4 -120
  48. package/dist/server/modules/order/index.js +483 -1779
  49. package/dist/server/modules/order/types.d.ts +3 -32
  50. package/dist/server/modules/order/types.js +0 -8
  51. package/dist/server/modules/order/utils/filterBookings.js +3 -26
  52. package/dist/server/modules/order/utils/filterOrders.js +8 -23
  53. package/dist/server/modules/products/index.d.ts +7 -34
  54. package/dist/server/modules/products/index.js +317 -631
  55. package/dist/server/modules/resource/index.d.ts +0 -2
  56. package/dist/server/modules/resource/index.js +3 -29
  57. package/dist/server/modules/schedule/index.d.ts +4 -4
  58. package/dist/server/modules/schedule/index.js +88 -111
  59. package/dist/solution/BaseSales/index.d.ts +9 -131
  60. package/dist/solution/BaseSales/index.js +447 -1944
  61. package/dist/solution/BaseSales/types.d.ts +6 -76
  62. package/dist/solution/BaseSales/types.js +4 -5
  63. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
  64. package/dist/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +24 -105
  65. package/dist/solution/BaseSales/utils.d.ts +1 -1
  66. package/dist/solution/BaseSales/utils.js +21 -62
  67. package/dist/solution/BookingByStep/index.d.ts +1 -1
  68. package/dist/solution/BookingTicket/index.d.ts +10 -270
  69. package/dist/solution/BookingTicket/index.js +237 -1772
  70. package/dist/solution/BookingTicket/types.d.ts +1 -118
  71. package/dist/solution/BookingTicket/types.js +2 -41
  72. package/dist/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
  73. package/dist/solution/BookingTicket/utils/bookingStatus.js +0 -70
  74. package/dist/solution/BookingTicket/utils/cartView.d.ts +1 -9
  75. package/dist/solution/BookingTicket/utils/cartView.js +7 -94
  76. package/dist/solution/BookingTicket/utils/scan/index.d.ts +0 -5
  77. package/dist/solution/BookingTicket/utils/scan/index.js +8 -20
  78. package/dist/solution/Checkout/appointmentDemo.json +1 -0
  79. package/dist/solution/Checkout/index.d.ts +0 -1
  80. package/dist/solution/Checkout/index.js +9 -10
  81. package/dist/solution/RegisterAndLogin/config.js +10 -2
  82. package/dist/solution/ScanOrder/index.d.ts +3 -9
  83. package/dist/solution/ScanOrder/index.js +134 -241
  84. package/dist/solution/ScanOrder/types.d.ts +5 -9
  85. package/dist/solution/ScanOrder/types.js +3 -2
  86. package/dist/solution/ScanOrder/utils.d.ts +1 -1
  87. package/dist/solution/ScanOrder/utils.js +22 -84
  88. package/dist/solution/VenueBooking/index.d.ts +2 -5
  89. package/dist/solution/VenueBooking/index.js +59 -110
  90. package/dist/solution/VenueBooking/sales-section-4-annotated.json +2 -0
  91. package/dist/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
  92. package/dist/solution/VenueBooking/utils/slotMerge.js +0 -10
  93. package/dist/types/index.d.ts +0 -10
  94. package/lib/model/strategy/adapter/promotion/evaluator.js +1 -2
  95. package/lib/model/strategy/adapter/walletPass/utils.js +2 -3
  96. package/lib/modules/Cart/utils/cartProduct.js +3 -20
  97. package/lib/modules/Cart/utils/changePrice.js +20 -12
  98. package/lib/modules/Customer/index.d.ts +0 -20
  99. package/lib/modules/Customer/index.js +11 -64
  100. package/lib/modules/Customer/types.d.ts +0 -2
  101. package/lib/modules/Discount/index.js +1 -5
  102. package/lib/modules/Discount/types.d.ts +0 -1
  103. package/lib/modules/OpenData/index.d.ts +0 -8
  104. package/lib/modules/OpenData/index.js +5 -19
  105. package/lib/modules/Order/index.d.ts +18 -268
  106. package/lib/modules/Order/index.js +344 -2149
  107. package/lib/modules/Order/types.d.ts +31 -279
  108. package/lib/modules/Order/types.js +0 -1
  109. package/lib/modules/Order/utils.d.ts +5 -147
  110. package/lib/modules/Order/utils.js +46 -614
  111. package/lib/modules/Payment/index.d.ts +13 -10
  112. package/lib/modules/Payment/index.js +150 -18
  113. package/lib/modules/Payment/types.d.ts +0 -2
  114. package/lib/modules/Payment/utils.js +1 -2
  115. package/lib/modules/Payment/walletpass.js +3 -7
  116. package/lib/modules/ProductList/index.d.ts +12 -16
  117. package/lib/modules/ProductList/index.js +4 -41
  118. package/lib/modules/ProductList/types.d.ts +0 -14
  119. package/lib/modules/Quotation/index.d.ts +1 -0
  120. package/lib/modules/Quotation/index.js +16 -19
  121. package/lib/modules/Rules/index.d.ts +0 -4
  122. package/lib/modules/Rules/index.js +120 -136
  123. package/lib/modules/Rules/types.d.ts +0 -1
  124. package/lib/modules/SalesSummary/index.d.ts +25 -8
  125. package/lib/modules/SalesSummary/index.js +4 -30
  126. package/lib/modules/SalesSummary/types.d.ts +1 -4
  127. package/lib/modules/SalesSummary/utils.d.ts +25 -2
  128. package/lib/modules/SalesSummary/utils.js +91 -645
  129. package/lib/modules/Schedule/index.d.ts +0 -7
  130. package/lib/modules/Schedule/index.js +1 -17
  131. package/lib/modules/Summary/index.js +4 -5
  132. package/lib/modules/index.d.ts +0 -2
  133. package/lib/modules/index.js +1 -5
  134. package/lib/plugins/request.d.ts +0 -1
  135. package/lib/server/index.d.ts +1 -204
  136. package/lib/server/index.js +57 -1889
  137. package/lib/server/modules/index.d.ts +0 -2
  138. package/lib/server/modules/index.js +0 -3
  139. package/lib/server/modules/order/index.d.ts +4 -120
  140. package/lib/server/modules/order/index.js +142 -919
  141. package/lib/server/modules/order/types.d.ts +3 -32
  142. package/lib/server/modules/order/utils/filterBookings.js +5 -24
  143. package/lib/server/modules/order/utils/filterOrders.js +6 -15
  144. package/lib/server/modules/products/index.d.ts +7 -34
  145. package/lib/server/modules/products/index.js +54 -189
  146. package/lib/server/modules/resource/index.d.ts +0 -2
  147. package/lib/server/modules/resource/index.js +3 -27
  148. package/lib/server/modules/schedule/index.d.ts +4 -4
  149. package/lib/server/modules/schedule/index.js +40 -47
  150. package/lib/solution/BaseSales/index.d.ts +9 -131
  151. package/lib/solution/BaseSales/index.js +63 -1106
  152. package/lib/solution/BaseSales/types.d.ts +6 -76
  153. package/lib/solution/BaseSales/types.js +1 -3
  154. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.d.ts +0 -1
  155. package/lib/solution/BaseSales/utils/transformBaseProductToOrderProduct.js +18 -106
  156. package/lib/solution/BaseSales/utils.d.ts +1 -1
  157. package/lib/solution/BaseSales/utils.js +10 -54
  158. package/lib/solution/BookingByStep/index.d.ts +1 -1
  159. package/lib/solution/BookingTicket/index.d.ts +10 -270
  160. package/lib/solution/BookingTicket/index.js +29 -922
  161. package/lib/solution/BookingTicket/types.d.ts +1 -118
  162. package/lib/solution/BookingTicket/types.js +0 -11
  163. package/lib/solution/BookingTicket/utils/bookingStatus.d.ts +0 -40
  164. package/lib/solution/BookingTicket/utils/bookingStatus.js +2 -44
  165. package/lib/solution/BookingTicket/utils/cartView.d.ts +1 -9
  166. package/lib/solution/BookingTicket/utils/cartView.js +6 -61
  167. package/lib/solution/BookingTicket/utils/scan/index.d.ts +0 -5
  168. package/lib/solution/BookingTicket/utils/scan/index.js +3 -17
  169. package/lib/solution/Checkout/appointmentDemo.json +1 -0
  170. package/lib/solution/Checkout/index.d.ts +0 -1
  171. package/lib/solution/Checkout/index.js +2 -1
  172. package/lib/solution/RegisterAndLogin/config.js +10 -2
  173. package/lib/solution/ScanOrder/index.d.ts +3 -9
  174. package/lib/solution/ScanOrder/index.js +70 -153
  175. package/lib/solution/ScanOrder/types.d.ts +5 -9
  176. package/lib/solution/ScanOrder/utils.d.ts +1 -1
  177. package/lib/solution/ScanOrder/utils.js +17 -83
  178. package/lib/solution/VenueBooking/index.d.ts +2 -5
  179. package/lib/solution/VenueBooking/index.js +17 -54
  180. package/lib/solution/VenueBooking/sales-section-4-annotated.json +2 -0
  181. package/lib/solution/VenueBooking/utils/slotMerge.d.ts +0 -4
  182. package/lib/solution/VenueBooking/utils/slotMerge.js +0 -10
  183. package/lib/types/index.d.ts +0 -10
  184. package/package.json +1 -1
  185. package/dist/modules/BookingContext/index.d.ts +0 -48
  186. package/dist/modules/BookingContext/index.js +0 -566
  187. package/dist/modules/BookingContext/types.d.ts +0 -102
  188. package/dist/modules/BookingContext/types.js +0 -51
  189. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  190. package/dist/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -284
  191. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  192. package/dist/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -145
  193. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  194. package/dist/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -218
  195. package/dist/modules/BookingContext/utils/flexible.d.ts +0 -28
  196. package/dist/modules/BookingContext/utils/flexible.js +0 -56
  197. package/dist/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  198. package/dist/modules/BookingContext/utils/formatResourceList.js +0 -38
  199. package/dist/modules/BookingContext/utils/index.d.ts +0 -11
  200. package/dist/modules/BookingContext/utils/index.js +0 -11
  201. package/dist/modules/BookingContext/utils/noResource.d.ts +0 -13
  202. package/dist/modules/BookingContext/utils/noResource.js +0 -77
  203. package/dist/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  204. package/dist/modules/BookingContext/utils/orderLineDisplay.js +0 -36
  205. package/dist/modules/BookingContext/utils/productExtend.d.ts +0 -72
  206. package/dist/modules/BookingContext/utils/productExtend.js +0 -339
  207. package/dist/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  208. package/dist/modules/BookingContext/utils/resourceErrors.js +0 -74
  209. package/dist/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  210. package/dist/modules/BookingContext/utils/resourceSelection.js +0 -24
  211. package/dist/modules/BookingContext/utils/resources.d.ts +0 -80
  212. package/dist/modules/BookingContext/utils/resources.js +0 -486
  213. package/dist/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  214. package/dist/modules/BookingContext/utils/serviceTimes.js +0 -151
  215. package/dist/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  216. package/dist/modules/BookingContext/utils/timeSlices.js +0 -100
  217. package/dist/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  218. package/dist/modules/Order/utils/manualProductDiscount.js +0 -210
  219. package/dist/modules/SurchargeList/index.d.ts +0 -16
  220. package/dist/modules/SurchargeList/index.js +0 -162
  221. package/dist/modules/SurchargeList/types.d.ts +0 -11
  222. package/dist/modules/SurchargeList/types.js +0 -1
  223. package/dist/server/modules/payment/index.d.ts +0 -28
  224. package/dist/server/modules/payment/index.js +0 -305
  225. package/dist/server/modules/payment/types.d.ts +0 -9
  226. package/dist/server/modules/payment/types.js +0 -1
  227. package/dist/server/test.json +0 -713
  228. package/dist/server/utils/small-ticket.d.ts +0 -71
  229. package/dist/server/utils/small-ticket.js +0 -830
  230. package/dist/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  231. package/dist/solution/BaseSales/utils/cartPromotion.js +0 -1438
  232. package/dist/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  233. package/dist/solution/BaseSales/utils/quotationPrice.js +0 -237
  234. package/dist/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  235. package/dist/solution/BookingTicket/utils/addProductDecision.js +0 -346
  236. package/dist/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  237. package/dist/solution/BookingTicket/utils/addTimeAvailability.js +0 -95
  238. package/dist/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  239. package/dist/solution/BookingTicket/utils/exampleData.js +0 -183
  240. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  241. package/dist/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -438
  242. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  243. package/dist/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -399
  244. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  245. package/dist/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -56
  246. package/dist/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  247. package/dist/solution/BookingTicket/utils/scan/scanProductValues.js +0 -150
  248. package/dist/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  249. package/dist/solution/BookingTicket/utils/sessionCatalogStale.js +0 -78
  250. package/lib/modules/BookingContext/index.d.ts +0 -48
  251. package/lib/modules/BookingContext/index.js +0 -368
  252. package/lib/modules/BookingContext/types.d.ts +0 -102
  253. package/lib/modules/BookingContext/types.js +0 -34
  254. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.d.ts +0 -16
  255. package/lib/modules/BookingContext/utils/buildCacheItemFromOrderLine.js +0 -276
  256. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.d.ts +0 -8
  257. package/lib/modules/BookingContext/utils/buildNormalProductCacheItemFromOrderLine.js +0 -151
  258. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.d.ts +0 -76
  259. package/lib/modules/BookingContext/utils/cacheItemToBookingInput.js +0 -201
  260. package/lib/modules/BookingContext/utils/flexible.d.ts +0 -28
  261. package/lib/modules/BookingContext/utils/flexible.js +0 -80
  262. package/lib/modules/BookingContext/utils/formatResourceList.d.ts +0 -8
  263. package/lib/modules/BookingContext/utils/formatResourceList.js +0 -50
  264. package/lib/modules/BookingContext/utils/index.d.ts +0 -11
  265. package/lib/modules/BookingContext/utils/index.js +0 -43
  266. package/lib/modules/BookingContext/utils/noResource.d.ts +0 -13
  267. package/lib/modules/BookingContext/utils/noResource.js +0 -90
  268. package/lib/modules/BookingContext/utils/orderLineDisplay.d.ts +0 -1
  269. package/lib/modules/BookingContext/utils/orderLineDisplay.js +0 -56
  270. package/lib/modules/BookingContext/utils/productExtend.d.ts +0 -72
  271. package/lib/modules/BookingContext/utils/productExtend.js +0 -283
  272. package/lib/modules/BookingContext/utils/resourceErrors.d.ts +0 -41
  273. package/lib/modules/BookingContext/utils/resourceErrors.js +0 -80
  274. package/lib/modules/BookingContext/utils/resourceSelection.d.ts +0 -7
  275. package/lib/modules/BookingContext/utils/resourceSelection.js +0 -46
  276. package/lib/modules/BookingContext/utils/resources.d.ts +0 -80
  277. package/lib/modules/BookingContext/utils/resources.js +0 -377
  278. package/lib/modules/BookingContext/utils/serviceTimes.d.ts +0 -55
  279. package/lib/modules/BookingContext/utils/serviceTimes.js +0 -162
  280. package/lib/modules/BookingContext/utils/timeSlices.d.ts +0 -42
  281. package/lib/modules/BookingContext/utils/timeSlices.js +0 -124
  282. package/lib/modules/Order/utils/manualProductDiscount.d.ts +0 -106
  283. package/lib/modules/Order/utils/manualProductDiscount.js +0 -206
  284. package/lib/modules/SurchargeList/index.d.ts +0 -16
  285. package/lib/modules/SurchargeList/index.js +0 -89
  286. package/lib/modules/SurchargeList/types.d.ts +0 -11
  287. package/lib/modules/SurchargeList/types.js +0 -17
  288. package/lib/server/modules/payment/index.d.ts +0 -28
  289. package/lib/server/modules/payment/index.js +0 -192
  290. package/lib/server/modules/payment/types.d.ts +0 -9
  291. package/lib/server/modules/payment/types.js +0 -17
  292. package/lib/server/test.json +0 -713
  293. package/lib/server/utils/small-ticket.d.ts +0 -71
  294. package/lib/server/utils/small-ticket.js +0 -781
  295. package/lib/solution/BaseSales/utils/cartPromotion.d.ts +0 -287
  296. package/lib/solution/BaseSales/utils/cartPromotion.js +0 -992
  297. package/lib/solution/BaseSales/utils/quotationPrice.d.ts +0 -7
  298. package/lib/solution/BaseSales/utils/quotationPrice.js +0 -277
  299. package/lib/solution/BookingTicket/utils/addProductDecision.d.ts +0 -117
  300. package/lib/solution/BookingTicket/utils/addProductDecision.js +0 -318
  301. package/lib/solution/BookingTicket/utils/addTimeAvailability.d.ts +0 -35
  302. package/lib/solution/BookingTicket/utils/addTimeAvailability.js +0 -125
  303. package/lib/solution/BookingTicket/utils/exampleData.d.ts +0 -123
  304. package/lib/solution/BookingTicket/utils/exampleData.js +0 -0
  305. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.d.ts +0 -185
  306. package/lib/solution/BookingTicket/utils/resolveBestAddTimePlan.js +0 -254
  307. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.d.ts +0 -36
  308. package/lib/solution/BookingTicket/utils/scan/applyGlobalScan.js +0 -168
  309. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.d.ts +0 -32
  310. package/lib/solution/BookingTicket/utils/scan/formatGlobalScan.js +0 -51
  311. package/lib/solution/BookingTicket/utils/scan/scanProductValues.d.ts +0 -21
  312. package/lib/solution/BookingTicket/utils/scan/scanProductValues.js +0 -127
  313. package/lib/solution/BookingTicket/utils/sessionCatalogStale.d.ts +0 -23
  314. package/lib/solution/BookingTicket/utils/sessionCatalogStale.js +0 -85
@@ -1,5 +1,4 @@
1
- import { ProductList, OrderModule, OpenDataModule } from '../../modules';
2
- import { BookingContextModule } from '../../modules/BookingContext';
1
+ import { ProductList, OrderModule } from '../../modules';
3
2
  import { CustomerModule } from '../../modules/Customer';
4
3
  import { SalesSummaryModule } from '../../modules/SalesSummary';
5
4
  import { ScheduleModule } from '../../modules/Schedule';
@@ -17,8 +16,6 @@ export interface BookingTicketState extends BaseSalesState {
17
16
  salesSummary: SalesSummaryModule;
18
17
  schedule: ScheduleModule;
19
18
  customer: CustomerModule;
20
- bookingContext: BookingContextModule;
21
- openData: OpenDataModule;
22
19
  }
23
20
  export declare function createBookingTicketModule<T extends keyof BookingTicketState>(moduleName: T, solutionName: string, name?: string, version?: string): BookingTicketState[T] | null;
24
21
  export declare enum BookingTicketHooks {
@@ -79,10 +76,6 @@ export interface ILoadProductsParams {
79
76
  with_count?: string[];
80
77
  /** 是否返回日程信息 */
81
78
  with_schedule?: number;
82
- /** 扩展商品类型过滤 */
83
- extension_type?: string[];
84
- /** 商品发布状态 */
85
- status?: string;
86
79
  }
87
80
  /**
88
81
  * 加载商品详情的参数
@@ -112,8 +105,6 @@ export type BookingTicketCartItemView = BaseSalesOrderProduct;
112
105
  export interface BookingTicketCartBookingView extends ISalesBooking {
113
106
  _extend: {
114
107
  product: BookingTicketCartItemView | null;
115
- addTimeProduct: BookingTicketCartItemView[];
116
- canAddTime: boolean;
117
108
  };
118
109
  }
119
110
  /**
@@ -141,111 +132,3 @@ export interface BookingTicketCustomerView {
141
132
  export interface BookingTicketProductCatalogView {
142
133
  products: ProductData[];
143
134
  }
144
- /**
145
- * 添加加时商品到已有 booking 的输入。
146
- *
147
- * @example
148
- * await bookingTicket.addAddTimeProductToBooking({
149
- * booking,
150
- * product,
151
- * num: 1,
152
- * price: '10.00',
153
- * product_add_schedule_time: 30,
154
- * });
155
- */
156
- export interface AddAddTimeProductToBookingInput {
157
- /** 当前购物车中已存在的 booking,必须带 metadata.unique_identification_number。 */
158
- booking: Record<string, any>;
159
- /** 加时商品原始数据,保留完整商品信息供 OrderModule 缓存原始快照。 */
160
- product: ProductData & Record<string, any>;
161
- /** 本次添加数量,缺省为 1。 */
162
- num?: number;
163
- /** 本次加时商品价格,缺省回退 product.price。 */
164
- price?: number | string;
165
- /** 加时时长,单位分钟;最终写入 product.metadata.product_add_schedule_time。 */
166
- product_add_schedule_time?: number;
167
- /** 本次加时方案实际覆盖分钟数,用于同步更新 booking 结束时间与 duration。 */
168
- coveredMinutes?: number;
169
- /** 直接写入 booking 的时间补丁,restart 场景使用。 */
170
- bookingPatch?: {
171
- start_date?: string;
172
- start_time?: string;
173
- end_date?: string;
174
- end_time?: string;
175
- duration?: number;
176
- };
177
- }
178
- /**
179
- * 批量添加加时商品到已有 booking 的单行输入。
180
- *
181
- * @example
182
- * const line: AddAddTimeProductLineInput = { product, product_add_schedule_time: 30 };
183
- */
184
- export type AddAddTimeProductLineInput = Omit<AddAddTimeProductToBookingInput, 'booking' | 'coveredMinutes'>;
185
- /**
186
- * 批量添加加时商品到已有 booking 的输入。
187
- *
188
- * @example
189
- * await bookingTicket.addAddTimeProductsToBooking({
190
- * booking,
191
- * products: [{ product, product_add_schedule_time: 30 }],
192
- * });
193
- */
194
- export interface AddAddTimeProductsToBookingInput {
195
- /** 当前购物车中已存在的 booking,必须带 metadata.unique_identification_number。 */
196
- booking: Record<string, any>;
197
- /** 需要一次性写入购物车的加时商品行。 */
198
- products: AddAddTimeProductLineInput[];
199
- /** 本次加时方案实际覆盖分钟数,用于同步更新 booking 结束时间与 duration。 */
200
- coveredMinutes?: number;
201
- /** 直接写入 booking 的时间补丁,restart 场景使用。 */
202
- bookingPatch?: AddAddTimeProductToBookingInput['bookingPatch'];
203
- }
204
- /** 扫码宿主桥接:SalesSdk 在 pubsub 订阅回调里注入,OS 需要 UI 时直接调用 */
205
- export interface GlobalScanHostBridge {
206
- openProductDetail?: (payload: Record<string, any>) => Promise<any | null>;
207
- openBookingEdit?: (payload: Record<string, any>) => Promise<any | null>;
208
- confirmDetail?: (input: {
209
- item: any;
210
- detailResult: {
211
- e: any;
212
- extension_type?: any;
213
- detail?: any;
214
- };
215
- options?: Record<string, any>;
216
- }) => Promise<any>;
217
- confirmBookingEdit?: (input: {
218
- cacheItem: any;
219
- options?: Record<string, any>;
220
- }) => Promise<any>;
221
- openOrder?: (data: {
222
- order_id: number;
223
- business_code?: string;
224
- }) => void;
225
- /**
226
- * walk-in 扫 walletPass:直接核销优惠码(对齐 SaleDetail Voucher.handleApplyCode / cart.scanCode)。
227
- */
228
- applyPromotionCode?: (code: string, customerId?: number) => Promise<{
229
- isAvailable?: boolean;
230
- type?: string;
231
- unavailableReason?: string;
232
- }>;
233
- onNotify?: (type: 'success' | 'fail' | 'info', messageKey?: string) => void;
234
- refresh?: () => void;
235
- }
236
- /** handleGlobalScanCode 结构化返回 */
237
- export type GlobalScanHandleResult = {
238
- status: 'success';
239
- kind: 'customer' | 'products' | 'promotion';
240
- meta?: {
241
- count?: number;
242
- };
243
- } | {
244
- status: 'pending';
245
- kind: 'openOrder' | 'requiresDetail' | 'requiresBookingEdit';
246
- } | {
247
- status: 'cancelled';
248
- } | {
249
- status: 'failed';
250
- reason: 'empty_code' | 'not_found' | 'invalid_data' | 'no_bridge';
251
- };
@@ -1,5 +1,4 @@
1
- import { ProductList, OrderModule, OpenDataModule } from "../../modules";
2
- import { BookingContextModule } from "../../modules/BookingContext";
1
+ import { ProductList, OrderModule } from "../../modules";
3
2
  import { CustomerModule } from "../../modules/Customer";
4
3
  import { SalesSummaryModule } from "../../modules/SalesSummary";
5
4
  import { ScheduleModule } from "../../modules/Schedule";
@@ -21,10 +20,6 @@ export function createBookingTicketModule(moduleName, solutionName, name, versio
21
20
  return new ScheduleModule("".concat(solutionName, "_").concat(name || moduleName), version);
22
21
  case 'customer':
23
22
  return new CustomerModule("".concat(solutionName, "_").concat(name || moduleName), version);
24
- case 'bookingContext':
25
- return new BookingContextModule("".concat(solutionName, "_").concat(name || moduleName), version);
26
- case 'openData':
27
- return new OpenDataModule("".concat(solutionName, "_").concat(name || moduleName), version);
28
23
  default:
29
24
  return null;
30
25
  }
@@ -79,38 +74,4 @@ export var BookingTicketHooks = /*#__PURE__*/function (BookingTicketHooks) {
79
74
 
80
75
  /**
81
76
  * BookingTicket 当前已加载的商品池视图。
82
- */
83
-
84
- /**
85
- * 添加加时商品到已有 booking 的输入。
86
- *
87
- * @example
88
- * await bookingTicket.addAddTimeProductToBooking({
89
- * booking,
90
- * product,
91
- * num: 1,
92
- * price: '10.00',
93
- * product_add_schedule_time: 30,
94
- * });
95
- */
96
-
97
- /**
98
- * 批量添加加时商品到已有 booking 的单行输入。
99
- *
100
- * @example
101
- * const line: AddAddTimeProductLineInput = { product, product_add_schedule_time: 30 };
102
- */
103
-
104
- /**
105
- * 批量添加加时商品到已有 booking 的输入。
106
- *
107
- * @example
108
- * await bookingTicket.addAddTimeProductsToBooking({
109
- * booking,
110
- * products: [{ product, product_add_schedule_time: 30 }],
111
- * });
112
- */
113
-
114
- /** 扫码宿主桥接:SalesSdk 在 pubsub 订阅回调里注入,OS 需要 UI 时直接调用 */
115
-
116
- /** handleGlobalScanCode 结构化返回 */
77
+ */
@@ -9,21 +9,6 @@
9
9
  * 字段含义严格对齐既有协议(OrderTempOrder / parseSalesResponse),
10
10
  * 不发明等价关系。
11
11
  */
12
- /**
13
- * 子预约状态机转移动作(POST /schedule/booking-transition/{schedule_event_id})。
14
- *
15
- * @example
16
- * await bookingTicket.transitionChildBooking({
17
- * schedule_event_id: 301,
18
- * action: 'confirm',
19
- * });
20
- */
21
- export type BookingTransitionAction = 'confirm' | 'reject' | 'arrive' | 'start' | 'complete' | 'cancel' | 'no_show' | 'reschedule';
22
- /** 子预约状态转移入参 */
23
- export interface TransitionChildBookingParams {
24
- schedule_event_id: number | string;
25
- action: BookingTransitionAction;
26
- }
27
12
  /**
28
13
  * 从 tempOrder 解析用于调用 appointment-status 接口的 schedule id。
29
14
  *
@@ -50,28 +35,3 @@ export declare function applyBookingsStatus(bookings: any[] | null | undefined,
50
35
  * 长度不一致时按较短一方对齐(防御式编程,正常路径不会发生)。
51
36
  */
52
37
  export declare function restoreBookingsStatus(bookings: any[] | null | undefined, previous: Array<string | undefined>): void;
53
- /**
54
- * 将状态机 action 解析为转移后的 `appointment_status`。
55
- *
56
- * `reschedule` 暂未在状态矩阵启用,返回 null 表示跳过乐观更新。
57
- *
58
- * @example
59
- * resolveStatusAfterTransition('confirm'); // 'confirmed'
60
- */
61
- export declare function resolveStatusAfterTransition(action: BookingTransitionAction): string | null;
62
- /**
63
- * 在 bookings 中按 `schedule_event_id` 定位子预约并乐观写入 `appointment_status`。
64
- *
65
- * @returns 写入前的 status;未命中时返回 undefined(调用方跳过回滚)
66
- *
67
- * @example
68
- * const prev = applyChildBookingStatus(tempOrder.bookings, 301, 'confirmed');
69
- */
70
- export declare function applyChildBookingStatus(bookings: any[] | null | undefined, scheduleEventId: number | string, status: string): string | undefined;
71
- /**
72
- * 撤销 applyChildBookingStatus 对单条子预约的乐观写入。
73
- *
74
- * @example
75
- * restoreChildBookingStatus(tempOrder.bookings, 301, prev);
76
- */
77
- export declare function restoreChildBookingStatus(bookings: any[] | null | undefined, scheduleEventId: number | string, previous: string | undefined): void;
@@ -10,18 +10,6 @@
10
10
  * 不发明等价关系。
11
11
  */
12
12
 
13
- /**
14
- * 子预约状态机转移动作(POST /schedule/booking-transition/{schedule_event_id})。
15
- *
16
- * @example
17
- * await bookingTicket.transitionChildBooking({
18
- * schedule_event_id: 301,
19
- * action: 'confirm',
20
- * });
21
- */
22
-
23
- /** 子预约状态转移入参 */
24
-
25
13
  /**
26
14
  * 从 tempOrder 解析用于调用 appointment-status 接口的 schedule id。
27
15
  *
@@ -75,62 +63,4 @@ export function restoreBookingsStatus(bookings, previous) {
75
63
  var b = bookings[i];
76
64
  if (b) b.appointment_status = previous[i];
77
65
  }
78
- }
79
-
80
- /**
81
- * 将状态机 action 解析为转移后的 `appointment_status`。
82
- *
83
- * `reschedule` 暂未在状态矩阵启用,返回 null 表示跳过乐观更新。
84
- *
85
- * @example
86
- * resolveStatusAfterTransition('confirm'); // 'confirmed'
87
- */
88
- export function resolveStatusAfterTransition(action) {
89
- var _map$action;
90
- var map = {
91
- confirm: 'confirmed',
92
- reject: 'rejected',
93
- arrive: 'arrived',
94
- start: 'started',
95
- complete: 'completed',
96
- cancel: 'cancelled',
97
- no_show: 'no_show',
98
- reschedule: null
99
- };
100
- return (_map$action = map[action]) !== null && _map$action !== void 0 ? _map$action : null;
101
- }
102
-
103
- /**
104
- * 在 bookings 中按 `schedule_event_id` 定位子预约并乐观写入 `appointment_status`。
105
- *
106
- * @returns 写入前的 status;未命中时返回 undefined(调用方跳过回滚)
107
- *
108
- * @example
109
- * const prev = applyChildBookingStatus(tempOrder.bookings, 301, 'confirmed');
110
- */
111
- export function applyChildBookingStatus(bookings, scheduleEventId, status) {
112
- var _bookings$idx;
113
- if (!Array.isArray(bookings)) return undefined;
114
- var idx = bookings.findIndex(function (b) {
115
- return b && String(b.schedule_event_id) === String(scheduleEventId);
116
- });
117
- if (idx === -1) return undefined;
118
- var previous = (_bookings$idx = bookings[idx]) === null || _bookings$idx === void 0 ? void 0 : _bookings$idx.appointment_status;
119
- bookings[idx].appointment_status = status;
120
- return previous;
121
- }
122
-
123
- /**
124
- * 撤销 applyChildBookingStatus 对单条子预约的乐观写入。
125
- *
126
- * @example
127
- * restoreChildBookingStatus(tempOrder.bookings, 301, prev);
128
- */
129
- export function restoreChildBookingStatus(bookings, scheduleEventId, previous) {
130
- if (!Array.isArray(bookings) || previous === undefined) return;
131
- var idx = bookings.findIndex(function (b) {
132
- return b && String(b.schedule_event_id) === String(scheduleEventId);
133
- });
134
- if (idx === -1) return;
135
- bookings[idx].appointment_status = previous;
136
66
  }
@@ -2,14 +2,6 @@ import type { BaseSalesOrderProduct } from '../../BaseSales';
2
2
  import type { ISalesBooking } from '../../BaseSales/utils/parseSalesResponse';
3
3
  import type { BookingTicketCartView, BookingTicketCustomerView, ICustomer } from '../types';
4
4
  import type { ScanOrderTempOrder } from '../../ScanOrder/types';
5
- export interface BuildCartViewOptions {
6
- addTimeProducts?: any[];
7
- bookingConfig?: Record<string, any> | null;
8
- productsByUid?: Record<string, {
9
- origin?: Record<string, any>;
10
- }>;
11
- shopOpeningHours?: string;
12
- }
13
5
  /**
14
6
  * 仅按 booking.product_uid 建索引,避免发明 booking 与商品行之间的其它等价关系。
15
7
  */
@@ -21,7 +13,7 @@ export declare function indexBookingsByProductUid(bookings: ISalesBooking[] | un
21
13
  * 关联规则(1:1):booking.product_uid ↔ line.metadata.unique_identification_number;
22
14
  * 同一 uid 已被更早的 booking 占用时,后续 booking 的 product 为 null。
23
15
  */
24
- export declare function buildCartView(lines: BaseSalesOrderProduct[] | undefined | null, bookings: ISalesBooking[] | undefined | null, options?: BuildCartViewOptions): BookingTicketCartView;
16
+ export declare function buildCartView(lines: BaseSalesOrderProduct[] | undefined | null, bookings: ISalesBooking[] | undefined | null): BookingTicketCartView;
25
17
  export declare function isWalkInCustomer(customer: Pick<ICustomer, 'id'> | null | undefined): boolean;
26
18
  /**
27
19
  * selected 优先,缺失时回退 tempOrder.customer_*,统一输出 UI 客户视图。
@@ -4,7 +4,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  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); }
7
- import { resolveBookingCanAddTime } from "./addTimeAvailability";
8
7
  /**
9
8
  * 仅按 booking.product_uid 建索引,避免发明 booking 与商品行之间的其它等价关系。
10
9
  */
@@ -34,69 +33,6 @@ function indexProductsByUid(lines) {
34
33
  }, {});
35
34
  }
36
35
 
37
- /**
38
- * 读取 booking 的协议唯一值。
39
- *
40
- * @example
41
- * const uid = getBookingUid(booking);
42
- */
43
- function getBookingUid(booking) {
44
- var _booking$metadata;
45
- var uid = booking === null || booking === void 0 || (_booking$metadata = booking.metadata) === null || _booking$metadata === void 0 ? void 0 : _booking$metadata.unique_identification_number;
46
- return uid === undefined || uid === null ? '' : String(uid);
47
- }
48
-
49
- /**
50
- * 读取商品行绑定的 booking 唯一值。
51
- *
52
- * @example
53
- * const bookingUid = getProductBookingUid(product);
54
- */
55
- function getProductBookingUid(line) {
56
- var _booking_uid, _line$metadata2;
57
- var uid = (_booking_uid = line === null || line === void 0 ? void 0 : line.booking_uid) !== null && _booking_uid !== void 0 ? _booking_uid : line === null || line === void 0 || (_line$metadata2 = line.metadata) === null || _line$metadata2 === void 0 ? void 0 : _line$metadata2.booking_uid;
58
- return uid === undefined || uid === null ? '' : String(uid);
59
- }
60
-
61
- /**
62
- * 判断商品行是否为加时商品行。
63
- *
64
- * @example
65
- * isAddTimeProductLine({ metadata: { product_add_schedule_time: 30 } } as any);
66
- */
67
- function isAddTimeProductLine(line) {
68
- var _line$metadata3, _line$metadata4;
69
- return (line === null || line === void 0 || (_line$metadata3 = line.metadata) === null || _line$metadata3 === void 0 ? void 0 : _line$metadata3.product_add_schedule_time) !== undefined && (line === null || line === void 0 || (_line$metadata4 = line.metadata) === null || _line$metadata4 === void 0 ? void 0 : _line$metadata4.product_add_schedule_time) !== null;
70
- }
71
-
72
- /**
73
- * 将加时商品按 booking_uid 建索引。
74
- *
75
- * @example
76
- * const map = indexAddTimeProductsByBookingUid(products);
77
- */
78
- function indexAddTimeProductsByBookingUid(lines) {
79
- return lines.reduce(function (acc, line) {
80
- if (!isAddTimeProductLine(line)) return acc;
81
- var bookingUid = getProductBookingUid(line);
82
- if (!bookingUid) return acc;
83
- if (!acc[bookingUid]) acc[bookingUid] = [];
84
- acc[bookingUid].push(line);
85
- return acc;
86
- }, {});
87
- }
88
-
89
- /**
90
- * 判断商品行是否是促销赠品行。
91
- *
92
- * @example
93
- * isGiftProductLine({ metadata: { _giftInfo: {} } } as any); // true
94
- */
95
- function isGiftProductLine(line) {
96
- var _line$metadata5;
97
- return Boolean(line === null || line === void 0 || (_line$metadata5 = line.metadata) === null || _line$metadata5 === void 0 ? void 0 : _line$metadata5._giftInfo);
98
- }
99
-
100
36
  /**
101
37
  * 构建购物车 UI 视图:bookings 平铺附带关联商品;items 仅含未关联 booking 的商品行。
102
38
  *
@@ -105,57 +41,34 @@ function isGiftProductLine(line) {
105
41
  * 同一 uid 已被更早的 booking 占用时,后续 booking 的 product 为 null。
106
42
  */
107
43
  export function buildCartView(lines, bookings) {
108
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
109
44
  var productLines = Array.isArray(lines) ? lines : [];
110
45
  var bookingList = Array.isArray(bookings) ? bookings : [];
111
46
  var linesByUid = indexProductsByUid(productLines);
112
- var addTimeLinesByBookingUid = indexAddTimeProductsByBookingUid(productLines);
113
47
  var claimedUids = new Set();
114
- var claimedAddTimeLines = new Set();
115
48
  var cartBookings = bookingList.filter(function (booking) {
116
49
  return booking.parent_id !== 0;
117
- }).reduce(function (acc, booking) {
50
+ }).map(function (booking) {
118
51
  var uid = booking === null || booking === void 0 ? void 0 : booking.product_uid;
119
- var bookingUid = getBookingUid(booking);
120
52
  var product = null;
121
53
  if (uid !== undefined && uid !== null && uid !== '') {
122
54
  var key = String(uid);
123
55
  if (!claimedUids.has(key)) {
124
56
  var line = linesByUid[key];
125
- // 赠品预约只作为提交数据保留,不在购物车顶部预约卡片区展示。
126
- if (isGiftProductLine(line)) return acc;
127
57
  if (line) {
128
58
  claimedUids.add(key);
129
59
  product = line;
130
60
  }
131
61
  }
132
62
  }
133
- var addTimeProduct = bookingUid ? addTimeLinesByBookingUid[bookingUid] || [] : [];
134
- addTimeProduct.forEach(function (line) {
135
- return claimedAddTimeLines.add(line);
136
- });
137
- acc.push(_objectSpread(_objectSpread({}, booking), {}, {
63
+ return _objectSpread(_objectSpread({}, booking), {}, {
138
64
  _extend: {
139
- product: product,
140
- addTimeProduct: addTimeProduct,
141
- canAddTime: resolveBookingCanAddTime({
142
- booking: booking,
143
- product: product,
144
- addTimeProducts: options.addTimeProducts,
145
- bookingConfig: options.bookingConfig,
146
- productsByUid: options.productsByUid,
147
- shopOpeningHours: options.shopOpeningHours
148
- })
65
+ product: product
149
66
  }
150
- }));
151
- return acc;
152
- }, []);
67
+ });
68
+ });
153
69
  var items = productLines.filter(function (line) {
154
- var _line$metadata6;
155
- // 促销赠品行仅通过主商品 Gift 行展示,不在 items 单独占一行(对齐 legacy `isGift: !!_giftInfo`)
156
- if (isGiftProductLine(line)) return false;
157
- if (claimedAddTimeLines.has(line)) return false;
158
- var uid = (_line$metadata6 = line.metadata) === null || _line$metadata6 === void 0 ? void 0 : _line$metadata6.unique_identification_number;
70
+ var _line$metadata2;
71
+ var uid = (_line$metadata2 = line.metadata) === null || _line$metadata2 === void 0 ? void 0 : _line$metadata2.unique_identification_number;
159
72
  if (uid === undefined || uid === null || uid === '') return true;
160
73
  return !claimedUids.has(String(uid));
161
74
  });
@@ -14,17 +14,12 @@ declare enum ScanResultType {
14
14
  NativeScanner = "nativeScanner"
15
15
  }
16
16
  export default class Scan {
17
- private static scanInstances;
18
- private static peripheralsListenerMounted;
19
17
  private solution;
20
18
  private watchKey;
21
19
  private listenerConfig;
22
20
  constructor(solution: BookingTicketImpl, watchKey: string);
23
21
  /**
24
22
  * 初始化外设扫码结果监听
25
- *
26
- * @example
27
- * scan.initPeripheralsListener();
28
23
  */
29
24
  initPeripheralsListener(): void;
30
25
  /**
@@ -1,4 +1,3 @@
1
- var _class;
2
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); }
3
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; }
4
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); } }
@@ -25,7 +24,6 @@ var Scan = /*#__PURE__*/function () {
25
24
  _defineProperty(this, "listenerConfig", new Map());
26
25
  this.solution = solution;
27
26
  this.watchKey = watchKey;
28
- Scan.scanInstances.add(this);
29
27
 
30
28
  // 初始化扫码监听
31
29
  // this.initPeripheralsListener();
@@ -33,23 +31,18 @@ var Scan = /*#__PURE__*/function () {
33
31
 
34
32
  /**
35
33
  * 初始化外设扫码结果监听
36
- *
37
- * @example
38
- * scan.initPeripheralsListener();
39
34
  */
40
35
  _createClass(Scan, [{
41
36
  key: "initPeripheralsListener",
42
37
  value: function initPeripheralsListener() {
43
- var _this$solution, _this$solution$mountF;
44
- if (Scan.peripheralsListenerMounted) return;
45
- Scan.peripheralsListenerMounted = true;
38
+ var _this$solution,
39
+ _this$solution$mountF,
40
+ _this = this;
46
41
  (_this$solution = this.solution) === null || _this$solution === void 0 || (_this$solution = _this$solution.window) === null || _this$solution === void 0 || (_this$solution = _this$solution.interaction) === null || _this$solution === void 0 || (_this$solution = _this$solution.utils) === null || _this$solution === void 0 || (_this$solution$mountF = _this$solution.mountFunction) === null || _this$solution$mountF === void 0 || _this$solution$mountF.call(_this$solution, 'global', 'peripheralsResult', function (strVal) {
47
42
  try {
48
43
  var _result = JSON.parse(strVal);
49
44
  console.log('nativeScannerResult>>>>>>>', _result);
50
- Scan.scanInstances.forEach(function (instance) {
51
- instance.handleScan(_result);
52
- });
45
+ _this.handleScan(_result);
53
46
  } catch (err) {
54
47
  console.error(err);
55
48
  }
@@ -68,9 +61,8 @@ var Scan = /*#__PURE__*/function () {
68
61
  if (lastEnableEventKey) {
69
62
  var listenerConfig = this.listenerConfig.get(lastEnableEventKey);
70
63
  if (listenerConfig) {
71
- var taskUuid = this.generateUuid();
72
64
  listenerConfig.task.addTask({
73
- uuid: taskUuid,
65
+ uuid: this.generateUuid(),
74
66
  type: lastEnableEventKey,
75
67
  actionParams: {
76
68
  scanResult: result
@@ -99,7 +91,7 @@ var Scan = /*#__PURE__*/function () {
99
91
  }, {
100
92
  key: "addListener",
101
93
  value: function addListener(event, scanCallback) {
102
- var _this = this;
94
+ var _this2 = this;
103
95
  // 订阅事件
104
96
  watch.subscribe(this.watchKey, event);
105
97
  // 创建任务
@@ -108,7 +100,7 @@ var Scan = /*#__PURE__*/function () {
108
100
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
109
101
  args[_key] = arguments[_key];
110
102
  }
111
- return _this.scanTaskAction.apply(_this, [event.key].concat(args));
103
+ return _this2.scanTaskAction.apply(_this2, [event.key].concat(args));
112
104
  });
113
105
 
114
106
  // 创建监听配置
@@ -118,7 +110,7 @@ var Scan = /*#__PURE__*/function () {
118
110
  });
119
111
  return {
120
112
  remove: function remove() {
121
- _this.removeListener(event);
113
+ _this2.removeListener(event);
122
114
  }
123
115
  };
124
116
  }
@@ -144,7 +136,6 @@ var Scan = /*#__PURE__*/function () {
144
136
  key: "removeAllListeners",
145
137
  value: function removeAllListeners() {
146
138
  var _this$listenerConfig, _this$listenerConfig$2, _this$listenerConfig2, _this$listenerConfig3;
147
- Scan.scanInstances.delete(this);
148
139
  watch.clearEvent(this.watchKey);
149
140
  (_this$listenerConfig = this.listenerConfig) === null || _this$listenerConfig === void 0 || (_this$listenerConfig$2 = _this$listenerConfig.forEach) === null || _this$listenerConfig$2 === void 0 || _this$listenerConfig$2.call(_this$listenerConfig, function (item) {
150
141
  var _item$task;
@@ -300,7 +291,4 @@ var Scan = /*#__PURE__*/function () {
300
291
  }]);
301
292
  return Scan;
302
293
  }();
303
- _class = Scan;
304
- _defineProperty(Scan, "scanInstances", new Set());
305
- _defineProperty(Scan, "peripheralsListenerMounted", false);
306
294
  export { Scan as default };
@@ -0,0 +1 @@
1
+ {"type":"appointment_booking","platform":"PC","sales_channel":"my_pisel","order_sales_channel":"online_store","bookings":[{"id":0,"number":1,"registration_type":"all","relation_products":[],"is_all":false,"product":{"num":1,"product_id":61170,"product_variant_id":0,"product_bundle":[],"product_option_item":[],"discount_list":[{"amount":100,"type":"good_pass","discount":{"resource_id":64523,"title":{"auto":"玄-商品券","original":"玄-商品券","en":null,"zh-CN":null,"zh-HK":null},"original_amount":100,"product_id":61170,"percent":"1.00"}}]},"sub_type":"minutes","duration":480,"like_status":"common","resources":[{"relation_type":"form","like_status":"common","form_id":35,"relation_id":40357,"capacity":1,"metadata":{"combined_resource":{"status":1,"resource_ids":[40262,40263]},"form_name":"桌台","resource_name":"组合资源测试table-0422-01"},"children":[{"relation_type":"form","like_status":"common","id":40262,"main_field":"A01(组合资源-小桌-4 人)","resourceType":"single","form_id":35,"relation_id":40262,"capacity":1,"metadata":{"combined_resource":null,"form_name":"桌台","resource_name":"A01(组合资源-小桌-4 人)"}},{"relation_type":"form","like_status":"common","id":40263,"main_field":"A02(组合资源-小桌-4 人)","resourceType":"single","form_id":35,"relation_id":40263,"capacity":0,"metadata":{"combined_resource":null,"form_name":"桌台","resource_name":"A02(组合资源-小桌-4 人)"}}]},{"relation_type":"form","like_status":"common","form_id":214,"relation_id":38350,"capacity":1,"metadata":{"combined_resource":null,"form_name":"校区2","resource_name":"West Campus"}}],"schedule_id":0,"start_date":"2025-08-22","start_time":"09:00","select_date":"2025-08-22","end_time":"17:00","end_date":"2025-08-22","metadata":{"account":{"id":13433,"username":"a a"},"capacity":[{"id":0,"value":1,"name":""}]},"holder":null,"relation_forms":[]}],"shop_note":"","schedule_date":"2025-08-22 09:00:00","is_deposit":0,"relation_products":[],"relation_forms":[]}
@@ -305,7 +305,6 @@ export declare class CheckoutImpl extends BaseModule implements Module, Checkout
305
305
  *
306
306
  * 删除本地 IndexDB 中超过指定天数且已同步到后端的订单数据
307
307
  */
308
- /** @deprecated */
309
308
  private cleanupExpiredOrdersAsync;
310
309
  /**
311
310
  * 清除计算缓存