@pisell/private-materials 6.4.41 → 6.4.43

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 (230) 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/Sales/Summary/utils.d.ts +1 -1
  12. package/es/components/booking/addons/model.d.ts +10 -1
  13. package/es/components/booking/components/actionButtons/index.js +37 -42
  14. package/es/components/booking/components/actionButtons/index.less +0 -28
  15. package/es/components/booking/components/footer/amount.d.ts +3 -3
  16. package/es/components/booking/components/footer/amount.js +13 -2
  17. package/es/components/booking/components/footer/index.js +168 -68
  18. package/es/components/booking/components/footer/utils.js +62 -33
  19. package/es/components/booking/forms/model.d.ts +10 -1
  20. package/es/components/booking/info/model.d.ts +10 -1
  21. package/es/components/booking/info/model.js +5 -0
  22. package/es/components/booking/info/service/addService/index.js +2 -1
  23. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  24. package/es/components/booking/info/service2/utils.d.ts +1 -1
  25. package/es/components/booking/info2/index.js +42 -2
  26. package/es/components/booking/info2/service/addService/index.js +2 -1
  27. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  28. package/es/components/booking/info2/service/editService/index.js +12 -4
  29. package/es/components/booking/model.d.ts +9 -1
  30. package/es/components/booking/notes/model.d.ts +10 -1
  31. package/es/components/booking/payments/model.d.ts +10 -1
  32. package/es/components/booking/utils.d.ts +2 -2
  33. package/es/components/checkout/PaymentModal.d.ts +2 -0
  34. package/es/components/checkout/PaymentModal.js +395 -240
  35. package/es/components/checkout/components/AdditionalModule/index.less +1 -1
  36. package/es/components/checkout/components/AmountSummary/index.js +161 -54
  37. package/es/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  38. package/es/components/checkout/components/CashPaymentModule/index.js +114 -137
  39. package/es/components/checkout/components/CashPaymentModule/index.less +200 -176
  40. package/es/components/checkout/components/PaymentDetailModal/index.js +2 -2
  41. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  42. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +210 -0
  43. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  44. package/es/components/checkout/components/PaymentOptionsModule/index.js +12 -114
  45. package/es/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  46. package/es/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  47. package/es/components/checkout/components/SearchAndClientModule/index.js +40 -39
  48. package/es/components/checkout/components/WalletPassModule/index.js +3 -2
  49. package/es/components/checkout/components/WalletPassModule/utils.js +6 -1
  50. package/es/components/checkout/hooks/useWalletPass.js +2 -0
  51. package/es/components/checkout/index.less +1 -1
  52. package/es/components/checkout/locales.d.ts +33 -0
  53. package/es/components/checkout/locales.js +39 -3
  54. package/es/components/checkout/types.d.ts +1 -0
  55. package/es/components/eftposPay/amount.d.ts +1 -1
  56. package/es/components/eftposPay/device.d.ts +1 -1
  57. package/es/components/eftposPay/hooks.d.ts +2 -2
  58. package/es/components/eftposPay/store/index.d.ts +5 -5
  59. package/es/components/pay/toC/model.d.ts +9 -1
  60. package/es/components/schedules/model.d.ts +9 -1
  61. package/es/components/shoppingCart/components/Cart/Product.js +143 -71
  62. package/es/components/shoppingCart/components/Cart/index.js +1 -1
  63. package/es/components/shoppingCart/components/Cart/index.less +31 -0
  64. package/es/components/shoppingCart/locales.d.ts +3 -0
  65. package/es/components/shoppingCart/locales.js +12 -3
  66. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  67. package/es/components/ticketBooking/utils/index.js +2 -1
  68. package/es/components/wallet/Detail/model.d.ts +13 -1
  69. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  70. package/es/components/wallet/PointCard/model.d.ts +13 -1
  71. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  72. package/es/components/wallet/Voucher/model.d.ts +13 -1
  73. package/es/components/wallet/model.d.ts +9 -1
  74. package/es/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +1 -1
  75. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  76. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +148 -0
  77. package/es/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  78. package/es/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  79. package/es/pro/pisellSimplePriceKeyboardPopover/index.js +1 -0
  80. package/es/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  81. package/es/pro/pisellSimplePriceKeyboardPopover/types.js +1 -0
  82. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  83. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +310 -0
  84. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  85. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +349 -0
  86. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  87. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +49 -0
  88. package/es/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  89. package/es/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  90. package/es/pro/priceKeyboard/components/cashKeyboard/locales.js +41 -0
  91. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  92. package/es/pro/priceKeyboard/components/cashKeyboard/types.js +1 -0
  93. package/es/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  94. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +442 -0
  95. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  96. package/es/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  97. package/es/pro/priceKeyboard/components/discountKeyboard/locales.js +44 -0
  98. package/es/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  99. package/es/pro/priceKeyboard/components/discountKeyboard/types.js +1 -0
  100. package/es/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  101. package/es/pro/priceKeyboard/components/paymentKeyboard/index.js +444 -0
  102. package/es/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  103. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  104. package/es/pro/priceKeyboard/components/paymentKeyboard/locales.js +47 -0
  105. package/es/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  106. package/es/pro/priceKeyboard/components/paymentKeyboard/types.js +1 -0
  107. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  108. package/es/pro/priceKeyboard/components/shortcuts/index.js +47 -0
  109. package/es/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  110. package/es/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  111. package/es/pro/priceKeyboard/hooks/keyActions.js +252 -0
  112. package/es/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  113. package/es/pro/priceKeyboard/hooks/rightItems.js +50 -0
  114. package/es/pro/priceKeyboard/index.d.ts +3 -0
  115. package/es/pro/priceKeyboard/index.js +3 -0
  116. package/es/pro/priceKeyboard/index.less +215 -0
  117. package/es/pro/priceKeyboard/utils.d.ts +31 -0
  118. package/es/pro/priceKeyboard/utils.js +51 -0
  119. package/es/pro/skuDetailModal/index.js +19 -16
  120. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  121. package/lib/components/booking/addons/model.d.ts +10 -1
  122. package/lib/components/booking/components/actionButtons/index.js +31 -28
  123. package/lib/components/booking/components/actionButtons/index.less +0 -28
  124. package/lib/components/booking/components/footer/amount.d.ts +3 -3
  125. package/lib/components/booking/components/footer/amount.js +10 -4
  126. package/lib/components/booking/components/footer/index.js +107 -40
  127. package/lib/components/booking/components/footer/utils.js +35 -7
  128. package/lib/components/booking/forms/model.d.ts +10 -1
  129. package/lib/components/booking/info/model.d.ts +10 -1
  130. package/lib/components/booking/info/model.js +3 -0
  131. package/lib/components/booking/info/service/addService/index.js +2 -1
  132. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  133. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  134. package/lib/components/booking/info2/index.js +18 -1
  135. package/lib/components/booking/info2/service/addService/index.js +2 -1
  136. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  137. package/lib/components/booking/info2/service/editService/index.js +12 -4
  138. package/lib/components/booking/model.d.ts +9 -1
  139. package/lib/components/booking/notes/model.d.ts +10 -1
  140. package/lib/components/booking/payments/model.d.ts +10 -1
  141. package/lib/components/booking/utils.d.ts +2 -2
  142. package/lib/components/checkout/PaymentModal.d.ts +2 -0
  143. package/lib/components/checkout/PaymentModal.js +152 -73
  144. package/lib/components/checkout/components/AdditionalModule/index.less +1 -1
  145. package/lib/components/checkout/components/AmountSummary/index.js +114 -40
  146. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +5 -3
  147. package/lib/components/checkout/components/CashPaymentModule/index.js +103 -140
  148. package/lib/components/checkout/components/CashPaymentModule/index.less +200 -176
  149. package/lib/components/checkout/components/PaymentDetailModal/index.js +2 -2
  150. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +29 -0
  151. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +172 -0
  152. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +2 -4
  153. package/lib/components/checkout/components/PaymentOptionsModule/index.js +11 -123
  154. package/lib/components/checkout/components/PaymentOptionsModule/index.less +29 -0
  155. package/lib/components/checkout/components/SavePayLaterHandler/index.js +1 -1
  156. package/lib/components/checkout/components/SearchAndClientModule/index.js +3 -29
  157. package/lib/components/checkout/components/WalletPassModule/index.js +3 -2
  158. package/lib/components/checkout/components/WalletPassModule/utils.js +4 -1
  159. package/lib/components/checkout/hooks/useWalletPass.js +2 -0
  160. package/lib/components/checkout/index.less +1 -1
  161. package/lib/components/checkout/locales.d.ts +33 -0
  162. package/lib/components/checkout/locales.js +39 -3
  163. package/lib/components/checkout/types.d.ts +1 -0
  164. package/lib/components/eftposPay/amount.d.ts +1 -1
  165. package/lib/components/eftposPay/device.d.ts +1 -1
  166. package/lib/components/eftposPay/hooks.d.ts +2 -2
  167. package/lib/components/eftposPay/store/index.d.ts +5 -5
  168. package/lib/components/pay/toC/model.d.ts +9 -1
  169. package/lib/components/schedules/model.d.ts +9 -1
  170. package/lib/components/shoppingCart/components/Cart/Product.js +111 -51
  171. package/lib/components/shoppingCart/components/Cart/index.js +1 -1
  172. package/lib/components/shoppingCart/components/Cart/index.less +31 -0
  173. package/lib/components/shoppingCart/locales.d.ts +3 -0
  174. package/lib/components/shoppingCart/locales.js +6 -3
  175. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +7 -7
  176. package/lib/components/ticketBooking/index.js +5 -1
  177. package/lib/components/ticketBooking/utils/index.js +2 -1
  178. package/lib/components/wallet/Detail/model.d.ts +13 -1
  179. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  180. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  181. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  182. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  183. package/lib/components/wallet/model.d.ts +9 -1
  184. package/lib/pro/pisellPriceKeyboardPopover/PisellPriceKeyboardPopover.js +2 -2
  185. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.d.ts +5 -0
  186. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.js +144 -0
  187. package/lib/pro/pisellSimplePriceKeyboardPopover/PisellPriceKeyboardPopover.less +23 -0
  188. package/lib/pro/pisellSimplePriceKeyboardPopover/index.d.ts +2 -0
  189. package/lib/pro/pisellSimplePriceKeyboardPopover/index.js +35 -0
  190. package/lib/pro/pisellSimplePriceKeyboardPopover/types.d.ts +33 -0
  191. package/lib/pro/pisellSimplePriceKeyboardPopover/types.js +17 -0
  192. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.d.ts +4 -0
  193. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +332 -0
  194. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.d.ts +13 -0
  195. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardSimple.js +399 -0
  196. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +11 -0
  197. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +76 -0
  198. package/lib/pro/priceKeyboard/components/cashKeyboard/index.less +103 -0
  199. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.d.ts +39 -0
  200. package/lib/pro/priceKeyboard/components/cashKeyboard/locales.js +65 -0
  201. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +97 -0
  202. package/lib/pro/priceKeyboard/components/cashKeyboard/types.js +17 -0
  203. package/lib/pro/priceKeyboard/components/discountKeyboard/index.d.ts +22 -0
  204. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +485 -0
  205. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +47 -0
  206. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.d.ts +42 -0
  207. package/lib/pro/priceKeyboard/components/discountKeyboard/locales.js +68 -0
  208. package/lib/pro/priceKeyboard/components/discountKeyboard/types.d.ts +17 -0
  209. package/lib/pro/priceKeyboard/components/discountKeyboard/types.js +17 -0
  210. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.d.ts +11 -0
  211. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.js +488 -0
  212. package/lib/pro/priceKeyboard/components/paymentKeyboard/index.less +64 -0
  213. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.d.ts +45 -0
  214. package/lib/pro/priceKeyboard/components/paymentKeyboard/locales.js +71 -0
  215. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.d.ts +39 -0
  216. package/lib/pro/priceKeyboard/components/paymentKeyboard/types.js +17 -0
  217. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +17 -0
  218. package/lib/pro/priceKeyboard/components/shortcuts/index.js +79 -0
  219. package/lib/pro/priceKeyboard/components/shortcuts/index.less +39 -0
  220. package/lib/pro/priceKeyboard/hooks/keyActions.d.ts +28 -0
  221. package/lib/pro/priceKeyboard/hooks/keyActions.js +176 -0
  222. package/lib/pro/priceKeyboard/hooks/rightItems.d.ts +27 -0
  223. package/lib/pro/priceKeyboard/hooks/rightItems.js +81 -0
  224. package/lib/pro/priceKeyboard/index.d.ts +3 -0
  225. package/lib/pro/priceKeyboard/index.js +45 -0
  226. package/lib/pro/priceKeyboard/index.less +215 -0
  227. package/lib/pro/priceKeyboard/utils.d.ts +31 -0
  228. package/lib/pro/priceKeyboard/utils.js +75 -0
  229. package/lib/pro/skuDetailModal/index.js +18 -22
  230. package/package.json +3 -3
@@ -0,0 +1,64 @@
1
+ .pisell-pro-price-keyboard-payment-container {
2
+ width: 380px;
3
+ padding: 10px;
4
+ border-radius: 10px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 10px;
8
+ background-color: var(--pisell-pro-price-keyboard-wrapper-bg-color, #ffffff);
9
+
10
+ .ellipsis {
11
+ overflow: hidden;
12
+ text-overflow: ellipsis;
13
+ white-space: nowrap;
14
+ }
15
+
16
+ // 复写Segmented样式
17
+ .pisell-lowcode-segmented {
18
+ background-color: var(
19
+ --pisell-pro-price-keyboard-bg-color-gray-200,
20
+ #eaecf0
21
+ );
22
+ color: var(--pisell-pro-price-keyboard-text-gray-500, #667085);
23
+ }
24
+
25
+ .pisell-pro-price-keyboard-title {
26
+ font-size: 20px;
27
+ font-weight: 600;
28
+ color: var(--pisell-pro-price-keyboard-text-gray-900, #101828);
29
+ }
30
+ .pisell-pro-price-keyboard-subtitle {
31
+ font-size: 16px;
32
+ font-weight: 400;
33
+ color: var(--pisell-pro-price-keyboard-text-gray-500, #667085);
34
+ }
35
+
36
+ .pisell-pro-price-keyboard-input-tip {
37
+ color: #475467;
38
+ font-size: 14px;
39
+ font-weight: 400;
40
+ }
41
+
42
+ .pisell-pro-price-keyboard-payment {
43
+ width: 100%;
44
+ padding: 10px;
45
+ border-radius: 10px;
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: 8px;
49
+ background-color: var(
50
+ --pisell-pro-price-keyboard-bg-color-gray-300,
51
+ #d0d5dd
52
+ );
53
+ }
54
+ }
55
+
56
+ .pisell-payment-keyboard-modal {
57
+ .pisell-lowcode-modal-content {
58
+ background-color: transparent;
59
+ }
60
+
61
+ .pisell-lowcode-modal-close {
62
+ display: none;
63
+ }
64
+ }
@@ -0,0 +1,45 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'payment-keyboard-payment': string;
4
+ 'payment-keyboard-surcharge': string;
5
+ 'payment-keyboard-percent': string;
6
+ 'payment-keyboard-fixed': string;
7
+ 'payment-keyboard-max': string;
8
+ 'payment-keyboard-remaining': string;
9
+ 'payment-keyboard-change-due': string;
10
+ 'payment-keyboard-total-amount-due': string;
11
+ 'payment-keyboard-inc-surcharge': string;
12
+ 'payment-keyboard-reset': string;
13
+ 'payment-keyboard-done': string;
14
+ 'payment-keyboard-pay': string;
15
+ };
16
+ 'zh-CN': {
17
+ 'payment-keyboard-payment': string;
18
+ 'payment-keyboard-surcharge': string;
19
+ 'payment-keyboard-percent': string;
20
+ 'payment-keyboard-change-due': string;
21
+ 'payment-keyboard-fixed': string;
22
+ 'payment-keyboard-max': string;
23
+ 'payment-keyboard-remaining': string;
24
+ 'payment-keyboard-total-amount-due': string;
25
+ 'payment-keyboard-inc-surcharge': string;
26
+ 'payment-keyboard-reset': string;
27
+ 'payment-keyboard-done': string;
28
+ 'payment-keyboard-pay': string;
29
+ };
30
+ 'zh-HK': {
31
+ 'payment-keyboard-payment': string;
32
+ 'payment-keyboard-surcharge': string;
33
+ 'payment-keyboard-percent': string;
34
+ 'payment-keyboard-fixed': string;
35
+ 'payment-keyboard-max': string;
36
+ 'payment-keyboard-remaining': string;
37
+ 'payment-keyboard-change-due': string;
38
+ 'payment-keyboard-total-amount-due': string;
39
+ 'payment-keyboard-inc-surcharge': string;
40
+ 'payment-keyboard-reset': string;
41
+ 'payment-keyboard-done': string;
42
+ 'payment-keyboard-pay': string;
43
+ };
44
+ };
45
+ export default _default;
@@ -0,0 +1,71 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/pro/priceKeyboard/components/paymentKeyboard/locales.ts
20
+ var locales_exports = {};
21
+ __export(locales_exports, {
22
+ default: () => locales_default
23
+ });
24
+ module.exports = __toCommonJS(locales_exports);
25
+ var locales_default = {
26
+ en: {
27
+ // Payment Keyboard Module
28
+ "payment-keyboard-payment": "Payment",
29
+ "payment-keyboard-surcharge": "Surcharge",
30
+ "payment-keyboard-percent": "percent",
31
+ "payment-keyboard-fixed": "fixed",
32
+ "payment-keyboard-max": "Max Amount",
33
+ "payment-keyboard-remaining": "Remaining",
34
+ "payment-keyboard-change-due": "Change Due",
35
+ "payment-keyboard-total-amount-due": "Total Amount Due",
36
+ "payment-keyboard-inc-surcharge": "Inc. Surcharge",
37
+ "payment-keyboard-reset": "Reset",
38
+ "payment-keyboard-done": "Done",
39
+ "payment-keyboard-pay": "Pay"
40
+ },
41
+ "zh-CN": {
42
+ // 支付键盘模块
43
+ "payment-keyboard-payment": "支付",
44
+ "payment-keyboard-surcharge": "手续费",
45
+ "payment-keyboard-percent": "百分比",
46
+ "payment-keyboard-change-due": "找零",
47
+ "payment-keyboard-fixed": "固定金额",
48
+ "payment-keyboard-max": "最大支付金额",
49
+ "payment-keyboard-remaining": "剩余待支付",
50
+ "payment-keyboard-total-amount-due": "应付总额",
51
+ "payment-keyboard-inc-surcharge": "包含手续费",
52
+ "payment-keyboard-reset": "重置",
53
+ "payment-keyboard-done": "确认",
54
+ "payment-keyboard-pay": "支付"
55
+ },
56
+ "zh-HK": {
57
+ // 支付鍵盤模組
58
+ "payment-keyboard-payment": "支付",
59
+ "payment-keyboard-surcharge": "手續費",
60
+ "payment-keyboard-percent": "百分比",
61
+ "payment-keyboard-fixed": "固定金額",
62
+ "payment-keyboard-max": "最大支付金額",
63
+ "payment-keyboard-remaining": "剩餘待支付",
64
+ "payment-keyboard-change-due": "找零",
65
+ "payment-keyboard-total-amount-due": "應付總額",
66
+ "payment-keyboard-inc-surcharge": "包含手續費",
67
+ "payment-keyboard-reset": "重置",
68
+ "payment-keyboard-done": "確認",
69
+ "payment-keyboard-pay": "支付"
70
+ }
71
+ };
@@ -0,0 +1,39 @@
1
+ export declare type SurchargeValue = {
2
+ percent?: string;
3
+ fixed?: string;
4
+ };
5
+ export interface PaymentKeyboardBaseProps {
6
+ /** 自定义支付允许超出最大值, EFTPOS不允许 */
7
+ enableExceedMaxAmount?: boolean;
8
+ /** payment 原始值 */
9
+ paymentOriginalValue?: string;
10
+ /** payment 当前值 */
11
+ paymentValue?: string;
12
+ /** payment 默认值, 非受控 */
13
+ paymentDefaultValue?: string;
14
+ /** surcharge 原始值 */
15
+ surchargeOriginalValue?: SurchargeValue;
16
+ /** surcharge 当前值 */
17
+ surchargeValue?: SurchargeValue;
18
+ /** surcharge 默认值, 非受控 */
19
+ surchargeDefaultValue?: SurchargeValue;
20
+ onReset?: () => void;
21
+ onPay?: (args: {
22
+ surcharge: SurchargeValue;
23
+ amount: string;
24
+ }) => void;
25
+ onChange?: (v: string | SurchargeValue) => void;
26
+ payment?: {
27
+ enable?: boolean;
28
+ };
29
+ surcharge?: {
30
+ enable?: boolean;
31
+ };
32
+ title?: {
33
+ text?: string;
34
+ };
35
+ subTitle?: {
36
+ text?: string;
37
+ };
38
+ [key: string]: any;
39
+ }
@@ -0,0 +1,17 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from === "object" || typeof from === "function") {
7
+ for (let key of __getOwnPropNames(from))
8
+ if (!__hasOwnProp.call(to, key) && key !== except)
9
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
+ }
11
+ return to;
12
+ };
13
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
+
15
+ // src/pro/priceKeyboard/components/paymentKeyboard/types.ts
16
+ var types_exports = {};
17
+ module.exports = __toCommonJS(types_exports);
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type ShortcutsItem = {
4
+ label: string;
5
+ value: number | string;
6
+ style?: React.CSSProperties;
7
+ onClick?: (item: ShortcutsItem, _next: () => void) => void;
8
+ render?: (item: ShortcutsItem) => React.ReactNode;
9
+ disabled?: boolean;
10
+ };
11
+ export interface ShortcutsProps {
12
+ presets?: ShortcutsItem[];
13
+ onChange?: (val: string) => void;
14
+ disabled?: boolean;
15
+ }
16
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ShortcutsProps & React.RefAttributes<HTMLDivElement>>>;
17
+ export default _default;
@@ -0,0 +1,79 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/pro/priceKeyboard/components/shortcuts/index.tsx
30
+ var shortcuts_exports = {};
31
+ __export(shortcuts_exports, {
32
+ default: () => shortcuts_default
33
+ });
34
+ module.exports = __toCommonJS(shortcuts_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_classnames = __toESM(require("classnames"));
37
+ var import_index = require("./index.less");
38
+ var Shortcuts = (0, import_react.forwardRef)((props, ref) => {
39
+ const { presets, onChange, disabled } = props;
40
+ const handleItemClick = (item) => {
41
+ if (disabled || item.disabled) {
42
+ return;
43
+ }
44
+ if (item.onClick) {
45
+ const _next = () => onChange == null ? void 0 : onChange(`${item.value}`);
46
+ item.onClick(item, _next);
47
+ } else {
48
+ onChange == null ? void 0 : onChange(`${item.value}`);
49
+ }
50
+ };
51
+ return (0, import_react.useMemo)(() => {
52
+ if (!(presets == null ? void 0 : presets.length)) {
53
+ return null;
54
+ }
55
+ return /* @__PURE__ */ import_react.default.createElement(
56
+ "div",
57
+ {
58
+ ref,
59
+ className: (0, import_classnames.default)("pisell-virtual-keyboard-shortcuts", {
60
+ disabled: props.disabled
61
+ })
62
+ },
63
+ presets.map((item, index) => {
64
+ var _a;
65
+ const itemProps = {
66
+ key: index,
67
+ className: (0, import_classnames.default)("pisell-virtual-keyboard-shortcut", {
68
+ disabled: item.disabled
69
+ }),
70
+ style: item.style,
71
+ onClick: () => handleItemClick(item)
72
+ };
73
+ return /* @__PURE__ */ import_react.default.createElement("div", { ...itemProps }, ((_a = item.render) == null ? void 0 : _a.call(item, item)) || item.label);
74
+ })
75
+ );
76
+ }, [presets, onChange, ref]);
77
+ });
78
+ Shortcuts.displayName = "Shortcuts";
79
+ var shortcuts_default = (0, import_react.memo)(Shortcuts);
@@ -0,0 +1,39 @@
1
+ .pisell-virtual-keyboard-shortcuts {
2
+ display: grid;
3
+ grid-template-columns: repeat(4, 1fr);
4
+ gap: 4px 8px;
5
+ overflow: hidden;
6
+
7
+ &.disabled {
8
+ .pisell-virtual-keyboard-shortcut {
9
+ cursor: not-allowed;
10
+ pointer-events: none;
11
+ color: #98a2b3 !important;
12
+ background: #f2f4f7 !important;
13
+ border-color: #d0d5dd !important;
14
+ }
15
+ }
16
+
17
+ .pisell-virtual-keyboard-shortcut {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ height: 40px;
22
+ border-radius: 8px;
23
+ border: 1px solid var(--Gray-300, #e9d7fe);
24
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
25
+ background: var(--Primary-25, #fcfaff);
26
+ font-weight: 600;
27
+ color: #6941c6;
28
+ cursor: pointer;
29
+ position: relative;
30
+
31
+ &.disabled {
32
+ cursor: not-allowed;
33
+ pointer-events: none;
34
+ color: #98a2b3 !important;
35
+ background: #f2f4f7 !important;
36
+ border-color: #d0d5dd !important;
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 键盘输入处理 Hook
3
+ * @param params 配置参数
4
+ * @param params.onChange 值变化回调
5
+ * @param params.onEnter 确认回调
6
+ * @param params.onReset 重置回调
7
+ * @param params.value 当前值
8
+ * @param params.min 最小值限制
9
+ * @param params.max 最大值限制
10
+ * @param params.scale 小数位数限制
11
+ * @param params.mode 输入模式:'append' 追加模式(默认)| 'replace' 替换模式
12
+ */
13
+ declare const useKeyActions: (params: {
14
+ onChange?: ((val: string) => void) | undefined;
15
+ onEnter?: ((val: string) => void) | undefined;
16
+ onReset?: (() => void) | undefined;
17
+ value?: string | undefined;
18
+ min?: number | undefined;
19
+ max?: number | undefined;
20
+ mode?: "replace" | "append" | undefined;
21
+ scale?: number | undefined;
22
+ }) => {
23
+ handleChange: (val?: string | number) => void;
24
+ error: {
25
+ msg: string;
26
+ } | null;
27
+ };
28
+ export default useKeyActions;
@@ -0,0 +1,176 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/pro/priceKeyboard/hooks/keyActions.ts
20
+ var keyActions_exports = {};
21
+ __export(keyActions_exports, {
22
+ default: () => keyActions_default
23
+ });
24
+ module.exports = __toCommonJS(keyActions_exports);
25
+ var import_react = require("react");
26
+ var import_utils = require("@pisell/utils");
27
+ var useKeyActions = (params) => {
28
+ const [error, setError] = (0, import_react.useState)(null);
29
+ const { onChange, onEnter, onReset, value = "", min, max, mode = "append", scale } = params;
30
+ const checkScale = (0, import_react.useCallback)(
31
+ (val) => {
32
+ if (scale === void 0) return true;
33
+ const decimalIndex = val.indexOf(".");
34
+ if (decimalIndex === -1) return true;
35
+ const decimalPart = val.substring(decimalIndex + 1);
36
+ return decimalPart.length <= scale;
37
+ },
38
+ [scale]
39
+ );
40
+ const validateRange = (0, import_react.useCallback)(
41
+ (val) => {
42
+ const trimmedVal = val.trim();
43
+ const numVal = Number(trimmedVal);
44
+ if (isNaN(numVal)) {
45
+ const errorMsg = "invalid";
46
+ setError({ msg: errorMsg });
47
+ return { isValid: false, errorMsg };
48
+ }
49
+ if (min !== void 0 && numVal < min) {
50
+ const errorMsg = "invalid";
51
+ setError({ msg: errorMsg });
52
+ return { isValid: false, errorMsg };
53
+ }
54
+ if (max !== void 0 && numVal > max) {
55
+ const errorMsg = "invalid";
56
+ setError({ msg: errorMsg });
57
+ return { isValid: false, errorMsg };
58
+ }
59
+ setError(null);
60
+ return { isValid: true };
61
+ },
62
+ [min, max]
63
+ );
64
+ const handleChangeValue = (0, import_react.useCallback)(
65
+ (val) => {
66
+ if (!checkScale(val)) {
67
+ return { isValid: false, errorMsg: "decimal_places_exceeded" };
68
+ }
69
+ const validation = validateRange(val);
70
+ if (validation.isValid) {
71
+ onChange == null ? void 0 : onChange(val);
72
+ }
73
+ return validation;
74
+ },
75
+ [onChange, validateRange, checkScale]
76
+ );
77
+ const handleNumberInput = (0, import_react.useCallback)(
78
+ (inputVal) => {
79
+ const numStr = String(inputVal);
80
+ if (mode === "replace") {
81
+ return handleChangeValue(numStr);
82
+ }
83
+ if (!value) {
84
+ return handleChangeValue(numStr);
85
+ }
86
+ if (/^0+$/.test(value)) {
87
+ if (numStr === "0") {
88
+ return handleChangeValue(value + "0");
89
+ } else {
90
+ return handleChangeValue(numStr);
91
+ }
92
+ }
93
+ if (/^0\.\d*$/.test(value)) {
94
+ return handleChangeValue(value + numStr);
95
+ }
96
+ if (/^0+\d+$/.test(value)) {
97
+ const withoutLeadingZeros = value.replace(/^0+/, "");
98
+ return handleChangeValue(withoutLeadingZeros + numStr);
99
+ }
100
+ return handleChangeValue(value + numStr);
101
+ },
102
+ [mode, value, handleChangeValue]
103
+ );
104
+ const handleDecimalInput = (0, import_react.useCallback)(() => {
105
+ if (mode === "replace") {
106
+ return handleChangeValue("0.");
107
+ }
108
+ if (value.includes(".")) {
109
+ return;
110
+ }
111
+ if (!value) {
112
+ return handleChangeValue("0.");
113
+ }
114
+ if (/^0+$/.test(value)) {
115
+ return handleChangeValue("0.");
116
+ }
117
+ if (/^0+\d+$/.test(value)) {
118
+ const withoutLeadingZeros = value.replace(/^0+/, "");
119
+ return handleChangeValue(withoutLeadingZeros + ".");
120
+ }
121
+ return handleChangeValue(value + ".");
122
+ }, [mode, value, handleChangeValue]);
123
+ const handleOtherInput = (0, import_react.useCallback)(
124
+ (inputVal) => {
125
+ const inputStr = String(inputVal);
126
+ if (mode === "replace") {
127
+ return handleChangeValue(inputStr);
128
+ }
129
+ return handleChangeValue(value + inputStr);
130
+ },
131
+ [mode, value, handleChangeValue]
132
+ );
133
+ const handleKeyInput = (0, import_react.useCallback)(
134
+ (val) => {
135
+ switch (val) {
136
+ case void 0:
137
+ break;
138
+ case "ok":
139
+ case "enter":
140
+ case "done":
141
+ const validation = validateRange(value);
142
+ if (validation.isValid) {
143
+ onEnter == null ? void 0 : onEnter(value);
144
+ }
145
+ break;
146
+ case "reset":
147
+ setError(null);
148
+ onReset == null ? void 0 : onReset();
149
+ break;
150
+ case "clear":
151
+ setError(null);
152
+ handleChangeValue("");
153
+ break;
154
+ case "delete":
155
+ handleChangeValue(value.slice(0, -1));
156
+ break;
157
+ case ".":
158
+ handleDecimalInput();
159
+ break;
160
+ default:
161
+ if ((0, import_utils.isNumber)(val) || String(val) === "0") {
162
+ handleNumberInput(val);
163
+ } else {
164
+ handleOtherInput(val);
165
+ }
166
+ break;
167
+ }
168
+ },
169
+ [value, validateRange, onEnter, onReset, handleChangeValue, handleDecimalInput, handleNumberInput, handleOtherInput]
170
+ );
171
+ return {
172
+ handleChange: handleKeyInput,
173
+ error
174
+ };
175
+ };
176
+ var keyActions_default = useKeyActions;
@@ -0,0 +1,27 @@
1
+ declare const useRightItems: (props: {
2
+ rightItemsStyle?: any;
3
+ doneText?: string;
4
+ resetText?: string;
5
+ }) => ({
6
+ value: string;
7
+ label: JSX.Element;
8
+ disabled: boolean;
9
+ type: string;
10
+ style: any;
11
+ size?: undefined;
12
+ } | {
13
+ value: string;
14
+ label: string;
15
+ disabled: boolean;
16
+ type: string;
17
+ style: any;
18
+ size?: undefined;
19
+ } | {
20
+ value: string;
21
+ label: string;
22
+ disabled: boolean;
23
+ type: string;
24
+ size: number;
25
+ style: any;
26
+ })[];
27
+ export default useRightItems;