@pisell/private-materials 3.3.85 → 3.3.86

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 (292) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +13 -13
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +11 -11
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +11 -11
  8. package/es/businessModel/SalesModel/Sales/index.js +37 -4
  9. package/es/components/Sales/Resource/index.js +2 -2
  10. package/es/components/Sales/Resource/serve.d.ts +7 -0
  11. package/es/components/Sales/Resource/serve.js +10 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  13. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  14. package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
  15. package/es/components/appointmentBooking/components/Services/index.js +23 -27
  16. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  17. package/es/components/appointmentBooking/index.js +14 -0
  18. package/es/components/appointmentBooking/index.less +1 -1
  19. package/es/components/appointmentBooking/locales.d.ts +0 -3
  20. package/es/components/appointmentBooking/locales.js +0 -3
  21. package/es/components/booking/addons/model.d.ts +10 -1
  22. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  23. package/es/components/booking/components/browserSelect/index.js +1 -1
  24. package/es/components/booking/components/footer/utils.d.ts +1 -0
  25. package/es/components/booking/components/footer/utils.js +1 -1
  26. package/es/components/booking/components/voucher/index.js +2 -2
  27. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  28. package/es/components/booking/editBookingModal/index.js +386 -0
  29. package/es/components/booking/editBookingModal/index.less +8 -0
  30. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  31. package/es/components/booking/editBookingModal/locales.js +20 -0
  32. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  33. package/es/components/booking/editBookingModal/mock.js +2993 -0
  34. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  35. package/es/components/booking/editBookingModal/serve.js +288 -0
  36. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  37. package/es/components/booking/editBookingModal/type.js +1 -0
  38. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  39. package/es/components/booking/editBookingModal/utils.js +157 -0
  40. package/es/components/booking/forms/model.d.ts +10 -1
  41. package/es/components/booking/forms/model.js +5 -5
  42. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  43. package/es/components/booking/info/model.d.ts +10 -1
  44. package/es/components/booking/info/service/like/index.js +1 -1
  45. package/es/components/booking/info/service2/utils.d.ts +1 -1
  46. package/es/components/booking/info/service2/utils.js +3 -2
  47. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  48. package/es/components/booking/info2/service/addService/utils.js +44 -13
  49. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  50. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  51. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  52. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  53. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  54. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  55. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  56. package/es/components/booking/info2/utilsByBooking.js +9 -0
  57. package/es/components/booking/locales.d.ts +3 -0
  58. package/es/components/booking/locales.js +3 -0
  59. package/es/components/booking/materiels/startTime/index.js +1 -1
  60. package/es/components/booking/model.d.ts +9 -1
  61. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  62. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  63. package/es/components/booking/notes/model.d.ts +10 -1
  64. package/es/components/booking/notes/model.js +5 -5
  65. package/es/components/booking/payments/model.d.ts +10 -1
  66. package/es/components/booking/payments/model.js +5 -5
  67. package/es/components/booking/utils.d.ts +2 -2
  68. package/es/components/eftposPay/const.d.ts +4 -1
  69. package/es/components/eftposPay/const.js +3 -1
  70. package/es/components/eftposPay/hooks.d.ts +1 -1
  71. package/es/components/eftposPay/hooks.js +3 -1
  72. package/es/components/eftposPay/index.js +1 -1
  73. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  74. package/es/components/eftposPay/linkly/const.js +82 -0
  75. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  76. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  77. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  78. package/es/components/eftposPay/linkly/hooks/normal.js +318 -0
  79. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  80. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  81. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  82. package/es/components/eftposPay/linkly/index.js +197 -0
  83. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  84. package/es/components/eftposPay/linkly/service.js +73 -0
  85. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  86. package/es/components/eftposPay/manufacturer.js +4 -0
  87. package/es/components/eftposPay/pay.d.ts +1 -1
  88. package/es/components/eftposPay/pay.js +6 -2
  89. package/es/components/eftposPay/store/index.d.ts +1 -1
  90. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  91. package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
  92. package/es/components/eventBooking/index.js +21 -7
  93. package/es/components/eventBooking/locales.js +3 -3
  94. package/es/components/index.d.ts +3 -1
  95. package/es/components/index.js +3 -1
  96. package/es/components/listComponent/index.js +5 -5
  97. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  98. package/es/components/pay/toC/model.d.ts +9 -1
  99. package/es/components/productExtension/card/index.js +3 -3
  100. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  101. package/es/components/productExtension/fields/Forms/index.js +12 -12
  102. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  103. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  104. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  105. package/es/components/productExtension/server.js +2 -2
  106. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  107. package/es/components/schedules/calendar/index.js +4 -4
  108. package/es/components/schedules/calendar/serve.js +2 -2
  109. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  110. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  111. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  112. package/es/components/schedules/components/ResourceList/index.js +1 -1
  113. package/es/components/schedules/components/Search/index.js +5 -5
  114. package/es/components/schedules/model.d.ts +9 -1
  115. package/es/components/schedules/model.js +5 -5
  116. package/es/components/schedules/openHours/index.js +1 -1
  117. package/es/components/schedules/openHours/serve.js +2 -2
  118. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  119. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  121. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  122. package/es/components/schedules/products/serve.js +2 -2
  123. package/es/components/schedules/products/utils.js +5 -5
  124. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  125. package/es/components/schedules/resources/detail/index.js +10 -10
  126. package/es/components/schedules/resources/list/index.js +2 -2
  127. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  128. package/es/components/schedules/resources/serve.js +2 -2
  129. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  130. package/es/components/schedules/utils.d.ts +1 -1
  131. package/es/components/schedules/utils.js +4 -4
  132. package/es/components/selectModal/index.js +2 -2
  133. package/es/components/stepController/components/Content/index.d.ts +7 -0
  134. package/es/components/stepController/components/Content/index.js +9 -0
  135. package/es/components/stepController/components/Content/index.less +8 -0
  136. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  137. package/es/components/stepController/components/Footer/index.js +15 -0
  138. package/es/components/stepController/components/Footer/index.less +39 -0
  139. package/es/components/stepController/components/Header/index.d.ts +20 -0
  140. package/es/components/stepController/components/Header/index.js +97 -0
  141. package/es/components/stepController/components/Header/index.less +21 -0
  142. package/es/components/stepController/index.d.ts +5 -0
  143. package/es/components/stepController/index.js +64 -0
  144. package/es/components/stepController/index.less +11 -0
  145. package/es/components/stepController/locales.d.ts +27 -0
  146. package/es/components/stepController/locales.js +32 -0
  147. package/es/components/stepController/types.d.ts +23 -0
  148. package/es/components/stepController/types.js +1 -0
  149. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  150. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  151. package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
  152. package/es/components/ticketBooking/locales.d.ts +164 -146
  153. package/es/components/ticketBooking/locales.js +195 -147
  154. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  155. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  156. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  157. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  158. package/es/components/wallet/Detail/model.d.ts +13 -1
  159. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  160. package/es/components/wallet/PointCard/model.d.ts +13 -1
  161. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  162. package/es/components/wallet/Voucher/model.d.ts +13 -1
  163. package/es/components/wallet/model.d.ts +9 -1
  164. package/es/hooks/useComponents.js +1 -1
  165. package/es/hooks/useWindowSize.d.ts +5 -0
  166. package/es/hooks/useWindowSize.js +26 -0
  167. package/es/index.d.ts +2 -0
  168. package/es/index.js +3 -1
  169. package/es/utils/index.d.ts +1 -1
  170. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  171. package/lib/components/Sales/Resource/index.js +1 -1
  172. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  173. package/lib/components/Sales/Resource/serve.js +9 -2
  174. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  175. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  176. package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
  177. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  178. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  179. package/lib/components/appointmentBooking/index.js +11 -0
  180. package/lib/components/appointmentBooking/index.less +1 -1
  181. package/lib/components/appointmentBooking/locales.d.ts +0 -3
  182. package/lib/components/appointmentBooking/locales.js +0 -3
  183. package/lib/components/booking/addons/model.d.ts +10 -1
  184. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  185. package/lib/components/booking/components/footer/utils.js +2 -0
  186. package/lib/components/booking/components/voucher/index.js +11 -23
  187. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  188. package/lib/components/booking/editBookingModal/index.js +363 -0
  189. package/lib/components/booking/editBookingModal/index.less +8 -0
  190. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  191. package/lib/components/booking/editBookingModal/locales.js +44 -0
  192. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  193. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  194. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  195. package/lib/components/booking/editBookingModal/serve.js +178 -0
  196. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  197. package/lib/components/booking/editBookingModal/type.js +17 -0
  198. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  199. package/lib/components/booking/editBookingModal/utils.js +158 -0
  200. package/lib/components/booking/forms/model.d.ts +10 -1
  201. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  202. package/lib/components/booking/info/model.d.ts +10 -1
  203. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  204. package/lib/components/booking/info/service2/utils.js +2 -2
  205. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  206. package/lib/components/booking/info2/service/addService/utils.js +27 -4
  207. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  208. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  209. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  210. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  211. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  212. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  213. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  214. package/lib/components/booking/info2/utilsByBooking.js +6 -0
  215. package/lib/components/booking/locales.d.ts +3 -0
  216. package/lib/components/booking/locales.js +3 -0
  217. package/lib/components/booking/model.d.ts +9 -1
  218. package/lib/components/booking/notes/model.d.ts +10 -1
  219. package/lib/components/booking/payments/model.d.ts +10 -1
  220. package/lib/components/booking/utils.d.ts +2 -2
  221. package/lib/components/eftposPay/const.d.ts +4 -1
  222. package/lib/components/eftposPay/const.js +2 -0
  223. package/lib/components/eftposPay/hooks.d.ts +1 -1
  224. package/lib/components/eftposPay/hooks.js +11 -4
  225. package/lib/components/eftposPay/index.js +1 -1
  226. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  227. package/lib/components/eftposPay/linkly/const.js +102 -0
  228. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  229. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  230. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  231. package/lib/components/eftposPay/linkly/hooks/normal.js +239 -0
  232. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  233. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  234. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  235. package/lib/components/eftposPay/linkly/index.js +208 -0
  236. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  237. package/lib/components/eftposPay/linkly/service.js +55 -0
  238. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  239. package/lib/components/eftposPay/manufacturer.js +6 -0
  240. package/lib/components/eftposPay/pay.d.ts +1 -1
  241. package/lib/components/eftposPay/pay.js +13 -2
  242. package/lib/components/eftposPay/store/index.d.ts +1 -1
  243. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  244. package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
  245. package/lib/components/eventBooking/index.js +11 -7
  246. package/lib/components/eventBooking/locales.js +3 -3
  247. package/lib/components/index.d.ts +3 -1
  248. package/lib/components/index.js +6 -0
  249. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  250. package/lib/components/pay/toC/model.d.ts +9 -1
  251. package/lib/components/schedules/model.d.ts +9 -1
  252. package/lib/components/schedules/utils.d.ts +1 -1
  253. package/lib/components/schedules/utils.js +1 -1
  254. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  255. package/lib/components/stepController/components/Content/index.js +40 -0
  256. package/lib/components/stepController/components/Content/index.less +8 -0
  257. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  258. package/lib/components/stepController/components/Footer/index.js +49 -0
  259. package/lib/components/stepController/components/Footer/index.less +39 -0
  260. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  261. package/lib/components/stepController/components/Header/index.js +104 -0
  262. package/lib/components/stepController/components/Header/index.less +21 -0
  263. package/lib/components/stepController/index.d.ts +5 -0
  264. package/lib/components/stepController/index.js +89 -0
  265. package/lib/components/stepController/index.less +11 -0
  266. package/lib/components/stepController/locales.d.ts +27 -0
  267. package/lib/components/stepController/locales.js +50 -0
  268. package/lib/components/stepController/types.d.ts +23 -0
  269. package/lib/components/stepController/types.js +17 -0
  270. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  271. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  272. package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
  273. package/lib/components/ticketBooking/locales.d.ts +164 -146
  274. package/lib/components/ticketBooking/locales.js +22 -4
  275. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  276. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  277. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  278. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  279. package/lib/components/wallet/Detail/model.d.ts +13 -1
  280. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  281. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  282. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  283. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  284. package/lib/components/wallet/model.d.ts +9 -1
  285. package/lib/hooks/useWindowSize.d.ts +5 -0
  286. package/lib/hooks/useWindowSize.js +51 -0
  287. package/lib/index.d.ts +2 -0
  288. package/lib/index.js +6 -0
  289. package/lib/utils/index.d.ts +1 -1
  290. package/lowcode/edit-booking-modal/meta.ts +53 -0
  291. package/lowcode/step-controller/meta.ts +88 -0
  292. package/package.json +4 -4
@@ -0,0 +1,11 @@
1
+ .pisell-step-controller {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ height: calc(var(--vh, 1vh) * 100);
6
+ box-sizing: border-box;
7
+ overflow-y: auto;
8
+ }
9
+
10
+ .pisell-step-controller-mobile {
11
+ }
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.step.controller.step': (step: number) => string;
4
+ 'pisell2.step.controller.sendEmail': string;
5
+ 'pisell2.step.controller.copy': string;
6
+ 'pisell2.step.controller.download': string;
7
+ 'pisell2.step.controller.preview': string;
8
+ 'pisell2.step.controller.continue': string;
9
+ };
10
+ 'zh-CN': {
11
+ 'pisell2.step.controller.step': (step: number) => string;
12
+ 'pisell2.step.controller.sendEmail': string;
13
+ 'pisell2.step.controller.copy': string;
14
+ 'pisell2.step.controller.download': string;
15
+ 'pisell2.step.controller.preview': string;
16
+ 'pisell2.step.controller.continue': string;
17
+ };
18
+ 'zh-HK': {
19
+ 'pisell2.step.controller.step': (step: number) => string;
20
+ 'pisell2.step.controller.sendEmail': string;
21
+ 'pisell2.step.controller.copy': string;
22
+ 'pisell2.step.controller.download': string;
23
+ 'pisell2.step.controller.preview': string;
24
+ 'pisell2.step.controller.continue': string;
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,50 @@
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/components/stepController/locales.ts
20
+ var locales_exports = {};
21
+ __export(locales_exports, {
22
+ default: () => locales_default
23
+ });
24
+ module.exports = __toCommonJS(locales_exports);
25
+ var locales_default = {
26
+ en: {
27
+ "pisell2.step.controller.step": (step) => `Step ${step || 1}`,
28
+ "pisell2.step.controller.sendEmail": "Send Email",
29
+ "pisell2.step.controller.copy": "Copy",
30
+ "pisell2.step.controller.download": "Download",
31
+ "pisell2.step.controller.preview": "Preview",
32
+ "pisell2.step.controller.continue": "Continue"
33
+ },
34
+ "zh-CN": {
35
+ "pisell2.step.controller.step": (step) => `步骤 ${step || 1}`,
36
+ "pisell2.step.controller.sendEmail": "发送邮件",
37
+ "pisell2.step.controller.copy": "复制",
38
+ "pisell2.step.controller.download": "下载",
39
+ "pisell2.step.controller.preview": "预览",
40
+ "pisell2.step.controller.continue": "继续"
41
+ },
42
+ "zh-HK": {
43
+ "pisell2.step.controller.step": (step) => `步驟 ${step || 1}`,
44
+ "pisell2.step.controller.sendEmail": "發送郵件",
45
+ "pisell2.step.controller.copy": "複製",
46
+ "pisell2.step.controller.download": "下載",
47
+ "pisell2.step.controller.preview": "預覽",
48
+ "pisell2.step.controller.continue": "繼續"
49
+ }
50
+ };
@@ -0,0 +1,23 @@
1
+ /// <reference types="react" />
2
+ export interface Step {
3
+ key: string;
4
+ description: string;
5
+ }
6
+ export interface StepControllerProps extends Step {
7
+ steps: Step[];
8
+ currentStep: string;
9
+ isLastStep?: boolean;
10
+ isMobile?: boolean;
11
+ children?: React.ReactNode;
12
+ onBack?: (key: string) => void;
13
+ onClose?: () => void;
14
+ confirmCloseProps?: {
15
+ isConfirmClose?: boolean;
16
+ title?: string;
17
+ content?: string;
18
+ okText?: string;
19
+ cancelText?: string;
20
+ };
21
+ showFooter?: boolean;
22
+ footerContent?: React.ReactNode;
23
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/components/stepController/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -404,7 +404,7 @@ var AddSerivce = (props) => {
404
404
  isTitle: 1,
405
405
  isSubtitle: 1,
406
406
  isPrice: 1,
407
- isOriginPrice: 1,
407
+ isOriginPrice: 0,
408
408
  isStock: 1
409
409
  }
410
410
  }
@@ -1,3 +1,4 @@
1
1
  import './index.less';
2
+ export declare const _formatBookingDetail: (data: any, modalState: any) => any;
2
3
  declare const TicketBooking: () => JSX.Element;
3
4
  export default TicketBooking;
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/ticketBooking/components/ticketBooking/index.tsx
30
30
  var ticketBooking_exports = {};
31
31
  __export(ticketBooking_exports, {
32
+ _formatBookingDetail: () => _formatBookingDetail,
32
33
  default: () => ticketBooking_default
33
34
  });
34
35
  module.exports = __toCommonJS(ticketBooking_exports);
@@ -45,12 +46,163 @@ var import_utils2 = require("../../utils");
45
46
  var import_addServiceVariant = __toESM(require("../addServiceVariant"));
46
47
  var import_timeBar = __toESM(require("../timeBar"));
47
48
  var import_index = require("./index.less");
49
+ var import_utils3 = require("../../../booking/info/service2/utils");
50
+ var import_amount = require("../../../booking/components/footer/amount");
51
+ var import_formatProductMessage = __toESM(require("../../utils/formatProductMessage"));
52
+ var _formatBookingDetail = (data, modalState) => {
53
+ var _a, _b, _c, _d;
54
+ let {
55
+ customer_id,
56
+ holder,
57
+ customer_name,
58
+ email,
59
+ phone,
60
+ country_calling_code,
61
+ bookings,
62
+ customer,
63
+ note,
64
+ payment_status,
65
+ is_other_entrance_edited,
66
+ shop_discount
67
+ } = data;
68
+ const clientValue = {
69
+ name: ((customer == null ? void 0 : customer.display_name) || "").trim() || ((customer == null ? void 0 : customer.nickname) || "").trim() || "",
70
+ id: customer_id || (customer == null ? void 0 : customer.id) || (customer == null ? void 0 : customer.customer_id) || 1,
71
+ email: customer == null ? void 0 : customer.email,
72
+ phone: (customer == null ? void 0 : customer.phone) || "",
73
+ country_calling_code: (customer == null ? void 0 : customer.country_calling_code) || "",
74
+ cover: (customer == null ? void 0 : customer.cover) || ""
75
+ };
76
+ const start_date = (_b = (_a = bookings == null ? void 0 : bookings.list) == null ? void 0 : _a[0]) == null ? void 0 : _b.start_date;
77
+ const dateValue = (0, import_dayjs.default)(
78
+ start_date ? start_date + " " + ((_d = (_c = bookings == null ? void 0 : bookings.list) == null ? void 0 : _c[0]) == null ? void 0 : _d.start_time) : /* @__PURE__ */ new Date()
79
+ );
80
+ const petsValue = holder;
81
+ const getCapacity = (resetD) => {
82
+ var _a2;
83
+ return (_a2 = resetD.metadata) == null ? void 0 : _a2.capacity;
84
+ };
85
+ const getResource = (resetD) => {
86
+ var _a2;
87
+ if (!bookings.relation_type) {
88
+ try {
89
+ if ((resetD == null ? void 0 : resetD.event_resources) && ((_a2 = resetD == null ? void 0 : resetD.event_resources) == null ? void 0 : _a2.length)) {
90
+ return resetD.event_resources.reduce((pre, cur) => {
91
+ if (pre[cur.form_id]) {
92
+ pre[cur.form_id].push(cur);
93
+ } else {
94
+ pre[cur.form_id] = [cur];
95
+ }
96
+ return pre;
97
+ }, {});
98
+ }
99
+ } catch (err) {
100
+ console.error(err);
101
+ }
102
+ }
103
+ return resetD.relation_id;
104
+ };
105
+ const serviceValue = bookings.list.map((d) => {
106
+ let { detail, product, ...resetD } = d;
107
+ let _detail = detail || mockProduct;
108
+ let start_date2 = (0, import_dayjs.default)(resetD.start_date + " " + resetD.start_time);
109
+ let end_date = (0, import_dayjs.default)(resetD.end_date + " " + resetD.end_time);
110
+ return {
111
+ _id: (Math.random() + "").replace(/\D/g, "").substring(0, 11),
112
+ ..._detail,
113
+ booking_id: resetD.id,
114
+ id: _detail.product_id,
115
+ title: _detail.product_title,
116
+ quantity: Number(_detail.product_quantity),
117
+ cover: _detail.product_cover,
118
+ // 商品本身的价格
119
+ price: Number(_detail.source_product_price),
120
+ relation_form_name: resetD.relation_form_name,
121
+ product_resource: product == null ? void 0 : product.product_resource,
122
+ capacity: product == null ? void 0 : product.capacity,
123
+ _extend: {
124
+ ...resetD,
125
+ quantity: Number(_detail.product_quantity),
126
+ startDate: start_date2,
127
+ start_date: start_date2,
128
+ endDate: end_date,
129
+ end_date,
130
+ // 商品本身的价格
131
+ price: Number(_detail.source_product_price),
132
+ product_name: _detail.product_title,
133
+ discount_reason: _detail.product_discount_reason,
134
+ // resource: resetD.relation_id,
135
+ order_detail_id: _detail.order_detail_id,
136
+ // 总价: 商品本身价格 + 套餐价格 + 单规格价格 包含折扣
137
+ total: Number(_detail.selling_price),
138
+ // 原总价: 商品本身价格 + 套餐价格 + 单规格价格 不包含折扣
139
+ origin_total: Number(_detail.original_price),
140
+ payment_price: Number(_detail.payment_price),
141
+ other: (0, import_utils2.restoreProductOtherData)(d),
142
+ // 是否编辑了套餐 默认为0 如果编辑之后为1
143
+ bundle_edit: 0,
144
+ discount_per: _detail.discount_per,
145
+ discount_type: _detail.discount_type,
146
+ discountway: _detail.discountway,
147
+ capacity: getCapacity(resetD),
148
+ resource: getResource(resetD)
149
+ }
150
+ };
151
+ });
152
+ let disabledEdit = (0, import_utils2.getDisabledEdit)(data);
153
+ let channelDisabledEdit = !!is_other_entrance_edited;
154
+ return {
155
+ ...modalState,
156
+ client: {
157
+ ...modalState.client,
158
+ value: clientValue,
159
+ edit: false,
160
+ showModal: false
161
+ },
162
+ date: {
163
+ ...modalState.date,
164
+ value: dateValue,
165
+ edit: false,
166
+ showModal: false
167
+ },
168
+ pet: {
169
+ ...modalState.pet,
170
+ showModal: false,
171
+ edit: false
172
+ },
173
+ service: {
174
+ ...modalState.service,
175
+ value: serviceValue,
176
+ addModal: false,
177
+ editModal: false,
178
+ edit: false
179
+ },
180
+ notes: {
181
+ ...modalState.notes,
182
+ orderNote: note,
183
+ edit: false
184
+ },
185
+ disabledEdit,
186
+ channelDisabledEdit,
187
+ appointment_status: bookings == null ? void 0 : bookings.appointment_status
188
+ };
189
+ };
48
190
  var TicketBooking = () => {
49
191
  var _a;
50
192
  const [state, setState] = (0, import_miniRedux.useStore)();
51
193
  const engineContext = (0, import_useEngineContext.default)();
52
194
  const { props: engineProps } = engineContext.engine;
53
- const { action, isTerminal, lowcodeRef, interaction, store, storage, Toast } = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
195
+ const {
196
+ action,
197
+ isTerminal,
198
+ lowcodeRef,
199
+ interaction,
200
+ store,
201
+ storage,
202
+ Toast,
203
+ getSymbolic,
204
+ translation
205
+ } = (_a = engineContext.appHelper) == null ? void 0 : _a.utils;
54
206
  const _persistentRef = (0, import_react.useRef)(false);
55
207
  const _initStateRef = (0, import_react.useRef)({});
56
208
  const _listTimerRef = (0, import_react.useRef)();
@@ -137,6 +289,112 @@ var TicketBooking = () => {
137
289
  intervalSetTime: isInterval
138
290
  });
139
291
  };
292
+ (0, import_react.useEffect)(() => {
293
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
294
+ const cartItems = (_b = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.service) == null ? void 0 : _b.value;
295
+ if (!Array.isArray(cartItems) || cartItems.length === 0) {
296
+ (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
297
+ module: "cds",
298
+ key: "cartUpdate",
299
+ data: {
300
+ currency_symbol: getSymbolic(),
301
+ total: "0",
302
+ // 小计
303
+ products: [],
304
+ fees: []
305
+ }
306
+ });
307
+ }
308
+ const total = (0, import_amount.getSumTotal)(state.modalState, true);
309
+ let formatedProducts = [];
310
+ try {
311
+ formatedProducts = (0, import_utils3.formatProducts)(
312
+ cartItems,
313
+ state.modalState,
314
+ false,
315
+ true,
316
+ true
317
+ );
318
+ } catch (error) {
319
+ console.error(error);
320
+ }
321
+ console.log("formatedProducts", total, formatedProducts);
322
+ let fees = [];
323
+ let products = [];
324
+ for (const item of formatedProducts) {
325
+ const { id, name, image, origin_total, total: total2, num, note, _origin } = item;
326
+ (_e = _origin == null ? void 0 : _origin.discount_list) == null ? void 0 : _e.forEach((dl) => {
327
+ fees.push({
328
+ isReduce: dl.type === "good_pass",
329
+ title: translation(dl == null ? void 0 : dl.discount.title),
330
+ price: dl.amount,
331
+ type: dl.type
332
+ });
333
+ });
334
+ let msg = "";
335
+ try {
336
+ msg = (0, import_formatProductMessage.default)(
337
+ {
338
+ ...item,
339
+ currency_symbol: getSymbolic()
340
+ },
341
+ (_f = engineContext.appHelper) == null ? void 0 : _f.utils
342
+ );
343
+ } catch (error) {
344
+ console.error(error);
345
+ }
346
+ let _item = {
347
+ productID: id,
348
+ title: name,
349
+ cover: image,
350
+ // 封面图
351
+ price: total2,
352
+ // 售价
353
+ buyCount: num,
354
+ // 购买数量
355
+ productFormatMessage: msg,
356
+ note
357
+ };
358
+ if (origin_total !== total2) _item.modifyPrice = origin_total;
359
+ products.push(_item);
360
+ }
361
+ console.log(
362
+ "formatedProducts",
363
+ (_g = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _g(products.length)
364
+ );
365
+ if (products.length > 0) {
366
+ fees.unshift({
367
+ title: import_utils.locales.getText("pisell2.product.card.subtotal"),
368
+ price: total.productAmount,
369
+ type: "subtotal",
370
+ message: (_h = import_utils.locales.getText("pisell2.product.card.cart-items")) == null ? void 0 : _h(
371
+ products.length
372
+ )
373
+ });
374
+ }
375
+ console.log("start post message, config:", {
376
+ module: "cds",
377
+ key: "cartUpdate",
378
+ data: {
379
+ currency_symbol: getSymbolic(),
380
+ total: total.productAmount,
381
+ // 小计
382
+ products,
383
+ fees
384
+ }
385
+ });
386
+ (_j = (_i = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _i.postMessageToApp) == null ? void 0 : _j.call(_i, {
387
+ module: "cds",
388
+ key: "cartUpdate",
389
+ data: {
390
+ currency_symbol: getSymbolic(),
391
+ total: total.expectAmount,
392
+ // 小计
393
+ products,
394
+ fees
395
+ }
396
+ });
397
+ }, [state.modalState]);
140
398
  const _setModalState = (props) => {
141
399
  var _a2, _b;
142
400
  console.log("同步state到外层", props);
@@ -306,144 +564,6 @@ var TicketBooking = () => {
306
564
  (_a2 = dom == null ? void 0 : dom.scrollIntoView) == null ? void 0 : _a2.call(dom, { block: "center", behavior: "smooth" });
307
565
  }
308
566
  };
309
- const _formatBookingDetail = (data, modalState) => {
310
- var _a2, _b, _c, _d;
311
- let {
312
- customer_id,
313
- holder,
314
- customer_name,
315
- email,
316
- phone,
317
- country_calling_code,
318
- bookings,
319
- customer,
320
- note,
321
- payment_status,
322
- is_other_entrance_edited,
323
- shop_discount
324
- } = data;
325
- const clientValue = {
326
- name: ((customer == null ? void 0 : customer.display_name) || "").trim() || ((customer == null ? void 0 : customer.nickname) || "").trim() || "",
327
- id: customer_id || (customer == null ? void 0 : customer.id) || (customer == null ? void 0 : customer.customer_id) || 1,
328
- email: customer == null ? void 0 : customer.email,
329
- phone: (customer == null ? void 0 : customer.phone) || "",
330
- country_calling_code: (customer == null ? void 0 : customer.country_calling_code) || "",
331
- cover: (customer == null ? void 0 : customer.cover) || ""
332
- };
333
- const start_date = (_b = (_a2 = bookings == null ? void 0 : bookings.list) == null ? void 0 : _a2[0]) == null ? void 0 : _b.start_date;
334
- const dateValue = (0, import_dayjs.default)(
335
- start_date ? start_date + " " + ((_d = (_c = bookings == null ? void 0 : bookings.list) == null ? void 0 : _c[0]) == null ? void 0 : _d.start_time) : /* @__PURE__ */ new Date()
336
- );
337
- const petsValue = holder;
338
- const getCapacity = (resetD) => {
339
- var _a3;
340
- return (_a3 = resetD.metadata) == null ? void 0 : _a3.capacity;
341
- };
342
- const getResource = (resetD) => {
343
- var _a3;
344
- if (!bookings.relation_type) {
345
- try {
346
- if ((resetD == null ? void 0 : resetD.event_resources) && ((_a3 = resetD == null ? void 0 : resetD.event_resources) == null ? void 0 : _a3.length)) {
347
- return resetD.event_resources.reduce((pre, cur) => {
348
- if (pre[cur.form_id]) {
349
- pre[cur.form_id].push(cur);
350
- } else {
351
- pre[cur.form_id] = [cur];
352
- }
353
- return pre;
354
- }, {});
355
- }
356
- } catch (err) {
357
- console.error(err);
358
- }
359
- }
360
- return resetD.relation_id;
361
- };
362
- const serviceValue = bookings.list.map((d) => {
363
- let { detail, product, ...resetD } = d;
364
- let _detail = detail || mockProduct;
365
- let start_date2 = (0, import_dayjs.default)(resetD.start_date + " " + resetD.start_time);
366
- let end_date = (0, import_dayjs.default)(resetD.end_date + " " + resetD.end_time);
367
- return {
368
- _id: (Math.random() + "").replace(/\D/g, "").substring(0, 11),
369
- ..._detail,
370
- booking_id: resetD.id,
371
- id: _detail.product_id,
372
- title: _detail.product_title,
373
- quantity: Number(_detail.product_quantity),
374
- cover: _detail.product_cover,
375
- // 商品本身的价格
376
- price: Number(_detail.source_product_price),
377
- relation_form_name: resetD.relation_form_name,
378
- product_resource: product == null ? void 0 : product.product_resource,
379
- capacity: product == null ? void 0 : product.capacity,
380
- _extend: {
381
- ...resetD,
382
- quantity: Number(_detail.product_quantity),
383
- startDate: start_date2,
384
- start_date: start_date2,
385
- endDate: end_date,
386
- end_date,
387
- // 商品本身的价格
388
- price: Number(_detail.source_product_price),
389
- product_name: _detail.product_title,
390
- discount_reason: _detail.product_discount_reason,
391
- // resource: resetD.relation_id,
392
- order_detail_id: _detail.order_detail_id,
393
- // 总价: 商品本身价格 + 套餐价格 + 单规格价格 包含折扣
394
- total: Number(_detail.selling_price),
395
- // 原总价: 商品本身价格 + 套餐价格 + 单规格价格 不包含折扣
396
- origin_total: Number(_detail.original_price),
397
- payment_price: Number(_detail.payment_price),
398
- other: (0, import_utils2.restoreProductOtherData)(d),
399
- // 是否编辑了套餐 默认为0 如果编辑之后为1
400
- bundle_edit: 0,
401
- discount_per: _detail.discount_per,
402
- discount_type: _detail.discount_type,
403
- discountway: _detail.discountway,
404
- capacity: getCapacity(resetD),
405
- resource: getResource(resetD)
406
- }
407
- };
408
- });
409
- let disabledEdit = (0, import_utils2.getDisabledEdit)(data);
410
- let channelDisabledEdit = !!is_other_entrance_edited;
411
- return {
412
- ...modalState,
413
- client: {
414
- ...modalState.client,
415
- value: clientValue,
416
- edit: false,
417
- showModal: false
418
- },
419
- date: {
420
- ...modalState.date,
421
- value: dateValue,
422
- edit: false,
423
- showModal: false
424
- },
425
- pet: {
426
- ...modalState.pet,
427
- showModal: false,
428
- edit: false
429
- },
430
- service: {
431
- ...modalState.service,
432
- value: serviceValue,
433
- addModal: false,
434
- editModal: false,
435
- edit: false
436
- },
437
- notes: {
438
- ...modalState.notes,
439
- orderNote: note,
440
- edit: false
441
- },
442
- disabledEdit,
443
- channelDisabledEdit,
444
- appointment_status: bookings == null ? void 0 : bookings.appointment_status
445
- };
446
- };
447
567
  const _initBookingData = (type, data) => {
448
568
  var _a2, _b, _c, _d, _e, _f, _g;
449
569
  let initState = _getInitState({
@@ -788,3 +908,7 @@ var TicketBooking = () => {
788
908
  ));
789
909
  };
790
910
  var ticketBooking_default = TicketBooking;
911
+ // Annotate the CommonJS export names for ESM import in node:
912
+ 0 && (module.exports = {
913
+ _formatBookingDetail
914
+ });