@pisell/private-materials 3.3.98 → 3.3.99

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 (207) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +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.d.ts +53 -0
  12. package/es/components/Sales/Cart/index.js +1 -5
  13. package/es/components/Sales/Cart/utils.d.ts +23 -0
  14. package/es/components/Sales/Cart/utils.js +0 -167
  15. package/es/components/Sales/Checkout/index.d.ts +33 -0
  16. package/es/components/Sales/Checkout/index.js +8 -52
  17. package/es/components/Sales/Checkout/serve.d.ts +2 -0
  18. package/es/components/Sales/Checkout/serve.js +2 -16
  19. package/es/components/Sales/Checkout/utils.d.ts +35 -0
  20. package/es/components/Sales/Checkout/utils.js +1 -7
  21. package/es/components/Sales/Summary/index.d.ts +25 -0
  22. package/es/components/Sales/Summary/index.js +2 -17
  23. package/es/components/Sales/Summary/serve.d.ts +0 -0
  24. package/es/components/Sales/Summary/serve.js +0 -6
  25. package/es/components/Sales/Summary/utils.d.ts +36 -0
  26. package/es/components/Sales/Summary/utils.js +1 -43
  27. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  28. package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
  29. package/es/components/appointmentBooking/components/Content/index.js +1 -15
  30. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  31. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  32. package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
  33. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  34. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  35. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  36. package/es/components/appointmentBooking/components/Services/index.js +27 -23
  37. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  38. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
  39. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  40. package/es/components/appointmentBooking/deposit/index.js +2 -4
  41. package/es/components/appointmentBooking/index.d.ts +3 -0
  42. package/es/components/appointmentBooking/index.js +0 -14
  43. package/es/components/appointmentBooking/index.less +1 -1
  44. package/es/components/booking/components/voucher/index.d.ts +3 -0
  45. package/es/components/booking/components/voucher/index.js +2 -2
  46. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  47. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  48. package/es/components/booking/info/index.d.ts +1 -0
  49. package/es/components/booking/info/service/Lists.d.ts +0 -1
  50. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  51. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  52. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  53. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  54. package/es/components/booking/utils.d.ts +2 -2
  55. package/es/components/eftposPay/amount.d.ts +1 -1
  56. package/es/components/eftposPay/app.d.ts +0 -1
  57. package/es/components/eftposPay/const.d.ts +181 -0
  58. package/es/components/eftposPay/const.js +1 -3
  59. package/es/components/eftposPay/device.d.ts +1 -1
  60. package/es/components/eftposPay/hooks.d.ts +35 -0
  61. package/es/components/eftposPay/hooks.js +1 -3
  62. package/es/components/eftposPay/index.d.ts +4 -0
  63. package/es/components/eftposPay/index.js +1 -1
  64. package/es/components/eftposPay/manufacturer.d.ts +6 -0
  65. package/es/components/eftposPay/manufacturer.js +0 -4
  66. package/es/components/eftposPay/pay.d.ts +20 -0
  67. package/es/components/eftposPay/pay.js +2 -6
  68. package/es/components/eftposPay/store/index.d.ts +355 -0
  69. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  70. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  71. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
  72. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  73. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
  74. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  75. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  76. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  78. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  79. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  80. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  81. package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
  82. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  83. package/es/components/eventBooking/locales.d.ts +222 -0
  84. package/es/components/eventBooking/locales.js +3 -27
  85. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  86. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  87. package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  88. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  89. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  90. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  91. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  92. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  93. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  94. package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
  95. package/es/components/ticketBooking/locales.d.ts +153 -0
  96. package/es/components/ticketBooking/locales.js +147 -195
  97. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  98. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  99. package/es/utils/index.d.ts +23 -0
  100. package/lib/components/Sales/Cart/index.d.ts +53 -0
  101. package/lib/components/Sales/Cart/index.js +0 -1
  102. package/lib/components/Sales/Cart/utils.d.ts +23 -0
  103. package/lib/components/Sales/Cart/utils.js +0 -117
  104. package/lib/components/Sales/Checkout/index.d.ts +33 -0
  105. package/lib/components/Sales/Checkout/index.js +7 -39
  106. package/lib/components/Sales/Checkout/serve.d.ts +2 -0
  107. package/lib/components/Sales/Checkout/serve.js +2 -7
  108. package/lib/components/Sales/Checkout/utils.d.ts +35 -0
  109. package/lib/components/Sales/Checkout/utils.js +0 -2
  110. package/lib/components/Sales/Summary/index.d.ts +25 -0
  111. package/lib/components/Sales/Summary/index.js +1 -7
  112. package/lib/components/Sales/Summary/serve.d.ts +0 -0
  113. package/lib/components/Sales/Summary/serve.js +0 -32
  114. package/lib/components/Sales/Summary/utils.d.ts +36 -0
  115. package/lib/components/Sales/Summary/utils.js +1 -30
  116. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  117. package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
  118. package/lib/components/appointmentBooking/components/Content/index.js +1 -6
  119. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  120. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  121. package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
  122. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  123. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  124. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  125. package/lib/components/appointmentBooking/components/Services/index.js +11 -6
  126. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  127. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
  128. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  129. package/lib/components/appointmentBooking/deposit/index.js +2 -4
  130. package/lib/components/appointmentBooking/index.d.ts +3 -0
  131. package/lib/components/appointmentBooking/index.js +0 -11
  132. package/lib/components/appointmentBooking/index.less +1 -1
  133. package/lib/components/booking/components/voucher/index.d.ts +3 -0
  134. package/lib/components/booking/components/voucher/index.js +2 -2
  135. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  136. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  137. package/lib/components/booking/info/index.d.ts +1 -0
  138. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  139. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  140. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  141. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  142. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  143. package/lib/components/booking/utils.d.ts +2 -2
  144. package/lib/components/eftposPay/amount.d.ts +1 -1
  145. package/lib/components/eftposPay/app.d.ts +0 -1
  146. package/lib/components/eftposPay/const.d.ts +181 -0
  147. package/lib/components/eftposPay/const.js +0 -2
  148. package/lib/components/eftposPay/device.d.ts +1 -1
  149. package/lib/components/eftposPay/hooks.d.ts +35 -0
  150. package/lib/components/eftposPay/hooks.js +4 -11
  151. package/lib/components/eftposPay/index.d.ts +4 -0
  152. package/lib/components/eftposPay/index.js +1 -1
  153. package/lib/components/eftposPay/manufacturer.d.ts +6 -0
  154. package/lib/components/eftposPay/manufacturer.js +0 -6
  155. package/lib/components/eftposPay/pay.d.ts +20 -0
  156. package/lib/components/eftposPay/pay.js +2 -13
  157. package/lib/components/eftposPay/store/index.d.ts +355 -0
  158. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  159. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
  160. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
  161. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
  162. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
  163. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
  164. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
  165. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  166. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  167. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  168. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  169. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
  170. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  171. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  172. package/lib/components/eventBooking/locales.d.ts +222 -0
  173. package/lib/components/eventBooking/locales.js +3 -27
  174. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  175. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  176. package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  177. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  178. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  179. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  180. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  181. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  182. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
  183. package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
  184. package/lib/components/ticketBooking/locales.d.ts +153 -0
  185. package/lib/components/ticketBooking/locales.js +4 -22
  186. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  187. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  188. package/lib/utils/index.d.ts +23 -0
  189. package/package.json +4 -4
  190. package/es/components/eftposPay/linkly/const.js +0 -82
  191. package/es/components/eftposPay/linkly/hooks/index.js +0 -2
  192. package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
  193. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
  194. package/es/components/eftposPay/linkly/index.js +0 -197
  195. package/es/components/eftposPay/linkly/service.js +0 -81
  196. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
  197. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  198. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  199. package/lib/components/eftposPay/linkly/const.js +0 -102
  200. package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
  201. package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
  202. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
  203. package/lib/components/eftposPay/linkly/index.js +0 -208
  204. package/lib/components/eftposPay/linkly/service.js +0 -55
  205. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
  206. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  207. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
@@ -0,0 +1,153 @@
1
+ declare const _default: {
2
+ en: {
3
+ "pisell2.ticket-booking.info": string;
4
+ "pisell2.ticket-booking.notes": string;
5
+ "pisell2.ticket-booking.forms": string;
6
+ "pisell2.ticket-booking.sales": string;
7
+ "pisell2.ticket-booking.payment": string;
8
+ "pisell2.ticket-booking.unsaved-changes": string;
9
+ "pisell2.ticket-booking.exit-confirm": string;
10
+ "pisell2.ticket-booking.go-back": string;
11
+ "pisell2.ticket-booking.exit": string;
12
+ "pisell2.ticket-booking.deposit": string;
13
+ "pisell2.ticket-booking.copy-success": string;
14
+ "pisell2.ticket-booking.no-data": string;
15
+ "pisell2.ticket-booking.authorized": string;
16
+ "pisell2.ticket-booking.paid": string;
17
+ "pisell2.ticket-booking.partially-paid": string;
18
+ "pisell2.ticket-booking.partially-refunded": string;
19
+ "pisell2.ticket-booking.payment-pending": string;
20
+ "pisell2.ticket-booking.refunded": string;
21
+ "pisell2.ticket-booking.unpaid": string;
22
+ "pisell2.ticket-booking.voided": string;
23
+ "pisell2.ticket-booking.pending": string;
24
+ "pisell2.ticket-booking.all": string;
25
+ "pisell2.ticket-booking.not-started": string;
26
+ "pisell2.ticket-booking.started": string;
27
+ "pisell2.ticket-booking.finished": string;
28
+ "pisell2.ticket-booking.canceled": string;
29
+ "pisell2.ticket-booking.inform": string;
30
+ "pisell2.ticket-booking.check-management": string;
31
+ "pisell2.ticket-booking.confirm": string;
32
+ "pisell2.ticket-booking.dashboard": string;
33
+ "pisell2.ticket-booking.booking-list": string;
34
+ "pisell2.ticket-booking.full-data": string;
35
+ "pisell2.ticket-booking.today": string;
36
+ "pisell2.ticket-booking.now": string;
37
+ "pisell2.ticket-booking.start-time": string;
38
+ "pisell2.ticket-booking.create-time": string;
39
+ "pisell2.ticket-booking.customer": string;
40
+ "pisell2.ticket-booking.total": string;
41
+ "pisell2.ticket-booking.search": string;
42
+ "pisell2.ticket-booking.refresh-success": string;
43
+ "pisell2.ticket-booking.loading": string;
44
+ "pisell2.ticket-booking.appointment-not-found": string;
45
+ "pisell2.ticket-booking.scan": string;
46
+ "pisell2.ticket-booking.create-new": string;
47
+ "pisell2.ticket-booking.add-to-cart": string;
48
+ "pisell2.ticket-booking.not-available-title": string;
49
+ "pisell2.ticket-booking.not-available-ok": string;
50
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
51
+ };
52
+ "zh-CN": {
53
+ "pisell2.ticket-booking.info": string;
54
+ "pisell2.ticket-booking.notes": string;
55
+ "pisell2.ticket-booking.forms": string;
56
+ "pisell2.ticket-booking.sales": string;
57
+ "pisell2.ticket-booking.payment": string;
58
+ "pisell2.ticket-booking.unsaved-changes": string;
59
+ "pisell2.ticket-booking.exit-confirm": string;
60
+ "pisell2.ticket-booking.go-back": string;
61
+ "pisell2.ticket-booking.exit": string;
62
+ "pisell2.ticket-booking.deposit": string;
63
+ "pisell2.ticket-booking.copy-success": string;
64
+ "pisell2.ticket-booking.no-data": string;
65
+ "pisell2.ticket-booking.authorized": string;
66
+ "pisell2.ticket-booking.paid": string;
67
+ "pisell2.ticket-booking.partially-paid": string;
68
+ "pisell2.ticket-booking.partially-refunded": string;
69
+ "pisell2.ticket-booking.payment-pending": string;
70
+ "pisell2.ticket-booking.refunded": string;
71
+ "pisell2.ticket-booking.unpaid": string;
72
+ "pisell2.ticket-booking.voided": string;
73
+ "pisell2.ticket-booking.pending": string;
74
+ "pisell2.ticket-booking.all": string;
75
+ "pisell2.ticket-booking.not-started": string;
76
+ "pisell2.ticket-booking.started": string;
77
+ "pisell2.ticket-booking.finished": string;
78
+ "pisell2.ticket-booking.canceled": string;
79
+ "pisell2.ticket-booking.inform": string;
80
+ "pisell2.ticket-booking.check-management": string;
81
+ "pisell2.ticket-booking.confirm": string;
82
+ "pisell2.ticket-booking.dashboard": string;
83
+ "pisell2.ticket-booking.booking-list": string;
84
+ "pisell2.ticket-booking.full-data": string;
85
+ "pisell2.ticket-booking.today": string;
86
+ "pisell2.ticket-booking.now": string;
87
+ "pisell2.ticket-booking.start-time": string;
88
+ "pisell2.ticket-booking.create-time": string;
89
+ "pisell2.ticket-booking.customer": string;
90
+ "pisell2.ticket-booking.total": string;
91
+ "pisell2.ticket-booking.search": string;
92
+ "pisell2.ticket-booking.refresh-success": string;
93
+ "pisell2.ticket-booking.loading": string;
94
+ "pisell2.ticket-booking.appointment-not-found": string;
95
+ "pisell2.ticket-booking.scan": string;
96
+ "pisell2.ticket-booking.create-new": string;
97
+ "pisell2.ticket-booking.add-to-cart": string;
98
+ "pisell2.ticket-booking.not-available-title": string;
99
+ "pisell2.ticket-booking.not-available-ok": string;
100
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
101
+ };
102
+ "zh-HK": {
103
+ "pisell2.ticket-booking.info": string;
104
+ "pisell2.ticket-booking.notes": string;
105
+ "pisell2.ticket-booking.forms": string;
106
+ "pisell2.ticket-booking.sales": string;
107
+ "pisell2.ticket-booking.payment": string;
108
+ "pisell2.ticket-booking.unsaved-changes": string;
109
+ "pisell2.ticket-booking.exit-confirm": string;
110
+ "pisell2.ticket-booking.go-back": string;
111
+ "pisell2.ticket-booking.exit": string;
112
+ "pisell2.ticket-booking.deposit": string;
113
+ "pisell2.ticket-booking.copy-success": string;
114
+ "pisell2.ticket-booking.no-data": string;
115
+ "pisell2.ticket-booking.authorized": string;
116
+ "pisell2.ticket-booking.paid": string;
117
+ "pisell2.ticket-booking.partially-paid": string;
118
+ "pisell2.ticket-booking.partially-refunded": string;
119
+ "pisell2.ticket-booking.payment-pending": string;
120
+ "pisell2.ticket-booking.refunded": string;
121
+ "pisell2.ticket-booking.unpaid": string;
122
+ "pisell2.ticket-booking.voided": string;
123
+ "pisell2.ticket-booking.pending": string;
124
+ "pisell2.ticket-booking.all": string;
125
+ "pisell2.ticket-booking.not-started": string;
126
+ "pisell2.ticket-booking.started": string;
127
+ "pisell2.ticket-booking.finished": string;
128
+ "pisell2.ticket-booking.canceled": string;
129
+ "pisell2.ticket-booking.inform": string;
130
+ "pisell2.ticket-booking.check-management": string;
131
+ "pisell2.ticket-booking.confirm": string;
132
+ "pisell2.ticket-booking.dashboard": string;
133
+ "pisell2.ticket-booking.booking-list": string;
134
+ "pisell2.ticket-booking.full-data": string;
135
+ "pisell2.ticket-booking.today": string;
136
+ "pisell2.ticket-booking.now": string;
137
+ "pisell2.ticket-booking.start-time": string;
138
+ "pisell2.ticket-booking.create-time": string;
139
+ "pisell2.ticket-booking.customer": string;
140
+ "pisell2.ticket-booking.total": string;
141
+ "pisell2.ticket-booking.search": string;
142
+ "pisell2.ticket-booking.refresh-success": string;
143
+ "pisell2.ticket-booking.loading": string;
144
+ "pisell2.ticket-booking.appointment-not-found": string;
145
+ "pisell2.ticket-booking.scan": string;
146
+ "pisell2.ticket-booking.create-new": string;
147
+ "pisell2.ticket-booking.add-to-cart": string;
148
+ "pisell2.ticket-booking.not-available-title": string;
149
+ "pisell2.ticket-booking.not-available-ok": string;
150
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
151
+ };
152
+ };
153
+ export default _default;
@@ -23,7 +23,7 @@ __export(locales_exports, {
23
23
  });
24
24
  module.exports = __toCommonJS(locales_exports);
25
25
  var locales_default = {
26
- en: {
26
+ "en": {
27
27
  "pisell2.ticket-booking.info": "Info",
28
28
  "pisell2.ticket-booking.notes": "Notes",
29
29
  "pisell2.ticket-booking.forms": "Forms",
@@ -71,13 +71,7 @@ var locales_default = {
71
71
  "pisell2.ticket-booking.add-to-cart": "Added to Cart",
72
72
  "pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
73
73
  "pisell2.ticket-booking.not-available-ok": "OK",
74
- "pisell2.ticket-booking.in-cart": (number) => `${number} in cart`,
75
- "pisell2.product.card.cart-items": (number) => `${number}items`,
76
- "pisell2.product.card.subtotal": "Subtotal",
77
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}h` : ""}${hour > 0 && minute > 0 ? " " : ""}${minute > 0 ? `${minute}min` : ""}`,
78
- "pisell2.product.card.day": (val) => `${val > 1 ? " days" : " day"}`,
79
- "pisell2.product.card.day.event": (val) => `${val > 1 ? " events" : " event"}`,
80
- "pisell2.product.card.minute": (val) => `${val > 1 ? " minutes" : " minute"}`
74
+ "pisell2.ticket-booking.in-cart": (number) => `${number} in cart`
81
75
  },
82
76
  "zh-CN": {
83
77
  "pisell2.ticket-booking.info": "信息",
@@ -127,13 +121,7 @@ var locales_default = {
127
121
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
128
122
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
129
123
  "pisell2.ticket-booking.not-available-ok": "好的",
130
- "pisell2.product.card.cart-items": (number) => `${number}件商品`,
131
- "pisell2.product.card.subtotal": "小计",
132
- "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`,
133
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小时` : ""}${minute > 0 ? `${minute}分钟` : ""}`,
134
- "pisell2.product.card.day": (val) => "天",
135
- "pisell2.product.card.day.event": (val) => "个活动",
136
- "pisell2.product.card.minute": (val) => "分钟"
124
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
137
125
  },
138
126
  "zh-HK": {
139
127
  "pisell2.ticket-booking.info": "資訊",
@@ -183,12 +171,6 @@ var locales_default = {
183
171
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
184
172
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
185
173
  "pisell2.ticket-booking.not-available-ok": "好的",
186
- "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`,
187
- "pisell2.product.card.cart-items": (number) => `${number}件商品`,
188
- "pisell2.product.card.subtotal": "小計",
189
- "pisell2.product.card.hour.minute": (hour, minute) => `${hour > 0 ? `${hour}小時` : ""}${minute > 0 ? `${minute}分鐘` : ""}`,
190
- "pisell2.product.card.day": (val) => "天",
191
- "pisell2.product.card.day.event": (val) => "个活動",
192
- "pisell2.product.card.minute": (val) => "分鐘"
174
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
193
175
  }
194
176
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
2
3
  import './index.less';
3
4
  interface ModalProps extends AntModalProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './../../index.less';
2
3
  declare const Search: () => JSX.Element;
3
4
  export default Search;
@@ -0,0 +1,23 @@
1
+ import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
2
+ declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
3
+ declare class Request {
4
+ private request;
5
+ constructor();
6
+ setRequest(val: any): void;
7
+ withCustomToast(config?: any): any;
8
+ getRequest(): {
9
+ get: (url: string, params: any, config?: any) => Promise<any>;
10
+ post: (url: string, params: any, config?: any) => Promise<any>;
11
+ put: RType;
12
+ remove: RType;
13
+ custom: RType;
14
+ };
15
+ }
16
+ export declare const request: Request;
17
+ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
+ export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
+ export declare const saveConfirm: () => Promise<{
20
+ destroy: () => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
+ }>;
23
+ export { modal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.98",
3
+ "version": "3.3.99",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
- "@pisell/utils": "3.0.0",
63
62
  "@pisell/materials": "3.3.35",
64
- "@pisell/icon": "0.0.11",
65
- "@pisell/date-picker": "3.0.4"
63
+ "@pisell/utils": "3.0.0",
64
+ "@pisell/date-picker": "3.0.2",
65
+ "@pisell/icon": "0.0.11"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",
@@ -1,82 +0,0 @@
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
- var _excluded = ["order_id", "name", "symbol", "amount", "mode", "number", "pay", "device", "net", "client"];
3
- 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; }
4
- 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; }
5
- 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; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- 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); }
8
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
- import { locales } from '@pisell/utils';
11
- import { ClientEnum, EftposEnum, ModeEnum, PayRouteEnum, StatusEnum } from "../const";
12
- export var getStep = function getStep() {
13
- var mode = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ModeEnum.Pay;
14
- return [{
15
- key: Date.now(),
16
- title: locales.getText('page.eftpos-pay.text.loading')(mode),
17
- // 'Payment in process...',
18
- text: locales.getText('page.eftpos-pay.text.waiting.processing'),
19
- // 'Waiting for the processing...',
20
- warn: '',
21
- tip: locales.getText('page.eftpos-pay.text.processing'),
22
- // 'processing...',
23
- status: StatusEnum.Loading
24
- }];
25
- };
26
- export default (function (params) {
27
- var _ref = params || {
28
- mode: ModeEnum.Pay
29
- },
30
- order_id = _ref.order_id,
31
- name = _ref.name,
32
- symbol = _ref.symbol,
33
- amount = _ref.amount,
34
- mode = _ref.mode,
35
- number = _ref.number,
36
- pay = _ref.pay,
37
- device = _ref.device,
38
- net = _ref.net,
39
- client = _ref.client,
40
- other = _objectWithoutProperties(_ref, _excluded);
41
- console.log('params =>>>>>> ', params);
42
- return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
43
- order_id: order_id,
44
- name: name,
45
- symbol: symbol,
46
- amount: amount,
47
- mode: mode,
48
- eftpos: EftposEnum.Linkly,
49
- key: Date.now(),
50
- step: 0,
51
- type: PayRouteEnum.Step,
52
- title: locales.getText('page.eftpos-pay.text.loading')(mode),
53
- component: '',
54
- status: StatusEnum.Loading,
55
- steps: getStep(mode),
56
- render: true,
57
- client: client !== 'undefined' ? client : ClientEnum.Merchant,
58
- warn: '',
59
- custom: other || {}
60
- }, typeof net !== 'undefined' ? {
61
- net: net
62
- } : {}), typeof number !== 'undefined' ? {
63
- number: number
64
- } : {}), typeof pay !== 'undefined' ? {
65
- pay: pay
66
- } : {}), typeof device !== 'undefined' ? {
67
- device: device
68
- } : {});
69
- });
70
- export var EVisibleButtonType = /*#__PURE__*/function (EVisibleButtonType) {
71
- EVisibleButtonType["CancelButton"] = "CancelButton";
72
- EVisibleButtonType["WaitButton"] = "WaitButton";
73
- return EVisibleButtonType;
74
- }({});
75
- export var LinklyActionStatus = /*#__PURE__*/function (LinklyActionStatus) {
76
- LinklyActionStatus["Empty"] = "Empty";
77
- LinklyActionStatus["Cancel"] = "Cancel";
78
- LinklyActionStatus["CancelWaiting"] = "CancelWaiting";
79
- LinklyActionStatus["Signature"] = "Signature";
80
- LinklyActionStatus["SignatureWaiting"] = "SignatureWaiting";
81
- return LinklyActionStatus;
82
- }({});
@@ -1,2 +0,0 @@
1
- export * from "./normal";
2
- export * from "./useTimeQuery";
@@ -1,321 +0,0 @@
1
- import { useRequest } from 'ahooks';
2
- import { useEffect, useRef } from 'react';
3
- import { locales, sendWarningLog } from '@pisell/utils';
4
- import { linklyPayCancelApi, linklyPayApi, linklyRefundCancelApi, linklyRefundApi, linklyPaySignatureApi, linklyRefundSignatureApi } from "../service";
5
- import { useFail, useStoreRef } from "../../hooks";
6
- import { ModeEnum, PayStatus, StatusEnum } from "../../const";
7
- import { useDispatch, updateState, updateCustom, updateStatus } from "../../store";
8
- import { LinklyActionStatus } from "../const";
9
-
10
- /**
11
- * 支付或退款
12
- * @param failAction 失败回调
13
- */
14
- export var useLinklyPayOrRefund = function useLinklyPayOrRefund(handleCheck) {
15
- var dispatch = useDispatch();
16
- var _useStoreRef = useStoreRef(),
17
- numRef = _useStoreRef.numRef,
18
- modeRef = _useStoreRef.modeRef,
19
- orderIdRef = _useStoreRef.orderIdRef,
20
- deviceRef = _useStoreRef.deviceRef,
21
- payRef = _useStoreRef.payRef,
22
- amountRef = _useStoreRef.amountRef;
23
- var fail = useFail(0);
24
- var failRef = useRef(fail);
25
- var resultQueryRef = useRef(null);
26
- var handleLinklySuccessRef = useRef(null);
27
- useEffect(function () {
28
- failRef.current = fail;
29
- }, [fail]);
30
- var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
31
- var _pay = useRequest(isPay ? linklyPayApi : linklyRefundApi, {
32
- manual: true,
33
- onSuccess: function onSuccess(res) {
34
- _onSuccess(res);
35
- },
36
- onError: function onError(error) {
37
- _onError(error);
38
-
39
- // TODO: mock数据
40
- // console.log('mock>>>>>>');
41
- // const res = {
42
- // status: true,
43
- // code: 200,
44
- // message: '',
45
- // data: {
46
- // pinpad_id: 3,
47
- // is_auto_print: 0,
48
- // session_id: '923d4abe-6521-43c8-915b-decde8b406bd',
49
- // status: 0,
50
- // response_code: '00',
51
- // response_text: 'APPROVED',
52
- // signature_flag: 0,
53
- // },
54
- // };
55
- // onSuccess(res, isPay ? 'pay' : 'refund');
56
- }
57
- });
58
- var _onSuccess = function _onSuccess(res) {
59
- var _res$data;
60
- console.log("linkly".concat(isPay ? 'Pay' : 'Refund', "Success---->>>>>>>"), res);
61
- if (!handleCheck()) {
62
- return;
63
- }
64
- sendWarningLog({
65
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u63A5\u53E3\u6210\u529F"),
66
- content: [{
67
- key: 'response',
68
- value: JSON.stringify(res)
69
- }]
70
- });
71
-
72
- // status 交易状态 0:未知,继续查询 1:成功 -1:失败 -2:交易错误
73
- // signature_flag 是否弹框确认签名 0:不用签名 1:等待签名确认 2:签名取消 3:签名确认
74
- var status = res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.status;
75
-
76
- // 继续查询交易状态
77
- if (status === 0) {
78
- var _res$data2;
79
- // 交易流水号
80
- numRef.current = res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.session_id;
81
- dispatch(updateState({
82
- number: numRef.current
83
- }));
84
- // 需要展示取消按钮
85
- dispatch(updateCustom({
86
- actionStatus: LinklyActionStatus.Cancel
87
- }));
88
- // 调用支付查询接口
89
- setTimeout(function () {
90
- var _resultQueryRef$curre;
91
- (_resultQueryRef$curre = resultQueryRef.current) === null || _resultQueryRef$curre === void 0 || _resultQueryRef$curre.call(resultQueryRef);
92
- });
93
- return;
94
- }
95
-
96
- // 无需展示取消按钮
97
- dispatch(updateCustom({
98
- actionStatus: LinklyActionStatus.Empty
99
- }));
100
-
101
- // 交易成功
102
- if (status === 1) {
103
- var _handleLinklySuccessR;
104
- (_handleLinklySuccessR = handleLinklySuccessRef.current) === null || _handleLinklySuccessR === void 0 || _handleLinklySuccessR.call(handleLinklySuccessRef, res);
105
- return;
106
- }
107
-
108
- // 交易失败
109
- if (status < 0) {
110
- var _failRef$current;
111
- // 需要特殊处理,将code码转换为支付失败code码
112
- res.code = PayStatus.Unknown;
113
- (_failRef$current = failRef.current) === null || _failRef$current === void 0 || _failRef$current.call(failRef, res, false);
114
- }
115
- };
116
- var _onError = function _onError(error) {
117
- var _failRef$current2;
118
- console.log("linkly".concat(isPay ? 'Pay' : 'Refund', "Error---->>>>>>>"), error);
119
- // 无网 或 已卸载 则不进行处理
120
- if (!handleCheck()) {
121
- return;
122
- }
123
- sendWarningLog({
124
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u63A5\u53E3\u5931\u8D25"),
125
- content: [{
126
- key: 'error',
127
- value: JSON.stringify(error)
128
- }]
129
- });
130
- (_failRef$current2 = failRef.current) === null || _failRef$current2 === void 0 || _failRef$current2.call(failRef, error, false);
131
- };
132
- var payOrRefund = function payOrRefund(resultQuery, handleLinklySuccess) {
133
- var _deviceRef$current, _payRef$current;
134
- handleLinklySuccessRef.current = handleLinklySuccess;
135
- resultQueryRef.current = resultQuery;
136
- var param = {
137
- // 订单id
138
- order_id: orderIdRef.current,
139
- // 设备id
140
- pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current = deviceRef.current) === null || _deviceRef$current === void 0 || (_deviceRef$current = _deviceRef$current.metadata) === null || _deviceRef$current === void 0 ? void 0 : _deviceRef$current.linkly_pinpad_id,
141
- // 交易金额, 包含选择的订单金额+手续费,订单金额+手续费=交易金额
142
- amount: isPay ? (_payRef$current = payRef.current) === null || _payRef$current === void 0 ? void 0 : _payRef$current.total : amountRef.current
143
- };
144
- sendWarningLog({
145
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund'),
146
- content: [{
147
- key: 'params',
148
- value: JSON.stringify(param)
149
- }]
150
- });
151
- _pay.run(param);
152
- };
153
- return {
154
- action: {
155
- pay: _pay
156
- },
157
- payOrRefund: payOrRefund
158
- };
159
- };
160
-
161
- /**
162
- * @title: 取消支付或退款
163
- * @description: 取消支付或退款调用接口后不管成功还是失败都需要调用支付查询接口
164
- */
165
- export var useLinklyCancel = function useLinklyCancel(handleCheck) {
166
- var dispatch = useDispatch();
167
- var _useStoreRef2 = useStoreRef(),
168
- numRef = _useStoreRef2.numRef,
169
- modeRef = _useStoreRef2.modeRef,
170
- deviceRef = _useStoreRef2.deviceRef;
171
- var resultQueryRef = useRef(null);
172
- var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
173
- var cancelAction = function cancelAction(res, type) {
174
- var _resultQueryRef$curre2;
175
- // 需要将按钮状态释放
176
- dispatch(updateCustom({
177
- buttonDisabled: false
178
- }));
179
- if (!handleCheck()) {
180
- return;
181
- }
182
- if (type === 'success') {
183
- sendWarningLog({
184
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88\u6210\u529F"),
185
- content: [{
186
- key: 'response',
187
- value: JSON.stringify(res)
188
- }]
189
- });
190
- } else {
191
- sendWarningLog({
192
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88\u5931\u8D25"),
193
- content: [{
194
- key: 'error',
195
- value: JSON.stringify(res)
196
- }]
197
- });
198
- }
199
- (_resultQueryRef$curre2 = resultQueryRef.current) === null || _resultQueryRef$curre2 === void 0 || _resultQueryRef$curre2.call(resultQueryRef);
200
- };
201
- var _cancel = useRequest(isPay ? linklyPayCancelApi : linklyRefundCancelApi, {
202
- manual: true,
203
- onSuccess: function onSuccess(res) {
204
- return cancelAction(res, 'success');
205
- },
206
- onError: function onError(error) {
207
- return cancelAction(error, 'error');
208
- }
209
- });
210
- var linklyCancel = function linklyCancel(resultQuery) {
211
- var _deviceRef$current2;
212
- resultQueryRef.current = resultQuery;
213
- // 需要将按钮状态锁定,防止重复点击
214
- dispatch(updateCustom({
215
- buttonDisabled: true
216
- }));
217
- var param = {
218
- // 设备id
219
- pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current2 = deviceRef.current) === null || _deviceRef$current2 === void 0 || (_deviceRef$current2 = _deviceRef$current2.metadata) === null || _deviceRef$current2 === void 0 ? void 0 : _deviceRef$current2.linkly_pinpad_id,
220
- // 交易流水号
221
- session_id: numRef.current
222
- };
223
- sendWarningLog({
224
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u53D6\u6D88"),
225
- content: [{
226
- key: 'params',
227
- value: JSON.stringify(param)
228
- }]
229
- });
230
- _cancel.run(param);
231
- dispatch(updateCustom({
232
- actionStatus: LinklyActionStatus.CancelWaiting
233
- }));
234
- };
235
- return {
236
- action: {
237
- cancel: _cancel
238
- },
239
- linklyCancel: linklyCancel
240
- };
241
- };
242
-
243
- /**
244
- * @title: 支付或退款签名
245
- * @description: 支付或退款签名调用接口后不管成功还是失败都需要调用支付查询接口
246
- */
247
- export var useLinklySignature = function useLinklySignature(handleCheck) {
248
- var dispatch = useDispatch();
249
- var _useStoreRef3 = useStoreRef(),
250
- numRef = _useStoreRef3.numRef,
251
- modeRef = _useStoreRef3.modeRef,
252
- deviceRef = _useStoreRef3.deviceRef;
253
- var resultQueryRef = useRef(null);
254
- var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
255
- var signatureAction = function signatureAction(res, type) {
256
- var _resultQueryRef$curre3;
257
- console.log('signatureAction---->>>>>>>', res);
258
- if (!handleCheck()) {
259
- return;
260
- }
261
- if (type === 'success') {
262
- sendWarningLog({
263
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D\u6210\u529F"),
264
- content: [{
265
- key: 'response',
266
- value: JSON.stringify(res)
267
- }]
268
- });
269
- } else {
270
- sendWarningLog({
271
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D\u5931\u8D25"),
272
- content: [{
273
- key: 'error',
274
- value: JSON.stringify(res)
275
- }]
276
- });
277
- }
278
- (_resultQueryRef$curre3 = resultQueryRef.current) === null || _resultQueryRef$curre3 === void 0 || _resultQueryRef$curre3.call(resultQueryRef);
279
- };
280
- var _signature = useRequest(isPay ? linklyPaySignatureApi : linklyRefundSignatureApi, {
281
- manual: true,
282
- onSuccess: function onSuccess(res) {
283
- return signatureAction(res, 'success');
284
- },
285
- onError: function onError(error) {
286
- return signatureAction(error, 'error');
287
- }
288
- });
289
- var linklySignature = function linklySignature(status, resultQuery) {
290
- var _deviceRef$current3;
291
- resultQueryRef.current = resultQuery;
292
- var param = {
293
- // 设备id
294
- pinpad_id: deviceRef === null || deviceRef === void 0 || (_deviceRef$current3 = deviceRef.current) === null || _deviceRef$current3 === void 0 || (_deviceRef$current3 = _deviceRef$current3.metadata) === null || _deviceRef$current3 === void 0 ? void 0 : _deviceRef$current3.linkly_pinpad_id,
295
- // 交易流水号
296
- session_id: numRef.current,
297
- signature_flag: status
298
- };
299
- dispatch(updateStatus(StatusEnum.Loading));
300
- dispatch(updateState({
301
- title: locales.getText('page.eftpos-pay.text.loading')(modeRef.current)
302
- }));
303
- dispatch(updateCustom({
304
- actionStatus: LinklyActionStatus.SignatureWaiting
305
- }));
306
- sendWarningLog({
307
- title: "Linkly-".concat(isPay ? 'Pay' : 'Refund', "-\u7B7E\u540D"),
308
- content: [{
309
- key: 'params',
310
- value: JSON.stringify(param)
311
- }]
312
- });
313
- _signature.run(param);
314
- };
315
- return {
316
- action: {
317
- signature: _signature
318
- },
319
- linklySignature: linklySignature
320
- };
321
- };