@pisell/private-materials 3.4.66 → 3.4.67

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 (261) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Cart/index.js +20 -3
  12. package/es/components/Sales/Cart/utils.d.ts +5 -0
  13. package/es/components/Sales/Cart/utils.js +16 -0
  14. package/es/components/Sales/Summary/utils.js +5 -4
  15. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  16. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  18. package/es/components/appointmentBooking/components/Header/index.js +12 -12
  19. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +2 -0
  20. package/es/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +82 -0
  21. package/es/components/appointmentBooking/components/TimeSlicing/index.js +46 -5
  22. package/es/components/appointmentBooking/components/Voucher/index.js +5 -2
  23. package/es/components/appointmentBooking/hooks.d.ts +1 -1
  24. package/es/components/appointmentBooking/hooks.js +6 -13
  25. package/es/components/appointmentBooking/locales.d.ts +3 -0
  26. package/es/components/appointmentBooking/locales.js +3 -0
  27. package/es/components/appointmentBooking/utils.d.ts +23 -0
  28. package/es/components/appointmentBooking/utils.js +159 -0
  29. package/es/components/booking/addons/model.d.ts +10 -1
  30. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  31. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  32. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  33. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  34. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  35. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  36. package/es/components/booking/components/voucher/index.js +5 -2
  37. package/es/components/booking/forms/footer.d.ts +1 -0
  38. package/es/components/booking/forms/model.d.ts +10 -1
  39. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  40. package/es/components/booking/forms/table/index.d.ts +1 -0
  41. package/es/components/booking/hooks/useClearCart.d.ts +1 -0
  42. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  43. package/es/components/booking/info/date/index.d.ts +1 -0
  44. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  45. package/es/components/booking/info/model.d.ts +10 -1
  46. package/es/components/booking/info/notes/index.d.ts +1 -0
  47. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  48. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  49. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  50. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  51. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  52. package/es/components/booking/locales.d.ts +3 -0
  53. package/es/components/booking/locales.js +3 -0
  54. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  55. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  56. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  57. package/es/components/booking/model.d.ts +9 -1
  58. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  59. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  60. package/es/components/booking/notes/model.d.ts +10 -1
  61. package/es/components/booking/payments/model.d.ts +10 -1
  62. package/es/components/booking/utils.d.ts +2 -2
  63. package/es/components/eftposPay/amount.d.ts +2 -1
  64. package/es/components/eftposPay/device.d.ts +1 -1
  65. package/es/components/eftposPay/hooks.d.ts +1 -1
  66. package/es/components/eftposPay/payo/config.d.ts +1 -0
  67. package/es/components/eftposPay/store/index.d.ts +1 -1
  68. package/es/components/eftposPay/tip.d.ts +1 -0
  69. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  70. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  71. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
  72. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  74. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  75. package/es/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
  76. package/es/components/eventBooking/components/Voucher/components/Voucher.js +99 -0
  77. package/es/components/eventBooking/components/Voucher/components/index.less +124 -0
  78. package/es/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
  79. package/es/components/eventBooking/components/Voucher/components/locales.js +38 -0
  80. package/es/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
  81. package/es/components/eventBooking/components/Voucher/hooks.js +212 -0
  82. package/es/components/eventBooking/components/Voucher/index.d.ts +2 -0
  83. package/es/components/eventBooking/components/Voucher/index.js +266 -0
  84. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  85. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  86. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  87. package/es/components/login/index.d.ts +1 -0
  88. package/es/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
  89. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  90. package/es/components/pay/toC/model.d.ts +9 -1
  91. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  92. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  93. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  94. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  95. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  96. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  97. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  98. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  99. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  100. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  101. package/es/components/schedules/calendar/index.d.ts +1 -0
  102. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  103. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  104. package/es/components/schedules/model.d.ts +9 -1
  105. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  107. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  108. package/es/components/schedules/products/list/index.d.ts +1 -0
  109. package/es/components/schedules/resources/list/index.d.ts +1 -0
  110. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  111. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  112. package/es/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  113. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  114. package/es/components/shoppingCart/index.d.ts +1 -0
  115. package/es/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  116. package/es/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  117. package/es/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  118. package/es/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  119. package/es/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  120. package/es/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  121. package/es/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  122. package/es/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  123. package/es/components/systemSettings/registry/components/docs/images/image.png +0 -0
  124. package/es/hooks/usePaymentLogger.d.ts +1 -0
  125. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  126. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  127. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  128. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  129. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  130. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  131. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  132. package/es/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  133. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  134. package/es/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  135. package/es/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  136. package/lib/components/Sales/Cart/index.js +25 -7
  137. package/lib/components/Sales/Cart/utils.d.ts +5 -0
  138. package/lib/components/Sales/Cart/utils.js +13 -1
  139. package/lib/components/Sales/Summary/utils.js +2 -4
  140. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +1 -0
  141. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  142. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  143. package/lib/components/appointmentBooking/components/Header/index.js +3 -8
  144. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.d.ts +2 -0
  145. package/lib/components/appointmentBooking/components/TimeSlicing/components/SelectDateOS.js +89 -0
  146. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +27 -7
  147. package/lib/components/appointmentBooking/components/Voucher/index.js +4 -1
  148. package/lib/components/appointmentBooking/hooks.d.ts +1 -1
  149. package/lib/components/appointmentBooking/hooks.js +6 -11
  150. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  151. package/lib/components/appointmentBooking/locales.js +3 -0
  152. package/lib/components/appointmentBooking/utils.d.ts +23 -0
  153. package/lib/components/appointmentBooking/utils.js +103 -0
  154. package/lib/components/booking/addons/model.d.ts +10 -1
  155. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  156. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  157. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  158. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  159. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  160. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  161. package/lib/components/booking/components/voucher/index.js +4 -1
  162. package/lib/components/booking/forms/footer.d.ts +1 -0
  163. package/lib/components/booking/forms/model.d.ts +10 -1
  164. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -0
  165. package/lib/components/booking/forms/table/index.d.ts +1 -0
  166. package/lib/components/booking/hooks/useClearCart.d.ts +1 -0
  167. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  168. package/lib/components/booking/info/date/index.d.ts +1 -0
  169. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  170. package/lib/components/booking/info/model.d.ts +10 -1
  171. package/lib/components/booking/info/notes/index.d.ts +1 -0
  172. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  173. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  174. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  175. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  176. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  177. package/lib/components/booking/locales.d.ts +3 -0
  178. package/lib/components/booking/locales.js +3 -0
  179. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  180. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  181. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  182. package/lib/components/booking/model.d.ts +9 -1
  183. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  184. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  185. package/lib/components/booking/notes/model.d.ts +10 -1
  186. package/lib/components/booking/payments/model.d.ts +10 -1
  187. package/lib/components/booking/utils.d.ts +2 -2
  188. package/lib/components/eftposPay/amount.d.ts +2 -1
  189. package/lib/components/eftposPay/device.d.ts +1 -1
  190. package/lib/components/eftposPay/hooks.d.ts +1 -1
  191. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  192. package/lib/components/eftposPay/store/index.d.ts +1 -1
  193. package/lib/components/eftposPay/tip.d.ts +1 -0
  194. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  195. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  196. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -1
  197. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +1 -0
  198. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +1 -0
  199. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +1 -0
  200. package/lib/components/eventBooking/components/Voucher/components/Voucher.d.ts +20 -0
  201. package/lib/components/eventBooking/components/Voucher/components/Voucher.js +116 -0
  202. package/lib/components/eventBooking/components/Voucher/components/index.less +124 -0
  203. package/lib/components/eventBooking/components/Voucher/components/locales.d.ts +39 -0
  204. package/lib/components/eventBooking/components/Voucher/components/locales.js +59 -0
  205. package/lib/components/eventBooking/components/Voucher/hooks.d.ts +7 -0
  206. package/lib/components/eventBooking/components/Voucher/hooks.js +176 -0
  207. package/lib/components/eventBooking/components/Voucher/index.d.ts +2 -0
  208. package/lib/components/eventBooking/components/Voucher/index.js +197 -0
  209. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  210. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  211. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +1 -0
  212. package/lib/components/login/index.d.ts +1 -0
  213. package/lib/components/pay/toC/PaymentMethods/StripePay/index.js +1 -1
  214. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  215. package/lib/components/pay/toC/model.d.ts +9 -1
  216. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  217. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  218. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +1 -0
  219. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  220. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  221. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  222. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  223. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  224. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  225. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  226. package/lib/components/schedules/calendar/index.d.ts +1 -0
  227. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  228. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  229. package/lib/components/schedules/model.d.ts +9 -1
  230. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  231. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  232. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  233. package/lib/components/schedules/products/list/index.d.ts +1 -0
  234. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  235. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  236. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  237. package/lib/components/shoppingCart/hooks/useAddService.d.ts +1 -0
  238. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -0
  239. package/lib/components/shoppingCart/index.d.ts +1 -0
  240. package/lib/components/systemSettings/registry/components/docs/images/image-1.png +0 -0
  241. package/lib/components/systemSettings/registry/components/docs/images/image-2.png +0 -0
  242. package/lib/components/systemSettings/registry/components/docs/images/image-3.png +0 -0
  243. package/lib/components/systemSettings/registry/components/docs/images/image-4.png +0 -0
  244. package/lib/components/systemSettings/registry/components/docs/images/image-5.png +0 -0
  245. package/lib/components/systemSettings/registry/components/docs/images/image-6.png +0 -0
  246. package/lib/components/systemSettings/registry/components/docs/images/image-7.png +0 -0
  247. package/lib/components/systemSettings/registry/components/docs/images/image-8.png +0 -0
  248. package/lib/components/systemSettings/registry/components/docs/images/image.png +0 -0
  249. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  250. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  251. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  252. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  253. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  254. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  255. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  256. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  257. package/lib/plus/saasRegister/components/VertifyEmail.d.ts +1 -0
  258. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  259. package/lib/plus/walletPassGallery/components/passList/index.d.ts +1 -0
  260. package/lib/plus/walletPassGallery/components/timelineSection/index.d.ts +1 -0
  261. package/package.json +2 -2
@@ -174,6 +174,32 @@ export var sortResources = function sortResources(resources, resourceSort) {
174
174
  console.log(error, 'wh2222');
175
175
  }
176
176
  };
177
+
178
+ /**
179
+ * @title: 处理资源列表并提取资源代码
180
+ * @description: 对资源列表进行排序,并提取 resourceCodes
181
+ * @param {any[]} resources - 原始资源列表
182
+ * @param {any[]} resourceSort - 资源排序配置
183
+ * @return {*} 返回处理后的资源列表和资源代码数组
184
+ * @Author: WangHan
185
+ * @Date: 2025-11-21 15:33
186
+ */
187
+ export var processResourceList = function processResourceList(resources, resourceSort) {
188
+ var _processedResources$;
189
+ var processedResources = resources.map(function (item) {
190
+ return _objectSpread(_objectSpread({}, item), {}, {
191
+ resources: sortResources((item === null || item === void 0 ? void 0 : item.resources) || [], resourceSort)
192
+ });
193
+ });
194
+ var _resources = (processedResources === null || processedResources === void 0 || (_processedResources$ = processedResources[0]) === null || _processedResources$ === void 0 ? void 0 : _processedResources$.resources) || [];
195
+ var resourceCodes = _resources.map(function (item) {
196
+ return item.code;
197
+ });
198
+ return {
199
+ resources: processedResources,
200
+ resourceCodes: resourceCodes
201
+ };
202
+ };
177
203
  export var getMeAccount = function getMeAccount(val) {
178
204
  return val === null || val === void 0 ? void 0 : val.find(function (d) {
179
205
  return !(d !== null && d !== void 0 && d.isGuest);
@@ -765,4 +791,137 @@ export var updateCartResources = function updateCartResources(item, value, curre
765
791
  });
766
792
  }
767
793
  return newResource || [];
794
+ };
795
+
796
+ // 步骤配置:定义每个步骤需要清空的数据类型(从后往前,越往前步骤清的越多)
797
+ var STEP_CLEAR_CONFIG = {
798
+ 'select-time': ['time'],
799
+ 'fill-form': ['time', 'form'],
800
+ 'select-resource': ['time', 'form', 'resource'],
801
+ 'select-date': ['time', 'form', 'resource', 'date'],
802
+ 'select-service': ['time', 'form', 'resource', 'date']
803
+ };
804
+
805
+ // 数据类型枚举
806
+
807
+ /**
808
+ * 根据key匹配步骤(支持精确匹配和startsWith匹配)
809
+ * @param key - 步骤key
810
+ * @returns 匹配到的步骤key,未匹配到返回null
811
+ */
812
+ var getMatchedStepKey = function getMatchedStepKey(key) {
813
+ // 精确匹配
814
+ if (STEP_CLEAR_CONFIG[key]) {
815
+ return key;
816
+ }
817
+ // startsWith匹配(支持 select-resource_@xxx 和 fill-form_@xxx 等)
818
+ var matchedKey = Object.keys(STEP_CLEAR_CONFIG).find(function (stepKey) {
819
+ return key.startsWith(stepKey);
820
+ });
821
+ return matchedKey || null;
822
+ };
823
+
824
+ /**
825
+ * 创建清空操作的映射
826
+ */
827
+ var createClearActions = function createClearActions(appointmentBooking, setTimes) {
828
+ return {
829
+ time: function time() {
830
+ appointmentBooking.deleteCartItemInfo('time');
831
+ setTimes === null || setTimes === void 0 || setTimes([]);
832
+ },
833
+ resource: function resource() {
834
+ appointmentBooking.deleteCartItemInfo('resource');
835
+ },
836
+ form: function form() {
837
+ appointmentBooking.deleteCartItemInfo('relationForms');
838
+ appointmentBooking.removeStep('fill-form');
839
+ },
840
+ date: function date() {
841
+ var _appointmentBooking$o2;
842
+ var _ref4 = (appointmentBooking === null || appointmentBooking === void 0 || (_appointmentBooking$o2 = appointmentBooking.otherParams) === null || _appointmentBooking$o2 === void 0 ? void 0 : _appointmentBooking$o2.productModuleParams) || {},
843
+ bookingProcess = _ref4.bookingProcess;
844
+
845
+ // 如果不是先选择日期步骤,则清空日期
846
+ if (bookingProcess !== 'date_first') {
847
+ appointmentBooking.clearDateRange();
848
+ }
849
+ }
850
+ };
851
+ };
852
+
853
+ /**
854
+ * 处理选择服务步骤的特殊逻辑:清空所有相关的资源和表单步骤
855
+ */
856
+ var clearServiceRelatedSteps = function clearServiceRelatedSteps(appointmentBooking) {
857
+ var stepList = (appointmentBooking === null || appointmentBooking === void 0 ? void 0 : appointmentBooking.getStepList()) || [];
858
+ var stepKeysToRemove = ['select-resource_', 'fill-form_'];
859
+ stepList.forEach(function (item) {
860
+ // 如果某个步骤是跳过的,则取消跳过
861
+ if (item !== null && item !== void 0 && item.isSkip) {
862
+ appointmentBooking.updateStep(item.key, {
863
+ key: item.key,
864
+ isSkip: false
865
+ });
866
+ }
867
+ var shouldRemove = stepKeysToRemove.some(function (prefix) {
868
+ var _item$key;
869
+ return (_item$key = item.key) === null || _item$key === void 0 ? void 0 : _item$key.startsWith(prefix);
870
+ });
871
+ if (shouldRemove) {
872
+ appointmentBooking.removeStep(item.key);
873
+ }
874
+ });
875
+ };
876
+
877
+ /**
878
+ * 执行清空操作
879
+ */
880
+ var executeClearActions = function executeClearActions(dataTypes, clearActions) {
881
+ // 去重后执行
882
+ var uniqueTypes = Array.from(new Set(dataTypes));
883
+ uniqueTypes.forEach(function (type) {
884
+ var action = clearActions[type];
885
+ if (action) {
886
+ action();
887
+ }
888
+ });
889
+ };
890
+
891
+ /**
892
+ * @title: 根据步骤key清空数据
893
+ * @param {string} key - 当前步骤的key
894
+ * @param {any} appointmentBooking - 预约预订实例
895
+ * @param {(times: any[]) => void} setTimes - 设置时间列表的回调函数
896
+ * @return {string[]} 返回需要清空的数据类型数组
897
+ * @Author: WangHan
898
+ * @Date: 2025-11-21 15:40
899
+ */
900
+ export var clearDataByStepKey = function clearDataByStepKey(key, appointmentBooking, setTimes) {
901
+ // 参数校验
902
+ if (!key || !appointmentBooking) {
903
+ return;
904
+ }
905
+
906
+ // 选择服务步骤的特殊处理
907
+ if (key === 'select-service') {
908
+ clearServiceRelatedSteps(appointmentBooking);
909
+ }
910
+
911
+ // 匹配步骤key
912
+ var stepKey = getMatchedStepKey(key);
913
+ if (!stepKey) {
914
+ return;
915
+ }
916
+
917
+ // 获取需要清空的数据类型
918
+ var clearDataTypes = STEP_CLEAR_CONFIG[stepKey] || [];
919
+ if (clearDataTypes.length === 0) {
920
+ return clearDataTypes;
921
+ }
922
+
923
+ // 创建清空操作并执行
924
+ var clearActions = createClearActions(appointmentBooking, setTimes);
925
+ executeClearActions(clearDataTypes, clearActions);
926
+ return clearDataTypes;
768
927
  };
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
3
4
  export default ProductItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const SelectProductItem: ({ item, onClick, onChangeQuantity, amountSymbol, style, className, disabled, }: any) => JSX.Element;
3
4
  export default SelectProductItem;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const renderBundles: (item: any, amountSymbol: string) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 空状态
3
4
  * @description:
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const FooterMenus: ({ state, menuChange, items }: any) => JSX.Element | null;
3
4
  export default FooterMenus;
@@ -247,7 +247,7 @@ var VoucherCard = function VoucherCard(props) {
247
247
  var onScanCode = /*#__PURE__*/function () {
248
248
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
249
249
  var _state$client$value2;
250
- var customerId, val;
250
+ var customerId, val, content;
251
251
  return _regeneratorRuntime().wrap(function _callee$(_context) {
252
252
  while (1) switch (_context.prev = _context.next) {
253
253
  case 0:
@@ -262,8 +262,11 @@ var VoucherCard = function VoucherCard(props) {
262
262
  productListToValue(val.productList, true);
263
263
  setCode('');
264
264
  } else {
265
+ content = {
266
+ time_limit: locales.getText('pisell2.text.goodpass.code-invalid-expired')
267
+ };
265
268
  PisellToast({
266
- content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
269
+ content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : content[val === null || val === void 0 ? void 0 : val.unavailableReason] || locales.getText('pisell2.text.goodpass.code-invalid-cart')
267
270
  });
268
271
  }
269
272
  case 6:
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface FooterProps {
2
3
  state: any;
3
4
  reload: () => void;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SendModalValues } from './index';
2
3
  declare const useSendModal: (bookingId?: number) => {
3
4
  open: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
3
4
  export default Table;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
2
3
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormState } from '../../../model';
2
3
  interface useClientFnParams {
3
4
  state: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
3
4
  declare const DateCom: () => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Notes: () => JSX.Element | null;
2
3
  export default Notes;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/actions/index.less';
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ContactInfoMode: () => JSX.Element;
2
3
  export default ContactInfoMode;
@@ -265,6 +265,7 @@ declare const _default: {
265
265
  'pisell2.text.goodpass.enter-code': string;
266
266
  'pisell2.text.goodpass.code-invalid': string;
267
267
  'pisell2.text.goodpass.code-invalid-cart': string;
268
+ 'pisell2.text.goodpass.code-invalid-expired': string;
268
269
  'pisell2.text.status.valid': string;
269
270
  'pisell2.text.status.expired': string;
270
271
  'pisell2.text.validity.expired': (str: string) => string;
@@ -542,6 +543,7 @@ declare const _default: {
542
543
  'pisell2.text.goodpass.enter-code': string;
543
544
  'pisell2.text.goodpass.code-invalid': string;
544
545
  'pisell2.text.goodpass.code-invalid-cart': string;
546
+ 'pisell2.text.goodpass.code-invalid-expired': string;
545
547
  'pisell2.text.status.valid': string;
546
548
  'pisell2.text.status.expired': string;
547
549
  'pisell2.text.validity.expired': (str: string) => string;
@@ -819,6 +821,7 @@ declare const _default: {
819
821
  'pisell2.text.goodpass.enter-code': string;
820
822
  'pisell2.text.goodpass.code-invalid': string;
821
823
  'pisell2.text.goodpass.code-invalid-cart': string;
824
+ 'pisell2.text.goodpass.code-invalid-expired': string;
822
825
  'pisell2.text.status.valid': string;
823
826
  'pisell2.text.status.expired': string;
824
827
  'pisell2.text.validity.expired': (str: string) => string;
@@ -304,6 +304,7 @@ export default {
304
304
  'pisell2.text.goodpass.enter-code': "Enter Code",
305
305
  'pisell2.text.goodpass.code-invalid': "Current code is invalid",
306
306
  'pisell2.text.goodpass.code-invalid-cart': "No eligible items in the cart",
307
+ 'pisell2.text.goodpass.code-invalid-expired': "Current coupon is not valid in use",
307
308
  'pisell2.text.status.valid': 'Valid',
308
309
  'pisell2.text.status.expired': 'Expired',
309
310
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -631,6 +632,7 @@ export default {
631
632
  'pisell2.text.goodpass.enter-code': "请输入券码",
632
633
  'pisell2.text.goodpass.code-invalid': "当前券码不可用",
633
634
  'pisell2.text.goodpass.code-invalid-cart': "当前购物车中无可用商品",
635
+ 'pisell2.text.goodpass.code-invalid-expired': "当前优惠券不在使用期限内",
634
636
  'pisell2.text.status.valid': '有效',
635
637
  'pisell2.text.status.expired': '已过期',
636
638
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -958,6 +960,7 @@ export default {
958
960
  'pisell2.text.goodpass.enter-code': "請輸入券碼",
959
961
  'pisell2.text.goodpass.code-invalid': "當前券碼不可用",
960
962
  'pisell2.text.goodpass.code-invalid-cart': "當前購物車中無可用商品",
963
+ 'pisell2.text.goodpass.code-invalid-expired': "當前優惠券不在使用期限內",
961
964
  'pisell2.text.status.valid': '有效',
962
965
  'pisell2.text.status.expired': '已過期',
963
966
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface DurationProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from "antd";
2
3
  interface StartTimeProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -108,4 +109,11 @@ export declare const walkInData: {
108
109
  id: number;
109
110
  nickname: string;
110
111
  };
111
- export declare const Provider: any, Context: any;
112
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
113
+ state: FormState;
114
+ } & {
115
+ dispatch: (params: {
116
+ type: string;
117
+ payload: any;
118
+ }) => void;
119
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  isEdit: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  title?: string;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -166,10 +166,10 @@ export declare const getProductTotalPrice: (item: any) => number;
166
166
  export declare const getDuration: (duration: number | {
167
167
  type: string;
168
168
  value: number;
169
- }) => number | {
169
+ }) => number | "flexible" | {
170
170
  type: string;
171
171
  value: number;
172
- } | "flexible";
172
+ };
173
173
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
174
174
  export declare const getIsEdit: (state: any) => boolean;
175
175
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -8,7 +9,7 @@ import { PosProps } from './const';
8
9
  */
9
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
11
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
13
  [keys: string]: unknown;
13
14
  } | undefined, other?: any) => void) | undefined;
14
15
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusEnum } from '../const';
2
3
  export declare const POS: ({ api, onChange, }: {
3
4
  api: {
@@ -297,7 +297,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
300
+ eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './tip.less';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @title: 按钮操作区
3
4
  * @description: 仅包含签名
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: ({ api, onChange, formatAmount, }: {
2
3
  api: any;
3
4
  onChange: any;
@@ -6,6 +6,7 @@ import SelectHolderModal from "../../SelectHolderModal";
6
6
  import ContinueButton from "../ContinueButton";
7
7
  import Total from "./Total";
8
8
  import Deposit from "../Deposit";
9
+ import Voucher from "../../../Voucher";
9
10
  import "./index.less";
10
11
  var CartItem = function CartItem() {
11
12
  var _cartData$cartItems;
@@ -58,7 +59,7 @@ var CartItem = function CartItem() {
58
59
  }
59
60
  })), /*#__PURE__*/React.createElement("div", {
60
61
  className: "event-footer"
61
- }, /*#__PURE__*/React.createElement(Total, null), (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? /*#__PURE__*/React.createElement(Deposit, null) : null, /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
62
+ }, /*#__PURE__*/React.createElement(Voucher, null), /*#__PURE__*/React.createElement(Total, null), (cartData === null || cartData === void 0 || (_cartData$cartItems = cartData.cartItems) === null || _cartData$cartItems === void 0 ? void 0 : _cartData$cartItems.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? /*#__PURE__*/React.createElement(Deposit, null) : null, /*#__PURE__*/React.createElement(ContinueButton, null))), /*#__PURE__*/React.createElement(SelectHolderModal, {
62
63
  open: open
63
64
  }));
64
65
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EmptyHolderModal: (props: any) => JSX.Element;
3
4
  export default EmptyHolderModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const OrderProductModal: (props: any) => JSX.Element;
3
4
  export default OrderProductModal;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
2
3
  export default RemoveOptionConfirmModal;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface VoucherUIProps {
4
+ showDetail: boolean;
5
+ onToggleDetail: () => void;
6
+ isLogin: boolean;
7
+ onLoginClick: () => void;
8
+ availableData: any[];
9
+ onDiscountChange: (val: {
10
+ id: any;
11
+ isSelected: boolean;
12
+ }) => void;
13
+ mixedSort: (val: any[]) => any[];
14
+ code: string;
15
+ onCodeChange: (value: string) => void;
16
+ onApplyCode: () => void;
17
+ codeDisabled?: boolean;
18
+ }
19
+ declare const VoucherUI: React.FC<VoucherUIProps>;
20
+ export default VoucherUI;