@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
@@ -0,0 +1,184 @@
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 { useEffect, useState, useCallback } from 'react';
8
+ import useEngineContext from "../../../hooks/useEngineContext";
9
+ export var useTerminal = function useTerminal() {
10
+ var _context$appHelper, _interaction$utils, _interaction$utils$is;
11
+ var context = useEngineContext();
12
+ var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
13
+ interaction = _ref.interaction,
14
+ isTerminal = _ref.isTerminal;
15
+ return {
16
+ isTerminal: isTerminal && isTerminal() || (interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$is = _interaction$utils.isAppEnv) === null || _interaction$utils$is === void 0 ? void 0 : _interaction$utils$is.call(_interaction$utils))
17
+ };
18
+ };
19
+
20
+ /**
21
+ * 获取扫码设备连接状态
22
+ */
23
+ export var useScannerDevice = function useScannerDevice() {
24
+ var _context$appHelper2;
25
+ var _useState = useState(false),
26
+ _useState2 = _slicedToArray(_useState, 2),
27
+ scannerStatus = _useState2[0],
28
+ setScannerStatus = _useState2[1];
29
+ var context = useEngineContext();
30
+ var _ref2 = ((_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.utils) || {},
31
+ interaction = _ref2.interaction;
32
+ useEffect(function () {
33
+ var _interaction$utils2, _interaction$utils2$p, _interaction$utils3, _interaction$utils3$m;
34
+ // 主动获取设备连接状态
35
+ interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
36
+ module: 'global',
37
+ key: 'get_peripherals_status',
38
+ data: {}
39
+ });
40
+
41
+ // 设备当前连接状态返回
42
+ interaction === null || interaction === void 0 || (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 || (_interaction$utils3$m = _interaction$utils3.mountFunction) === null || _interaction$utils3$m === void 0 || _interaction$utils3$m.call(_interaction$utils3, 'global', 'peripheralsStatus', function (strPeripherals) {
43
+ try {
44
+ var peripherals = JSON.parse(strPeripherals);
45
+ setScannerStatus((peripherals === null || peripherals === void 0 ? void 0 : peripherals.scanner) == 'connected');
46
+ } catch (err) {
47
+ console.error(err);
48
+ }
49
+ });
50
+ }, []);
51
+ return {
52
+ scannerStatus: scannerStatus
53
+ };
54
+ };
55
+
56
+ /**
57
+ * 摄像头激活和状态获取
58
+ */
59
+ export var useCameraDevice = function useCameraDevice() {
60
+ var _context$appHelper3, _interaction$utils5, _interaction$utils5$i;
61
+ var context = useEngineContext();
62
+ var _ref3 = ((_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.utils) || {},
63
+ interaction = _ref3.interaction,
64
+ isTerminal = _ref3.isTerminal;
65
+ var activeCamera = useCallback(function () {
66
+ var _interaction$utils4, _interaction$utils4$p;
67
+ interaction === null || interaction === void 0 || (_interaction$utils4 = interaction.utils) === null || _interaction$utils4 === void 0 || (_interaction$utils4$p = _interaction$utils4.postMessageToApp) === null || _interaction$utils4$p === void 0 || _interaction$utils4$p.call(_interaction$utils4, {
68
+ module: 'global',
69
+ key: 'active_native_scanner',
70
+ data: {
71
+ source: 'eftposPay_huifu'
72
+ }
73
+ });
74
+ }, []);
75
+ return {
76
+ activeCamera: activeCamera,
77
+ cameraStatus: isTerminal && isTerminal() || (interaction === null || interaction === void 0 || (_interaction$utils5 = interaction.utils) === null || _interaction$utils5 === void 0 || (_interaction$utils5$i = _interaction$utils5.isAppEnv) === null || _interaction$utils5$i === void 0 ? void 0 : _interaction$utils5$i.call(_interaction$utils5))
78
+ };
79
+ };
80
+
81
+ /**
82
+ * 获取外部设备扫描结果
83
+ */
84
+ export var useScanListener = function useScanListener() {
85
+ var _context$appHelper4, _interaction$utils6, _interaction$utils6$i;
86
+ var context = useEngineContext();
87
+ var _ref4 = ((_context$appHelper4 = context.appHelper) === null || _context$appHelper4 === void 0 ? void 0 : _context$appHelper4.utils) || {},
88
+ interaction = _ref4.interaction,
89
+ isTerminal = _ref4.isTerminal;
90
+ var _useState3 = useState({
91
+ type: 'scanner',
92
+ value: ''
93
+ }),
94
+ _useState4 = _slicedToArray(_useState3, 2),
95
+ scanResult = _useState4[0],
96
+ setScanResult = _useState4[1];
97
+ var isNativeEnv = isTerminal && isTerminal() || (interaction === null || interaction === void 0 || (_interaction$utils6 = interaction.utils) === null || _interaction$utils6 === void 0 || (_interaction$utils6$i = _interaction$utils6.isAppEnv) === null || _interaction$utils6$i === void 0 ? void 0 : _interaction$utils6$i.call(_interaction$utils6));
98
+ useEffect(function () {
99
+ var _interaction$utils7, _interaction$utils7$m;
100
+ // 获取外部设备扫描结果
101
+ interaction === null || interaction === void 0 || (_interaction$utils7 = interaction.utils) === null || _interaction$utils7 === void 0 || (_interaction$utils7$m = _interaction$utils7.mountFunction) === null || _interaction$utils7$m === void 0 || _interaction$utils7$m.call(_interaction$utils7, 'global', 'peripheralsResult', function (strVal) {
102
+ try {
103
+ var val = JSON.parse(strVal);
104
+ setScanResult(val);
105
+ } catch (err) {
106
+ console.error(err);
107
+ setScanResult({
108
+ type: 'scanner',
109
+ value: ''
110
+ });
111
+ }
112
+ });
113
+
114
+ // 支持在web环境下监听外部设备扫描结果,使用监听键盘事件
115
+ var inputBuffer = '';
116
+ var lastInputTime = 0;
117
+ var inputTimer = null;
118
+ var handleKeyDown = function handleKeyDown(e) {
119
+ // 过滤特殊键
120
+ if (e.key === 'Shift' || e.key === 'Control' || e.key === 'Alt' || e.key === 'Meta' || e.key === 'Tab' || e.key === 'CapsLock' || e.key === 'Escape' || e.key.startsWith('Arrow') || e.ctrlKey || e.metaKey) {
121
+ return;
122
+ }
123
+ var currentTime = Date.now();
124
+ var timeDiff = currentTime - lastInputTime;
125
+
126
+ // Enter键表示扫码结束
127
+ if (e.key === 'Enter') {
128
+ var trimmedCode = inputBuffer.trim();
129
+ if (trimmedCode.length >= 10) {
130
+ setScanResult({
131
+ type: 'scanner',
132
+ value: trimmedCode
133
+ });
134
+ }
135
+ inputBuffer = '';
136
+ lastInputTime = 0;
137
+ if (inputTimer) {
138
+ clearTimeout(inputTimer);
139
+ inputTimer = null;
140
+ }
141
+ return;
142
+ }
143
+
144
+ // 输入间隔 < 30ms 认为是扫码枪
145
+ if (timeDiff < 30 && inputBuffer.length > 0) {
146
+ inputBuffer += e.key;
147
+ } else {
148
+ inputBuffer = e.key;
149
+ }
150
+ lastInputTime = currentTime;
151
+
152
+ // 清除之前的定时器
153
+ if (inputTimer) {
154
+ clearTimeout(inputTimer);
155
+ }
156
+
157
+ // 100ms 内没有新输入,认为扫码完成
158
+ inputTimer = setTimeout(function () {
159
+ var trimmedCode = inputBuffer.trim();
160
+ if (trimmedCode.length >= 10) {
161
+ setScanResult({
162
+ type: 'scanner',
163
+ value: trimmedCode
164
+ });
165
+ }
166
+ inputBuffer = '';
167
+ }, 100);
168
+ };
169
+ if (!isNativeEnv) {
170
+ document.addEventListener('keydown', handleKeyDown);
171
+ }
172
+ return function () {
173
+ if (!isNativeEnv) {
174
+ document.removeEventListener('keydown', handleKeyDown);
175
+ }
176
+ if (inputTimer) {
177
+ clearTimeout(inputTimer);
178
+ }
179
+ };
180
+ }, []);
181
+ return {
182
+ scanResult: scanResult
183
+ };
184
+ };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { HuifuProps } from './types';
4
+ declare const Huifu: React.FC<HuifuProps>;
5
+ export default Huifu;
@@ -0,0 +1,196 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React, { useEffect, useRef } from 'react';
8
+ import { locales } from '@pisell/utils';
9
+ import "./index.less";
10
+ import { useContextData, updateStatus, updateState } from "../store";
11
+ import { ScanAction } from "./Action";
12
+ import { useMicropay } from "../aggregatePayment";
13
+ import { EPaymentStatus } from "../aggregatePayment/types";
14
+ import { useStoreRef, useFail } from "../hooks";
15
+ import { useDispatch, updateNextStep, updateCustom } from "../store";
16
+ import { ModeEnum, StatusEnum } from "../const";
17
+ import { getPayParams } from "../helper";
18
+ import useEngineContext from "../../../hooks/useEngineContext";
19
+ var Huifu = function Huifu(_ref) {
20
+ var _context$appHelper, _data$custom;
21
+ var isNativeApp = _ref.isNativeApp,
22
+ onChange = _ref.onChange;
23
+ var data = useContextData();
24
+ var context = useEngineContext();
25
+ var _ref2 = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
26
+ interaction = _ref2.interaction;
27
+
28
+ // 数据源
29
+ var _useStoreRef = useStoreRef(),
30
+ statusRef = _useStoreRef.statusRef,
31
+ numRef = _useStoreRef.numRef,
32
+ netRef = _useStoreRef.netRef,
33
+ modeRef = _useStoreRef.modeRef,
34
+ amountRef = _useStoreRef.amountRef,
35
+ orderIdRef = _useStoreRef.orderIdRef,
36
+ deviceRef = _useStoreRef.deviceRef,
37
+ payRef = _useStoreRef.payRef;
38
+ var dispatch = useDispatch();
39
+ var fail = useFail(0);
40
+ var failRef = useRef(fail);
41
+
42
+ // 当前组件数据
43
+ var initRef = useRef(false);
44
+ var unloadRef = useRef(false);
45
+ var clearRef = useRef(null);
46
+ var payment = useMicropay({
47
+ paymentCode: (data === null || data === void 0 || (_data$custom = data.custom) === null || _data$custom === void 0 ? void 0 : _data$custom.custom_payment_code) || 'EFTPOS_HUIFU',
48
+ paymentNum: numRef.current || '',
49
+ shouldContinue: function shouldContinue() {
50
+ return !(unloadRef.current || !netRef.current);
51
+ },
52
+ callback: function callback(_instance, response) {
53
+ console.log('callback = ', response);
54
+ var _ref3 = response || {},
55
+ status = _ref3.status,
56
+ data = _ref3.data;
57
+ if (status === EPaymentStatus.Success) {
58
+ dispatch(updateNextStep());
59
+ // 将所有步骤状态设为完成 resolve
60
+ dispatch(updateCustom({
61
+ card_reader_surcharge: 0,
62
+ receipt: []
63
+ }));
64
+ // 更新支付状态与文案
65
+ dispatch(updateState({
66
+ status: 'success',
67
+ title: locales.getText('page.eftpos-pay.text.successful')(modeRef.current)
68
+ }));
69
+ clearRef.current = setTimeout(function () {
70
+ var params = getPayParams({
71
+ mode: modeRef.current,
72
+ amount: amountRef.current,
73
+ order_id: orderIdRef.current,
74
+ number: numRef.current,
75
+ device: deviceRef.current,
76
+ pay: payRef.current,
77
+ custom: {
78
+ card_reader_surcharge: 0,
79
+ receipt: []
80
+ }
81
+ }, 'success');
82
+ onChange('success', _objectSpread(_objectSpread({}, params), {}, {
83
+ receipt: []
84
+ }));
85
+ }, 1000);
86
+ } else if (status === EPaymentStatus.Failed) {
87
+ var _failRef$current;
88
+ (_failRef$current = failRef.current) === null || _failRef$current === void 0 || _failRef$current.call(failRef, data, false);
89
+ }
90
+ }
91
+ });
92
+ useEffect(function () {
93
+ failRef.current = fail;
94
+ }, [fail]);
95
+ useEffect(function () {
96
+ if (statusRef.current === StatusEnum.Success || statusRef.current === StatusEnum.Fail) {
97
+ return;
98
+ }
99
+ if (initRef.current) {
100
+ return;
101
+ }
102
+ initRef.current = true;
103
+
104
+ // 存在支付流水号
105
+ if (numRef.current) {
106
+ console.log('payment.query');
107
+ payment.query();
108
+ return;
109
+ }
110
+ console.log('data?.custom =>>>> ', data === null || data === void 0 ? void 0 : data.custom);
111
+ // 如果是退款场景,直接进入退款流程
112
+ var isPay = modeRef.current === ModeEnum.Pay || modeRef.current === ModeEnum.FullPay;
113
+ if (!isPay) {
114
+ var _data$custom2;
115
+ payment.run({
116
+ orderPaymentId: data === null || data === void 0 || (_data$custom2 = data.custom) === null || _data$custom2 === void 0 ? void 0 : _data$custom2.order_payment_id
117
+ });
118
+ return;
119
+ }
120
+ }, []);
121
+ useEffect(function () {
122
+ if (isNativeApp && (data === null || data === void 0 ? void 0 : data.status) === StatusEnum.Init) {
123
+ var _interaction$utils, _interaction$utils$po;
124
+ // 如果是原生App调用并且是init状态,则显示关闭按钮
125
+ interaction === null || interaction === void 0 || (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 || (_interaction$utils$po = _interaction$utils.postMessageToApp) === null || _interaction$utils$po === void 0 || _interaction$utils$po.call(_interaction$utils, {
126
+ module: 'pos',
127
+ key: 'other',
128
+ data: {
129
+ key: 'show_close_button'
130
+ }
131
+ });
132
+ }
133
+ }, [isNativeApp, data === null || data === void 0 ? void 0 : data.status]);
134
+
135
+ // 页面卸载处理
136
+ useEffect(function () {
137
+ return function () {
138
+ unloadRef.current = true;
139
+ if (clearRef.current) {
140
+ clearTimeout(clearRef.current);
141
+ }
142
+ };
143
+ }, []);
144
+
145
+ /**
146
+ * 更新到加载状态
147
+ */
148
+ var updateToLoading = function updateToLoading() {
149
+ // 如果是原生App调用,进入加载状态则隐藏关闭按钮
150
+ if (isNativeApp) {
151
+ var _interaction$utils2, _interaction$utils2$p;
152
+ interaction === null || interaction === void 0 || (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 || (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 || _interaction$utils2$p.call(_interaction$utils2, {
153
+ module: 'pos',
154
+ key: 'other',
155
+ data: {
156
+ key: 'hide_close_button'
157
+ }
158
+ });
159
+ }
160
+ dispatch(updateStatus(StatusEnum.Loading));
161
+ dispatch(updateState({
162
+ title: locales.getText('page.eftpos-pay.text.loading')(modeRef.current)
163
+ }));
164
+ };
165
+ var onClose = function onClose() {
166
+ onChange('fail', {
167
+ number: data.number,
168
+ uniquePaymentNumber: data.number,
169
+ device: data.device,
170
+ order_id: data.order_id
171
+ });
172
+ };
173
+ var onPayClick = function onPayClick(scanResult) {
174
+ console.log('scanResult = ', scanResult);
175
+ updateToLoading();
176
+ payment.run({
177
+ authCode: scanResult
178
+ });
179
+ };
180
+ var onScanCallback = function onScanCallback(scanResult) {
181
+ console.log('scanResult = ', scanResult);
182
+ updateToLoading();
183
+ payment.run({
184
+ authCode: scanResult
185
+ });
186
+ };
187
+ return /*#__PURE__*/React.createElement(React.Fragment, null, (data === null || data === void 0 ? void 0 : data.status) === StatusEnum.Init && /*#__PURE__*/React.createElement(ScanAction, {
188
+ onClose: onClose,
189
+ onScanCallback: onScanCallback,
190
+ onPayClick: onPayClick,
191
+ isNativeApp: isNativeApp
192
+ }), (data === null || data === void 0 ? void 0 : data.status) === StatusEnum.Loading ? /*#__PURE__*/React.createElement("div", {
193
+ className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip"
194
+ }, locales.getText('page.eftpos-pay.text.processing')) : null);
195
+ };
196
+ export default Huifu;
@@ -0,0 +1,180 @@
1
+ .pisell-eftpos-pay-huifu {
2
+ &-scan {
3
+ height: 100%;
4
+ display: flex;
5
+ flex-direction: column;
6
+
7
+ &-status {
8
+ position: relative;
9
+
10
+ &-wrapper {
11
+ position: absolute;
12
+ left: -4px;
13
+ bottom: 4px;
14
+ width: 14px;
15
+ height: 14px;
16
+ }
17
+ }
18
+
19
+ &-header {
20
+ position: relative;
21
+ padding-bottom: 20px;
22
+ display: flex;
23
+ align-items: center;
24
+
25
+ &-close {
26
+ position: absolute;
27
+ right: -10px;
28
+ padding: 10px;
29
+ cursor: pointer;
30
+ }
31
+
32
+ &-divider {
33
+ position: absolute;
34
+ bottom: 0;
35
+ left: -24px;
36
+ right: -24px;
37
+ height: 1px;
38
+ background: #eaecf0;
39
+ }
40
+
41
+ &-title {
42
+ color: #101828;
43
+ font-size: 18px;
44
+ font-weight: 600;
45
+ }
46
+ }
47
+
48
+ &-content {
49
+ padding-bottom: 24px;
50
+ flex: 1;
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 20px;
54
+
55
+ &-title {
56
+ color: #344054;
57
+ font-size: 14px;
58
+ font-weight: 600;
59
+ }
60
+
61
+ &-scanner {
62
+ padding: 16px;
63
+ display: flex;
64
+ align-items: center;
65
+ gap: 16px;
66
+ border-radius: 12px;
67
+
68
+ &-right {
69
+ flex: 1;
70
+ display: flex;
71
+ flex-direction: column;
72
+ gap: 4px;
73
+ }
74
+ }
75
+
76
+ &-scanner-active {
77
+ border: 1px solid #75e0a7;
78
+ background: #f6fef9;
79
+ box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
80
+
81
+ &-title {
82
+ color: #067647;
83
+ font-size: 14px;
84
+ font-weight: 600;
85
+ }
86
+
87
+ &-desc {
88
+ color: #067647;
89
+ font-size: 14px;
90
+ font-weight: 400;
91
+ }
92
+ }
93
+
94
+ &-scanner-unactive {
95
+ border: 1px solid #fda29b;
96
+ background: #fffbfa;
97
+ box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
98
+
99
+ &-title {
100
+ color: #b42318;
101
+ font-size: 14px;
102
+ font-weight: 600;
103
+ }
104
+
105
+ &-desc {
106
+ color: #b42318;
107
+ font-size: 14px;
108
+ font-weight: 400;
109
+ }
110
+ }
111
+
112
+ &-camera {
113
+ padding: 16px;
114
+ display: flex;
115
+ align-items: center;
116
+ gap: 8px;
117
+ border-radius: 12px;
118
+ background: #f2f4f7;
119
+ cursor: pointer;
120
+
121
+ &-right {
122
+ flex: 1;
123
+ display: flex;
124
+ flex-direction: column;
125
+ gap: 6px;
126
+ }
127
+
128
+ &-title {
129
+ color: #175cd3;
130
+ font-size: 14px;
131
+ font-weight: 500;
132
+ }
133
+
134
+ &-desc {
135
+ color: #000;
136
+ font-size: 14px;
137
+ font-weight: 400;
138
+ }
139
+ }
140
+
141
+ &-input-wrapper {
142
+ display: flex;
143
+ flex-direction: column;
144
+ gap: 8px;
145
+
146
+ &-title {
147
+ color: #344054;
148
+ font-size: 14px;
149
+ font-weight: 600;
150
+ }
151
+
152
+ &-tip {
153
+ color: #475467;
154
+ font-size: 14px;
155
+ font-weight: 400;
156
+ }
157
+ }
158
+ }
159
+
160
+ &-footer {
161
+ position: relative;
162
+ padding-top: 24px;
163
+ display: flex;
164
+ gap: 12px;
165
+
166
+ &-divider {
167
+ position: absolute;
168
+ top: 0;
169
+ left: -24px;
170
+ right: -24px;
171
+ height: 1px;
172
+ background: #eaecf0;
173
+ }
174
+
175
+ &-button {
176
+ height: 48px;
177
+ }
178
+ }
179
+ }
180
+ }
@@ -0,0 +1,14 @@
1
+ export declare type Peripherals = {
2
+ scanner: 'none' | 'connected' | 'disconnect';
3
+ nfc: 'none' | 'connected' | 'disconnect';
4
+ };
5
+ export interface HuifuProps {
6
+ isNativeApp?: boolean;
7
+ onChange: (status: any, params: any) => void;
8
+ }
9
+ export interface HuifuActionProps {
10
+ isNativeApp?: boolean;
11
+ onClose: () => void;
12
+ onPayClick: (scanResult: string) => void;
13
+ onScanCallback: (scanResult: string) => void;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps } from './const';
2
3
  import './index.less';
3
4
  declare const _default: (props: PosProps) => JSX.Element | null;
@@ -119,7 +119,7 @@ export default (function (props) {
119
119
  if (props.source === RestoreEumn.Restore) {
120
120
  return props.params;
121
121
  }
122
- return getInitState(props.type, props.params ? _objectSpread(_objectSpread({
122
+ var initState = getInitState(props.type, props.params ? _objectSpread(_objectSpread({
123
123
  mode: mode
124
124
  }, props.params), {}, {
125
125
  symbol: current
@@ -127,6 +127,10 @@ export default (function (props) {
127
127
  mode: mode,
128
128
  symbol: current
129
129
  });
130
+ // 手动将 originalParams 添加到 State 根级别
131
+ return _objectSpread(_objectSpread({}, initState), {}, {
132
+ originalParams: props.params || undefined
133
+ });
130
134
  }, [mode, props.params, props.type, symbol]);
131
135
  var stateRef = useRef(state);
132
136
  useEffect(function () {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Linkly: ({ api, onChange }: any) => JSX.Element;
2
3
  export default Linkly;
@@ -107,6 +107,18 @@ declare const _default: {
107
107
  'page.eftpos-pay.text.not.connected': string;
108
108
  'page.eftpos-pay.text.tyro-btn': (key: string) => string;
109
109
  'page.eftpos-pay.text.tyro': (key: string) => string;
110
+ 'page.eftpos-pay.text.huifu.scan.title': string;
111
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': string;
112
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': string;
113
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': string;
114
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': string;
115
+ 'page.eftpos-pay.text.huifu.scan.camera-title': string;
116
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': string;
117
+ 'page.eftpos-pay.text.huifu.scan.input-title': string;
118
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': string;
119
+ 'page.eftpos-pay.text.huifu.scan.input-tip': string;
120
+ 'page.eftpos-pay.text.huifu.scan.cancel': string;
121
+ 'page.eftpos-pay.text.huifu.scan.confirm': string;
110
122
  };
111
123
  'zh-CN': {
112
124
  'page.eftpos-pay.text.loading': (mode: string) => string;
@@ -216,6 +228,18 @@ declare const _default: {
216
228
  'page.eftpos-pay.text.not.connected': string;
217
229
  'page.eftpos-pay.text.tyro-btn': (key: string) => string;
218
230
  'page.eftpos-pay.text.tyro': (key: string) => string | string[];
231
+ 'page.eftpos-pay.text.huifu.scan.title': string;
232
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': string;
233
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': string;
234
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': string;
235
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': string;
236
+ 'page.eftpos-pay.text.huifu.scan.camera-title': string;
237
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': string;
238
+ 'page.eftpos-pay.text.huifu.scan.input-title': string;
239
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': string;
240
+ 'page.eftpos-pay.text.huifu.scan.input-tip': string;
241
+ 'page.eftpos-pay.text.huifu.scan.cancel': string;
242
+ 'page.eftpos-pay.text.huifu.scan.confirm': string;
219
243
  };
220
244
  'zh-HK': {
221
245
  'page.eftpos-pay.text.loading': (mode: string) => string;
@@ -325,6 +349,18 @@ declare const _default: {
325
349
  'page.eftpos-pay.text.not.connected': string;
326
350
  'page.eftpos-pay.text.tyro-btn': (key: string) => string;
327
351
  'page.eftpos-pay.text.tyro': (key: string) => string | string[];
352
+ 'page.eftpos-pay.text.huifu.scan.title': string;
353
+ 'page.eftpos-pay.text.huifu.scan.gun.connected': string;
354
+ 'page.eftpos-pay.text.huifu.scan.gun.connected-desc': string;
355
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected': string;
356
+ 'page.eftpos-pay.text.huifu.scan.gun.not-connected-desc': string;
357
+ 'page.eftpos-pay.text.huifu.scan.camera-title': string;
358
+ 'page.eftpos-pay.text.huifu.scan.camera-desc': string;
359
+ 'page.eftpos-pay.text.huifu.scan.input-title': string;
360
+ 'page.eftpos-pay.text.huifu.scan.input-placeholder': string;
361
+ 'page.eftpos-pay.text.huifu.scan.input-tip': string;
362
+ 'page.eftpos-pay.text.huifu.scan.cancel': string;
363
+ 'page.eftpos-pay.text.huifu.scan.confirm': string;
328
364
  };
329
365
  };
330
366
  export default _default;