@pisell/private-materials 6.5.3 → 6.5.5

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 (461) 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 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  14. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  15. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  16. package/es/components/booking/components/actionButtons/index.js +37 -42
  17. package/es/components/booking/components/actionButtons/index.less +0 -28
  18. package/es/components/booking/components/collapsibleList/utils.d.ts +0 -1
  19. package/es/components/booking/components/emptyBooking/index.d.ts +0 -1
  20. package/es/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  21. package/es/components/booking/components/footer/amount.d.ts +3 -3
  22. package/es/components/booking/components/footer/amount.js +52 -31
  23. package/es/components/booking/components/footer/index.js +168 -68
  24. package/es/components/booking/components/footer/utils.js +62 -33
  25. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  26. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  27. package/es/components/booking/deposit/index.d.ts +0 -1
  28. package/es/components/booking/forms/model.d.ts +10 -1
  29. package/es/components/booking/forms/single/index.d.ts +0 -1
  30. package/es/components/booking/forms/table/index.d.ts +0 -1
  31. package/es/components/booking/info/addServiceVariant/index.d.ts +0 -1
  32. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  33. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  34. package/es/components/booking/info/date/index.d.ts +0 -1
  35. package/es/components/booking/info/header/index.d.ts +0 -1
  36. package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  37. package/es/components/booking/info/index.d.ts +0 -1
  38. package/es/components/booking/info/model.d.ts +10 -1
  39. package/es/components/booking/info/model.js +5 -0
  40. package/es/components/booking/info/notes/index.d.ts +0 -1
  41. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  42. package/es/components/booking/info/service/addService/index.js +2 -1
  43. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  44. package/es/components/booking/info/service/like/index.d.ts +0 -1
  45. package/es/components/booking/info/service/serviceList/index.d.ts +0 -1
  46. package/es/components/booking/info/service2/utils.d.ts +1 -1
  47. package/es/components/booking/info2/index.js +42 -2
  48. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  49. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  50. package/es/components/booking/info2/service/addService/index.js +2 -1
  51. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  52. package/es/components/booking/info2/service/editService/index.js +12 -4
  53. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  54. package/es/components/booking/materiels/contacts/index.d.ts +0 -1
  55. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  56. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  57. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  58. package/es/components/booking/model.d.ts +9 -1
  59. package/es/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  60. package/es/components/booking/notes/NoteBlock/index.d.ts +0 -1
  61. package/es/components/booking/notes/addNote/index.d.ts +0 -1
  62. package/es/components/booking/notes/model.d.ts +10 -1
  63. package/es/components/booking/payments/model.d.ts +10 -1
  64. package/es/components/booking/utils.js +10 -5
  65. package/es/components/checkout/PaymentModal.d.ts +2 -0
  66. package/es/components/checkout/PaymentModal.js +402 -241
  67. package/es/components/checkout/PaymentPlugin.d.ts +0 -1
  68. package/es/components/checkout/components/AdditionalModule/index.less +1 -1
  69. package/es/components/checkout/components/AmountSummary/index.js +161 -54
  70. package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  71. package/es/components/checkout/components/CashPaymentModule/index.js +114 -131
  72. package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
  73. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  74. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  75. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
  76. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  77. package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
  78. package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  79. package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  80. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  81. package/es/components/checkout/components/WalletPassModule/index.js +4 -3
  82. package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
  83. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  84. package/es/components/checkout/hooks/useWalletPass.js +2 -0
  85. package/es/components/checkout/index.less +1 -1
  86. package/es/components/checkout/locales.d.ts +33 -0
  87. package/es/components/checkout/locales.js +39 -3
  88. package/es/components/checkout/types.d.ts +1 -0
  89. package/es/components/eftpos/deviceList/index.d.ts +0 -1
  90. package/es/components/eftpos/form/index.d.ts +0 -1
  91. package/es/components/eftpos/group/index.d.ts +0 -1
  92. package/es/components/eftpos/hooks.d.ts +0 -1
  93. package/es/components/eftpos/icon/apiKey.d.ts +0 -1
  94. package/es/components/eftpos/icon/device.d.ts +0 -1
  95. package/es/components/eftpos/index.d.ts +0 -1
  96. package/es/components/eftpos/pos.d.ts +0 -1
  97. package/es/components/eftpos/receipt/index.d.ts +0 -1
  98. package/es/components/eftpos/surcharge/index.d.ts +0 -1
  99. package/es/components/eftposPay/amount.d.ts +1 -2
  100. package/es/components/eftposPay/app.d.ts +0 -1
  101. package/es/components/eftposPay/component/alert/warn.d.ts +0 -1
  102. package/es/components/eftposPay/component/fail/network.d.ts +0 -1
  103. package/es/components/eftposPay/component/header/titlebar.d.ts +0 -1
  104. package/es/components/eftposPay/component/manual/index.d.ts +0 -1
  105. package/es/components/eftposPay/component/signature/index.d.ts +0 -1
  106. package/es/components/eftposPay/component/step/index.d.ts +0 -1
  107. package/es/components/eftposPay/component/step/step.d.ts +0 -1
  108. package/es/components/eftposPay/device.d.ts +1 -1
  109. package/es/components/eftposPay/hooks.d.ts +2 -2
  110. package/es/components/eftposPay/payo/config.d.ts +0 -1
  111. package/es/components/eftposPay/store/index.d.ts +5 -5
  112. package/es/components/eftposPay/tip.d.ts +0 -1
  113. package/es/components/eftposPay/tyro/hooks.d.ts +0 -1
  114. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  115. package/es/components/eftposPay/windcave/windcave.d.ts +0 -1
  116. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  117. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  118. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  119. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  120. package/es/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  121. package/es/components/login/index.d.ts +0 -1
  122. package/es/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  123. package/es/components/pay/toB/components/Content/Header.d.ts +0 -1
  124. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  125. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  126. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  127. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  128. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  129. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  130. package/es/components/pay/toC/model.d.ts +9 -1
  131. package/es/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  132. package/es/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  133. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  134. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  135. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  136. package/es/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  137. package/es/components/schedules/calendar/calendarItem.d.ts +0 -1
  138. package/es/components/schedules/calendar/index.d.ts +0 -1
  139. package/es/components/schedules/components/CurrentDay/index.d.ts +0 -1
  140. package/es/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  141. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  142. package/es/components/schedules/components/ScheduleList/index.d.ts +0 -1
  143. package/es/components/schedules/model.d.ts +9 -1
  144. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  145. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  146. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  147. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  148. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  149. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  150. package/es/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  151. package/es/components/schedules/products/index.d.ts +0 -1
  152. package/es/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  153. package/es/components/schedules/products/list/index.d.ts +0 -1
  154. package/es/components/schedules/resources/index.d.ts +0 -1
  155. package/es/components/schedules/resources/list/index.d.ts +0 -1
  156. package/es/components/schedules/resources/relationProduct/index.d.ts +0 -1
  157. package/es/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  158. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  159. package/es/components/schedules/schedules/index.d.ts +0 -1
  160. package/es/components/schedules/utils.d.ts +1 -1
  161. package/es/components/shoppingCart/components/Cart/Product.js +143 -71
  162. package/es/components/shoppingCart/components/Cart/index.js +1 -1
  163. package/es/components/shoppingCart/components/Cart/index.less +31 -0
  164. package/es/components/shoppingCart/locales.d.ts +3 -0
  165. package/es/components/shoppingCart/locales.js +12 -3
  166. package/es/components/taxSelect/index.d.ts +0 -1
  167. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  168. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  169. package/es/components/ticketBooking/utils/index.js +2 -1
  170. package/es/components/wallet/Detail/model.d.ts +13 -1
  171. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  172. package/es/components/wallet/PointCard/model.d.ts +13 -1
  173. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  174. package/es/components/wallet/Voucher/model.d.ts +13 -1
  175. package/es/components/wallet/model.d.ts +9 -1
  176. package/es/hooks/usePaymentLogger.d.ts +0 -1
  177. package/es/plus/clientName/index.d.ts +0 -1
  178. package/es/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
  179. package/es/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
  180. package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  181. package/es/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  182. package/es/plus/saasCreateOrganization/index.d.ts +0 -1
  183. package/es/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  184. package/es/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  185. package/es/plus/saasRegister/components/GoLogin.d.ts +0 -1
  186. package/es/plus/saasRegister/components/Header.d.ts +0 -1
  187. package/es/plus/saasRegister/components/VerifyError.d.ts +0 -1
  188. package/es/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  189. package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
  190. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  191. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
  192. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  193. package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  194. package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
  195. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  196. package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
  197. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  198. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
  199. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  200. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
  201. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  202. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
  203. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  204. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  205. package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
  206. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  207. package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
  208. package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  209. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
  210. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  211. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  212. package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
  213. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  214. package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
  215. package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  216. package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
  217. package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  218. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  219. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
  220. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  221. package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
  222. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  223. package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
  224. package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  225. package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  226. package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
  227. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  228. package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
  229. package/es/pro/priceKeyboard/index.d.ts +3 -0
  230. package/es/pro/priceKeyboard/index.js +3 -0
  231. package/es/pro/priceKeyboard/index.less +215 -0
  232. package/es/pro/priceKeyboard/utils.d.ts +31 -0
  233. package/es/pro/priceKeyboard/utils.js +51 -0
  234. package/es/pro/skuDetailModal/index.js +19 -16
  235. package/es/utils/index.d.ts +1 -1
  236. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  237. package/lib/components/booking/addons/model.d.ts +10 -1
  238. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  239. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  240. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  241. package/lib/components/booking/components/actionButtons/index.js +31 -28
  242. package/lib/components/booking/components/actionButtons/index.less +0 -28
  243. package/lib/components/booking/components/collapsibleList/utils.d.ts +0 -1
  244. package/lib/components/booking/components/emptyBooking/index.d.ts +0 -1
  245. package/lib/components/booking/components/footer/FooterMenus/index.d.ts +0 -1
  246. package/lib/components/booking/components/footer/amount.d.ts +3 -3
  247. package/lib/components/booking/components/footer/amount.js +50 -34
  248. package/lib/components/booking/components/footer/index.js +107 -40
  249. package/lib/components/booking/components/footer/utils.js +35 -7
  250. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +0 -1
  251. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -1
  252. package/lib/components/booking/deposit/index.d.ts +0 -1
  253. package/lib/components/booking/forms/model.d.ts +10 -1
  254. package/lib/components/booking/forms/single/index.d.ts +0 -1
  255. package/lib/components/booking/forms/table/index.d.ts +0 -1
  256. package/lib/components/booking/info/addServiceVariant/index.d.ts +0 -1
  257. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  258. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +0 -1
  259. package/lib/components/booking/info/date/index.d.ts +0 -1
  260. package/lib/components/booking/info/header/index.d.ts +0 -1
  261. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
  262. package/lib/components/booking/info/index.d.ts +0 -1
  263. package/lib/components/booking/info/model.d.ts +10 -1
  264. package/lib/components/booking/info/model.js +3 -0
  265. package/lib/components/booking/info/notes/index.d.ts +0 -1
  266. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  267. package/lib/components/booking/info/service/addService/index.js +2 -1
  268. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  269. package/lib/components/booking/info/service/like/index.d.ts +0 -1
  270. package/lib/components/booking/info/service/serviceList/index.d.ts +0 -1
  271. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  272. package/lib/components/booking/info2/index.js +18 -1
  273. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  274. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  275. package/lib/components/booking/info2/service/addService/index.js +2 -1
  276. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  277. package/lib/components/booking/info2/service/editService/index.js +12 -4
  278. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  279. package/lib/components/booking/materiels/contacts/index.d.ts +0 -1
  280. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  281. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  282. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  283. package/lib/components/booking/model.d.ts +9 -1
  284. package/lib/components/booking/notes/NoteBlock/NoteItem/index.d.ts +0 -1
  285. package/lib/components/booking/notes/NoteBlock/index.d.ts +0 -1
  286. package/lib/components/booking/notes/addNote/index.d.ts +0 -1
  287. package/lib/components/booking/notes/model.d.ts +10 -1
  288. package/lib/components/booking/payments/model.d.ts +10 -1
  289. package/lib/components/booking/utils.js +10 -5
  290. package/lib/components/checkout/PaymentModal.d.ts +2 -0
  291. package/lib/components/checkout/PaymentModal.js +160 -73
  292. package/lib/components/checkout/PaymentPlugin.d.ts +0 -1
  293. package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
  294. package/lib/components/checkout/components/AmountSummary/index.js +114 -40
  295. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  296. package/lib/components/checkout/components/CashPaymentModule/index.js +103 -134
  297. package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
  298. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  299. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  300. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
  301. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  302. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
  303. package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  304. package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  305. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  306. package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
  307. package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
  308. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  309. package/lib/components/checkout/hooks/useWalletPass.js +2 -0
  310. package/lib/components/checkout/index.less +1 -1
  311. package/lib/components/checkout/locales.d.ts +33 -0
  312. package/lib/components/checkout/locales.js +39 -3
  313. package/lib/components/checkout/types.d.ts +1 -0
  314. package/lib/components/eftpos/deviceList/index.d.ts +0 -1
  315. package/lib/components/eftpos/form/index.d.ts +0 -1
  316. package/lib/components/eftpos/group/index.d.ts +0 -1
  317. package/lib/components/eftpos/hooks.d.ts +0 -1
  318. package/lib/components/eftpos/icon/apiKey.d.ts +0 -1
  319. package/lib/components/eftpos/icon/device.d.ts +0 -1
  320. package/lib/components/eftpos/index.d.ts +0 -1
  321. package/lib/components/eftpos/pos.d.ts +0 -1
  322. package/lib/components/eftpos/receipt/index.d.ts +0 -1
  323. package/lib/components/eftpos/surcharge/index.d.ts +0 -1
  324. package/lib/components/eftposPay/amount.d.ts +1 -2
  325. package/lib/components/eftposPay/app.d.ts +0 -1
  326. package/lib/components/eftposPay/component/alert/warn.d.ts +0 -1
  327. package/lib/components/eftposPay/component/fail/network.d.ts +0 -1
  328. package/lib/components/eftposPay/component/header/titlebar.d.ts +0 -1
  329. package/lib/components/eftposPay/component/manual/index.d.ts +0 -1
  330. package/lib/components/eftposPay/component/signature/index.d.ts +0 -1
  331. package/lib/components/eftposPay/component/step/index.d.ts +0 -1
  332. package/lib/components/eftposPay/component/step/step.d.ts +0 -1
  333. package/lib/components/eftposPay/device.d.ts +1 -1
  334. package/lib/components/eftposPay/hooks.d.ts +2 -2
  335. package/lib/components/eftposPay/payo/config.d.ts +0 -1
  336. package/lib/components/eftposPay/store/index.d.ts +5 -5
  337. package/lib/components/eftposPay/tip.d.ts +0 -1
  338. package/lib/components/eftposPay/tyro/hooks.d.ts +0 -1
  339. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -1
  340. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -1
  341. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +0 -1
  342. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +0 -1
  343. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +0 -1
  344. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +0 -1
  345. package/lib/components/eventBooking/components/scheduleCalendar/ProductItem/index.d.ts +0 -1
  346. package/lib/components/login/index.d.ts +0 -1
  347. package/lib/components/pay/toB/components/CardGroup/index.d.ts +0 -1
  348. package/lib/components/pay/toB/components/Content/Header.d.ts +0 -1
  349. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/ThreedsLoading/index.d.ts +0 -1
  350. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +0 -1
  351. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +0 -1
  352. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +0 -1
  353. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +0 -1
  354. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +0 -1
  355. package/lib/components/pay/toC/model.d.ts +9 -1
  356. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/BirthdayField/index.d.ts +0 -1
  357. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/GenderField/index.d.ts +0 -1
  358. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  359. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +0 -1
  360. package/lib/components/productExtension/fields/SelectProducts/ProductItemPreview/index.d.ts +0 -1
  361. package/lib/components/ruleSetting/ruleBorder/index.d.ts +0 -1
  362. package/lib/components/schedules/calendar/calendarItem.d.ts +0 -1
  363. package/lib/components/schedules/calendar/index.d.ts +0 -1
  364. package/lib/components/schedules/components/CurrentDay/index.d.ts +0 -1
  365. package/lib/components/schedules/components/ScheduleDetailList/index.d.ts +0 -1
  366. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +0 -1
  367. package/lib/components/schedules/components/ScheduleList/index.d.ts +0 -1
  368. package/lib/components/schedules/model.d.ts +9 -1
  369. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.d.ts +0 -1
  370. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.d.ts +0 -1
  371. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/AddSchedules/index.d.ts +0 -1
  372. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.d.ts +0 -1
  373. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +0 -1
  374. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +0 -1
  375. package/lib/components/schedules/products/ProductDetailDrawer/index.d.ts +0 -1
  376. package/lib/components/schedules/products/index.d.ts +0 -1
  377. package/lib/components/schedules/products/list/ProductItem/index.d.ts +0 -1
  378. package/lib/components/schedules/products/list/index.d.ts +0 -1
  379. package/lib/components/schedules/resources/index.d.ts +0 -1
  380. package/lib/components/schedules/resources/list/index.d.ts +0 -1
  381. package/lib/components/schedules/resources/relationProduct/index.d.ts +0 -1
  382. package/lib/components/schedules/schedules/AllSchedules/index.d.ts +0 -1
  383. package/lib/components/schedules/schedules/ScheduleDetailDrawer/index.d.ts +0 -1
  384. package/lib/components/schedules/schedules/index.d.ts +0 -1
  385. package/lib/components/schedules/utils.d.ts +1 -1
  386. package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
  387. package/lib/components/shoppingCart/components/Cart/index.js +1 -1
  388. package/lib/components/shoppingCart/components/Cart/index.less +31 -0
  389. package/lib/components/shoppingCart/locales.d.ts +3 -0
  390. package/lib/components/shoppingCart/locales.js +6 -3
  391. package/lib/components/taxSelect/index.d.ts +0 -1
  392. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  393. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  394. package/lib/components/ticketBooking/utils/index.js +2 -1
  395. package/lib/components/wallet/Detail/model.d.ts +13 -1
  396. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  397. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  398. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  399. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  400. package/lib/components/wallet/model.d.ts +9 -1
  401. package/lib/hooks/usePaymentLogger.d.ts +0 -1
  402. package/lib/plus/clientName/index.d.ts +0 -1
  403. package/lib/plus/clinetSearch/Add/BirthdayField/index.d.ts +0 -1
  404. package/lib/plus/clinetSearch/Add/GenderField/index.d.ts +0 -1
  405. package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +0 -1
  406. package/lib/plus/saasCreateOrganization/components/Header.d.ts +0 -1
  407. package/lib/plus/saasCreateOrganization/index.d.ts +0 -1
  408. package/lib/plus/saasRegister/components/EntryEmail.d.ts +0 -1
  409. package/lib/plus/saasRegister/components/EntryInfo.d.ts +0 -1
  410. package/lib/plus/saasRegister/components/GoLogin.d.ts +0 -1
  411. package/lib/plus/saasRegister/components/Header.d.ts +0 -1
  412. package/lib/plus/saasRegister/components/VerifyError.d.ts +0 -1
  413. package/lib/plus/saasRegister/components/VerifyingLink.d.ts +0 -1
  414. package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
  415. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  416. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
  417. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  418. package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  419. package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
  420. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  421. package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
  422. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  423. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
  424. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  425. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
  426. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  427. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
  428. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  429. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  430. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
  431. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  432. package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
  433. package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  434. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
  435. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  436. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  437. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
  438. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  439. package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
  440. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  441. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
  442. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  443. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  444. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
  445. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  446. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
  447. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  448. package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
  449. package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  450. package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  451. package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
  452. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  453. package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
  454. package/lib/pro/priceKeyboard/index.d.ts +3 -0
  455. package/lib/pro/priceKeyboard/index.js +45 -0
  456. package/lib/pro/priceKeyboard/index.less +215 -0
  457. package/lib/pro/priceKeyboard/utils.d.ts +31 -0
  458. package/lib/pro/priceKeyboard/utils.js +75 -0
  459. package/lib/pro/skuDetailModal/index.js +18 -22
  460. package/lib/utils/index.d.ts +1 -1
  461. package/package.json +12 -12
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  import { IClientNameProps } from './type';
4
3
  declare const ClientName: ({ className, dataSource, style }: IClientNameProps) => JSX.Element | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DateSectionCom: ({ value, onChange, showTime, className, style, useSpace, format, itemStyle, }: any) => JSX.Element;
3
2
  export default DateSectionCom;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GenderField: (props: any) => JSX.Element;
3
2
  export default GenderField;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PhoneField: ({ value, onChange }: any) => JSX.Element;
3
2
  export default PhoneField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SCOProps } from '../types';
3
2
  import '../index.less';
4
3
  export declare const Header: (props: SCOProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SCOProps } from './types';
3
2
  import './index.less';
4
3
  declare const SaasCreateOrganization: (props: SCOProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormInstance } from 'antd';
3
2
  import { SRProps } from '../types';
4
3
  import '../index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormInstance } from 'antd';
3
2
  import { SRProps } from '../types';
4
3
  import '../index.less';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SRProps } from '../types';
3
2
  import '../index.less';
4
3
  declare const GoLogin: (props: SRProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SRProps } from '../types';
3
2
  import '../index.less';
4
3
  export declare const Header: (props: SRProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SRStepStatus } from '../types';
3
2
  import '../index.less';
4
3
  declare const VerifyError: (props: {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../index.less';
3
2
  declare const VerifyingEmailLink: (props: {
4
3
  onVerifyLink: () => Promise<void>;
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useState, useImperativeHandle, forwardRef } from 'react';
8
8
  import { Popover } from 'antd';
9
- import { PisellPriceKeyboard } from '@pisell/materials';
9
+ import PisellPriceKeyboard from '@pisell/materials/src/components/pisellAdjustPrice/index';
10
10
  import { locales } from '@pisell/utils';
11
11
  import "./PisellPriceKeyboardPopover.less";
12
12
  var PisellPriceKeyboardPopover = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import './PisellPriceKeyboardPopover.less';
3
+ import { PisellPriceKeyboardPopoverProps, PisellPriceKeyboardPopoverRef } from './types';
4
+ declare const PisellPriceKeyboardPopover: React.ForwardRefExoticComponent<PisellPriceKeyboardPopoverProps & React.RefAttributes<PisellPriceKeyboardPopoverRef>>;
5
+ export default PisellPriceKeyboardPopover;
@@ -0,0 +1,148 @@
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, useImperativeHandle, forwardRef } from 'react';
8
+ import { Popover } from 'antd';
9
+ import { PisellPriceKeyboard } from '@pisell/materials';
10
+ import { locales } from '@pisell/utils';
11
+ import "./PisellPriceKeyboardPopover.less";
12
+ var PisellPriceKeyboardPopover = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
+ var children = _ref.children,
14
+ _ref$value = _ref.value,
15
+ value = _ref$value === void 0 ? '' : _ref$value,
16
+ onChange = _ref.onChange,
17
+ onConfirm = _ref.onConfirm,
18
+ onCancel = _ref.onCancel,
19
+ _ref$showCurrencySymb = _ref.showCurrencySymbol,
20
+ showCurrencySymbol = _ref$showCurrencySymb === void 0 ? true : _ref$showCurrencySymb,
21
+ _ref$useThousandsSepa = _ref.useThousandsSeparator,
22
+ useThousandsSeparator = _ref$useThousandsSepa === void 0 ? false : _ref$useThousandsSepa,
23
+ _ref$selectType = _ref.selectType,
24
+ selectType = _ref$selectType === void 0 ? 'dark' : _ref$selectType,
25
+ _ref$disabled = _ref.disabled,
26
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
27
+ _ref$overlayClassName = _ref.overlayClassName,
28
+ overlayClassName = _ref$overlayClassName === void 0 ? '' : _ref$overlayClassName,
29
+ style = _ref.style;
30
+ var _useState = useState(false),
31
+ _useState2 = _slicedToArray(_useState, 2),
32
+ open = _useState2[0],
33
+ setOpen = _useState2[1];
34
+ var _useState3 = useState(''),
35
+ _useState4 = _slicedToArray(_useState3, 2),
36
+ tempValue = _useState4[0],
37
+ setTempValue = _useState4[1];
38
+ var _useState5 = useState(true),
39
+ _useState6 = _slicedToArray(_useState5, 2),
40
+ isFirstInput = _useState6[0],
41
+ setIsFirstInput = _useState6[1]; // 标记是否是首次输入
42
+
43
+ // 暴露给父组件的方法
44
+ useImperativeHandle(ref, function () {
45
+ return {
46
+ open: function open() {
47
+ setOpen(true);
48
+ setTempValue(value);
49
+ setIsFirstInput(true);
50
+ },
51
+ close: function close() {
52
+ return setOpen(false);
53
+ },
54
+ isOpen: function isOpen() {
55
+ return open;
56
+ }
57
+ };
58
+ });
59
+ var handleOpenChange = function handleOpenChange(visible) {
60
+ if (disabled) return;
61
+ setOpen(visible);
62
+ if (visible) {
63
+ // 打开时初始化临时值,并重置首次输入标记
64
+ setTempValue(value);
65
+ setIsFirstInput(true);
66
+ } else {
67
+ // 关闭时调用取消回调
68
+ onCancel === null || onCancel === void 0 || onCancel();
69
+ }
70
+ };
71
+
72
+ // 处理价格变化(合并了 onChange 和 onEnter)
73
+ var handlePriceChange = function handlePriceChange(val) {
74
+ // 如果用户点击了清除按钮(值变为空或0),重置首次输入标记
75
+ if ((val === '' || val === 0 || val === '0') && !isFirstInput) {
76
+ setIsFirstInput(true);
77
+ setTempValue(val);
78
+ onChange === null || onChange === void 0 || onChange(val);
79
+ return;
80
+ }
81
+ if (isFirstInput && val !== '' && val !== 0 && val !== '0') {
82
+ setIsFirstInput(false);
83
+ var currentValueStr = String(tempValue || '').replace(/[^\d.]/g, ''); // 去除非数字字符
84
+ var newValueStr = String(val).replace(/[^\d.]/g, '');
85
+
86
+ // 如果当前有值且新值是在当前值基础上追加的,说明用户输入了新数字
87
+ if (currentValueStr && currentValueStr !== '0' && newValueStr.length > currentValueStr.length && newValueStr.startsWith(currentValueStr)) {
88
+ // 提取用户真正输入的新数字
89
+ var newInput = newValueStr.slice(currentValueStr.length);
90
+ if (newInput) {
91
+ // 直接使用用户输入的新数字,覆盖原值
92
+ setTempValue(newInput);
93
+ onChange === null || onChange === void 0 || onChange(newInput);
94
+ return;
95
+ }
96
+ }
97
+ }
98
+
99
+ // 后续输入或其他情况正常处理
100
+ setTempValue(val);
101
+ onChange === null || onChange === void 0 || onChange(val);
102
+ };
103
+
104
+ // 处理确认(点击完成按钮)
105
+ var handleConfirm = function handleConfirm(val) {
106
+ onConfirm === null || onConfirm === void 0 || onConfirm(val);
107
+ setOpen(false);
108
+ };
109
+
110
+ // 处理取消
111
+ var handleCancel = function handleCancel() {
112
+ setOpen(false);
113
+ onCancel === null || onCancel === void 0 || onCancel();
114
+ };
115
+ var keyboardContent = /*#__PURE__*/React.createElement("div", {
116
+ className: "pisell-price-keyboard-popover-content"
117
+ }, /*#__PURE__*/React.createElement(PisellPriceKeyboard, {
118
+ value: tempValue,
119
+ onChange: handlePriceChange,
120
+ onEnter: handleConfirm,
121
+ doneText: locales.getText('pisell2.customise-item.save'),
122
+ resetText: locales.getText('pisell2.booking.info.text.clear'),
123
+ amountProps: {
124
+ showCurrencySymbol: showCurrencySymbol,
125
+ useThousandsSeparator: useThousandsSeparator
126
+ },
127
+ selectType: selectType,
128
+ backgroundColor: "transparent"
129
+ }));
130
+ return /*#__PURE__*/React.createElement(Popover, {
131
+ open: open,
132
+ content: keyboardContent,
133
+ trigger: disabled ? [] : ['click'],
134
+ overlayInnerStyle: {
135
+ padding: 0
136
+ },
137
+ destroyTooltipOnHide: true,
138
+ arrow: false,
139
+ align: {
140
+ offset: [0, 0]
141
+ },
142
+ overlayClassName: "pisell-price-keyboard-popover ".concat(overlayClassName),
143
+ onOpenChange: handleOpenChange,
144
+ overlayStyle: style
145
+ }, children);
146
+ });
147
+ PisellPriceKeyboardPopover.displayName = 'PisellPriceKeyboardPopover';
148
+ export default PisellPriceKeyboardPopover;
@@ -0,0 +1,23 @@
1
+ .pisell-price-keyboard-popover {
2
+ &.ant-popover {
3
+ z-index: 1050;
4
+
5
+ .ant-popover-inner {
6
+ border-radius: 12px;
7
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
8
+ background: transparent;
9
+ }
10
+
11
+ .ant-popover-inner-content {
12
+ padding: 0;
13
+ background: transparent;
14
+ }
15
+ }
16
+
17
+ .pisell-price-keyboard-popover-content {
18
+ background: rgba(29, 41, 57, 0.8) !important;
19
+ border-radius: 10px;
20
+ overflow: hidden;
21
+ padding: 10px;
22
+ }
23
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './PisellPriceKeyboardPopover';
2
+ export type { PisellPriceKeyboardPopoverProps, PisellPriceKeyboardPopoverRef } from './types';
@@ -0,0 +1 @@
1
+ export { default } from "./PisellPriceKeyboardPopover";
@@ -0,0 +1,33 @@
1
+ /// <reference types="react" />
2
+ export interface PisellPriceKeyboardPopoverProps {
3
+ /** 触发元素 */
4
+ children: React.ReactNode;
5
+ /** 当前价格值 */
6
+ value?: string | number;
7
+ /** 价格变化回调(合并了 onChange 和 onEnter) */
8
+ onChange?: (value: string | number) => void;
9
+ /** 确认回调 */
10
+ onConfirm?: (value: string | number) => void;
11
+ /** 取消回调 */
12
+ onCancel?: () => void;
13
+ /** 货币符号显示 */
14
+ showCurrencySymbol?: boolean;
15
+ /** 是否使用千分位分隔符 */
16
+ useThousandsSeparator?: boolean;
17
+ /** 键盘主题 */
18
+ selectType?: 'light' | 'dark';
19
+ /** 是否禁用 */
20
+ disabled?: boolean;
21
+ /** Popover 额外的类名 */
22
+ overlayClassName?: string;
23
+ /** 自定义样式 */
24
+ style?: React.CSSProperties;
25
+ }
26
+ export interface PisellPriceKeyboardPopoverRef {
27
+ /** 打开键盘 */
28
+ open: () => void;
29
+ /** 关闭键盘 */
30
+ close: () => void;
31
+ /** 获取当前是否打开 */
32
+ isOpen: () => boolean;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import { CashKeyboardBaseProps } from './types';
2
+ import './index.less';
3
+ declare const CashKeyboardIntact: (props: CashKeyboardBaseProps) => JSX.Element;
4
+ export default CashKeyboardIntact;
@@ -0,0 +1,310 @@
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 _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
9
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
13
+ 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."); }
14
+ 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); }
15
+ 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; }
16
+ 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; } }
17
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+ import React, { useEffect, useMemo, useState } from 'react';
19
+ import { useControllableValue } from 'ahooks';
20
+ //@ts-ignore
21
+ import { merge, omit } from 'lodash';
22
+ //@ts-ignore
23
+ import { locales } from '@pisell/utils';
24
+ import { PisellText, VirtualInput } from '@pisell/materials';
25
+ import Shortcuts from "../shortcuts";
26
+ import CashKeyboardSimple from "./CashKeyboardSimple";
27
+ import { setKeyboardTheme } from "../../utils";
28
+ import "./index.less";
29
+ import Decimal from 'decimal.js';
30
+ var CashKeyboardIntact = function CashKeyboardIntact(props) {
31
+ var _mergedDisplayField$b, _mergedDisplayField$c, _mergedDisplayField$c2;
32
+ var amountSymbol = props.amountSymbol,
33
+ _props$titleArea = props.titleArea,
34
+ titleArea = _props$titleArea === void 0 ? {} : _props$titleArea,
35
+ _props$displayField = props.displayField,
36
+ displayField = _props$displayField === void 0 ? {} : _props$displayField,
37
+ originalValue = props.originalValue,
38
+ presets = props.presets,
39
+ style = props.style,
40
+ _props$selectType = props.selectType,
41
+ selectType = _props$selectType === void 0 ? 'light' : _props$selectType,
42
+ placeholder = props.placeholder,
43
+ doneText = props.doneText,
44
+ resetText = props.resetText,
45
+ disabled = props.disabled,
46
+ hiddenChangeDue = props.hiddenChangeDue;
47
+ var _useControllableValue = useControllableValue(props),
48
+ _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
49
+ internalValue = _useControllableValue2[0],
50
+ setInternalValue = _useControllableValue2[1];
51
+ var _useState = useState(false),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ isShowModal = _useState2[0],
54
+ setIsShowModal = _useState2[1];
55
+
56
+ // 找零
57
+ var changeDue = useMemo(function () {
58
+ return Math.max(0, new Decimal(internalValue || 0).minus(new Decimal(originalValue || 0)).toNumber());
59
+ }, [internalValue, originalValue]);
60
+ var _restProps = useMemo(function () {
61
+ return omit(props, ['defaultValue', 'value', 'onChange', 'onEnter', 'onReset', 'style']);
62
+ }, [props]);
63
+
64
+ // 设置主题
65
+ useEffect(function () {
66
+ setKeyboardTheme(selectType);
67
+ }, [selectType]);
68
+
69
+ // 变体2:末尾有三个默认预设项,总数不大于8个
70
+ var getDefaultPresets = function getDefaultPresets() {
71
+ var defaultEndPresets = [{
72
+ label: locales.getText('cash-keyboard-other'),
73
+ value: 'other',
74
+ style: {
75
+ color: '#344054',
76
+ backgroundColor: 'white'
77
+ },
78
+ onClick: function onClick() {
79
+ setIsShowModal(true);
80
+ },
81
+ render: function render() {
82
+ return /*#__PURE__*/React.createElement("div", {
83
+ style: {
84
+ position: 'absolute',
85
+ left: 0,
86
+ top: 0,
87
+ bottom: 0,
88
+ right: 0,
89
+ display: 'flex',
90
+ alignItems: 'center',
91
+ justifyContent: 'center'
92
+ }
93
+ }, locales.getText('cash-keyboard-other'));
94
+ }
95
+ }, {
96
+ label: resetText || locales.getText('cash-keyboard-reset'),
97
+ value: 'reset',
98
+ style: {
99
+ color: '#D92D20',
100
+ backgroundColor: 'white'
101
+ },
102
+ onClick: function onClick() {
103
+ var _props$onReset;
104
+ // 重置为待支付金额
105
+ setInternalValue(String(originalValue) || '');
106
+ props === null || props === void 0 || (_props$onReset = props.onReset) === null || _props$onReset === void 0 || _props$onReset.call(props);
107
+ }
108
+ }, {
109
+ label: doneText || locales.getText('cash-keyboard-pay'),
110
+ value: 'pay',
111
+ style: {
112
+ color: 'white',
113
+ backgroundColor: '#7F56DA'
114
+ },
115
+ onClick: function onClick() {
116
+ var _props$onEnter;
117
+ (_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 || _props$onEnter.call(props, internalValue);
118
+ }
119
+ }];
120
+ var userPresets = presets || [];
121
+
122
+ // 计算可用的用户预设数量(总数8 - 默认3个 = 5个)
123
+ var maxUserPresets = 8 - defaultEndPresets.length;
124
+ var limitedUserPresets = userPresets.slice(0, maxUserPresets);
125
+ return [].concat(_toConsumableArray(limitedUserPresets), defaultEndPresets);
126
+ };
127
+
128
+ // 变体2:左中右布局,中间为Input区域
129
+ var getDefaultDisplayField = function getDefaultDisplayField() {
130
+ return {
131
+ cashReceived: {
132
+ visible: true,
133
+ label: locales.getText('cash-keyboard-cash-received')
134
+ },
135
+ balanceDue: {
136
+ visible: true,
137
+ label: locales.getText('cash-keyboard-balance-due')
138
+ },
139
+ changeDue: {
140
+ visible: true,
141
+ label: locales.getText('cash-keyboard-change-due')
142
+ },
143
+ gridRatio: [1, 2, 1] // 左中右布局,中间占 2 份
144
+ };
145
+ };
146
+
147
+ // 默认配置
148
+ var defaultTitleArea = {
149
+ visible: true,
150
+ title: {
151
+ visible: true
152
+ },
153
+ subtitle: {
154
+ visible: true
155
+ },
156
+ alignment: 'space-between',
157
+ padding: '0px'
158
+ };
159
+
160
+ // 合并配置
161
+ var mergedTitleArea = merge({}, defaultTitleArea, titleArea);
162
+ var mergedDisplayField = merge({}, getDefaultDisplayField(), displayField);
163
+
164
+ // 渲染标题区域
165
+ var renderTitleArea = function renderTitleArea() {
166
+ var _mergedTitleArea$titl, _mergedTitleArea$subt;
167
+ var _ref = mergedTitleArea || {},
168
+ title = _ref.title,
169
+ subtitle = _ref.subtitle;
170
+ if (!(title !== null && title !== void 0 && title.visible) && !(subtitle !== null && subtitle !== void 0 && subtitle.visible)) {
171
+ return null;
172
+ }
173
+ if (!(title !== null && title !== void 0 && title.text) && !(subtitle !== null && subtitle !== void 0 && subtitle.text)) {
174
+ return null;
175
+ }
176
+ var titleStyle = {
177
+ display: 'flex',
178
+ justifyContent: mergedTitleArea.alignment,
179
+ alignItems: 'center',
180
+ padding: mergedTitleArea.padding,
181
+ marginBottom: '8'
182
+ };
183
+ return /*#__PURE__*/React.createElement("div", {
184
+ style: titleStyle
185
+ }, ((_mergedTitleArea$titl = mergedTitleArea.title) === null || _mergedTitleArea$titl === void 0 ? void 0 : _mergedTitleArea$titl.visible) && /*#__PURE__*/React.createElement("div", {
186
+ className: "pisell-cash-keyboard-title",
187
+ style: {
188
+ fontSize: mergedTitleArea.title.fontSize,
189
+ color: mergedTitleArea.title.color,
190
+ fontWeight: mergedTitleArea.title.fontWeight
191
+ }
192
+ }, mergedTitleArea.title.text), ((_mergedTitleArea$subt = mergedTitleArea.subtitle) === null || _mergedTitleArea$subt === void 0 ? void 0 : _mergedTitleArea$subt.visible) && /*#__PURE__*/React.createElement("div", {
193
+ className: "pisell-cash-keyboard-subtitle",
194
+ style: {
195
+ fontSize: mergedTitleArea.subtitle.fontSize,
196
+ color: mergedTitleArea.subtitle.color,
197
+ fontWeight: mergedTitleArea.subtitle.fontWeight
198
+ }
199
+ }, mergedTitleArea.subtitle.text));
200
+ };
201
+
202
+ // 计算栅格样式
203
+ var getGridStyle = function getGridStyle(index) {
204
+ if (!mergedDisplayField.gridRatio) {
205
+ return {
206
+ flex: 1
207
+ };
208
+ }
209
+ var ratio = mergedDisplayField.gridRatio[index] || 1;
210
+ return {
211
+ flex: ratio
212
+ };
213
+ };
214
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
215
+ className: "pisell-cash-keyboard pisell-cash-keyboard-intact ".concat(disabled ? 'disabled' : ''),
216
+ style: _objectSpread({}, style || {})
217
+ }, renderTitleArea(), /*#__PURE__*/React.createElement("div", {
218
+ className: "pisell-cash-keyboard-intact-container"
219
+ }, /*#__PURE__*/React.createElement("div", {
220
+ style: {
221
+ display: 'flex',
222
+ gap: '16px'
223
+ }
224
+ }, ((_mergedDisplayField$b = mergedDisplayField.balanceDue) === null || _mergedDisplayField$b === void 0 ? void 0 : _mergedDisplayField$b.visible) && /*#__PURE__*/React.createElement("div", {
225
+ className: "pisell-cash-keyboard-intact-container-top",
226
+ style: _objectSpread(_objectSpread({}, getGridStyle(0)), {}, {
227
+ overflow: 'hidden'
228
+ })
229
+ }, /*#__PURE__*/React.createElement("div", {
230
+ className: "pisell-cash-keyboard-intact-container-top-label"
231
+ }, mergedDisplayField.balanceDue.label), /*#__PURE__*/React.createElement("div", {
232
+ className: "pisell-cash-keyboard-intact-container-top-value"
233
+ }, /*#__PURE__*/React.createElement(PisellText.Amount, {
234
+ value: originalValue || '',
235
+ hideDecimalForWholeNumbers: false,
236
+ precision: 2
237
+ }))), ((_mergedDisplayField$c = mergedDisplayField.cashReceived) === null || _mergedDisplayField$c === void 0 ? void 0 : _mergedDisplayField$c.visible) && /*#__PURE__*/React.createElement(VirtualInput, {
238
+ showCursor: false,
239
+ focused: true,
240
+ wrapperStyle: _objectSpread(_objectSpread({}, getGridStyle(1)), {}, {
241
+ padding: '6px 16px',
242
+ borderRadius: '8px',
243
+ backgroundColor: 'white',
244
+ boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.06)',
245
+ overflow: 'hidden',
246
+ maxWidth: 188
247
+ }),
248
+ topContent: /*#__PURE__*/React.createElement("div", {
249
+ style: {
250
+ fontSize: '14px',
251
+ color: '#667085'
252
+ }
253
+ }, mergedDisplayField.cashReceived.label),
254
+ value: internalValue ? /*#__PURE__*/React.createElement(PisellText.Amount, {
255
+ value: internalValue,
256
+ hideDecimalForWholeNumbers: false,
257
+ precision: 2
258
+ }) : '',
259
+ height: 30,
260
+ fontSize: 20,
261
+ placeholder: placeholder,
262
+ style: {
263
+ fontSize: '24px',
264
+ fontWeight: 'bold',
265
+ border: 'none',
266
+ background: 'transparent',
267
+ width: '100%'
268
+ }
269
+ }), ((_mergedDisplayField$c2 = mergedDisplayField.changeDue) === null || _mergedDisplayField$c2 === void 0 ? void 0 : _mergedDisplayField$c2.visible) && /*#__PURE__*/React.createElement("div", {
270
+ className: "pisell-cash-keyboard-intact-container-top",
271
+ style: _objectSpread(_objectSpread({}, getGridStyle(2)), {}, {
272
+ overflow: 'hidden'
273
+ })
274
+ }, /*#__PURE__*/React.createElement("div", {
275
+ className: "pisell-cash-keyboard-intact-container-top-label"
276
+ }, mergedDisplayField.changeDue.label), /*#__PURE__*/React.createElement("div", {
277
+ className: "pisell-cash-keyboard-intact-container-top-value"
278
+ }, /*#__PURE__*/React.createElement(PisellText.Amount, {
279
+ value: hiddenChangeDue ? 0 : changeDue,
280
+ hideDecimalForWholeNumbers: false,
281
+ precision: 2
282
+ })))), /*#__PURE__*/React.createElement(Shortcuts, {
283
+ presets: getDefaultPresets(),
284
+ onChange: setInternalValue,
285
+ disabled: disabled
286
+ }))), /*#__PURE__*/React.createElement(CashKeyboardSimple, _extends({
287
+ containerProps: {
288
+ renderType: 'modal',
289
+ open: isShowModal,
290
+ onCancel: function onCancel() {
291
+ return setIsShowModal(false);
292
+ }
293
+ }
294
+ }, _restProps, {
295
+ titleArea: _objectSpread(_objectSpread({}, mergedTitleArea), {}, {
296
+ subtitle: {
297
+ visible: false
298
+ }
299
+ }),
300
+ selectType: "dark",
301
+ value: internalValue,
302
+ onChange: setInternalValue,
303
+ onEnter: function onEnter() {
304
+ var _props$onEnter2;
305
+ (_props$onEnter2 = props.onEnter) === null || _props$onEnter2 === void 0 || _props$onEnter2.call(props, internalValue);
306
+ setIsShowModal(false);
307
+ }
308
+ })));
309
+ };
310
+ export default CashKeyboardIntact;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { CashKeyboardBaseProps } from './types';
3
+ import './index.less';
4
+ export interface CashKeyboardSimpleProps extends CashKeyboardBaseProps {
5
+ containerProps?: {
6
+ renderType: 'modal' | 'popover';
7
+ open: boolean;
8
+ [key: string]: any;
9
+ };
10
+ children?: React.ReactNode;
11
+ }
12
+ declare const CashKeyboardSimple: (props: CashKeyboardSimpleProps) => JSX.Element | null;
13
+ export default CashKeyboardSimple;