@pisell/private-materials 6.4.42 → 6.4.44

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 (226) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +8 -8
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/booking/addons/model.d.ts +1 -10
  12. package/es/components/booking/components/actionButtons/index.js +37 -42
  13. package/es/components/booking/components/actionButtons/index.less +0 -28
  14. package/es/components/booking/components/footer/amount.d.ts +3 -3
  15. package/es/components/booking/components/footer/amount.js +13 -2
  16. package/es/components/booking/components/footer/index.js +168 -68
  17. package/es/components/booking/components/footer/utils.js +62 -33
  18. package/es/components/booking/forms/model.d.ts +1 -10
  19. package/es/components/booking/info/model.d.ts +1 -10
  20. package/es/components/booking/info/model.js +5 -0
  21. package/es/components/booking/info/service/addService/index.js +2 -1
  22. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  23. package/es/components/booking/info/service2/utils.d.ts +1 -1
  24. package/es/components/booking/info2/index.js +42 -2
  25. package/es/components/booking/info2/service/addService/index.js +2 -1
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/info2/service/editService/index.js +12 -4
  28. package/es/components/booking/model.d.ts +1 -9
  29. package/es/components/booking/notes/model.d.ts +1 -10
  30. package/es/components/booking/payments/model.d.ts +1 -10
  31. package/es/components/booking/utils.d.ts +2 -2
  32. package/es/components/checkout/PaymentModal.d.ts +2 -0
  33. package/es/components/checkout/PaymentModal.js +395 -240
  34. package/es/components/checkout/components/AdditionalModule/index.less +1 -1
  35. package/es/components/checkout/components/AmountSummary/index.js +161 -54
  36. package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  37. package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
  38. package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
  39. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  40. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  41. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
  42. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  43. package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
  44. package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  45. package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  46. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  47. package/es/components/checkout/components/WalletPassModule/index.js +4 -3
  48. package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
  49. package/es/components/checkout/hooks/useWalletPass.js +2 -0
  50. package/es/components/checkout/index.less +1 -1
  51. package/es/components/checkout/locales.d.ts +33 -0
  52. package/es/components/checkout/locales.js +39 -3
  53. package/es/components/checkout/types.d.ts +1 -0
  54. package/es/components/eftposPay/amount.d.ts +1 -1
  55. package/es/components/eftposPay/device.d.ts +1 -1
  56. package/es/components/eftposPay/hooks.d.ts +2 -2
  57. package/es/components/eftposPay/store/index.d.ts +6 -6
  58. package/es/components/pay/toC/model.d.ts +1 -9
  59. package/es/components/schedules/model.d.ts +1 -9
  60. package/es/components/shoppingCart/components/Cart/Product.js +143 -71
  61. package/es/components/shoppingCart/components/Cart/index.js +1 -1
  62. package/es/components/shoppingCart/components/Cart/index.less +31 -0
  63. package/es/components/shoppingCart/locales.d.ts +3 -0
  64. package/es/components/shoppingCart/locales.js +12 -3
  65. package/es/components/ticketBooking/utils/index.js +2 -1
  66. package/es/components/wallet/Detail/model.d.ts +1 -13
  67. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  68. package/es/components/wallet/PointCard/model.d.ts +1 -13
  69. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  70. package/es/components/wallet/Voucher/model.d.ts +1 -13
  71. package/es/components/wallet/model.d.ts +1 -9
  72. package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
  73. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  74. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
  75. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  76. package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  77. package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
  78. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  79. package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
  80. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  81. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
  82. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  83. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
  84. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  85. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
  86. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  87. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  88. package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
  89. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  90. package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
  91. package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  92. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
  93. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  94. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  95. package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
  96. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  97. package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
  98. package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  99. package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
  100. package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  101. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  102. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
  103. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  104. package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
  105. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  106. package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
  107. package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  108. package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  109. package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
  110. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  111. package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
  112. package/es/pro/priceKeyboard/index.d.ts +3 -0
  113. package/es/pro/priceKeyboard/index.js +3 -0
  114. package/es/pro/priceKeyboard/index.less +215 -0
  115. package/es/pro/priceKeyboard/utils.d.ts +31 -0
  116. package/es/pro/priceKeyboard/utils.js +51 -0
  117. package/es/pro/skuDetailModal/index.js +19 -16
  118. package/lib/components/booking/addons/model.d.ts +1 -10
  119. package/lib/components/booking/components/actionButtons/index.js +31 -28
  120. package/lib/components/booking/components/actionButtons/index.less +0 -28
  121. package/lib/components/booking/components/footer/amount.d.ts +3 -3
  122. package/lib/components/booking/components/footer/amount.js +10 -4
  123. package/lib/components/booking/components/footer/index.js +107 -40
  124. package/lib/components/booking/components/footer/utils.js +35 -7
  125. package/lib/components/booking/forms/model.d.ts +1 -10
  126. package/lib/components/booking/info/model.d.ts +1 -10
  127. package/lib/components/booking/info/model.js +3 -0
  128. package/lib/components/booking/info/service/addService/index.js +2 -1
  129. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  130. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  131. package/lib/components/booking/info2/index.js +18 -1
  132. package/lib/components/booking/info2/service/addService/index.js +2 -1
  133. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  134. package/lib/components/booking/info2/service/editService/index.js +12 -4
  135. package/lib/components/booking/model.d.ts +1 -9
  136. package/lib/components/booking/notes/model.d.ts +1 -10
  137. package/lib/components/booking/payments/model.d.ts +1 -10
  138. package/lib/components/booking/utils.d.ts +2 -2
  139. package/lib/components/checkout/PaymentModal.d.ts +2 -0
  140. package/lib/components/checkout/PaymentModal.js +152 -73
  141. package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
  142. package/lib/components/checkout/components/AmountSummary/index.js +114 -40
  143. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  144. package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
  145. package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
  146. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  147. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  148. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
  149. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  150. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
  151. package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  152. package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  153. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  154. package/lib/components/checkout/components/WalletPassModule/index.js +4 -3
  155. package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
  156. package/lib/components/checkout/hooks/useWalletPass.js +2 -0
  157. package/lib/components/checkout/index.less +1 -1
  158. package/lib/components/checkout/locales.d.ts +33 -0
  159. package/lib/components/checkout/locales.js +39 -3
  160. package/lib/components/checkout/types.d.ts +1 -0
  161. package/lib/components/eftposPay/amount.d.ts +1 -1
  162. package/lib/components/eftposPay/device.d.ts +1 -1
  163. package/lib/components/eftposPay/hooks.d.ts +2 -2
  164. package/lib/components/eftposPay/store/index.d.ts +6 -6
  165. package/lib/components/pay/toC/model.d.ts +1 -9
  166. package/lib/components/schedules/model.d.ts +1 -9
  167. package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
  168. package/lib/components/shoppingCart/components/Cart/index.js +1 -1
  169. package/lib/components/shoppingCart/components/Cart/index.less +31 -0
  170. package/lib/components/shoppingCart/locales.d.ts +3 -0
  171. package/lib/components/shoppingCart/locales.js +6 -3
  172. package/lib/components/ticketBooking/index.js +5 -1
  173. package/lib/components/ticketBooking/utils/index.js +2 -1
  174. package/lib/components/wallet/Detail/model.d.ts +1 -13
  175. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  176. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  177. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  178. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  179. package/lib/components/wallet/model.d.ts +1 -9
  180. package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
  181. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  182. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
  183. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  184. package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  185. package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
  186. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  187. package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
  188. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  189. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
  190. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  191. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
  192. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  193. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
  194. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  195. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  196. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
  197. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  198. package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
  199. package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  200. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
  201. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  202. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  203. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
  204. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  205. package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
  206. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  207. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
  208. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  209. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  210. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
  211. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  212. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
  213. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  214. package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
  215. package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  216. package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  217. package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
  218. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  219. package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
  220. package/lib/pro/priceKeyboard/index.d.ts +3 -0
  221. package/lib/pro/priceKeyboard/index.js +45 -0
  222. package/lib/pro/priceKeyboard/index.less +215 -0
  223. package/lib/pro/priceKeyboard/utils.d.ts +31 -0
  224. package/lib/pro/priceKeyboard/utils.js +75 -0
  225. package/lib/pro/skuDetailModal/index.js +18 -22
  226. package/package.json +2 -2
@@ -1,4 +1,3 @@
1
- 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); }
2
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); }
3
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
4
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
@@ -10,16 +9,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
10
9
  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; } }
11
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
11
  import React, { useState, useEffect } from 'react';
13
- import "./index.less";
14
- import classNames from 'classnames';
15
- import { Edit05 } from '@pisell/icon';
16
- import PisellPriceKeyboardPopover from "../../../../pro/pisellPriceKeyboardPopover";
17
- // import pisellos from "@/utils/pisellos"; // 暂时注释,使用 context 中的 pisellos
18
-
19
12
  import useEngineContext from "../../../../hooks/useEngineContext";
13
+ // @ts-ignore
20
14
  import { locales, formatAmount } from '@pisell/utils';
21
15
  import checkoutLocales from "../../locales";
22
16
  import useToast from "../../../../hooks/useToast";
17
+ import { CashKeyboard } from "../../../../pro/priceKeyboard";
18
+ import { useDebounceFn } from 'ahooks';
19
+ import "./index.less";
23
20
  export function CashPaymentModule(_ref) {
24
21
  var amountSymbol = _ref.amountSymbol,
25
22
  orderInfo = _ref.orderInfo,
@@ -31,7 +28,9 @@ export function CashPaymentModule(_ref) {
31
28
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
32
29
  roundingFunction = _ref.roundingFunction,
33
30
  _ref$balanceDueAmount = _ref.balanceDueAmount,
34
- balanceDueAmount = _ref$balanceDueAmount === void 0 ? '0' : _ref$balanceDueAmount;
31
+ balanceDueAmount = _ref$balanceDueAmount === void 0 ? '0' : _ref$balanceDueAmount,
32
+ _ref$syncingLock = _ref.syncingLock,
33
+ syncingLock = _ref$syncingLock === void 0 ? false : _ref$syncingLock;
35
34
  var _useState = useState(customAmount || ''),
36
35
  _useState2 = _slicedToArray(_useState, 2),
37
36
  amount = _useState2[0],
@@ -40,21 +39,13 @@ export function CashPaymentModule(_ref) {
40
39
  _useState4 = _slicedToArray(_useState3, 2),
41
40
  roundingAmount = _useState4[0],
42
41
  setRoundingAmount = _useState4[1];
43
- var _useState5 = useState(amountButtons.length ? amountButtons : new Array(6).fill(0)),
44
- _useState6 = _slicedToArray(_useState5, 2),
45
- amountList = _useState6[0],
46
- setAmountList = _useState6[1];
47
- useEffect(function () {
48
- setAmountList(amountButtons.length ? amountButtons : new Array(6).fill(0));
49
- }, [amountButtons]);
50
42
  var context = useEngineContext();
51
- // const { pisellos, action, token, store, getApp } = context.appHelper?.utils;
52
43
  var Toast = useToast();
53
44
 
54
45
  // 创建本地翻译函数,优先使用 checkout 语言包
55
46
  var getText = function getText(key, fallback) {
56
- var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _checkoutLocales;
57
- var currentLang = ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get('umi_locale')) || 'en';
47
+ var _context$appHelper, _context$appHelper$ge, _context$appHelper$ge2, _context$appHelper$ut, _checkoutLocales;
48
+ var currentLang = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 || (_context$appHelper$ge = _context$appHelper.getApp) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.call(_context$appHelper)) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge = _context$appHelper$ge.locales) === null || _context$appHelper$ge === void 0 || (_context$appHelper$ge2 = _context$appHelper$ge.getLocale) === null || _context$appHelper$ge2 === void 0 ? void 0 : _context$appHelper$ge2.call(_context$appHelper$ge)) || ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale')) || 'en';
58
49
  var checkoutText = (_checkoutLocales = checkoutLocales[currentLang]) === null || _checkoutLocales === void 0 ? void 0 : _checkoutLocales[key];
59
50
  if (checkoutText) {
60
51
  return checkoutText;
@@ -65,7 +56,6 @@ export function CashPaymentModule(_ref) {
65
56
  };
66
57
  useEffect(function () {
67
58
  handleKeyboardConfirm(customAmount || '');
68
- // setAmount(customAmount || '');
69
59
  }, [customAmount, balanceDueAmount]);
70
60
 
71
61
  // 检查是否应该禁用按钮:原本disabled为true 或者 订单金额为0
@@ -73,17 +63,11 @@ export function CashPaymentModule(_ref) {
73
63
 
74
64
  // 检查是否应该禁用输入框:原本disabled为true 或者 订单金额为0
75
65
  var isInputDisabled = disabled || Number(customAmount || 0) === 0;
76
- var handleAmountClick = function handleAmountClick(clickedAmount) {
77
- if (isAmountButtonsDisabled) return;
78
- var amountStr = clickedAmount.toString();
79
- setAmount(amountStr);
80
- setRoundingAmount(0);
81
- };
82
- var handleCashPay = function handleCashPay() {
66
+ var handleCashPayInternal = function handleCashPayInternal() {
83
67
  if (isAmountButtonsDisabled) return;
84
68
  if (onPaymentComplete) {
85
69
  if (Number(amount) === 0 && Math.abs(roundingAmount) === 0) {
86
- Toast.fail(getText('pisell2.amount-summary.amount-cannot-be-zero', 'The amount cannot be 0'));
70
+ Toast.fail(getText('cash-payment-amount-cannot-be-zero', 'The amount cannot be 0'));
87
71
  return;
88
72
  }
89
73
  var finalAmount = typeof amount === 'number' ? amount : Number(amount) || 0;
@@ -97,6 +81,12 @@ export function CashPaymentModule(_ref) {
97
81
  }
98
82
  };
99
83
 
84
+ // 使用防抖,1000毫秒内不重复执行
85
+ var _useDebounceFn = useDebounceFn(handleCashPayInternal, {
86
+ wait: 500
87
+ }),
88
+ handleCashPay = _useDebounceFn.run;
89
+
100
90
  // 处理键盘确认
101
91
  var handleKeyboardConfirm = /*#__PURE__*/function () {
102
92
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
@@ -113,24 +103,23 @@ export function CashPaymentModule(_ref) {
113
103
  setRoundingAmount(0);
114
104
  return _context.abrupt("return");
115
105
  case 4:
116
- ;
117
106
  finalValue = String(value);
118
107
  console.log('键盘确认:', finalValue);
119
108
  if (!(Number(finalValue) === 0)) {
120
- _context.next = 10;
109
+ _context.next = 9;
121
110
  break;
122
111
  }
123
- Toast.fail(getText('pisell2.amount-summary.amount-cannot-be-zero', 'The amount cannot be 0'));
112
+ Toast.fail(getText('cash-payment-amount-cannot-be-zero', 'The amount cannot be 0'));
124
113
  return _context.abrupt("return");
125
- case 10:
114
+ case 9:
126
115
  if (!(finalValue === '' || finalValue === null || finalValue === undefined)) {
127
- _context.next = 14;
116
+ _context.next = 13;
128
117
  break;
129
118
  }
130
119
  setAmount('');
131
- _context.next = 33;
120
+ _context.next = 32;
132
121
  break;
133
- case 14:
122
+ case 13:
134
123
  // 移除可能的货币符号和多余空格
135
124
  cleanValue = finalValue.replace(/[$\s]/g, '');
136
125
  numValue = parseFloat(cleanValue); // 检查当前金额是否等于剩余支付金额
@@ -139,22 +128,22 @@ export function CashPaymentModule(_ref) {
139
128
  finalAmount = numValue;
140
129
  roundingDiff = 0;
141
130
  if (!(shouldApplyRounding && roundingFunction)) {
142
- _context.next = 30;
131
+ _context.next = 29;
143
132
  break;
144
133
  }
145
- _context.next = 23;
134
+ _context.next = 22;
146
135
  return roundingFunction(numValue);
147
- case 23:
136
+ case 22:
148
137
  _result = _context.sent;
149
138
  _ref3 = _result || {}, _ref3$roundedAmount = _ref3.roundedAmount, roundedAmount = _ref3$roundedAmount === void 0 ? numValue : _ref3$roundedAmount, _ref3$roundingDiffere = _ref3.roundingDifference, roundingDifference = _ref3$roundingDiffere === void 0 ? 0 : _ref3$roundingDiffere;
150
139
  finalAmount = roundedAmount;
151
140
  roundingDiff = roundingDifference;
152
141
  console.log('应用抹零:', numValue, '->', roundedAmount, '差额:', roundingDifference);
153
- _context.next = 31;
142
+ _context.next = 30;
154
143
  break;
155
- case 30:
144
+ case 29:
156
145
  console.log('不应用抹零,用户输入金额:', numValue, '剩余支付金额:', balanceDue);
157
- case 31:
146
+ case 30:
158
147
  setRoundingAmount(roundingDiff);
159
148
  if (isNaN(numValue)) {
160
149
  setAmount('');
@@ -162,7 +151,7 @@ export function CashPaymentModule(_ref) {
162
151
  setAmount(finalAmount.toString());
163
152
  console.log('设置金额为:', finalAmount);
164
153
  }
165
- case 33:
154
+ case 32:
166
155
  case "end":
167
156
  return _context.stop();
168
157
  }
@@ -173,103 +162,91 @@ export function CashPaymentModule(_ref) {
173
162
  };
174
163
  }();
175
164
 
176
- // 处理键盘取消
177
- var handleKeyboardCancel = function handleKeyboardCancel() {
178
- console.log('键盘取消');
179
- };
180
-
181
- // 处理键盘输入变化
182
- var handleKeyboardChange = function handleKeyboardChange(value) {
183
- if (isInputDisabled) return;
184
- var stringValue = String(value);
185
- console.log('键盘输入变化:', stringValue, '类型:', _typeof(stringValue));
186
- // 在实时输入过程中更新amount状态
187
- setAmount(stringValue);
188
- };
189
- return /*#__PURE__*/React.createElement("div", {
190
- className: classNames('cash-pay-container', {
191
- 'cash-pay-container--disabled': disabled
192
- })
193
- }, /*#__PURE__*/React.createElement("div", {
194
- className: classNames('cash-pay-header')
195
- }, /*#__PURE__*/React.createElement("div", {
196
- className: classNames('cash-pay-header-title')
197
- }, getText('cash') || 'Cash'), Math.abs(roundingAmount) > 0 && /*#__PURE__*/React.createElement("div", {
198
- className: classNames('cash-pay-header-rounding')
199
- }, getText('rounding') || 'Rounding', ":", ' ', formatAmount(roundingAmount, 2, amountSymbol))), /*#__PURE__*/React.createElement("div", {
200
- className: classNames('cash-pay-main-content', {
201
- 'cash-pay-main-content--disabled': disabled
202
- })
203
- }, /*#__PURE__*/React.createElement("div", {
204
- className: classNames('cash-pay-payment-area')
205
- }, /*#__PURE__*/React.createElement(PisellPriceKeyboardPopover, {
206
- value: amount || '0'
207
- // onChange={handleKeyboardChange}
165
+ // 重置功能 - 重置为待支付金额,保留抹零
166
+ var handleReset = /*#__PURE__*/function () {
167
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
168
+ var resetAmount, cleanValue, numValue, balanceDue, shouldApplyRounding, finalAmount, roundingDiff, _result2, _ref5, _ref5$roundedAmount, roundedAmount, _ref5$roundingDiffere, roundingDifference;
169
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
170
+ while (1) switch (_context2.prev = _context2.next) {
171
+ case 0:
172
+ if (!isAmountButtonsDisabled) {
173
+ _context2.next = 2;
174
+ break;
175
+ }
176
+ return _context2.abrupt("return");
177
+ case 2:
178
+ resetAmount = balanceDueAmount || '0'; // 移除可能的货币符号和多余空格
179
+ cleanValue = resetAmount.replace(/[$\s]/g, '');
180
+ numValue = parseFloat(cleanValue); // 检查当前金额是否等于剩余支付金额
181
+ balanceDue = parseFloat(balanceDueAmount);
182
+ shouldApplyRounding = Math.abs(numValue - balanceDue) < 0.01; // 使用小数精度比较
183
+ finalAmount = numValue;
184
+ roundingDiff = 0;
185
+ if (!(shouldApplyRounding && roundingFunction)) {
186
+ _context2.next = 19;
187
+ break;
188
+ }
189
+ _context2.next = 12;
190
+ return roundingFunction(finalAmount);
191
+ case 12:
192
+ _result2 = _context2.sent;
193
+ _ref5 = _result2 || {}, _ref5$roundedAmount = _ref5.roundedAmount, roundedAmount = _ref5$roundedAmount === void 0 ? numValue : _ref5$roundedAmount, _ref5$roundingDiffere = _ref5.roundingDifference, roundingDifference = _ref5$roundingDiffere === void 0 ? 0 : _ref5$roundingDiffere;
194
+ finalAmount = roundedAmount;
195
+ roundingDiff = roundingDifference;
196
+ console.log('应用抹零:', numValue, '->', roundedAmount, '差额:', roundingDifference);
197
+ _context2.next = 20;
198
+ break;
199
+ case 19:
200
+ console.log('不应用抹零,用户输入金额:', numValue, '剩余支付金额:', balanceDue);
201
+ case 20:
202
+ setAmount(finalAmount.toString());
203
+ setRoundingAmount(roundingDiff);
204
+ case 22:
205
+ case "end":
206
+ return _context2.stop();
207
+ }
208
+ }, _callee2);
209
+ }));
210
+ return function handleReset() {
211
+ return _ref4.apply(this, arguments);
212
+ };
213
+ }();
214
+ return /*#__PURE__*/React.createElement(CashKeyboard, {
215
+ variant: "intact"
216
+ // 原价格:订单的待支付金额
208
217
  ,
209
- onConfirm: handleKeyboardConfirm,
210
- onCancel: handleKeyboardCancel,
211
- showCurrencySymbol: true,
212
- useThousandsSeparator: true,
213
- selectType: "dark",
214
- overlayClassName: "cash-payment-keyboard-popover",
215
- disabled: isInputDisabled
216
- }, /*#__PURE__*/React.createElement("div", {
217
- className: classNames('cash-pay-amount-input-area', {
218
- 'cash-pay-amount-input-area--disabled': isInputDisabled
219
- })
220
- }, /*#__PURE__*/React.createElement(Edit05, {
221
- className: classNames('cash-pay-amount-edit-icon', {
222
- 'cash-pay-amount-edit-icon--disabled': isInputDisabled
223
- })
224
- }), /*#__PURE__*/React.createElement("div", {
225
- className: classNames('cash-pay-amount-input-wrapper', {
226
- 'cash-pay-amount-input-wrapper--disabled': isInputDisabled
227
- })
228
- }, /*#__PURE__*/React.createElement("span", {
229
- className: classNames('cash-pay-currency-symbol', {
230
- 'cash-pay-currency-symbol--disabled': isInputDisabled
231
- })
232
- }, amountSymbol), /*#__PURE__*/React.createElement("div", {
233
- className: classNames('cash-pay-amount-display', {
234
- 'cash-pay-amount-display--disabled': isInputDisabled
235
- })
236
- }, amount || '0.00')))), /*#__PURE__*/React.createElement("div", _extends({
237
- className: classNames('cash-pay-button', {
238
- 'cash-pay-button--disabled': isAmountButtonsDisabled
239
- })
240
- }, isAmountButtonsDisabled ? {} : {
241
- onClick: handleCashPay
242
- }, {
243
- style: {
244
- cursor: isAmountButtonsDisabled ? 'not-allowed' : 'pointer'
245
- }
246
- }), /*#__PURE__*/React.createElement("div", {
247
- className: classNames('cash-pay-button-text', {
248
- 'cash-pay-button-text--disabled': isAmountButtonsDisabled
249
- })
250
- }, getText('cash.payment') || 'Cash Pay'))), /*#__PURE__*/React.createElement("div", {
251
- className: classNames('cash-pay-amount-button-grid', {
252
- 'cash-pay-amount-button-grid--disabled': isAmountButtonsDisabled
253
- })
254
- }, amountList.slice(0, 6).map(function (amount, index) {
255
- return /*#__PURE__*/React.createElement("div", _extends({
256
- key: index,
257
- className: classNames('cash-pay-amount-button', {
258
- 'cash-pay-amount-button--disabled': isAmountButtonsDisabled
259
- })
260
- }, isAmountButtonsDisabled ? {} : {
261
- onClick: function onClick() {
262
- return handleAmountClick(amount);
263
- }
264
- }, {
265
- style: {
266
- cursor: isAmountButtonsDisabled ? 'not-allowed' : 'pointer'
218
+ originalValue: customAmount
219
+ // 当前值:实收现金(cash recevie)
220
+ ,
221
+ value: amount,
222
+ disabled: disabled,
223
+ hiddenChangeDue: roundingAmount > 0,
224
+ onChange: function onChange(value) {
225
+ setAmount(value);
226
+ setRoundingAmount(0);
227
+ },
228
+ titleArea: {
229
+ visible: true,
230
+ title: {
231
+ text: getText('cash-payment-title', 'Cash Payment')
232
+ },
233
+ subtitle: {
234
+ visible: Math.abs(roundingAmount) > 0,
235
+ text: "".concat(getText('cash-payment-rounding', 'Rounding'), ": ").concat(formatAmount(roundingAmount, 2, amountSymbol))
267
236
  }
268
- }), /*#__PURE__*/React.createElement("div", {
269
- className: classNames('cash-pay-amount-button-text', {
270
- 'cash-pay-amount-button-text--disabled': isAmountButtonsDisabled
271
- })
272
- }, formatAmount(amount, 2, amountSymbol)));
273
- }))));
237
+ },
238
+ style: {
239
+ width: '100%',
240
+ backgroundColor: 'transparent'
241
+ },
242
+ presets: amountButtons.slice(0, 5).map(function (buttonAmount) {
243
+ return {
244
+ label: formatAmount(buttonAmount, 2, amountSymbol),
245
+ value: buttonAmount
246
+ };
247
+ }),
248
+ onReset: handleReset,
249
+ onEnter: syncingLock ? undefined : handleCashPay
250
+ });
274
251
  }
275
252
  export default CashPaymentModule;