@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,51 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/solution/BookingTicket/utils/scan/formatGlobalScan.ts
20
- var formatGlobalScan_exports = {};
21
- __export(formatGlobalScan_exports, {
22
- formatGlobalScanResult: () => formatGlobalScanResult
23
- });
24
- module.exports = __toCommonJS(formatGlobalScan_exports);
25
- function formatGlobalScanResult(raw, scanCode) {
26
- var _a;
27
- if (!(raw == null ? void 0 : raw.searchType))
28
- return null;
29
- const { searchType } = raw;
30
- const { data: resultData, code } = raw.response || {};
31
- if (code !== 200 && searchType !== "local_product") {
32
- return null;
33
- }
34
- if (searchType === "wallet") {
35
- return { searchType, data: resultData == null ? void 0 : resultData.customer, scanCode };
36
- }
37
- if (searchType === "walletPass") {
38
- return { searchType, data: (_a = resultData == null ? void 0 : resultData[0]) == null ? void 0 : _a.customer, scanCode };
39
- }
40
- if (searchType === "product" || searchType === "local_product") {
41
- return { searchType, data: resultData, scanCode };
42
- }
43
- if (searchType === "order") {
44
- return { searchType, data: resultData, scanCode };
45
- }
46
- return null;
47
- }
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- formatGlobalScanResult
51
- });
@@ -1,21 +0,0 @@
1
- /**
2
- * 扫码商品条码预选规格纯函数(对齐 ticketBooking addServiceVariant/utils)。
3
- */
4
- /** 套餐商品 */
5
- export declare function isScanProductBundle(item: any): boolean;
6
- /** 单规格 / 选项组商品 */
7
- export declare function isScanProductOption(item: any): boolean;
8
- /**
9
- * 根据条码匹配 variant,生成 cartDetailValue(对齐 ticketBooking `genValues`)。
10
- *
11
- * @example
12
- * ```ts
13
- * const values = genScanProductValues(catalogItem, '6901234567890');
14
- * const itemWithSelection = { ...catalogItem, cartDetailValue: values };
15
- * ```
16
- */
17
- export declare function genScanProductValues(item: any, code: string): Record<string, any>;
18
- /**
19
- * 统计条码命中的 variant 数量(多命中时需弹窗选择)。
20
- */
21
- export declare function countScanVariantMatches(item: any, code: string): number;
@@ -1,127 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/solution/BookingTicket/utils/scan/scanProductValues.ts
20
- var scanProductValues_exports = {};
21
- __export(scanProductValues_exports, {
22
- countScanVariantMatches: () => countScanVariantMatches,
23
- genScanProductValues: () => genScanProductValues,
24
- isScanProductBundle: () => isScanProductBundle,
25
- isScanProductOption: () => isScanProductOption
26
- });
27
- module.exports = __toCommonJS(scanProductValues_exports);
28
- function isScanProductBundle(item) {
29
- return ((item == null ? void 0 : item.bundle_group_count) || 0) > 0;
30
- }
31
- function isScanProductOption(item) {
32
- var _a;
33
- return ((item == null ? void 0 : item.option_group_count) || 0) > 0 || (((_a = item == null ? void 0 : item.option_group) == null ? void 0 : _a.length) || 0) > 0;
34
- }
35
- function formatVariantGroupTitle(title, variantGroup = []) {
36
- try {
37
- return variantGroup.map((group) => {
38
- const value = title == null ? void 0 : title[group == null ? void 0 : group.position_id];
39
- return value ? `${(group == null ? void 0 : group.name) || "-"}: ${value}` : "";
40
- }).filter(Boolean).join(", ");
41
- } catch {
42
- return "";
43
- }
44
- }
45
- function formatDataKey(data) {
46
- var _a, _b, _c, _d;
47
- const next = { ...data };
48
- let key = `${next.product_id}`;
49
- let rowKey = key;
50
- if (next.product_variant_id) {
51
- const str = `_${next.product_variant_id}`;
52
- key += str;
53
- rowKey += str;
54
- }
55
- if ((_a = next == null ? void 0 : next.option) == null ? void 0 : _a.length) {
56
- for (const item of next.option) {
57
- const str = `_${item.option_group_id}_${item.product_option_item_id}`;
58
- key += str;
59
- rowKey += `${str}_${item.quantity || item.num}`;
60
- }
61
- }
62
- if ((_b = next == null ? void 0 : next.bundle) == null ? void 0 : _b.length) {
63
- for (const item of next.bundle) {
64
- let str = `_${item.group_id}_${item.bundle_product_id}`;
65
- key += str;
66
- rowKey += `${str}_${item.quantity || item.num}`;
67
- if (item == null ? void 0 : item.option) {
68
- for (const opt of item.option) {
69
- const optStr = `_${opt.option_group_id}_${opt.product_option_item_id}`;
70
- key += optStr;
71
- rowKey += `${optStr}_${opt.quantity || opt.num}`;
72
- }
73
- }
74
- }
75
- }
76
- if (next == null ? void 0 : next.session) {
77
- const str = `_${(_c = next.session) == null ? void 0 : _c.key}`;
78
- key += str;
79
- rowKey += str;
80
- }
81
- if (next == null ? void 0 : next.schedule) {
82
- const str = `_${(_d = next.schedule) == null ? void 0 : _d.key}`;
83
- key += str;
84
- rowKey += str;
85
- }
86
- next.key = key;
87
- next.rowKey = rowKey;
88
- return next;
89
- }
90
- function genScanProductValues(item, code) {
91
- var _a, _b;
92
- const params = {
93
- bundle: [],
94
- option: [],
95
- product_id: item.id,
96
- product_variant_id: 0,
97
- quantity: 1,
98
- rowKey: "",
99
- session: null
100
- };
101
- if (((_a = item == null ? void 0 : item.variant_group) == null ? void 0 : _a.length) || ((_b = item == null ? void 0 : item.option_group) == null ? void 0 : _b.length)) {
102
- const variantItem = (item.variant || []).find(
103
- (v) => (v == null ? void 0 : v.code) === code || (v == null ? void 0 : v.barcode) === code
104
- );
105
- if (variantItem) {
106
- params.price = Number((variantItem == null ? void 0 : variantItem.price) || 0);
107
- params.product_variant_id = variantItem.id;
108
- params.product_option_string = formatVariantGroupTitle(
109
- variantItem == null ? void 0 : variantItem.title,
110
- (item == null ? void 0 : item.variant_group) || []
111
- );
112
- }
113
- }
114
- return formatDataKey(params);
115
- }
116
- function countScanVariantMatches(item, code) {
117
- return ((item == null ? void 0 : item.variant) || []).filter(
118
- (v) => (v == null ? void 0 : v.code) === code || (v == null ? void 0 : v.barcode) === code
119
- ).length;
120
- }
121
- // Annotate the CommonJS export names for ESM import in node:
122
- 0 && (module.exports = {
123
- countScanVariantMatches,
124
- genScanProductValues,
125
- isScanProductBundle,
126
- isScanProductOption
127
- });
@@ -1,23 +0,0 @@
1
- import type { ProductData } from '../../../modules/Product/types';
2
- export interface SessionCatalogStaleInfo {
3
- productId: number | string | null;
4
- productTitle: string | null;
5
- sessionDay: string | null;
6
- timeBarDay: string | null;
7
- bookingDate: unknown;
8
- }
9
- /**
10
- * 判断 session 商品 catalog 中的 session 日历日是否与当前 TimeBar / bookingDate 不一致。
11
- *
12
- * @example
13
- * isSessionCatalogDateStale(product, '2026-06-05 19:01:18');
14
- * // session 为 2026-06-04 → true;一致或无 session 快照 → false
15
- */
16
- export declare function isSessionCatalogDateStale(product: ProductData & Record<string, any>, bookingDate: unknown): boolean;
17
- /**
18
- * 组装 session catalog 日期不一致时的日志 metadata。
19
- *
20
- * @example
21
- * buildSessionCatalogStaleInfo(product, '2026-06-05 19:01:18');
22
- */
23
- export declare function buildSessionCatalogStaleInfo(product: ProductData & Record<string, any>, bookingDate: unknown): SessionCatalogStaleInfo;
@@ -1,85 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
- // If the importer is in node compatibility mode or this is not an ESM
21
- // file that has been converted to a CommonJS file using a Babel-
22
- // compatible transform (i.e. "__esModule" has not been set), then set
23
- // "default" to the CommonJS "module.exports" for node compatibility.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
- // src/solution/BookingTicket/utils/sessionCatalogStale.ts
30
- var sessionCatalogStale_exports = {};
31
- __export(sessionCatalogStale_exports, {
32
- buildSessionCatalogStaleInfo: () => buildSessionCatalogStaleInfo,
33
- isSessionCatalogDateStale: () => isSessionCatalogDateStale
34
- });
35
- module.exports = __toCommonJS(sessionCatalogStale_exports);
36
- var import_dayjs = __toESM(require("dayjs"));
37
- var SESSION_EXTENSION_TYPES = ["session_product", "session_ticket"];
38
- function getIsSessionProduct(product) {
39
- return SESSION_EXTENSION_TYPES.includes(product == null ? void 0 : product.extension_type);
40
- }
41
- function resolveSessionCalendarDay(session) {
42
- if (!session)
43
- return null;
44
- const raw = session.start_at ?? session.end_at;
45
- if (!raw)
46
- return null;
47
- const parsed = (0, import_dayjs.default)(raw);
48
- return parsed.isValid() ? parsed.format("YYYY-MM-DD") : null;
49
- }
50
- function formatScheduleCalendarDay(date) {
51
- if (date == null || date === "")
52
- return null;
53
- const parsed = (0, import_dayjs.default)(date);
54
- return parsed.isValid() ? parsed.format("YYYY-MM-DD") : null;
55
- }
56
- function isSessionCatalogDateStale(product, bookingDate) {
57
- var _a;
58
- if (!getIsSessionProduct(product)) {
59
- return false;
60
- }
61
- const timeBarDay = formatScheduleCalendarDay(bookingDate);
62
- if (!timeBarDay) {
63
- return false;
64
- }
65
- const sessionDay = resolveSessionCalendarDay((_a = product.cartDetailValue) == null ? void 0 : _a.session);
66
- if (!sessionDay) {
67
- return false;
68
- }
69
- return sessionDay !== timeBarDay;
70
- }
71
- function buildSessionCatalogStaleInfo(product, bookingDate) {
72
- var _a;
73
- return {
74
- productId: (product == null ? void 0 : product.id) ?? null,
75
- productTitle: (product == null ? void 0 : product.title) ?? (product == null ? void 0 : product.name) ?? null,
76
- sessionDay: resolveSessionCalendarDay((_a = product.cartDetailValue) == null ? void 0 : _a.session),
77
- timeBarDay: formatScheduleCalendarDay(bookingDate),
78
- bookingDate
79
- };
80
- }
81
- // Annotate the CommonJS export names for ESM import in node:
82
- 0 && (module.exports = {
83
- buildSessionCatalogStaleInfo,
84
- isSessionCatalogDateStale
85
- });