@pisell/private-materials 3.3.102 → 3.3.104

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 (409) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/Sales/Cart/index.js +5 -1
  12. package/es/components/Sales/Cart/utils.d.ts +40 -0
  13. package/es/components/Sales/Cart/utils.js +167 -0
  14. package/es/components/Sales/Checkout/index.d.ts +4 -0
  15. package/es/components/Sales/Checkout/index.js +52 -8
  16. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  17. package/es/components/Sales/Checkout/serve.js +16 -2
  18. package/es/components/Sales/Checkout/utils.js +7 -1
  19. package/es/components/Sales/Summary/index.d.ts +10 -0
  20. package/es/components/Sales/Summary/index.js +17 -2
  21. package/es/components/Sales/Summary/serve.d.ts +1 -0
  22. package/es/components/Sales/Summary/serve.js +6 -0
  23. package/es/components/Sales/Summary/utils.d.ts +15 -0
  24. package/es/components/Sales/Summary/utils.js +43 -1
  25. package/es/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  26. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  27. package/es/components/appointmentBooking/components/Content/index.js +15 -1
  28. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  29. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  30. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  31. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  32. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  33. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  34. package/es/components/appointmentBooking/components/Resource/index.js +1 -0
  35. package/es/components/appointmentBooking/components/Services/index.js +23 -27
  36. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  37. package/es/components/appointmentBooking/deposit/index.js +4 -2
  38. package/es/components/appointmentBooking/index.js +14 -0
  39. package/es/components/appointmentBooking/index.less +1 -1
  40. package/es/components/booking/addons/model.d.ts +10 -1
  41. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  42. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  43. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  44. package/es/components/booking/components/browserSelect/index.js +1 -1
  45. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  46. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  47. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  48. package/es/components/booking/components/footer/index.d.ts +1 -0
  49. package/es/components/booking/components/footer/utils.d.ts +41 -0
  50. package/es/components/booking/components/voucher/index.js +2 -2
  51. package/es/components/booking/deposit/index.d.ts +1 -0
  52. package/es/components/booking/forms/model.d.ts +10 -1
  53. package/es/components/booking/forms/model.js +5 -5
  54. package/es/components/booking/forms/single/index.d.ts +1 -0
  55. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  56. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  57. package/es/components/booking/info/date/index.d.ts +1 -0
  58. package/es/components/booking/info/header/index.d.ts +1 -0
  59. package/es/components/booking/info/index.d.ts +0 -1
  60. package/es/components/booking/info/model.d.ts +10 -1
  61. package/es/components/booking/info/notes/index.d.ts +1 -0
  62. package/es/components/booking/info/service/Lists.d.ts +1 -0
  63. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  64. package/es/components/booking/info/service/like/index.js +1 -1
  65. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  66. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  67. package/es/components/booking/info/service2/utils.d.ts +1 -1
  68. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  69. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  70. package/es/components/booking/info2/service/serviceList/index.d.ts +1 -0
  71. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  72. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  73. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  74. package/es/components/booking/materiels/startTime/index.js +1 -1
  75. package/es/components/booking/model.d.ts +9 -1
  76. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  77. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  78. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  79. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  80. package/es/components/booking/notes/addNote/index.d.ts +1 -0
  81. package/es/components/booking/notes/model.d.ts +10 -1
  82. package/es/components/booking/notes/model.js +5 -5
  83. package/es/components/booking/payments/model.d.ts +10 -1
  84. package/es/components/booking/payments/model.js +5 -5
  85. package/es/components/booking/utils.d.ts +2 -2
  86. package/es/components/eftpos/index.d.ts +1 -0
  87. package/es/components/eftpos/pos.d.ts +1 -0
  88. package/es/components/eftposPay/amount.d.ts +2 -1
  89. package/es/components/eftposPay/app.d.ts +1 -0
  90. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  91. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  92. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  93. package/es/components/eftposPay/const.d.ts +4 -1
  94. package/es/components/eftposPay/const.js +3 -1
  95. package/es/components/eftposPay/device.d.ts +2 -1
  96. package/es/components/eftposPay/hooks.d.ts +2 -2
  97. package/es/components/eftposPay/hooks.js +3 -1
  98. package/es/components/eftposPay/index.js +1 -1
  99. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  100. package/es/components/eftposPay/linkly/const.js +82 -0
  101. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  102. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  103. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  104. package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
  105. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  106. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  107. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  108. package/es/components/eftposPay/linkly/index.js +197 -0
  109. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  110. package/es/components/eftposPay/linkly/service.js +81 -0
  111. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  112. package/es/components/eftposPay/manufacturer.js +4 -0
  113. package/es/components/eftposPay/pay.d.ts +1 -1
  114. package/es/components/eftposPay/pay.js +6 -2
  115. package/es/components/eftposPay/payo/config.d.ts +1 -0
  116. package/es/components/eftposPay/store/index.d.ts +6 -6
  117. package/es/components/eftposPay/tip.d.ts +1 -0
  118. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  119. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  120. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  121. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
  122. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  123. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  124. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  125. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  126. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  127. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  128. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  129. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  130. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  131. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  132. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  133. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  134. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  135. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -1
  136. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  137. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  138. package/es/components/eventBooking/index.d.ts +1 -0
  139. package/es/components/eventBooking/locales.d.ts +24 -0
  140. package/es/components/eventBooking/locales.js +27 -3
  141. package/es/components/listComponent/index.js +5 -5
  142. package/es/components/login/index.d.ts +1 -0
  143. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  144. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  145. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  146. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  147. package/es/components/pay/toC/model.d.ts +9 -1
  148. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  149. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  150. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  151. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  152. package/es/components/productExtension/card/index.js +3 -3
  153. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  154. package/es/components/productExtension/fields/Forms/index.js +12 -12
  155. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  156. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  157. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  158. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  159. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  160. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  161. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  162. package/es/components/productExtension/index.d.ts +1 -0
  163. package/es/components/productExtension/server.js +2 -2
  164. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  165. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  166. package/es/components/schedules/calendar/index.d.ts +1 -0
  167. package/es/components/schedules/calendar/index.js +4 -4
  168. package/es/components/schedules/calendar/serve.js +2 -2
  169. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  170. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  171. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  172. package/es/components/schedules/components/ResourceList/index.js +1 -1
  173. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  174. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  175. package/es/components/schedules/components/Search/index.js +5 -5
  176. package/es/components/schedules/model.d.ts +9 -1
  177. package/es/components/schedules/model.js +5 -5
  178. package/es/components/schedules/openHours/index.js +1 -1
  179. package/es/components/schedules/openHours/serve.js +2 -2
  180. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  181. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  182. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  183. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  184. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  185. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  186. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  187. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  188. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  189. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  190. package/es/components/schedules/products/list/index.d.ts +1 -0
  191. package/es/components/schedules/products/serve.js +2 -2
  192. package/es/components/schedules/products/utils.js +5 -5
  193. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  194. package/es/components/schedules/resources/detail/index.js +10 -10
  195. package/es/components/schedules/resources/index.d.ts +1 -0
  196. package/es/components/schedules/resources/list/index.d.ts +1 -0
  197. package/es/components/schedules/resources/list/index.js +2 -2
  198. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  199. package/es/components/schedules/resources/serve.js +2 -2
  200. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  201. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  202. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  203. package/es/components/schedules/schedules/index.d.ts +1 -0
  204. package/es/components/schedules/utils.d.ts +1 -1
  205. package/es/components/schedules/utils.js +4 -4
  206. package/es/components/selectModal/index.js +2 -2
  207. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  208. package/es/components/shoppingCart/index.d.ts +1 -0
  209. package/es/components/taxSelect/index.d.ts +1 -0
  210. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  211. package/es/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  212. package/es/components/ticketBooking/components/ticketBooking/index.js +120 -1
  213. package/es/components/ticketBooking/index.d.ts +1 -0
  214. package/es/components/ticketBooking/locales.d.ts +164 -146
  215. package/es/components/ticketBooking/locales.js +195 -147
  216. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  217. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  218. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  219. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  220. package/es/components/wallet/Detail/model.d.ts +13 -1
  221. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  222. package/es/components/wallet/PointCard/model.d.ts +13 -1
  223. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  224. package/es/components/wallet/Voucher/model.d.ts +13 -1
  225. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  226. package/es/components/wallet/model.d.ts +9 -1
  227. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  228. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  229. package/es/hooks/useComponents.js +1 -1
  230. package/es/utils/index.d.ts +1 -1
  231. package/lib/components/Sales/Cart/index.js +1 -0
  232. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  233. package/lib/components/Sales/Cart/utils.js +117 -0
  234. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  235. package/lib/components/Sales/Checkout/index.js +39 -7
  236. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  237. package/lib/components/Sales/Checkout/serve.js +7 -2
  238. package/lib/components/Sales/Checkout/utils.js +2 -0
  239. package/lib/components/Sales/Summary/index.d.ts +10 -0
  240. package/lib/components/Sales/Summary/index.js +7 -1
  241. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  242. package/lib/components/Sales/Summary/serve.js +32 -0
  243. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  244. package/lib/components/Sales/Summary/utils.js +30 -1
  245. package/lib/components/appointmentBooking/components/Cart/Item/index.js +1 -0
  246. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  247. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  248. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  249. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  250. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  251. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  252. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  253. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  254. package/lib/components/appointmentBooking/components/Resource/index.js +1 -0
  255. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  256. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  257. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  258. package/lib/components/appointmentBooking/index.js +11 -0
  259. package/lib/components/appointmentBooking/index.less +1 -1
  260. package/lib/components/booking/addons/model.d.ts +10 -1
  261. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  262. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  263. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  264. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  265. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  266. package/lib/components/booking/components/footer/index.d.ts +1 -0
  267. package/lib/components/booking/components/footer/utils.d.ts +41 -0
  268. package/lib/components/booking/components/voucher/index.js +2 -2
  269. package/lib/components/booking/deposit/index.d.ts +1 -0
  270. package/lib/components/booking/forms/model.d.ts +10 -1
  271. package/lib/components/booking/forms/single/index.d.ts +1 -0
  272. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  273. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  274. package/lib/components/booking/info/date/index.d.ts +1 -0
  275. package/lib/components/booking/info/header/index.d.ts +1 -0
  276. package/lib/components/booking/info/index.d.ts +0 -1
  277. package/lib/components/booking/info/model.d.ts +10 -1
  278. package/lib/components/booking/info/notes/index.d.ts +1 -0
  279. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  280. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  281. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  282. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  283. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  284. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  285. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  286. package/lib/components/booking/info2/service/serviceList/index.d.ts +1 -0
  287. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  288. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  289. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  290. package/lib/components/booking/model.d.ts +9 -1
  291. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  292. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  293. package/lib/components/booking/notes/addNote/index.d.ts +1 -0
  294. package/lib/components/booking/notes/model.d.ts +10 -1
  295. package/lib/components/booking/payments/model.d.ts +10 -1
  296. package/lib/components/booking/utils.d.ts +2 -2
  297. package/lib/components/eftpos/index.d.ts +1 -0
  298. package/lib/components/eftpos/pos.d.ts +1 -0
  299. package/lib/components/eftposPay/amount.d.ts +2 -1
  300. package/lib/components/eftposPay/app.d.ts +1 -0
  301. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  302. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  303. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  304. package/lib/components/eftposPay/const.d.ts +4 -1
  305. package/lib/components/eftposPay/const.js +2 -0
  306. package/lib/components/eftposPay/device.d.ts +2 -1
  307. package/lib/components/eftposPay/hooks.d.ts +2 -2
  308. package/lib/components/eftposPay/hooks.js +11 -4
  309. package/lib/components/eftposPay/index.js +1 -1
  310. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  311. package/lib/components/eftposPay/linkly/const.js +102 -0
  312. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  313. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  314. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  315. package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
  316. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  317. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  318. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  319. package/lib/components/eftposPay/linkly/index.js +208 -0
  320. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  321. package/lib/components/eftposPay/linkly/service.js +55 -0
  322. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  323. package/lib/components/eftposPay/manufacturer.js +6 -0
  324. package/lib/components/eftposPay/pay.d.ts +1 -1
  325. package/lib/components/eftposPay/pay.js +13 -2
  326. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  327. package/lib/components/eftposPay/store/index.d.ts +6 -6
  328. package/lib/components/eftposPay/tip.d.ts +1 -0
  329. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  330. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  331. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  332. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
  333. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  334. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
  335. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  336. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  337. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  338. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  339. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  340. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  341. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  342. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  343. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  344. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  345. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  346. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  347. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  348. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  349. package/lib/components/eventBooking/index.d.ts +1 -0
  350. package/lib/components/eventBooking/locales.d.ts +24 -0
  351. package/lib/components/eventBooking/locales.js +27 -3
  352. package/lib/components/login/index.d.ts +1 -0
  353. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +1 -0
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  355. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  356. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  357. package/lib/components/pay/toC/model.d.ts +9 -1
  358. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  359. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  360. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  361. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  362. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  363. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  364. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  365. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  366. package/lib/components/productExtension/index.d.ts +1 -0
  367. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  368. package/lib/components/schedules/calendar/index.d.ts +1 -0
  369. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  370. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  371. package/lib/components/schedules/model.d.ts +9 -1
  372. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  373. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  374. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +1 -0
  375. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +1 -0
  376. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  377. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  378. package/lib/components/schedules/products/list/index.d.ts +1 -0
  379. package/lib/components/schedules/resources/index.d.ts +1 -0
  380. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  381. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  382. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  383. package/lib/components/schedules/schedules/index.d.ts +1 -0
  384. package/lib/components/schedules/utils.d.ts +1 -1
  385. package/lib/components/schedules/utils.js +1 -1
  386. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  387. package/lib/components/shoppingCart/index.d.ts +1 -0
  388. package/lib/components/taxSelect/index.d.ts +1 -0
  389. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  390. package/lib/components/ticketBooking/components/menuBar/index.d.ts +0 -1
  391. package/lib/components/ticketBooking/components/ticketBooking/index.js +120 -1
  392. package/lib/components/ticketBooking/index.d.ts +1 -0
  393. package/lib/components/ticketBooking/locales.d.ts +164 -146
  394. package/lib/components/ticketBooking/locales.js +22 -4
  395. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  396. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  397. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  398. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  399. package/lib/components/wallet/Detail/model.d.ts +13 -1
  400. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  401. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  402. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  403. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  404. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  405. package/lib/components/wallet/model.d.ts +9 -1
  406. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  407. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  408. package/lib/utils/index.d.ts +1 -1
  409. package/package.json +2 -2
@@ -0,0 +1,197 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React, { useEffect, useRef } from 'react';
8
+ import { Button } from 'antd';
9
+ import { locales } from '@pisell/utils';
10
+ import { useContextData, useDispatch, updateCustom, updateState, updateNextStep } from "../store";
11
+ import { useFail, useStoreRef } from "../hooks";
12
+ import useEngineContext from "../../../hooks/useEngineContext";
13
+ import { request } from "../../../utils";
14
+ import Step from "../component/step/step";
15
+ import { StatusEnum } from "../const";
16
+ import { useLinklyCancel, useLinklyPayOrRefund, useTimeResultQuery, useLinklySignature } from "./hooks";
17
+ import { LinklyActionStatus } from "./const";
18
+ import { getPayParams } from "../helper";
19
+ var Linkly = function Linkly(_ref) {
20
+ var api = _ref.api,
21
+ onChange = _ref.onChange;
22
+ // 设置request
23
+ var context = useEngineContext();
24
+ var utils = context.appHelper.utils || {};
25
+ request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
26
+ var _useContextData = useContextData(),
27
+ custom = _useContextData.custom,
28
+ status = _useContextData.status;
29
+ var _useStoreRef = useStoreRef(),
30
+ statusRef = _useStoreRef.statusRef,
31
+ netRef = _useStoreRef.netRef,
32
+ modeRef = _useStoreRef.modeRef,
33
+ amountRef = _useStoreRef.amountRef,
34
+ orderIdRef = _useStoreRef.orderIdRef,
35
+ numRef = _useStoreRef.numRef,
36
+ deviceRef = _useStoreRef.deviceRef,
37
+ payRef = _useStoreRef.payRef;
38
+ var dispatch = useDispatch();
39
+ var stepRef = useRef(custom === null || custom === void 0 ? void 0 : custom.step);
40
+ var fail = useFail(0);
41
+ var failRef = useRef(fail);
42
+ var initRef = useRef(false);
43
+ var controllerRef = useRef();
44
+ var unloadRef = useRef(false);
45
+ var clearRef = useRef();
46
+
47
+ // 检查是否可以继续处理接口返回结果,无网 或 已卸载 则不进行处理
48
+ var handleCheck = function handleCheck() {
49
+ return !(unloadRef.current || !netRef.current);
50
+ };
51
+ var handleLinklySuccess = function handleLinklySuccess(res) {
52
+ var resData = (res === null || res === void 0 ? void 0 : res.data) || {};
53
+ var receipt = Array.isArray(resData === null || resData === void 0 ? void 0 : resData.receipt) ? resData.receipt : [resData.receipt];
54
+ receipt = receipt.filter(function (item) {
55
+ return typeof item === 'string';
56
+ }).filter(Boolean);
57
+ dispatch(updateNextStep());
58
+ // 将所有步骤状态设为完成 resolve
59
+ dispatch(updateCustom({
60
+ card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
61
+ receipt: receipt
62
+ }));
63
+
64
+ // 更新支付状态与文案
65
+ dispatch(updateState({
66
+ status: 'success',
67
+ title: locales.getText('page.eftpos-pay.text.successful')(modeRef.current)
68
+ }));
69
+ clearRef.current = setTimeout(function () {
70
+ var _deviceRef$current;
71
+ var params = getPayParams({
72
+ mode: modeRef.current,
73
+ amount: amountRef.current,
74
+ order_id: orderIdRef.current,
75
+ number: numRef.current,
76
+ device: deviceRef.current,
77
+ pay: payRef.current,
78
+ custom: {
79
+ card_reader_surcharge: (resData === null || resData === void 0 ? void 0 : resData.card_reader_surcharge) || 0,
80
+ receipt: receipt
81
+ }
82
+ }, 'success');
83
+ onChange('success', _objectSpread(_objectSpread({}, params), {}, {
84
+ receipt: (_deviceRef$current = deviceRef.current) !== null && _deviceRef$current !== void 0 && (_deviceRef$current = _deviceRef$current.setting) !== null && _deviceRef$current !== void 0 && _deviceRef$current.receipts ? [] : receipt
85
+ }));
86
+ }, 1000);
87
+ };
88
+ var _useLinklyPayOrRefund = useLinklyPayOrRefund(handleCheck),
89
+ payOrRefund = _useLinklyPayOrRefund.payOrRefund;
90
+ var _useLinklyCancel = useLinklyCancel(handleCheck),
91
+ linklyCancel = _useLinklyCancel.linklyCancel;
92
+ var _useTimeResultQuery = useTimeResultQuery(api, handleCheck, handleLinklySuccess),
93
+ resultQuery = _useTimeResultQuery.run,
94
+ stopResultQuery = _useTimeResultQuery.stop;
95
+ var _useLinklySignature = useLinklySignature(handleCheck),
96
+ linklySignature = _useLinklySignature.linklySignature;
97
+ useEffect(function () {
98
+ stepRef.current = custom === null || custom === void 0 ? void 0 : custom.step;
99
+ }, [custom === null || custom === void 0 ? void 0 : custom.step]);
100
+ useEffect(function () {
101
+ failRef.current = fail;
102
+ }, [fail]);
103
+ useEffect(function () {
104
+ if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail) {
105
+ return;
106
+ }
107
+ if (initRef.current) {
108
+ return;
109
+ }
110
+ initRef.current = true;
111
+
112
+ // 存在支付流水号
113
+ if (numRef.current) {
114
+ resultQuery();
115
+ return;
116
+ }
117
+ payOrRefund(resultQuery, handleLinklySuccess);
118
+ }, []);
119
+ useEffect(function () {
120
+ return function () {
121
+ var _controllerRef$curren;
122
+ (_controllerRef$curren = controllerRef.current) === null || _controllerRef$curren === void 0 || _controllerRef$curren.abort();
123
+ unloadRef.current = true;
124
+ if (clearRef.current) {
125
+ clearTimeout(clearRef.current);
126
+ }
127
+ };
128
+ }, []);
129
+
130
+ /**
131
+ * 取消支付
132
+ */
133
+ var onCancel = function onCancel() {
134
+ stopResultQuery();
135
+ linklyCancel(resultQuery);
136
+ };
137
+
138
+ /**
139
+ * 拒绝签名
140
+ */
141
+ var onDecline = function onDecline() {
142
+ stopResultQuery();
143
+ linklySignature(2, resultQuery);
144
+ };
145
+
146
+ /**
147
+ * 接受签名
148
+ */
149
+ var onAccept = function onAccept() {
150
+ stopResultQuery();
151
+ linklySignature(3, resultQuery);
152
+ };
153
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
154
+ className: "pisell-lowcode__eft-pay-body"
155
+ }, ((custom === null || custom === void 0 ? void 0 : custom.list) || []).map(function (item) {
156
+ return /*#__PURE__*/React.createElement(Step, {
157
+ key: item.index,
158
+ pedding: item.pedding,
159
+ resolve: item.resolve,
160
+ reject: item.reject,
161
+ status: item.status
162
+ });
163
+ }), status === StatusEnum.Loading ? /*#__PURE__*/React.createElement("div", {
164
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
165
+ }, locales.getText('page.eftpos-pay.text.processing')) : null, status === StatusEnum.Question ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
166
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
167
+ }, locales.getText('page.eftpos-pay.text.receipt.again.title')), /*#__PURE__*/React.createElement("div", {
168
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
169
+ }, locales.getText('page.eftpos-pay.text.receipt.again.text'))) : null, status === StatusEnum.Success ? /*#__PURE__*/React.createElement("div", {
170
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
171
+ }, locales.getText('page.eftpos-pay.text.transaction.end')) : null), (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Cancel ? /*#__PURE__*/React.createElement("div", {
172
+ className: "pisell-lowcode__eft-pay-step-item-btns"
173
+ }, /*#__PURE__*/React.createElement(Button, {
174
+ block: true,
175
+ className: "pisell-lowcode__eft-pay-step-item-btn",
176
+ onClick: onCancel,
177
+ disabled: !!(custom !== null && custom !== void 0 && custom.buttonDisabled)
178
+ }, locales.getText('page.eftpos-pay.text.cancel'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.CancelWaiting || (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.SignatureWaiting ? /*#__PURE__*/React.createElement("div", {
179
+ className: "pisell-lowcode__eft-pay-step-item-btns"
180
+ }, /*#__PURE__*/React.createElement(Button, {
181
+ block: true,
182
+ className: "pisell-lowcode__eft-pay-step-item-btn",
183
+ disabled: true
184
+ }, locales.getText('page.eftpos-pay.text.leave'))) : null, (custom === null || custom === void 0 ? void 0 : custom.actionStatus) === LinklyActionStatus.Signature ? /*#__PURE__*/React.createElement("div", {
185
+ className: "pisell-lowcode__eft-pay-step-item-btns"
186
+ }, /*#__PURE__*/React.createElement(Button, {
187
+ block: true,
188
+ className: "pisell-lowcode__eft-pay-step-item-btn",
189
+ onClick: onDecline
190
+ }, locales.getText('page.eftpos-pay.text.decline')), /*#__PURE__*/React.createElement(Button, {
191
+ block: true,
192
+ type: "primary",
193
+ className: "pisell-lowcode__eft-pay-step-item-btn",
194
+ onClick: onAccept
195
+ }, locales.getText('page.eftpos-pay.text.accept'))) : null);
196
+ };
197
+ export default Linkly;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * linkly支付接口
3
+ */
4
+ export declare const linklyPayApi: (data: any) => Promise<any>;
5
+ /**
6
+ * 查询linkly支付结果
7
+ */
8
+ export declare const linklyPayQueryApi: (param: any) => Promise<any>;
9
+ /**
10
+ * 取消linkly支付
11
+ */
12
+ export declare const linklyPayCancelApi: (param: any) => Promise<any>;
13
+ /**
14
+ * linkly支付签名结果处理
15
+ */
16
+ export declare const linklyPaySignatureApi: (param: any) => Promise<any>;
17
+ /**
18
+ * linkly退款接口
19
+ */
20
+ export declare const linklyRefundApi: (data: any) => Promise<any>;
21
+ /**
22
+ * 查询linkly退款结果
23
+ */
24
+ export declare const linklyRefundQueryApi: (param: any) => Promise<any>;
25
+ /**
26
+ * 取消linkly退款
27
+ */
28
+ export declare const linklyRefundCancelApi: (param: any) => Promise<any>;
29
+ /**
30
+ * linkly退款签名结果处理
31
+ */
32
+ export declare const linklyRefundSignatureApi: (param: any) => Promise<any>;
@@ -0,0 +1,81 @@
1
+ import { request } from "../../../utils";
2
+
3
+ /**
4
+ * linkly支付接口
5
+ */
6
+ export var linklyPayApi = function linklyPayApi(data) {
7
+ return request.getRequest().post('/shop/linkly/pay/apply', data, {
8
+ customMessage: true,
9
+ fullResult: true
10
+ });
11
+ };
12
+
13
+ /**
14
+ * 查询linkly支付结果
15
+ */
16
+ export var linklyPayQueryApi = function linklyPayQueryApi(param) {
17
+ return request.getRequest().get('/shop/linkly/pay/query', param, {
18
+ customMessage: true,
19
+ fullResult: true
20
+ });
21
+ };
22
+
23
+ /**
24
+ * 取消linkly支付
25
+ */
26
+ export var linklyPayCancelApi = function linklyPayCancelApi(param) {
27
+ return request.getRequest().post('/shop/linkly/pay/cancel', param, {
28
+ customMessage: true,
29
+ fullResult: true
30
+ });
31
+ };
32
+
33
+ /**
34
+ * linkly支付签名结果处理
35
+ */
36
+ export var linklyPaySignatureApi = function linklyPaySignatureApi(param) {
37
+ return request.getRequest().post('/shop/linkly/pay/signature', param, {
38
+ customMessage: true,
39
+ fullResult: true
40
+ });
41
+ };
42
+
43
+ /**
44
+ * linkly退款接口
45
+ */
46
+ export var linklyRefundApi = function linklyRefundApi(data) {
47
+ return request.getRequest().post('/shop/linkly/refund/apply', data, {
48
+ customMessage: true,
49
+ fullResult: true
50
+ });
51
+ };
52
+
53
+ /**
54
+ * 查询linkly退款结果
55
+ */
56
+ export var linklyRefundQueryApi = function linklyRefundQueryApi(param) {
57
+ return request.getRequest().get('/shop/linkly/refund/query', param, {
58
+ customMessage: true,
59
+ fullResult: true
60
+ });
61
+ };
62
+
63
+ /**
64
+ * 取消linkly退款
65
+ */
66
+ export var linklyRefundCancelApi = function linklyRefundCancelApi(param) {
67
+ return request.getRequest().post('/shop/linkly/refund/cancel', param, {
68
+ customMessage: true,
69
+ fullResult: true
70
+ });
71
+ };
72
+
73
+ /**
74
+ * linkly退款签名结果处理
75
+ */
76
+ export var linklyRefundSignatureApi = function linklyRefundSignatureApi(param) {
77
+ return request.getRequest().post('/shop/linkly/refund/signature', param, {
78
+ customMessage: true,
79
+ fullResult: true
80
+ });
81
+ };
@@ -3,4 +3,5 @@ export { getAmonunt } from './helper';
3
3
  export { default as Payo } from './payo';
4
4
  export { default as Windcave } from './windcave/windcave';
5
5
  export { default as Tyro } from './tyro';
6
+ export { default as Linkly } from './linkly';
6
7
  export declare const getInitState: (type: string, params?: any) => State;
@@ -2,10 +2,12 @@ import { EftposEnum } from "./const";
2
2
  import getPayoInitState from "./payo/const";
3
3
  import getTyroInitState from "./tyro/const";
4
4
  import getWindcaveInitState from "./windcave/const";
5
+ import getLinklyInitState from "./linkly/const";
5
6
  export { getAmonunt } from "./helper";
6
7
  export { default as Payo } from "./payo";
7
8
  export { default as Windcave } from "./windcave/windcave";
8
9
  export { default as Tyro } from "./tyro";
10
+ export { default as Linkly } from "./linkly";
9
11
  export var getInitState = function getInitState(type, params) {
10
12
  switch (type) {
11
13
  case EftposEnum.Payo:
@@ -14,6 +16,8 @@ export var getInitState = function getInitState(type, params) {
14
16
  return getWindcaveInitState(params);
15
17
  case EftposEnum.Tyro:
16
18
  return getTyroInitState(params);
19
+ case EftposEnum.Linkly:
20
+ return getLinklyInitState(params);
17
21
  default:
18
22
  throw new Error('未知的厂商类型');
19
23
  }
@@ -6,7 +6,7 @@ import './index.less';
6
6
  * @Author: hongbing.wang
7
7
  * @Date: 2024-08-20 14:59
8
8
  */
9
- declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
9
+ declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client, }: PayProps & {
10
10
  terminal: {
11
11
  network: boolean;
12
12
  };
@@ -10,7 +10,7 @@ import { getPayParams } from "./helper";
10
10
  import Manual from "./component/manual";
11
11
  import Signature from "./component/signature";
12
12
  import { StatusEnum, PayRouteEnum, ClientEnum } from "./const";
13
- import { Payo, Windcave, Tyro } from "./manufacturer";
13
+ import { Payo, Windcave, Tyro, Linkly } from "./manufacturer";
14
14
  import { useContextData, useDispatch, updateStatus, backUpProduction, updateComponent, backUpFree, updateState } from "./store";
15
15
  import "./index.less";
16
16
 
@@ -150,7 +150,7 @@ var Pay = function Pay(_ref) {
150
150
  }
151
151
  };
152
152
  }, []);
153
- // console.log("pay2222 = ",'pay 222' , data.render,data.type)
153
+ console.log('data =>>>>>> ', data);
154
154
  return /*#__PURE__*/React.createElement(React.Fragment, null, data.render ? /*#__PURE__*/React.createElement("div", {
155
155
  className: "pisell-lowcode__eft-pay-box ".concat(className),
156
156
  style: data.type === 'step' ? {} : {
@@ -178,6 +178,10 @@ var Pay = function Pay(_ref) {
178
178
  onChange: onChange,
179
179
  key: data.key,
180
180
  formatAmount: formatAmount
181
+ }) : null, data.eftpos === 'linkly' ? /*#__PURE__*/React.createElement(Linkly, {
182
+ key: data.key,
183
+ api: api,
184
+ onChange: onChange
181
185
  }) : null) : null, data.type === PayRouteEnum.Unset && Comm ? /*#__PURE__*/React.createElement(Comm, {
182
186
  onChange: onChange,
183
187
  api: api,
@@ -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: {
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "loading" | "warn" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
+ action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "unset" | "step" | undefined;
306
+ type?: "step" | "unset" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => JSX.Element;
4
3
  export default ErrorTip;
@@ -16,7 +16,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
16
  import React, { useMemo, useState } from 'react';
17
17
  import { locales } from '@pisell/utils';
18
18
  import { Button, PisellToast } from '@pisell/materials';
19
- import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer } from "../../../../../Sales";
19
+ import { useCart, useHolder, useStep, useCheckout, useSales, useCustomer, useSummary } from "../../../../../Sales";
20
20
  import { formatValues, getFormParams } from "../../../../../Sales/Checkout/utils";
21
21
  import OrderProductModal from "../../OrderProductModal/index";
22
22
  import EmptyHolderModal from "../../EmptyHolderModal";
@@ -24,6 +24,7 @@ import { getProductPrice } from "../../../../../Sales/Event/serve";
24
24
  import { useRequest } from 'ahooks';
25
25
  import useEngineContext from "../../../../../../hooks/useEngineContext";
26
26
  import "./index.less";
27
+ import { Toast } from "../../../../../appointmentBooking/utils";
27
28
  var ContinueButton = function ContinueButton() {
28
29
  var _context$appHelper, _cartData$cartItems;
29
30
  var _useSales = useSales(),
@@ -43,10 +44,14 @@ var ContinueButton = function ContinueButton() {
43
44
  onCheckout = _useCheckout.onCheckout,
44
45
  createBooking = _useCheckout.createBooking,
45
46
  onCheckBeforeBooking = _useCheckout.onCheckBeforeBooking,
46
- checkBeforeBooking = _useCheckout.checkBeforeBooking;
47
+ checkBeforeBooking = _useCheckout.checkBeforeBooking,
48
+ freePay = _useCheckout.freePay;
47
49
  var _useCustomer = useCustomer(),
48
50
  openLoginModal = _useCustomer.openLoginModal,
49
51
  isLogin = _useCustomer.isLogin;
52
+ var _useSummary = useSummary(),
53
+ deposit = _useSummary.deposit,
54
+ isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy;
50
55
 
51
56
  // 下单之前是否检测失败
52
57
  var _useState = useState(false),
@@ -384,41 +389,48 @@ var ContinueButton = function ContinueButton() {
384
389
  */
385
390
  var handleContinue = /*#__PURE__*/function () {
386
391
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
387
- var value, checkRes, emptyHolders;
392
+ var _deposit$protocols, value, checkRes, emptyHolders;
388
393
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
389
394
  while (1) switch (_context6.prev = _context6.next) {
390
395
  case 0:
391
396
  if (!isLastStep) {
392
- _context6.next = 14;
397
+ _context6.next = 17;
398
+ break;
399
+ }
400
+ value = formatValues(data); // 如果未同意定金政策,则提示
401
+ if (!(deposit !== null && deposit !== void 0 && deposit.hasDeposit && (deposit === null || deposit === void 0 || (_deposit$protocols = deposit.protocols) === null || _deposit$protocols === void 0 ? void 0 : _deposit$protocols.length) > 0 && !isAgreeDepositPolicy)) {
402
+ _context6.next = 5;
393
403
  break;
394
404
  }
395
- value = formatValues(data); // 检测商品是否可以下单
396
- _context6.next = 4;
405
+ Toast(locales.getText('pisell2.appointment.deposit.agree.policy'));
406
+ return _context6.abrupt("return");
407
+ case 5:
408
+ _context6.next = 7;
397
409
  return onCheckBeforeBooking(value);
398
- case 4:
410
+ case 7:
399
411
  checkRes = _context6.sent;
400
412
  if (!((checkRes === null || checkRes === void 0 ? void 0 : checkRes.result) === false)) {
401
- _context6.next = 9;
413
+ _context6.next = 12;
402
414
  break;
403
415
  }
404
416
  setCheckedNumber(checkRes === null || checkRes === void 0 ? void 0 : checkRes.num);
405
417
  setOpenCheckout(true);
406
418
  return _context6.abrupt("return");
407
- case 9:
419
+ case 12:
408
420
  // 验证holder是否为空
409
421
  emptyHolders = getWithoutCartItemsHolderNames();
410
422
  if (!((emptyHolders === null || emptyHolders === void 0 ? void 0 : emptyHolders.length) > 0)) {
411
- _context6.next = 12;
423
+ _context6.next = 15;
412
424
  break;
413
425
  }
414
426
  return _context6.abrupt("return", setOpenEmptyHolder(true));
415
- case 12:
427
+ case 15:
416
428
  // 关闭购物车弹窗
417
429
  onCloseCart();
418
430
  return _context6.abrupt("return", handleCheckout());
419
- case 14:
431
+ case 17:
420
432
  if (isLogin()) {
421
- _context6.next = 17;
433
+ _context6.next = 20;
422
434
  break;
423
435
  }
424
436
  onCloseCart();
@@ -448,9 +460,9 @@ var ContinueButton = function ContinueButton() {
448
460
  return callback;
449
461
  }()
450
462
  }));
451
- case 17:
463
+ case 20:
452
464
  handleHolder();
453
- case 18:
465
+ case 21:
454
466
  case "end":
455
467
  return _context6.stop();
456
468
  }
@@ -487,8 +499,8 @@ var ContinueButton = function ContinueButton() {
487
499
  */
488
500
  var confirmLoading = useMemo(function () {
489
501
  if (!isLastStep) return false;
490
- return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading);
491
- }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading]);
502
+ return (createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading) || (checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading) || (freePay === null || freePay === void 0 ? void 0 : freePay.loading);
503
+ }, [isLastStep, createBooking === null || createBooking === void 0 ? void 0 : createBooking.loading, checkBeforeBooking === null || checkBeforeBooking === void 0 ? void 0 : checkBeforeBooking.loading, freePay === null || freePay === void 0 ? void 0 : freePay.loading]);
492
504
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Button, {
493
505
  disabled: !(cartData !== null && cartData !== void 0 && (_cartData$cartItems = cartData.cartItems) !== null && _cartData$cartItems !== void 0 && _cartData$cartItems.length),
494
506
  size: "large",
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Deposit: () => JSX.Element;
3
+ export default Deposit;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { useSummary } from "../../../../../Sales";
3
+ import { DepositContent } from "../../../../../appointmentBooking/components/Deposit";
4
+ var Deposit = function Deposit() {
5
+ var _useSummary = useSummary(),
6
+ deposit = _useSummary.deposit,
7
+ isAgreeDepositPolicy = _useSummary.isAgreeDepositPolicy,
8
+ setIsAgreeDepositPolicy = _useSummary.setIsAgreeDepositPolicy,
9
+ getDepositProtocol = _useSummary.getDepositProtocol;
10
+ return /*#__PURE__*/React.createElement(DepositContent, {
11
+ isAgreeDepositPolicy: !!isAgreeDepositPolicy,
12
+ setIsAgreeDepositPolicy: setIsAgreeDepositPolicy,
13
+ deposit: deposit,
14
+ depositProtocolRequest: getDepositProtocol
15
+ });
16
+ };
17
+ export default Deposit;
@@ -5,21 +5,25 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
5
5
  import React from 'react';
6
6
  import { locales } from '@pisell/utils';
7
7
  import { PisellText } from '@pisell/materials';
8
- import { useSummary } from "../../../../../Sales";
8
+ import { useCart, useSummary } from "../../../../../Sales";
9
9
  import useEngineContext from "../../../../../../hooks/useEngineContext";
10
10
  import "./index.less";
11
11
  import classNames from 'classnames';
12
12
  var Total = function Total(_ref) {
13
- var _context$appHelper, _context$appHelper$ge, _context$appHelper2, _context$appHelper2$g;
13
+ var _context$appHelper, _context$appHelper$ge, _cartData$cartItems, _cartData$cartItems2, _context$appHelper2, _context$appHelper2$g;
14
14
  var className = _ref.className,
15
15
  isFooter = _ref.isFooter;
16
+ var _useCart = useCart(),
17
+ cartData = _useCart.cartData;
16
18
  var _useSummary = useSummary(),
17
19
  taxTitle = _useSummary.taxTitle,
18
20
  totalTaxFee = _useSummary.totalTaxFee,
19
21
  isPriceIncludeTax = _useSummary.isPriceIncludeTax,
20
- total = _useSummary.total;
22
+ total = _useSummary.total,
23
+ deposit = _useSummary.deposit;
21
24
  var context = useEngineContext();
22
- console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), 'wh97978');
25
+ console.log(taxTitle, isPriceIncludeTax, totalTaxFee, total, context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getSymbolic) === null || _context$appHelper$ge === void 0 ? void 0 : _context$appHelper$ge.call(_context$appHelper), deposit, 'wh97978');
26
+ var showDeposit = (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 ? void 0 : deposit.hasDeposit);
23
27
  return /*#__PURE__*/React.createElement("div", {
24
28
  className: "event-total-wrap ".concat(className)
25
29
  }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("div", {
@@ -31,8 +35,8 @@ var Total = function Total(_ref) {
31
35
  className: classNames('event-total', _defineProperty({}, ['total-gst-wrap'], !isPriceIncludeTax && Number(totalTaxFee) > 0))
32
36
  }, /*#__PURE__*/React.createElement("div", {
33
37
  className: "left"
34
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
35
- value: total,
38
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", null, isFooter && showDeposit ? locales.getText('pisell2.appointment.deposit') : locales.getText('pisell2.event.total'), isFooter ? ': ' : ''), isFooter ? /*#__PURE__*/React.createElement(PisellText.Amount, {
39
+ value: (cartData === null || cartData === void 0 || (_cartData$cartItems2 = cartData.cartItems) === null || _cartData$cartItems2 === void 0 ? void 0 : _cartData$cartItems2.length) > 0 && deposit !== null && deposit !== void 0 && deposit.hasDeposit ? deposit === null || deposit === void 0 ? void 0 : deposit.total : total,
36
40
  showCurrencySymbol: true,
37
41
  className: "event-amount"
38
42
  }) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /*#__PURE__*/React.createElement("span", {