@pisell/private-materials 6.3.44 → 6.3.46

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 (267) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +10 -10
  6. package/build/lowcode/view.js +2 -2
  7. package/es/businessModel/SalesModel/index.d.ts +0 -1
  8. package/es/components/Sales/Summary/utils.d.ts +1 -1
  9. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  11. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  14. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  15. package/es/components/booking/components/collapsibleList/utils.d.ts +1 -0
  16. package/es/components/booking/components/emptyBooking/index.d.ts +1 -0
  17. package/es/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  18. package/es/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  19. package/es/components/booking/forms/model.d.ts +10 -1
  20. package/es/components/booking/forms/single/index.d.ts +1 -0
  21. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  22. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  23. package/es/components/booking/info/date/index.d.ts +1 -0
  24. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  25. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  26. package/es/components/booking/info/index.d.ts +0 -1
  27. package/es/components/booking/info/model.d.ts +10 -1
  28. package/es/components/booking/info/notes/index.d.ts +1 -0
  29. package/es/components/booking/info/service/Lists.d.ts +0 -1
  30. package/es/components/booking/info/service/actions/index.d.ts +1 -0
  31. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  32. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  33. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  34. package/es/components/booking/info/service2/utils.d.ts +1 -1
  35. package/es/components/booking/info2/service/actions/index.d.ts +1 -0
  36. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  37. package/es/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  38. package/es/components/booking/materiels/contacts/index.d.ts +1 -0
  39. package/es/components/booking/materiels/duration/index.d.ts +1 -0
  40. package/es/components/booking/model.d.ts +9 -1
  41. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  42. package/es/components/booking/notes/NoteBlock/index.d.ts +1 -0
  43. package/es/components/booking/notes/model.d.ts +10 -1
  44. package/es/components/booking/payments/model.d.ts +10 -1
  45. package/es/components/eftpos/index.d.ts +1 -0
  46. package/es/components/eftpos/pos.d.ts +1 -0
  47. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  48. package/es/components/eftposPay/amount.d.ts +2 -1
  49. package/es/components/eftposPay/app.d.ts +0 -1
  50. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  51. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  52. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  53. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  54. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  55. package/es/components/eftposPay/device.d.ts +1 -1
  56. package/es/components/eftposPay/hooks.d.ts +2 -2
  57. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +14 -6
  58. package/es/components/eftposPay/pay.d.ts +1 -0
  59. package/es/components/eftposPay/payo/config.js +70 -32
  60. package/es/components/eftposPay/payo/payment.d.ts +66 -0
  61. package/es/components/eftposPay/payo/payment.js +579 -0
  62. package/es/components/eftposPay/store/index.d.ts +4 -4
  63. package/es/components/eftposPay/tip.d.ts +1 -0
  64. package/es/components/eftposPay/utils/log/index.d.ts +110 -0
  65. package/es/components/eftposPay/utils/log/index.js +371 -0
  66. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  67. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  68. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  70. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  71. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  73. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  77. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  78. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  79. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  80. package/es/components/index.d.ts +2 -1
  81. package/es/components/index.js +2 -1
  82. package/es/components/login/index.d.ts +1 -0
  83. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  84. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  85. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  86. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  87. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  88. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  89. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  90. package/es/components/pay/toC/index.js +2 -1
  91. package/es/components/pay/toC/model.d.ts +9 -1
  92. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  93. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  94. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  95. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  96. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  97. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  98. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  99. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  100. package/es/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  101. package/es/components/schedules/calendar/index.d.ts +1 -0
  102. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  103. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  104. package/es/components/schedules/components/ScheduleList/index.d.ts +1 -0
  105. package/es/components/schedules/model.d.ts +9 -1
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  108. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  109. package/es/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  110. package/es/components/schedules/products/list/index.d.ts +1 -0
  111. package/es/components/schedules/resources/index.d.ts +1 -0
  112. package/es/components/schedules/resources/list/index.d.ts +1 -0
  113. package/es/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  114. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  115. package/es/components/schedules/schedules/index.d.ts +1 -0
  116. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  117. package/es/components/shoppingCart/index.d.ts +1 -0
  118. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  119. package/es/components/wallet/Detail/model.d.ts +13 -1
  120. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  121. package/es/components/wallet/PointCard/model.d.ts +13 -1
  122. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  123. package/es/components/wallet/Voucher/model.d.ts +13 -1
  124. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  125. package/es/components/wallet/model.d.ts +9 -1
  126. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  127. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  128. package/es/hooks/usePaymentLogger.d.ts +1 -0
  129. package/es/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  130. package/es/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  131. package/es/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  132. package/es/plus/saasRegister/components/GoLogin.d.ts +1 -0
  133. package/es/plus/saasRegister/components/Header.d.ts +1 -0
  134. package/es/plus/saasRegister/components/VerifyError.d.ts +1 -0
  135. package/es/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  136. package/es/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  137. package/lib/businessModel/SalesModel/index.d.ts +0 -1
  138. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  139. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  140. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  141. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  142. package/lib/components/booking/addons/model.d.ts +10 -1
  143. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +1 -0
  144. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +1 -0
  145. package/lib/components/booking/components/collapsibleList/utils.d.ts +1 -0
  146. package/lib/components/booking/components/emptyBooking/index.d.ts +1 -0
  147. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +1 -0
  148. package/lib/components/booking/components/reloadResourceModal/index.d.ts +1 -0
  149. package/lib/components/booking/forms/model.d.ts +10 -1
  150. package/lib/components/booking/forms/single/index.d.ts +1 -0
  151. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  152. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +1 -0
  153. package/lib/components/booking/info/date/index.d.ts +1 -0
  154. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  155. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  156. package/lib/components/booking/info/index.d.ts +0 -1
  157. package/lib/components/booking/info/model.d.ts +10 -1
  158. package/lib/components/booking/info/notes/index.d.ts +1 -0
  159. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  160. package/lib/components/booking/info/service/actions/index.d.ts +1 -0
  161. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  162. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  163. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  164. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  165. package/lib/components/booking/info2/service/actions/index.d.ts +1 -0
  166. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  167. package/lib/components/booking/info2/service/contactInfoMode/index.d.ts +1 -0
  168. package/lib/components/booking/materiels/contacts/index.d.ts +1 -0
  169. package/lib/components/booking/materiels/duration/index.d.ts +1 -0
  170. package/lib/components/booking/model.d.ts +9 -1
  171. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +1 -0
  172. package/lib/components/booking/notes/NoteBlock/index.d.ts +1 -0
  173. package/lib/components/booking/notes/model.d.ts +10 -1
  174. package/lib/components/booking/payments/model.d.ts +10 -1
  175. package/lib/components/eftpos/index.d.ts +1 -0
  176. package/lib/components/eftpos/pos.d.ts +1 -0
  177. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  178. package/lib/components/eftposPay/amount.d.ts +2 -1
  179. package/lib/components/eftposPay/app.d.ts +0 -1
  180. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  181. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  182. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  183. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  184. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  185. package/lib/components/eftposPay/device.d.ts +1 -1
  186. package/lib/components/eftposPay/hooks.d.ts +2 -2
  187. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +12 -6
  188. package/lib/components/eftposPay/pay.d.ts +1 -0
  189. package/lib/components/eftposPay/payo/config.js +98 -73
  190. package/lib/components/eftposPay/payo/payment.d.ts +66 -0
  191. package/lib/components/eftposPay/payo/payment.js +357 -0
  192. package/lib/components/eftposPay/store/index.d.ts +4 -4
  193. package/lib/components/eftposPay/tip.d.ts +1 -0
  194. package/lib/components/eftposPay/utils/log/index.d.ts +110 -0
  195. package/lib/components/eftposPay/utils/log/index.js +294 -0
  196. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  197. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  198. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  199. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  200. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  201. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  202. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  205. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  206. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  207. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  208. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +1 -0
  209. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +0 -1
  210. package/lib/components/index.d.ts +2 -1
  211. package/lib/components/index.js +3 -0
  212. package/lib/components/login/index.d.ts +1 -0
  213. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +13 -11
  214. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  215. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  216. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  217. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  218. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  219. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  220. package/lib/components/pay/toC/index.js +1 -0
  221. package/lib/components/pay/toC/model.d.ts +9 -1
  222. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +1 -0
  223. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +1 -0
  224. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +0 -1
  225. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  226. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -0
  227. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +1 -0
  228. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  229. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  230. package/lib/components/ruleSetting/ruleBorder/index.d.ts +1 -0
  231. package/lib/components/schedules/calendar/index.d.ts +1 -0
  232. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +1 -0
  233. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  234. package/lib/components/schedules/components/ScheduleList/index.d.ts +1 -0
  235. package/lib/components/schedules/model.d.ts +9 -1
  236. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +1 -0
  237. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +1 -0
  238. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +1 -0
  239. package/lib/components/schedules/products/list/ProductItem/index.d.ts +1 -0
  240. package/lib/components/schedules/products/list/index.d.ts +1 -0
  241. package/lib/components/schedules/resources/index.d.ts +1 -0
  242. package/lib/components/schedules/resources/list/index.d.ts +1 -0
  243. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +1 -0
  244. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +1 -0
  245. package/lib/components/schedules/schedules/index.d.ts +1 -0
  246. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -1
  247. package/lib/components/shoppingCart/index.d.ts +1 -0
  248. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +0 -1
  249. package/lib/components/wallet/Detail/model.d.ts +13 -1
  250. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  251. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  252. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  253. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  254. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  255. package/lib/components/wallet/model.d.ts +9 -1
  256. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  257. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  258. package/lib/hooks/usePaymentLogger.d.ts +1 -0
  259. package/lib/plus/saasCreateOrganization/components/Header.d.ts +1 -0
  260. package/lib/plus/saasRegister/components/EntryEmail.d.ts +1 -0
  261. package/lib/plus/saasRegister/components/EntryInfo.d.ts +1 -0
  262. package/lib/plus/saasRegister/components/GoLogin.d.ts +1 -0
  263. package/lib/plus/saasRegister/components/Header.d.ts +1 -0
  264. package/lib/plus/saasRegister/components/VerifyError.d.ts +1 -0
  265. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +1 -0
  266. package/lib/plus/walletEditor/components/relationProduct/index.d.ts +1 -0
  267. package/package.json +3 -3
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Notes: () => JSX.Element | null;
2
3
  export default Notes;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -244,4 +244,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
244
244
  * @Author: WangHan
245
245
  * @Date: 2024-12-24 11:32
246
246
  */
247
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
247
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/actions/index.less';
2
3
  declare const Actions: ({ currentService }: {
3
4
  currentService: any;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: any;
10
+ locale: string;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const ContactInfoMode: () => JSX.Element;
2
3
  export default ContactInfoMode;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type ContactType = {
3
4
  country_calling_code: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface DurationProps extends SelectProps {
3
4
  locale?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -109,4 +110,11 @@ export declare const walkInData: {
109
110
  id: number;
110
111
  nickname: string;
111
112
  };
112
- export declare const Provider: any, Context: any;
113
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
114
+ state: FormState;
115
+ } & {
116
+ dispatch: (params: {
117
+ type: string;
118
+ payload: any;
119
+ }) => void;
120
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  isEdit: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  export interface InfoProps {
3
4
  title?: string;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Eftpos, DeviceStatus } from './const';
2
3
  import './index.less';
3
4
  interface PosProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { DeviceProp } from "./const";
2
3
  interface PosProps {
3
4
  eftposName: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.css';
3
2
  /**
4
3
  * @title: 自定义组件设置
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -8,7 +9,7 @@ import { PosProps } from './const';
8
9
  */
9
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
11
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
13
  [keys: string]: unknown;
13
14
  } | undefined, other?: any) => void) | undefined;
14
15
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PosProps, RouteType } from './const';
3
2
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
4
3
  action: RouteType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ className, isMobile, onChange }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 断网(客户端)提示页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 支付状态未知页面
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  import './index.less';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  /**
3
4
  * @title: 取消签名确认页
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -41,6 +41,7 @@ var import_const = require("../../const");
41
41
  var import_const2 = require("../const");
42
42
  var GlobalTimeout = 1e3 * 60 * 2;
43
43
  var RequestTimeout = 1e3 * 5;
44
+ var QUERY_INTERVAL = 1e3 * 2;
44
45
  var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
45
46
  const dispatch = (0, import_store.useDispatch)();
46
47
  const { numRef, modeRef, deviceRef, orderIdRef } = (0, import_hooks.useStoreRef)();
@@ -56,6 +57,7 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
56
57
  const startTimeRef = (0, import_react.useRef)(null);
57
58
  const isQueryFinishedRef = (0, import_react.useRef)(true);
58
59
  const queryIdRef = (0, import_react.useRef)(null);
60
+ const queryIntervalTimerRef = (0, import_react.useRef)(null);
59
61
  const _resultQuery = async () => {
60
62
  var _a, _b;
61
63
  if (controllerRef.current) {
@@ -107,9 +109,9 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
107
109
  console.log("交易状态为0需要继续查询");
108
110
  _log("Querying" /* Querying */, result);
109
111
  isQueryFinishedRef.current = false;
110
- setTimeout(() => {
112
+ queryIntervalTimerRef.current = setTimeout(() => {
111
113
  _resultQuery();
112
- }, 1500);
114
+ }, QUERY_INTERVAL);
113
115
  return;
114
116
  }
115
117
  if (data.status < 0) {
@@ -145,18 +147,18 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
145
147
  _log("AbortError" /* AbortError */);
146
148
  console.log("Error: 请求被取消,将继续查询");
147
149
  isQueryFinishedRef.current = false;
148
- setTimeout(() => {
150
+ queryIntervalTimerRef.current = setTimeout(() => {
149
151
  _resultQuery();
150
- }, 1500);
152
+ }, QUERY_INTERVAL);
151
153
  return;
152
154
  }
153
155
  if (!(error == null ? void 0 : error.code) || `${error.code}` === import_const.PayStatus.Timeout) {
154
156
  _log("NetworkError" /* NetworkError */);
155
157
  console.log("Error: 网关类报错,将继续查询");
156
158
  isQueryFinishedRef.current = false;
157
- setTimeout(() => {
159
+ queryIntervalTimerRef.current = setTimeout(() => {
158
160
  _resultQuery();
159
- }, 1500);
161
+ }, QUERY_INTERVAL);
160
162
  return;
161
163
  }
162
164
  _log("Error" /* Error */, error);
@@ -203,6 +205,10 @@ var useTimeResultQuery = (api, resultCheck, handleLinklySuccess) => {
203
205
  clearTimeout(requestTimeoutIdRef.current);
204
206
  requestTimeoutIdRef.current = null;
205
207
  }
208
+ if (queryIntervalTimerRef.current) {
209
+ clearTimeout(queryIntervalTimerRef.current);
210
+ queryIntervalTimerRef.current = null;
211
+ }
206
212
  if (controllerRef.current) {
207
213
  controllerRef.current.abort();
208
214
  controllerRef.current = null;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PayProps } from './const';
2
3
  import './index.less';
3
4
  /**
@@ -42,6 +42,7 @@ var import_helper = require("../helper");
42
42
  var import_hooks = require("../hooks");
43
43
  var import_store = require("../store");
44
44
  var import_hooks2 = require("./hooks");
45
+ var import_payment = require("./payment");
45
46
  var POS = ({
46
47
  api,
47
48
  onChange
@@ -68,6 +69,13 @@ var POS = ({
68
69
  const initRef = (0, import_react.useRef)(false);
69
70
  const unloadRef = (0, import_react.useRef)(false);
70
71
  const [check] = (0, import_hooks2.useValidate)(1e3 * 60);
72
+ const { run: paymentRun, clean: paymentClean } = (0, import_payment.usePayment)({
73
+ payApi: api.pay,
74
+ checkApi: api.check,
75
+ shouldContinue: () => {
76
+ return !(unloadRef.current || !netRef.current);
77
+ }
78
+ });
71
79
  (0, import_react.useEffect)(() => {
72
80
  failRef.current = fail;
73
81
  }, [fail]);
@@ -126,7 +134,7 @@ var POS = ({
126
134
  );
127
135
  };
128
136
  (0, import_react.useEffect)(() => {
129
- var _a, _b;
137
+ var _a, _b, _c;
130
138
  if (statusRef.current === import_const.StatusEnum.Success || statusRef.current === import_const.StatusEnum.Fail) {
131
139
  return;
132
140
  }
@@ -145,82 +153,98 @@ var POS = ({
145
153
  })
146
154
  );
147
155
  controllerRef.current = new AbortController();
148
- const resultPromise = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay ? api.pay(
149
- {
150
- ...(custom == null ? void 0 : custom.platform) ? {
151
- operator_id: custom.operator_id,
152
- operator_type: custom.operator_type,
153
- platform: custom.platform,
154
- custom_payment_id: custom.custom_payment_id,
155
- service_charge: {
156
- amount: payRef.current.surMoney,
157
- percentage: payRef.current.surPercentRate
158
- },
159
- original_amount: payRef.current.amount
160
- } : {},
161
- order_id: orderIdRef.current,
162
- amount: payRef.current.total,
163
- card_reader_type: eftposRef.current,
164
- card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
165
- number: numRef.current,
166
- pay_param_base64: encodeURIComponent(
167
- btoa(
168
- encodeURIComponent(
169
- JSON.stringify({
170
- ...dataRef.current,
171
- number: numRef.current
172
- })
173
- )
156
+ const isPay = modeRef.current === import_const.ModeEnum.Pay || modeRef.current === import_const.ModeEnum.FullPay;
157
+ const apiParams = isPay ? {
158
+ ...(custom == null ? void 0 : custom.platform) ? {
159
+ operator_id: custom.operator_id,
160
+ operator_type: custom.operator_type,
161
+ platform: custom.platform,
162
+ custom_payment_id: custom.custom_payment_id
163
+ } : {},
164
+ original_amount: payRef.current.amount,
165
+ service_charge: {
166
+ amount: payRef.current.surMoney,
167
+ percentage: payRef.current.surPercentRate
168
+ },
169
+ order_id: orderIdRef.current,
170
+ amount: payRef.current.total,
171
+ card_reader_type: eftposRef.current,
172
+ card_reader_id: (_a = deviceRef.current) == null ? void 0 : _a.id,
173
+ number: numRef.current,
174
+ pay_param_base64: encodeURIComponent(
175
+ btoa(
176
+ encodeURIComponent(
177
+ JSON.stringify({
178
+ ...dataRef.current,
179
+ number: numRef.current
180
+ })
174
181
  )
175
182
  )
176
- },
177
- { signal: controllerRef.current.signal }
178
- ) : api.refund(
179
- {
180
- order_id: orderIdRef.current,
181
- amount: amountRef.current,
182
- card_reader_type: eftposRef.current,
183
- card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id,
184
- number: numRef.current,
185
- pay_param_base64: encodeURIComponent(
186
- btoa(
187
- encodeURIComponent(
188
- JSON.stringify({
189
- ...dataRef.current,
190
- number: numRef.current
191
- })
192
- )
183
+ )
184
+ } : {
185
+ order_id: orderIdRef.current,
186
+ amount: amountRef.current,
187
+ card_reader_type: eftposRef.current,
188
+ card_reader_id: (_b = deviceRef.current) == null ? void 0 : _b.id,
189
+ number: numRef.current,
190
+ pay_param_base64: encodeURIComponent(
191
+ btoa(
192
+ encodeURIComponent(
193
+ JSON.stringify({
194
+ ...dataRef.current,
195
+ number: numRef.current
196
+ })
193
197
  )
194
198
  )
195
- },
196
- { signal: controllerRef.current.signal }
197
- );
198
- resultPromise.then((res) => {
199
- console.log("netRef.current111 = ", netRef.current);
200
- if (unloadRef.current || !netRef.current) {
201
- return;
202
- }
203
- if (res && `${res.code}` === "200") {
204
- success(res);
205
- return;
206
- }
207
- return Promise.reject(res);
208
- }).catch((err) => {
209
- console.log(
210
- "netRef.current222 = ",
211
- netRef.current,
212
- unloadRef.current,
213
- err
214
- );
215
- if (unloadRef.current || !netRef.current) {
216
- return;
217
- }
218
- if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
219
- checkApi();
220
- return;
221
- }
222
- failRef.current(err, true);
223
- });
199
+ )
200
+ };
201
+ if (isPay) {
202
+ paymentRun({
203
+ paymentType: import_payment.ActionType.Pay,
204
+ paymentNum: numRef.current,
205
+ orderId: orderIdRef.current,
206
+ deviceId: (_c = deviceRef.current) == null ? void 0 : _c.id,
207
+ params: apiParams,
208
+ callbacks: {
209
+ onSuccess: (res) => {
210
+ success(res);
211
+ },
212
+ onError: (err) => {
213
+ console.log("err = >>>>>", err);
214
+ failRef.current(err, true);
215
+ }
216
+ }
217
+ });
218
+ return;
219
+ } else {
220
+ const resultPromise = api.refund(apiParams, { signal: controllerRef.current.signal });
221
+ resultPromise.then((res) => {
222
+ console.log("netRef.current111 = ", netRef.current);
223
+ if (unloadRef.current || !netRef.current) {
224
+ return;
225
+ }
226
+ if (res && `${res.code}` === "200") {
227
+ success(res);
228
+ return;
229
+ }
230
+ return Promise.reject(res);
231
+ }).catch((err) => {
232
+ console.log(
233
+ "netRef.current222 = ",
234
+ netRef.current,
235
+ unloadRef.current,
236
+ err
237
+ );
238
+ if (unloadRef.current || !netRef.current) {
239
+ return;
240
+ }
241
+ if (!(err == null ? void 0 : err.code) || `${err.code}` === import_const.PayStatus.Timeout) {
242
+ checkApi();
243
+ return;
244
+ }
245
+ failRef.current(err, true);
246
+ });
247
+ }
224
248
  }, [api, check, dispatch, onChange]);
225
249
  (0, import_react.useEffect)(
226
250
  () => () => {
@@ -230,6 +254,7 @@ var POS = ({
230
254
  if (clearRef.current) {
231
255
  clearTimeout(clearRef.current);
232
256
  }
257
+ paymentClean();
233
258
  },
234
259
  []
235
260
  );
@@ -0,0 +1,66 @@
1
+ interface RunApiParams {
2
+ [key: string]: any;
3
+ }
4
+ export declare enum ActionType {
5
+ Pay = "pay",
6
+ Refund = "refund",
7
+ Query = "query"
8
+ }
9
+ interface UsePaymentOptions {
10
+ /**
11
+ * 支付接口
12
+ */
13
+ payApi: (params: RunApiParams, options?: {
14
+ signal?: AbortSignal;
15
+ }) => Promise<any>;
16
+ /**
17
+ * 退款接口
18
+ */
19
+ refundApi?: (params: RunApiParams, options?: {
20
+ signal?: AbortSignal;
21
+ }) => Promise<any>;
22
+ /**
23
+ * 查询接口
24
+ */
25
+ checkApi: (params: {
26
+ number: string;
27
+ }, options?: {
28
+ signal?: AbortSignal;
29
+ }) => Promise<any>;
30
+ /**
31
+ * 检查是否应该继续处理结果(用于处理网络断开、组件卸载等情况)
32
+ */
33
+ shouldContinue?: () => boolean;
34
+ }
35
+ interface RunParams {
36
+ /** 支付类型 */
37
+ paymentType: ActionType;
38
+ /** 支付交易号 */
39
+ paymentNum: string;
40
+ /** 订单ID */
41
+ orderId?: string | number;
42
+ /** 设备ID */
43
+ deviceId?: string | number;
44
+ /** 支付参数 */
45
+ params: RunApiParams;
46
+ /** 回调方法 */
47
+ callbacks: RunCallbacks;
48
+ }
49
+ interface RunCallbacks {
50
+ /**
51
+ * 成功回调
52
+ */
53
+ onSuccess: (res: any) => void;
54
+ /**
55
+ * 失败回调
56
+ */
57
+ onError: (error: any) => void;
58
+ }
59
+ export declare const usePayment: (options: UsePaymentOptions) => {
60
+ run: (options: RunParams) => Promise<void>;
61
+ stop: () => void;
62
+ clean: (params?: {
63
+ clearCallbacks?: boolean;
64
+ }) => void;
65
+ };
66
+ export {};