@pisell/private-materials 6.8.83 → 6.8.85

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 (396) 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 +150 -164
  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/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/dashboard/serve.d.ts +1 -0
  14. package/es/components/booking/forms/model.d.ts +10 -1
  15. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  16. package/es/components/booking/forms/serve.d.ts +18 -0
  17. package/es/components/booking/info/client/serve.d.ts +2 -0
  18. package/es/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
  19. package/es/components/booking/info/index.d.ts +1 -0
  20. package/es/components/booking/info/model.d.ts +10 -1
  21. package/es/components/booking/info/pet/serve.d.ts +1 -0
  22. package/es/components/booking/info/service/Lists.d.ts +3 -0
  23. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  25. package/es/components/booking/info/service/serve.d.ts +34 -0
  26. package/es/components/booking/info/service/serviceManager/index.d.ts +20 -0
  27. package/es/components/booking/info/service2/utils.d.ts +219 -0
  28. package/es/components/booking/info2/serve.d.ts +6 -0
  29. package/es/components/booking/info2/service/addService/utils.d.ts +106 -0
  30. package/es/components/booking/info2/service/editNormalService/index.d.ts +3 -0
  31. package/es/components/booking/info2/service/editService/utils.d.ts +28 -0
  32. package/es/components/booking/info2/service/openNormalService.d.ts +34 -0
  33. package/es/components/booking/info2/utilsByBooking.d.ts +36 -0
  34. package/es/components/booking/model.d.ts +121 -0
  35. package/es/components/booking/notes/model.d.ts +10 -1
  36. package/es/components/booking/payments/model.d.ts +10 -1
  37. package/es/components/booking/utils.d.ts +182 -0
  38. package/es/components/checkout/PaymentModal.js +4 -2
  39. package/es/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
  40. package/es/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
  41. package/es/components/checkout/components/PaymentOptionsModule/index.js +1 -1
  42. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
  43. package/es/components/checkout/components/ScrollableList/index.d.ts +5 -0
  44. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  45. package/es/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
  46. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  47. package/es/components/eftposPay/aggregatePayment/hooks/useMicropay.js +120 -0
  48. package/es/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  49. package/es/components/eftposPay/aggregatePayment/index.js +3 -0
  50. package/es/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  51. package/es/components/eftposPay/aggregatePayment/service.js +69 -0
  52. package/es/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  53. package/es/components/eftposPay/aggregatePayment/types.js +65 -0
  54. package/es/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  55. package/es/components/eftposPay/aggregatePayment/utils/logs.js +371 -0
  56. package/es/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  57. package/es/components/eftposPay/aggregatePayment/utils/payment.js +1138 -0
  58. package/es/components/eftposPay/amount.d.ts +2 -1
  59. package/es/components/eftposPay/app.d.ts +1 -0
  60. package/es/components/eftposPay/app.js +5 -0
  61. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  62. package/es/components/eftposPay/component/fail/failCustom.js +16 -12
  63. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  64. package/es/components/eftposPay/component/fail/index.js +12 -5
  65. package/es/components/eftposPay/component/fail/network.d.ts +1 -0
  66. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  67. package/es/components/eftposPay/component/manual/index.d.ts +1 -0
  68. package/es/components/eftposPay/component/signature/index.d.ts +1 -0
  69. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  70. package/es/components/eftposPay/const.d.ts +6 -1
  71. package/es/components/eftposPay/const.js +3 -0
  72. package/es/components/eftposPay/device.d.ts +1 -1
  73. package/es/components/eftposPay/hooks.d.ts +3 -2
  74. package/es/components/eftposPay/hooks.js +12 -0
  75. package/es/components/eftposPay/huifu/Action.d.ts +8 -0
  76. package/es/components/eftposPay/huifu/Action.js +146 -0
  77. package/es/components/eftposPay/huifu/const.d.ts +5 -0
  78. package/es/components/eftposPay/huifu/const.js +70 -0
  79. package/es/components/eftposPay/huifu/hooks.d.ts +25 -0
  80. package/es/components/eftposPay/huifu/hooks.js +184 -0
  81. package/es/components/eftposPay/huifu/index.d.ts +5 -0
  82. package/es/components/eftposPay/huifu/index.js +196 -0
  83. package/es/components/eftposPay/huifu/index.less +180 -0
  84. package/es/components/eftposPay/huifu/types.d.ts +14 -0
  85. package/es/components/eftposPay/huifu/types.js +1 -0
  86. package/es/components/eftposPay/index.d.ts +1 -0
  87. package/es/components/eftposPay/index.js +5 -1
  88. package/es/components/eftposPay/linkly/index.d.ts +1 -0
  89. package/es/components/eftposPay/locales.d.ts +36 -0
  90. package/es/components/eftposPay/locales.js +42 -3
  91. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  92. package/es/components/eftposPay/manufacturer.js +5 -0
  93. package/es/components/eftposPay/pay.d.ts +1 -0
  94. package/es/components/eftposPay/pay.js +6 -2
  95. package/es/components/eftposPay/payo/config.d.ts +1 -0
  96. package/es/components/eftposPay/store/index.d.ts +13 -6
  97. package/es/components/eftposPay/tip.d.ts +1 -0
  98. package/es/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  99. package/es/components/eftposPay/windcave/windcave.d.ts +1 -0
  100. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  101. package/es/components/eventBooking/index.d.ts +1 -0
  102. package/es/components/kioskSkuDetail/index.d.ts +3 -0
  103. package/es/components/kioskSkuDetail/index.js +266 -173
  104. package/es/components/kioskSkuDetail/index.less +49 -7
  105. package/es/components/kioskSkuDetail/locales.d.ts +6 -0
  106. package/es/components/kioskSkuDetail/locales.js +9 -3
  107. package/es/components/list/types.d.ts +178 -0
  108. package/es/components/list/utils/index.d.ts +19 -0
  109. package/es/components/pay/toB/components/CardGroup/index.d.ts +1 -0
  110. package/es/components/pay/toB/components/EFTPOS/index.js +8 -1
  111. package/es/components/pay/toB/types/index.d.ts +1 -0
  112. package/es/components/pay/toC/PaymentList/serve.js +14 -0
  113. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  114. package/es/components/pay/toC/model.d.ts +9 -1
  115. package/es/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
  116. package/es/components/schedules/model.d.ts +9 -1
  117. package/es/components/shoppingCart/components/Cart/Product.js +1 -1
  118. package/es/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  119. package/es/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
  120. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
  121. package/es/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
  122. package/es/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  123. package/es/components/ticketBooking/context/index.d.ts +2 -0
  124. package/es/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  125. package/es/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
  126. package/es/components/ticketBooking/index.d.ts +16 -0
  127. package/es/components/ticketBooking/locales.d.ts +201 -0
  128. package/es/components/ticketBooking/serve.d.ts +288 -0
  129. package/es/components/ticketBooking/utils/index.d.ts +101 -0
  130. package/es/hooks/printer.d.ts +4 -0
  131. package/es/hooks/useEngineContext.d.ts +4 -0
  132. package/es/plus/productSelect/CategoryTabs/index.d.ts +21 -0
  133. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
  134. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
  135. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
  136. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
  137. package/es/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
  138. package/es/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
  139. package/es/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  140. package/es/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
  141. package/es/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
  142. package/es/plus/productSelect/ProductCard/index.d.ts +47 -0
  143. package/es/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
  144. package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  145. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
  146. package/es/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
  147. package/es/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  148. package/es/plus/skuOptionsSelection/components/VariantCard/index.js +1 -1
  149. package/es/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
  150. package/es/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
  151. package/es/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
  152. package/es/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
  153. package/es/plus/skuOptionsSelection/locales.d.ts +3 -0
  154. package/es/plus/skuOptionsSelection/locales.js +3 -0
  155. package/es/plus/skuOptionsSelection/store/actions.d.ts +22 -0
  156. package/es/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
  157. package/es/plus/skuOptionsSelection/store/index.d.ts +2 -0
  158. package/es/plus/skuOptionsSelection/store/store.d.ts +4 -0
  159. package/es/plus/skuOptionsSelection/types.d.ts +431 -0
  160. package/es/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
  161. package/es/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
  162. package/es/plus/skuOptionsSelection/utils/index.d.ts +7 -0
  163. package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
  164. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
  165. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
  166. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
  167. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
  168. package/es/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
  169. package/es/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
  170. package/es/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
  171. package/es/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
  172. package/es/plus/webPosLogin/index.d.ts +12 -0
  173. package/es/plus/webPosLogin/locales.d.ts +49 -0
  174. package/es/plus/webPosLogin/types.d.ts +286 -0
  175. package/es/pro/Cards/index.d.ts +1 -0
  176. package/es/pro/Login2.0/components/LoginCodeInput.js +36 -3
  177. package/es/pro/Login2.0/steps/CodeInput.js +37 -7
  178. package/es/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  179. package/es/pro/Selector/Item.d.ts +14 -0
  180. package/es/pro/Selector/Selector.d.ts +14 -0
  181. package/es/pro/Selector/Selector.stories.d.ts +78 -0
  182. package/es/pro/Selector/SelectorGroup.d.ts +11 -0
  183. package/es/pro/Selector/components/Card/index.d.ts +57 -0
  184. package/es/pro/Selector/components/Card/types.d.ts +1 -0
  185. package/es/pro/Selector/components/Indicator/index.d.ts +20 -0
  186. package/es/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  187. package/es/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
  188. package/es/pro/Selector/components/Media/index.d.ts +6 -0
  189. package/es/pro/Selector/components/Media/types.d.ts +47 -0
  190. package/es/pro/Selector/components/index.d.ts +4 -0
  191. package/es/pro/Selector/demo.d.ts +3 -0
  192. package/es/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
  193. package/es/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  194. package/es/pro/Selector/hooks/useSelectionController.d.ts +49 -0
  195. package/es/pro/Selector/index.d.ts +11 -0
  196. package/es/pro/Selector/locales.d.ts +36 -0
  197. package/es/pro/Selector/types.d.ts +212 -0
  198. package/es/pro/Selector/utils/index.d.ts +49 -0
  199. package/es/pro/skuDetailModal/locales.d.ts +103 -0
  200. package/es/pro/skuDetailModal/types.d.ts +354 -0
  201. package/es/pro/skuDetailModal/utils.d.ts +4 -0
  202. package/es/test/setup.d.ts +1 -0
  203. package/lib/components/authentication/admin/ChannelAuthSetting/SaaSManagermentAuth/index.d.ts +6 -0
  204. package/lib/components/booking/addons/model.d.ts +10 -1
  205. package/lib/components/booking/dashboard/serve.d.ts +1 -0
  206. package/lib/components/booking/forms/model.d.ts +10 -1
  207. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  208. package/lib/components/booking/forms/serve.d.ts +18 -0
  209. package/lib/components/booking/info/client/serve.d.ts +2 -0
  210. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +11 -0
  211. package/lib/components/booking/info/index.d.ts +1 -0
  212. package/lib/components/booking/info/model.d.ts +10 -1
  213. package/lib/components/booking/info/pet/serve.d.ts +1 -0
  214. package/lib/components/booking/info/service/Lists.d.ts +3 -0
  215. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  216. package/lib/components/booking/info/service/addTimeModal/serve.d.ts +5 -0
  217. package/lib/components/booking/info/service/serve.d.ts +34 -0
  218. package/lib/components/booking/info/service/serviceManager/index.d.ts +20 -0
  219. package/lib/components/booking/info/service2/utils.d.ts +219 -0
  220. package/lib/components/booking/info2/serve.d.ts +6 -0
  221. package/lib/components/booking/info2/service/addService/utils.d.ts +106 -0
  222. package/lib/components/booking/info2/service/editNormalService/index.d.ts +3 -0
  223. package/lib/components/booking/info2/service/editService/utils.d.ts +28 -0
  224. package/lib/components/booking/info2/service/openNormalService.d.ts +34 -0
  225. package/lib/components/booking/info2/utilsByBooking.d.ts +36 -0
  226. package/lib/components/booking/model.d.ts +121 -0
  227. package/lib/components/booking/notes/model.d.ts +10 -1
  228. package/lib/components/booking/payments/model.d.ts +10 -1
  229. package/lib/components/booking/utils.d.ts +182 -0
  230. package/lib/components/checkout/PaymentModal.js +5 -2
  231. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +26 -0
  232. package/lib/components/checkout/components/PaymentDetailModal/index.d.ts +38 -0
  233. package/lib/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  234. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +85 -0
  235. package/lib/components/checkout/components/ScrollableList/index.d.ts +5 -0
  236. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  237. package/lib/components/checkout/utils/PaymentResultToastUtils.d.ts +32 -0
  238. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.d.ts +7 -0
  239. package/lib/components/eftposPay/aggregatePayment/hooks/useMicropay.js +133 -0
  240. package/lib/components/eftposPay/aggregatePayment/index.d.ts +3 -0
  241. package/lib/components/eftposPay/aggregatePayment/index.js +42 -0
  242. package/lib/components/eftposPay/aggregatePayment/service.d.ts +24 -0
  243. package/lib/components/eftposPay/aggregatePayment/service.js +81 -0
  244. package/lib/components/eftposPay/aggregatePayment/types.d.ts +106 -0
  245. package/lib/components/eftposPay/aggregatePayment/types.js +74 -0
  246. package/lib/components/eftposPay/aggregatePayment/utils/logs.d.ts +110 -0
  247. package/lib/components/eftposPay/aggregatePayment/utils/logs.js +294 -0
  248. package/lib/components/eftposPay/aggregatePayment/utils/payment.d.ts +139 -0
  249. package/lib/components/eftposPay/aggregatePayment/utils/payment.js +752 -0
  250. package/lib/components/eftposPay/amount.d.ts +2 -1
  251. package/lib/components/eftposPay/app.d.ts +1 -0
  252. package/lib/components/eftposPay/app.js +5 -0
  253. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  254. package/lib/components/eftposPay/component/fail/failCustom.js +15 -9
  255. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  256. package/lib/components/eftposPay/component/fail/index.js +4 -1
  257. package/lib/components/eftposPay/component/fail/network.d.ts +1 -0
  258. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  259. package/lib/components/eftposPay/component/manual/index.d.ts +1 -0
  260. package/lib/components/eftposPay/component/signature/index.d.ts +1 -0
  261. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  262. package/lib/components/eftposPay/const.d.ts +6 -1
  263. package/lib/components/eftposPay/const.js +3 -0
  264. package/lib/components/eftposPay/device.d.ts +1 -1
  265. package/lib/components/eftposPay/hooks.d.ts +3 -2
  266. package/lib/components/eftposPay/hooks.js +16 -0
  267. package/lib/components/eftposPay/huifu/Action.d.ts +8 -0
  268. package/lib/components/eftposPay/huifu/Action.js +174 -0
  269. package/lib/components/eftposPay/huifu/const.d.ts +5 -0
  270. package/lib/components/eftposPay/huifu/const.js +86 -0
  271. package/lib/components/eftposPay/huifu/hooks.d.ts +25 -0
  272. package/lib/components/eftposPay/huifu/hooks.js +186 -0
  273. package/lib/components/eftposPay/huifu/index.d.ts +5 -0
  274. package/lib/components/eftposPay/huifu/index.js +200 -0
  275. package/lib/components/eftposPay/huifu/index.less +180 -0
  276. package/lib/components/eftposPay/huifu/types.d.ts +14 -0
  277. package/lib/components/eftposPay/huifu/types.js +17 -0
  278. package/lib/components/eftposPay/index.d.ts +1 -0
  279. package/lib/components/eftposPay/index.js +5 -1
  280. package/lib/components/eftposPay/linkly/index.d.ts +1 -0
  281. package/lib/components/eftposPay/locales.d.ts +36 -0
  282. package/lib/components/eftposPay/locales.js +42 -3
  283. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  284. package/lib/components/eftposPay/manufacturer.js +7 -0
  285. package/lib/components/eftposPay/pay.d.ts +1 -0
  286. package/lib/components/eftposPay/pay.js +3 -2
  287. package/lib/components/eftposPay/payo/config.d.ts +1 -0
  288. package/lib/components/eftposPay/store/index.d.ts +13 -6
  289. package/lib/components/eftposPay/tip.d.ts +1 -0
  290. package/lib/components/eftposPay/windcave/receiptAction.d.ts +1 -0
  291. package/lib/components/eftposPay/windcave/windcave.d.ts +1 -0
  292. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  293. package/lib/components/eventBooking/index.d.ts +1 -0
  294. package/lib/components/kioskSkuDetail/index.d.ts +3 -0
  295. package/lib/components/kioskSkuDetail/index.js +180 -113
  296. package/lib/components/kioskSkuDetail/index.less +49 -7
  297. package/lib/components/kioskSkuDetail/locales.d.ts +6 -0
  298. package/lib/components/kioskSkuDetail/locales.js +9 -3
  299. package/lib/components/list/types.d.ts +178 -0
  300. package/lib/components/list/utils/index.d.ts +19 -0
  301. package/lib/components/pay/toB/components/CardGroup/index.d.ts +1 -0
  302. package/lib/components/pay/toB/components/EFTPOS/index.js +8 -1
  303. package/lib/components/pay/toB/types/index.d.ts +1 -0
  304. package/lib/components/pay/toC/PaymentList/serve.js +15 -0
  305. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.js +7 -6
  306. package/lib/components/pay/toC/model.d.ts +9 -1
  307. package/lib/components/pisellSelectCustomerModal/RightPanel/serve.d.ts +3 -0
  308. package/lib/components/schedules/model.d.ts +9 -1
  309. package/lib/components/shoppingCart/components/Cart/Product.js +1 -1
  310. package/lib/components/ticketBooking/components/ProductDisplayAdapter/types.d.ts +115 -0
  311. package/lib/components/ticketBooking/components/ProductDisplayAdapter/utils.d.ts +84 -0
  312. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +11 -0
  313. package/lib/components/ticketBooking/components/addServiceVariant/utils.d.ts +9 -0
  314. package/lib/components/ticketBooking/context/OsKeyContext.d.ts +26 -0
  315. package/lib/components/ticketBooking/context/index.d.ts +2 -0
  316. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.d.ts +25 -0
  317. package/lib/components/ticketBooking/hooks/pisellos/useProducts.d.ts +16 -0
  318. package/lib/components/ticketBooking/index.d.ts +16 -0
  319. package/lib/components/ticketBooking/locales.d.ts +201 -0
  320. package/lib/components/ticketBooking/serve.d.ts +288 -0
  321. package/lib/components/ticketBooking/utils/index.d.ts +101 -0
  322. package/lib/hooks/printer.d.ts +4 -0
  323. package/lib/hooks/useEngineContext.d.ts +4 -0
  324. package/lib/plus/productSelect/CategoryTabs/index.d.ts +21 -0
  325. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA1/index.d.ts +1 -0
  326. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA2/index.d.ts +1 -0
  327. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA5/index.d.ts +1 -0
  328. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardA9/index.d.ts +1 -0
  329. package/lib/plus/productSelect/ProductCard/SkuCard/SkuCardCustom/index.d.ts +1 -0
  330. package/lib/plus/productSelect/ProductCard/SkuCard/components/CardCom/index.d.ts +1 -0
  331. package/lib/plus/productSelect/ProductCard/SkuCard/components/MemberPrice/index.d.ts +1 -1
  332. package/lib/plus/productSelect/ProductCard/SkuCard/components/Price/index.d.ts +7 -0
  333. package/lib/plus/productSelect/ProductCard/SkuCard/index.d.ts +1 -0
  334. package/lib/plus/productSelect/ProductCard/index.d.ts +47 -0
  335. package/lib/plus/productSelect/ProductList/gridComponents.d.ts +46 -0
  336. package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
  337. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +6 -0
  338. package/lib/plus/skuOptionsSelection/components/TitleExtra/index.d.ts +4 -0
  339. package/lib/plus/skuOptionsSelection/components/VariantCard/index.d.ts +1 -0
  340. package/lib/plus/skuOptionsSelection/components/VariantCard/index.js +2 -0
  341. package/lib/plus/skuOptionsSelection/hooks/index.d.ts +3 -0
  342. package/lib/plus/skuOptionsSelection/hooks/useLanguage.d.ts +2 -0
  343. package/lib/plus/skuOptionsSelection/hooks/useStore.d.ts +2 -0
  344. package/lib/plus/skuOptionsSelection/hooks/useSymbol.d.ts +2 -0
  345. package/lib/plus/skuOptionsSelection/locales.d.ts +3 -0
  346. package/lib/plus/skuOptionsSelection/locales.js +3 -0
  347. package/lib/plus/skuOptionsSelection/store/actions.d.ts +22 -0
  348. package/lib/plus/skuOptionsSelection/store/createStore.d.ts +15 -0
  349. package/lib/plus/skuOptionsSelection/store/index.d.ts +2 -0
  350. package/lib/plus/skuOptionsSelection/store/store.d.ts +4 -0
  351. package/lib/plus/skuOptionsSelection/types.d.ts +431 -0
  352. package/lib/plus/skuOptionsSelection/utils/calculateOption.d.ts +6 -0
  353. package/lib/plus/skuOptionsSelection/utils/checkSkuStatus.d.ts +37 -0
  354. package/lib/plus/skuOptionsSelection/utils/index.d.ts +7 -0
  355. package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +19 -0
  356. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +1 -0
  357. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +4 -0
  358. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +4 -0
  359. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +1 -0
  360. package/lib/plus/webPosLogin/WebPosLoginCpt.d.ts +9 -0
  361. package/lib/plus/webPosLogin/components/BrandPanel/index.d.ts +9 -0
  362. package/lib/plus/webPosLogin/components/LoginPanel/index.d.ts +21 -0
  363. package/lib/plus/webPosLogin/components/MediaDisplay/type.d.ts +54 -0
  364. package/lib/plus/webPosLogin/index.d.ts +12 -0
  365. package/lib/plus/webPosLogin/locales.d.ts +49 -0
  366. package/lib/plus/webPosLogin/types.d.ts +286 -0
  367. package/lib/pro/Cards/index.d.ts +1 -0
  368. package/lib/pro/Login2.0/components/LoginCodeInput.js +26 -4
  369. package/lib/pro/Login2.0/steps/CodeInput.js +27 -5
  370. package/lib/pro/Selector/BatchSelectorDemo.d.ts +3 -0
  371. package/lib/pro/Selector/Item.d.ts +14 -0
  372. package/lib/pro/Selector/Selector.d.ts +14 -0
  373. package/lib/pro/Selector/Selector.stories.d.ts +78 -0
  374. package/lib/pro/Selector/SelectorGroup.d.ts +11 -0
  375. package/lib/pro/Selector/components/Card/index.d.ts +57 -0
  376. package/lib/pro/Selector/components/Card/types.d.ts +1 -0
  377. package/lib/pro/Selector/components/Indicator/index.d.ts +20 -0
  378. package/lib/pro/Selector/components/IntersectionObserver.d.ts +105 -0
  379. package/lib/pro/Selector/components/LayoutContainer/index.d.ts +18 -0
  380. package/lib/pro/Selector/components/Media/index.d.ts +6 -0
  381. package/lib/pro/Selector/components/Media/types.d.ts +47 -0
  382. package/lib/pro/Selector/components/index.d.ts +4 -0
  383. package/lib/pro/Selector/demo.d.ts +3 -0
  384. package/lib/pro/Selector/hooks/usePresetItemProps.d.ts +43 -0
  385. package/lib/pro/Selector/hooks/usePresetProps.d.ts +24 -0
  386. package/lib/pro/Selector/hooks/useSelectionController.d.ts +49 -0
  387. package/lib/pro/Selector/index.d.ts +11 -0
  388. package/lib/pro/Selector/locales.d.ts +36 -0
  389. package/lib/pro/Selector/types.d.ts +212 -0
  390. package/lib/pro/Selector/utils/index.d.ts +49 -0
  391. package/lib/pro/skuDetailModal/locales.d.ts +103 -0
  392. package/lib/pro/skuDetailModal/types.d.ts +354 -0
  393. package/lib/pro/skuDetailModal/utils.d.ts +4 -0
  394. package/lib/test/setup.d.ts +1 -0
  395. package/lowcode/kiosk-sku-detail/meta.ts +229 -94
  396. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  /**
3
4
  * @title: 支付金额信息配置页
@@ -8,7 +9,7 @@ import { PosProps } from './const';
8
9
  */
9
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
11
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps, RouteType } from './const';
2
3
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
4
  action: RouteType;
@@ -21,6 +21,8 @@ import { RouteEnum, ClientEnum, RestoreEumn } from "./const";
21
21
  import Device from "./device";
22
22
  import Pay from "./pay";
23
23
  import { useContextData, useDispatch, updateState, updateClient } from "./store";
24
+ import useEngineContext from "../../hooks/useEngineContext";
25
+ import { request } from "../../utils";
24
26
  var App = function App(_ref) {
25
27
  var action = _ref.action,
26
28
  api = _ref.api,
@@ -42,6 +44,9 @@ var App = function App(_ref) {
42
44
  _useState2 = _slicedToArray(_useState, 2),
43
45
  current = _useState2[0],
44
46
  setCurrent = _useState2[1];
47
+ var engineContext = useEngineContext();
48
+ var utils = engineContext.appHelper.utils || {};
49
+ request.setRequest(utils === null || utils === void 0 ? void 0 : utils.request);
45
50
  var statusRef = useRef(data.status);
46
51
 
47
52
  // 外部网络数据
@@ -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,9 @@
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); }
1
7
  /* eslint-disable no-nested-ternary */
2
8
  import { locales } from '@pisell/utils';
3
9
  import { useMount } from 'ahooks';
@@ -23,7 +29,8 @@ export default (function (_ref) {
23
29
  order_id = _useContextData.order_id,
24
30
  number = _useContextData.number,
25
31
  device = _useContextData.device,
26
- client = _useContextData.client;
32
+ client = _useContextData.client,
33
+ originalParams = _useContextData.originalParams;
27
34
  var failCustom = custom === null || custom === void 0 ? void 0 : custom.failCustom;
28
35
  var dispatch = useDispatch();
29
36
 
@@ -34,20 +41,17 @@ export default (function (_ref) {
34
41
  */
35
42
  var onRetry = function onRetry() {
36
43
  onChange('page', 'pay');
37
- dispatch(updateState(getInitState(eftpos, mode === ModeEnum.Query ? {
44
+ var params = _objectSpread(_objectSpread({}, originalParams || {}), {}, {
38
45
  mode: mode,
39
46
  name: name,
40
47
  symbol: symbol,
41
48
  amount: amount,
42
49
  order_id: order_id
43
- } : {
44
- mode: mode,
45
- name: name,
46
- symbol: symbol,
47
- amount: amount,
48
- order_id: order_id,
49
- number: ''
50
- })));
50
+ });
51
+ if (mode === ModeEnum.Query) {
52
+ params.number = '';
53
+ }
54
+ dispatch(updateState(getInitState(eftpos, params)));
51
55
  };
52
56
 
53
57
  /**
@@ -56,14 +60,14 @@ export default (function (_ref) {
56
60
  * @Date: 2024-08-20 11:30
57
61
  */
58
62
  var onModify = function onModify() {
59
- dispatch(updateState(getInitState(eftpos, {
63
+ dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
60
64
  mode: mode,
61
65
  name: name,
62
66
  symbol: symbol,
63
67
  amount: amount,
64
68
  order_id: order_id,
65
69
  number: ''
66
- })));
70
+ }))));
67
71
  onChange('page', 'amount');
68
72
  };
69
73
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ActionProps } from '../../const';
2
3
  declare const _default: ({ onChange, className, isMobile }: ActionProps) => JSX.Element;
3
4
  export default _default;
@@ -1,3 +1,9 @@
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); }
1
7
  /* eslint-disable no-nested-ternary */
2
8
  import { locales } from '@pisell/utils';
3
9
  import { Button } from 'antd';
@@ -25,7 +31,8 @@ export default (function (_ref) {
25
31
  order_id = _useContextData.order_id,
26
32
  number = _useContextData.number,
27
33
  device = _useContextData.device,
28
- client = _useContextData.client;
34
+ client = _useContextData.client,
35
+ originalParams = _useContextData.originalParams;
29
36
  var isPosNetworkError = ((_steps$step = steps[step]) === null || _steps$step === void 0 || (_steps$step = _steps$step.custom) === null || _steps$step === void 0 ? void 0 : _steps$step.isPosNetworkError) || false;
30
37
  var dispatch = useDispatch();
31
38
 
@@ -36,14 +43,14 @@ export default (function (_ref) {
36
43
  */
37
44
  var onRetry = function onRetry() {
38
45
  onChange('page', 'pay');
39
- dispatch(updateState(getInitState(eftpos, {
46
+ dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
40
47
  mode: mode,
41
48
  name: name,
42
49
  symbol: symbol,
43
50
  amount: amount,
44
51
  order_id: order_id,
45
52
  number: ''
46
- })));
53
+ }))));
47
54
  };
48
55
 
49
56
  /**
@@ -52,14 +59,14 @@ export default (function (_ref) {
52
59
  * @Date: 2024-08-20 11:30
53
60
  */
54
61
  var onModify = function onModify() {
55
- dispatch(updateState(getInitState(eftpos, {
62
+ dispatch(updateState(getInitState(eftpos, _objectSpread(_objectSpread({}, originalParams || {}), {}, {
56
63
  mode: mode,
57
64
  name: name,
58
65
  symbol: symbol,
59
66
  amount: amount,
60
67
  order_id: order_id,
61
68
  number: ''
62
- })));
69
+ }))));
63
70
  onChange('page', 'amount');
64
71
  };
65
72
 
@@ -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: 取消签名确认页
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusType } from '../../const';
2
3
  declare const _default: (props: {
3
4
  status: StatusType;
@@ -7,9 +7,12 @@ export declare enum EftposEnum {
7
7
  /** 后端支付 - 支付 + 退款 */
8
8
  Windcave = "windcave",
9
9
  Stripe = "stripe",
10
- Linkly = "linkly"
10
+ Linkly = "linkly",
11
+ /** 汇付天下 */
12
+ Huifu = "huifu"
11
13
  }
12
14
  export declare enum StatusEnum {
15
+ Init = "init",
13
16
  Loading = "loading",
14
17
  Warn = "warn",
15
18
  Fail = "fail",
@@ -160,6 +163,8 @@ export declare enum PayStatus {
160
163
  'Unknown' = "701000",
161
164
  /** 交易请求超时 */
162
165
  'Timeout' = "701001",
166
+ /** 支付失败(汇付天下) */
167
+ 'PaymentFailed' = "701002",
163
168
  /** 繁忙 EFTPOS终端暂时不可用,因为EFTPOS正在处理另一个请求。 */
164
169
  'PayOtherEftposFailed' = "701003",
165
170
  /** 购物者没有出示卡片/卡片金额不足/在线拒绝/卡已过期/卡被锁定 */
@@ -4,9 +4,11 @@ export var EftposEnum = /*#__PURE__*/function (EftposEnum) {
4
4
  EftposEnum["Windcave"] = "windcave";
5
5
  EftposEnum["Stripe"] = "stripe";
6
6
  EftposEnum["Linkly"] = "linkly";
7
+ EftposEnum["Huifu"] = "huifu";
7
8
  return EftposEnum;
8
9
  }({});
9
10
  export var StatusEnum = /*#__PURE__*/function (StatusEnum) {
11
+ StatusEnum["Init"] = "init";
10
12
  StatusEnum["Loading"] = "loading";
11
13
  StatusEnum["Warn"] = "warn";
12
14
  StatusEnum["Fail"] = "fail";
@@ -68,6 +70,7 @@ export var PayStatus = /*#__PURE__*/function (PayStatus) {
68
70
  PayStatus["PairingFailure"] = "606020";
69
71
  PayStatus["Unknown"] = "701000";
70
72
  PayStatus["Timeout"] = "701001";
73
+ PayStatus["PaymentFailed"] = "701002";
71
74
  PayStatus["PayOtherEftposFailed"] = "701003";
72
75
  PayStatus["PayCardErrorFailed"] = "701004";
73
76
  PayStatus["NoNetWork"] = "701005";
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  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" | "warn" | "success" | "init" | "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<"payo" | "tyro" | "windcave" | "stripe" | "linkly" | "huifu">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -32,4 +32,5 @@ export declare const useStoreRef: <T extends {
32
32
  */
33
33
  export declare const useFail: (index: number) => (res: {
34
34
  code?: `${PayStatus}`;
35
+ message?: string;
35
36
  }, isMark?: boolean) => void;
@@ -314,6 +314,18 @@ export var useFail = function useFail(index) {
314
314
  }));
315
315
  return;
316
316
  }
317
+ if (code === PayStatus.PaymentFailed) {
318
+ // 前往错误页 不可标记状态
319
+ steps[index].title = locales.getText('page.eftpos-pay.text.transaction.fail');
320
+ steps[index].fail = (res === null || res === void 0 ? void 0 : res.message) || locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
321
+ steps[index].status = 'fail';
322
+ dispatch(updateSteps(steps));
323
+ dispatch(updateComponent('Fail'));
324
+ dispatch(updateCustom({
325
+ errorStatus: 'know' // unknow know
326
+ }));
327
+ return;
328
+ }
317
329
 
318
330
  // 其他场景前往未知错误页
319
331
  steps[index].title = locales.getText('page.eftpos-pay.text.failed')(modeRef.current);
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { HuifuActionProps } from './types';
4
+ export declare const NativeDeviceStatus: ({ type, status, }: {
5
+ type: 'scanner' | 'camera';
6
+ status: boolean;
7
+ }) => JSX.Element;
8
+ export declare const ScanAction: React.FC<HuifuActionProps>;
@@ -0,0 +1,146 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useState, useEffect } from 'react';
8
+ import { locales } from '@pisell/utils';
9
+ import { Iconfont, Button, Input } from '@pisell/materials';
10
+ import "./index.less";
11
+ import { useScannerDevice, useCameraDevice, useScanListener } from "./hooks";
12
+ export var NativeDeviceStatus = function NativeDeviceStatus(_ref) {
13
+ var type = _ref.type,
14
+ status = _ref.status;
15
+ var iconType = type === 'scanner' ? 'pisell2-Scanner' : 'pisell2-camera';
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ className: "pisell-eftpos-pay-huifu-scan-status"
18
+ }, /*#__PURE__*/React.createElement(Iconfont, {
19
+ type: iconType,
20
+ style: {
21
+ fontSize: '40px'
22
+ }
23
+ }), /*#__PURE__*/React.createElement("div", {
24
+ className: "pisell-eftpos-pay-huifu-scan-status-wrapper"
25
+ }, /*#__PURE__*/React.createElement(Iconfont, {
26
+ style: {
27
+ borderRadius: '50%',
28
+ background: status ? '#17B26A' : '#F04438',
29
+ color: '#fff'
30
+ },
31
+ type: status ? 'pisell2-check' : 'pisell2-x-close'
32
+ })));
33
+ };
34
+ var DEFAULT_SCANNER_CLASS = 'pisell-eftpos-pay-huifu-scan-content-scanner';
35
+ export var ScanAction = function ScanAction(_ref2) {
36
+ var isNativeApp = _ref2.isNativeApp,
37
+ onClose = _ref2.onClose,
38
+ onPayClick = _ref2.onPayClick,
39
+ onScanCallback = _ref2.onScanCallback;
40
+ var _useScannerDevice = useScannerDevice(),
41
+ scannerStatus = _useScannerDevice.scannerStatus;
42
+ var _useCameraDevice = useCameraDevice(),
43
+ cameraStatus = _useCameraDevice.cameraStatus,
44
+ activeCamera = _useCameraDevice.activeCamera;
45
+ var _useScanListener = useScanListener(),
46
+ scanResult = _useScanListener.scanResult;
47
+ var _useState = useState(''),
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ inputValue = _useState2[0],
50
+ setInputValue = _useState2[1];
51
+ useEffect(function () {
52
+ if (!!(scanResult !== null && scanResult !== void 0 && scanResult.value)) {
53
+ onScanCallback(scanResult.value);
54
+ }
55
+ }, [scanResult]);
56
+ return /*#__PURE__*/React.createElement("div", {
57
+ className: "pisell-eftpos-pay-huifu-scan"
58
+ }, !isNativeApp ? /*#__PURE__*/React.createElement("div", {
59
+ className: "pisell-eftpos-pay-huifu-scan-header"
60
+ }, /*#__PURE__*/React.createElement("span", {
61
+ className: "pisell-eftpos-pay-huifu-scan-header-title"
62
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.title')), /*#__PURE__*/React.createElement("div", {
63
+ className: "pisell-eftpos-pay-huifu-scan-header-close",
64
+ onClick: onClose
65
+ }, /*#__PURE__*/React.createElement(Iconfont, {
66
+ type: "pisell2-x-close",
67
+ style: {
68
+ fontSize: '24px'
69
+ }
70
+ })), /*#__PURE__*/React.createElement("div", {
71
+ className: "pisell-eftpos-pay-huifu-scan-header-divider"
72
+ })) : null, /*#__PURE__*/React.createElement("div", {
73
+ className: "pisell-eftpos-pay-huifu-scan-content",
74
+ style: {
75
+ paddingTop: isNativeApp ? '0' : '24px'
76
+ }
77
+ }, !!isNativeApp && /*#__PURE__*/React.createElement("div", {
78
+ className: "pisell-eftpos-pay-huifu-scan-content-title"
79
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.title')), /*#__PURE__*/React.createElement("div", {
80
+ className: "".concat(DEFAULT_SCANNER_CLASS, " ").concat(DEFAULT_SCANNER_CLASS, "-").concat(scannerStatus ? 'active' : 'unactive')
81
+ }, /*#__PURE__*/React.createElement(NativeDeviceStatus, {
82
+ type: "scanner",
83
+ status: scannerStatus
84
+ }), /*#__PURE__*/React.createElement("div", {
85
+ className: "pisell-eftpos-pay-huifu-scan-content-scanner-right"
86
+ }, /*#__PURE__*/React.createElement("span", {
87
+ className: "".concat(DEFAULT_SCANNER_CLASS, "-").concat(scannerStatus ? 'active' : 'unactive', "-title")
88
+ }, scannerStatus ? locales.getText('page.eftpos-pay.text.huifu.scan.gun.connected') : locales.getText('page.eftpos-pay.text.huifu.scan.gun.not-connected')), /*#__PURE__*/React.createElement("span", {
89
+ className: "".concat(DEFAULT_SCANNER_CLASS, "-").concat(scannerStatus ? 'active' : 'unactive', "-desc")
90
+ }, scannerStatus ? locales.getText('page.eftpos-pay.text.huifu.scan.gun.connected-desc') : locales.getText('page.eftpos-pay.text.huifu.scan.gun.not-connected-desc')))), cameraStatus && /*#__PURE__*/React.createElement("div", {
91
+ className: "pisell-eftpos-pay-huifu-scan-content-camera",
92
+ onClick: activeCamera
93
+ }, /*#__PURE__*/React.createElement(NativeDeviceStatus, {
94
+ type: "camera",
95
+ status: cameraStatus
96
+ }), /*#__PURE__*/React.createElement("div", {
97
+ className: "pisell-eftpos-pay-huifu-scan-content-camera-right"
98
+ }, /*#__PURE__*/React.createElement("span", {
99
+ className: "pisell-eftpos-pay-huifu-scan-content-camera-title"
100
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.camera-title')), /*#__PURE__*/React.createElement("span", {
101
+ className: "pisell-eftpos-pay-huifu-scan-content-camera-desc"
102
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.camera-desc')))), /*#__PURE__*/React.createElement("div", {
103
+ className: "pisell-eftpos-pay-huifu-scan-content-input-wrapper"
104
+ }, /*#__PURE__*/React.createElement("div", {
105
+ className: "pisell-eftpos-pay-huifu-scan-content-input-wrapper-title"
106
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.input-title')), /*#__PURE__*/React.createElement(Input, {
107
+ placeholder: locales.getText('page.eftpos-pay.text.huifu.scan.input-placeholder'),
108
+ maxLength: 18,
109
+ style: {
110
+ width: '100%',
111
+ fontSize: '16px'
112
+ },
113
+ size: "large",
114
+ value: inputValue,
115
+ onChange: function onChange(e) {
116
+ var _e$target;
117
+ // 使用正则控制只能输入0-9字符,且长度不超过18
118
+ var value = (e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) || '';
119
+ var regex = /^[0-9]*$/;
120
+ if (regex.test(value) && (value === null || value === void 0 ? void 0 : value.length) <= 18) {
121
+ setInputValue(value);
122
+ }
123
+ }
124
+ }), /*#__PURE__*/React.createElement("div", {
125
+ className: "pisell-eftpos-pay-huifu-scan-content-input-wrapper-tip"
126
+ }, "\uD83D\uDCA1", locales.getText('page.eftpos-pay.text.huifu.scan.input-tip')))), /*#__PURE__*/React.createElement("div", {
127
+ className: "pisell-eftpos-pay-huifu-scan-footer"
128
+ }, /*#__PURE__*/React.createElement("div", {
129
+ className: "pisell-eftpos-pay-huifu-scan-footer-divider"
130
+ }), /*#__PURE__*/React.createElement(Button, {
131
+ type: "default",
132
+ block: true,
133
+ size: "large",
134
+ className: "pisell-eftpos-pay-huifu-scan-footer-button",
135
+ onClick: onClose
136
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.cancel')), /*#__PURE__*/React.createElement(Button, {
137
+ type: "primary",
138
+ block: true,
139
+ size: "large",
140
+ disabled: !inputValue || (inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) < 18,
141
+ onClick: function onClick() {
142
+ return onPayClick(inputValue);
143
+ },
144
+ className: "pisell-eftpos-pay-huifu-scan-footer-button"
145
+ }, locales.getText('page.eftpos-pay.text.huifu.scan.confirm'))));
146
+ };
@@ -0,0 +1,5 @@
1
+ import { State } from '../store';
2
+ import { ModeEnum } from '../const';
3
+ export declare const getStep: (mode?: ModeEnum) => State['steps'];
4
+ declare const _default: (params: any) => State;
5
+ export default _default;
@@ -0,0 +1,70 @@
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
+ var isPay = mode === ModeEnum.Pay || mode === ModeEnum.FullPay;
43
+ return _objectSpread(_objectSpread(_objectSpread(_objectSpread({
44
+ order_id: order_id,
45
+ name: name,
46
+ symbol: symbol,
47
+ amount: amount,
48
+ mode: mode,
49
+ eftpos: EftposEnum.Huifu,
50
+ key: Date.now(),
51
+ step: 0,
52
+ type: PayRouteEnum.Step,
53
+ title: isPay ? '' : locales.getText('page.eftpos-pay.text.loading')(mode),
54
+ component: '',
55
+ status: isPay ? StatusEnum.Init : StatusEnum.Loading,
56
+ steps: getStep(mode),
57
+ render: true,
58
+ client: client !== 'undefined' ? client : ClientEnum.Merchant,
59
+ warn: '',
60
+ custom: other || {}
61
+ }, typeof net !== 'undefined' ? {
62
+ net: net
63
+ } : {}), typeof number !== 'undefined' ? {
64
+ number: number
65
+ } : {}), typeof pay !== 'undefined' ? {
66
+ pay: pay
67
+ } : {}), typeof device !== 'undefined' ? {
68
+ device: device
69
+ } : {});
70
+ });
@@ -0,0 +1,25 @@
1
+ export declare const useTerminal: () => {
2
+ isTerminal: any;
3
+ };
4
+ /**
5
+ * 获取扫码设备连接状态
6
+ */
7
+ export declare const useScannerDevice: () => {
8
+ scannerStatus: boolean;
9
+ };
10
+ /**
11
+ * 摄像头激活和状态获取
12
+ */
13
+ export declare const useCameraDevice: () => {
14
+ activeCamera: () => void;
15
+ cameraStatus: any;
16
+ };
17
+ /**
18
+ * 获取外部设备扫描结果
19
+ */
20
+ export declare const useScanListener: () => {
21
+ scanResult: {
22
+ type: 'scanner' | 'nfc' | 'camera';
23
+ value: string;
24
+ };
25
+ };