@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
@@ -0,0 +1,81 @@
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/hooks/rightItems.tsx
30
+ var rightItems_exports = {};
31
+ __export(rightItems_exports, {
32
+ default: () => rightItems_default
33
+ });
34
+ module.exports = __toCommonJS(rightItems_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_materials = require("@pisell/materials");
37
+ var useRightItems = (props) => {
38
+ const { rightItemsStyle, doneText, resetText } = props;
39
+ const rightItems = (0, import_react.useMemo)(() => {
40
+ return [
41
+ {
42
+ value: "delete",
43
+ label: /* @__PURE__ */ import_react.default.createElement(import_materials.Icon, { type: "pisell2-delete" }),
44
+ disabled: false,
45
+ type: "text",
46
+ style: {
47
+ color: (rightItemsStyle == null ? void 0 : rightItemsStyle.textColor) || "#000000",
48
+ backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.buttonBackgroundColor) || "#ffffff",
49
+ ...(rightItemsStyle == null ? void 0 : rightItemsStyle.deleteButtonStyle) || {}
50
+ }
51
+ },
52
+ {
53
+ value: "reset",
54
+ label: resetText || "Reset",
55
+ disabled: false,
56
+ type: "text",
57
+ style: {
58
+ fontSize: "18px",
59
+ color: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonTextColor) || "#D92D20",
60
+ backgroundColor: (rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonBackgroundColor) || "#ffffff",
61
+ ...(rightItemsStyle == null ? void 0 : rightItemsStyle.resetButtonStyle) || {}
62
+ }
63
+ },
64
+ {
65
+ value: "done",
66
+ label: doneText || "Done",
67
+ disabled: false,
68
+ type: "primary",
69
+ size: 2,
70
+ style: {
71
+ fontSize: "18px",
72
+ background: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "var(--theme-color)" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonBackgroundColor) || "#5d3f9f",
73
+ color: (rightItemsStyle == null ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) ? "#ffffff" : (rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonTextColor) || "#ffffff",
74
+ ...(rightItemsStyle == null ? void 0 : rightItemsStyle.doneButtonStyle) || {}
75
+ }
76
+ }
77
+ ];
78
+ }, [doneText, resetText, rightItemsStyle]);
79
+ return rightItems;
80
+ };
81
+ var rightItems_default = useRightItems;
@@ -0,0 +1,3 @@
1
+ export { default as CashKeyboard } from './components/cashKeyboard';
2
+ export { default as PaymentKeyboard } from './components/paymentKeyboard';
3
+ export { default as DiscountKeyboard } from './components/discountKeyboard';
@@ -0,0 +1,45 @@
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/index.tsx
30
+ var priceKeyboard_exports = {};
31
+ __export(priceKeyboard_exports, {
32
+ CashKeyboard: () => import_cashKeyboard.default,
33
+ DiscountKeyboard: () => import_discountKeyboard.default,
34
+ PaymentKeyboard: () => import_paymentKeyboard.default
35
+ });
36
+ module.exports = __toCommonJS(priceKeyboard_exports);
37
+ var import_cashKeyboard = __toESM(require("./components/cashKeyboard"));
38
+ var import_paymentKeyboard = __toESM(require("./components/paymentKeyboard"));
39
+ var import_discountKeyboard = __toESM(require("./components/discountKeyboard"));
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ CashKeyboard,
43
+ DiscountKeyboard,
44
+ PaymentKeyboard
45
+ });
@@ -0,0 +1,215 @@
1
+ .price-keyboard {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 20px;
5
+ background-color: #ffffff;
6
+ border-radius: 12px;
7
+ padding: 20px;
8
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
9
+ }
10
+
11
+ .price-keyboard-inputs {
12
+ display: flex;
13
+ flex-direction: column;
14
+ gap: 16px;
15
+ }
16
+
17
+ .price-keyboard-inputs-default {
18
+ display: flex;
19
+ flex-direction: column;
20
+ gap: 16px;
21
+ }
22
+
23
+ .price-keyboard-input-wrapper {
24
+ display: flex;
25
+ align-items: center;
26
+ padding: 12px 16px;
27
+ background-color: #f9fafb;
28
+ border: 1px solid #d0d5dd;
29
+ border-radius: 8px;
30
+ transition: all 0.2s ease;
31
+
32
+ &:hover {
33
+ border-color: #98a2b3;
34
+ }
35
+
36
+ &:focus-within {
37
+ border-color: #1570ef;
38
+ box-shadow: 0 0 0 3px rgba(21, 112, 239, 0.1);
39
+ }
40
+ }
41
+
42
+ .price-keyboard-input {
43
+ flex: 1;
44
+ }
45
+
46
+ .price-keyboard-keyboard {
47
+ display: flex;
48
+ gap: 12px;
49
+ }
50
+
51
+ .price-keyboard-keyboard-numbers {
52
+ flex: 1;
53
+ display: grid;
54
+ grid-template-columns: repeat(3, 1fr);
55
+ gap: 8px;
56
+ }
57
+
58
+ .price-keyboard-keyboard-actions {
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: 8px;
62
+ width: 80px;
63
+ }
64
+
65
+ .price-keyboard-key {
66
+ display: flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ height: 48px;
70
+ border: 1px solid #d0d5dd;
71
+ border-radius: 8px;
72
+ background-color: #ffffff;
73
+ color: #344054;
74
+ font-size: 16px;
75
+ font-weight: 500;
76
+ cursor: pointer;
77
+ transition: all 0.2s ease;
78
+ outline: none;
79
+
80
+ &:hover {
81
+ background-color: #f9fafb;
82
+ border-color: #98a2b3;
83
+ }
84
+
85
+ &:active {
86
+ background-color: #f2f4f7;
87
+ transform: translateY(1px);
88
+ }
89
+
90
+ &:disabled {
91
+ opacity: 0.5;
92
+ cursor: not-allowed;
93
+
94
+ &:hover {
95
+ background-color: #ffffff;
96
+ border-color: #d0d5dd;
97
+ transform: none;
98
+ }
99
+ }
100
+
101
+ &.price-keyboard-key-primary {
102
+ background-color: #1570ef;
103
+ color: #ffffff;
104
+ border-color: #1570ef;
105
+
106
+ &:hover {
107
+ background-color: #1366d9;
108
+ border-color: #1366d9;
109
+ }
110
+
111
+ &:active {
112
+ background-color: #0f5bc4;
113
+ border-color: #0f5bc4;
114
+ }
115
+ }
116
+
117
+ &.price-keyboard-key-size-2 {
118
+ height: 104px; /* 48px * 2 + 8px gap */
119
+ }
120
+
121
+ &.price-keyboard-key-size-3 {
122
+ height: 160px; /* 48px * 3 + 16px gap */
123
+ }
124
+ }
125
+
126
+ .price-keyboard-delete-icon {
127
+ width: 20px;
128
+ height: 20px;
129
+ }
130
+
131
+ /* 响应式设计 */
132
+ @media (max-width: 768px) {
133
+ .price-keyboard {
134
+ padding: 16px;
135
+ gap: 16px;
136
+ }
137
+
138
+ .price-keyboard-keyboard {
139
+ flex-direction: column;
140
+ gap: 16px;
141
+ }
142
+
143
+ .price-keyboard-keyboard-actions {
144
+ flex-direction: row;
145
+ width: auto;
146
+ height: auto;
147
+ }
148
+
149
+ .price-keyboard-key {
150
+ height: 44px;
151
+ font-size: 14px;
152
+ }
153
+
154
+ .price-keyboard-key.price-keyboard-key-size-2 {
155
+ height: 44px;
156
+ flex: 2;
157
+ }
158
+
159
+ .price-keyboard-key.price-keyboard-key-size-3 {
160
+ height: 44px;
161
+ flex: 3;
162
+ }
163
+ }
164
+
165
+ /* 深色主题支持 */
166
+ @media (prefers-color-scheme: dark) {
167
+ .price-keyboard {
168
+ background-color: #1f2937;
169
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
170
+ }
171
+
172
+ .price-keyboard-input-wrapper {
173
+ background-color: #374151;
174
+ border-color: #4b5563;
175
+
176
+ &:hover {
177
+ border-color: #6b7280;
178
+ }
179
+
180
+ &:focus-within {
181
+ border-color: #3b82f6;
182
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
183
+ }
184
+ }
185
+
186
+ .price-keyboard-key {
187
+ background-color: #374151;
188
+ border-color: #4b5563;
189
+ color: #f9fafb;
190
+
191
+ &:hover {
192
+ background-color: #4b5563;
193
+ border-color: #6b7280;
194
+ }
195
+
196
+ &:active {
197
+ background-color: #6b7280;
198
+ }
199
+
200
+ &.price-keyboard-key-primary {
201
+ background-color: #3b82f6;
202
+ border-color: #3b82f6;
203
+
204
+ &:hover {
205
+ background-color: #2563eb;
206
+ border-color: #2563eb;
207
+ }
208
+
209
+ &:active {
210
+ background-color: #1d4ed8;
211
+ border-color: #1d4ed8;
212
+ }
213
+ }
214
+ }
215
+ }
@@ -0,0 +1,31 @@
1
+ export declare const DEFAULT_THEME_CONFIG: {
2
+ dark: {
3
+ titleColor: string;
4
+ subtitleColor: string;
5
+ keyboardBgColor: string;
6
+ keyboardWrapperBgColor: string;
7
+ bgColor: string;
8
+ bgColorGray200: string;
9
+ bgColorGray300: string;
10
+ textGray500: string;
11
+ textGray600: string;
12
+ textGray900: string;
13
+ };
14
+ light: {
15
+ titleColor: string;
16
+ subtitleColor: string;
17
+ keyboardBgColor: string;
18
+ keyboardWrapperBgColor: string;
19
+ bgColor: string;
20
+ bgColorGray200: string;
21
+ bgColorGray300: string;
22
+ textGray500: string;
23
+ textGray600: string;
24
+ textGray900: string;
25
+ };
26
+ };
27
+ /**
28
+ * 设置键盘主题
29
+ * @param theme 主题
30
+ */
31
+ export declare const setKeyboardTheme: (theme?: 'dark' | 'light') => void;
@@ -0,0 +1,75 @@
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/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ DEFAULT_THEME_CONFIG: () => DEFAULT_THEME_CONFIG,
23
+ setKeyboardTheme: () => setKeyboardTheme
24
+ });
25
+ module.exports = __toCommonJS(utils_exports);
26
+ var import_utils = require("@pisell/utils");
27
+ var DEFAULT_THEME_CONFIG = {
28
+ dark: {
29
+ titleColor: "#FFFFFF",
30
+ subtitleColor: "#D0D5DD",
31
+ keyboardBgColor: "rgba(0, 0, 0, 0.4)",
32
+ keyboardWrapperBgColor: "rgba(0, 0, 0, 0.7)",
33
+ bgColor: "rgba(0, 0, 0, 0.70)",
34
+ bgColorGray200: "rgba(0, 0, 0, 0.40)",
35
+ bgColorGray300: "rgba(0, 0, 0, 0.40)",
36
+ textGray500: "#D0D5DD",
37
+ textGray600: "#FFFFFF",
38
+ textGray900: "#FFFFFF"
39
+ },
40
+ light: {
41
+ titleColor: "#101828",
42
+ subtitleColor: "#667085",
43
+ keyboardBgColor: "#D0D5DD",
44
+ keyboardWrapperBgColor: "white",
45
+ bgColor: "#FFFFFF",
46
+ bgColorGray200: "#EAECF0",
47
+ bgColorGray300: "#D0D5DD",
48
+ textGray500: "#667085",
49
+ textGray600: "#475467",
50
+ textGray900: "#101828"
51
+ }
52
+ };
53
+ var setKeyboardTheme = (theme) => {
54
+ const currentTheme = DEFAULT_THEME_CONFIG[theme || "light"];
55
+ (0, import_utils.setTheme)({
56
+ // 标题颜色
57
+ "--pisell-pro-price-keyboard-title-color": currentTheme.titleColor,
58
+ // 副标题颜色
59
+ "--pisell-pro-price-keyboard-subtitle-color": currentTheme.subtitleColor,
60
+ // 背景颜色梯度
61
+ "--pisell-pro-price-keyboard-wrapper-bg-color": currentTheme.keyboardWrapperBgColor,
62
+ "--pisell-pro-price-keyboard-bg-color": currentTheme.keyboardBgColor,
63
+ "--pisell-pro-price-keyboard-bg-color-gray-200": currentTheme.bgColorGray200,
64
+ "--pisell-pro-price-keyboard-bg-color-gray-300": currentTheme.bgColorGray300,
65
+ // 文本颜色梯度
66
+ "--pisell-pro-price-keyboard-text-gray-500": currentTheme.textGray500,
67
+ "--pisell-pro-price-keyboard-text-gray-600": currentTheme.textGray600,
68
+ "--pisell-pro-price-keyboard-text-gray-900": currentTheme.textGray900
69
+ });
70
+ };
71
+ // Annotate the CommonJS export names for ESM import in node:
72
+ 0 && (module.exports = {
73
+ DEFAULT_THEME_CONFIG,
74
+ setKeyboardTheme
75
+ });
@@ -35,8 +35,6 @@ module.exports = __toCommonJS(skuDetailModal_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_materials = require("@pisell/materials");
37
37
  var import_decimal = __toESM(require("decimal.js"));
38
- var import_materials2 = require("@pisell/materials");
39
- var import_react_dom = require("react-dom");
40
38
  var import_cloneDeep = __toESM(require("lodash/cloneDeep"));
41
39
  var import_utils = require("@pisell/utils");
42
40
  var import_Delete_wght300_24px = __toESM(require("@pisell/icon/es/Delete_wght300_24px"));
@@ -45,6 +43,7 @@ var import_index = require("./index.less");
45
43
  var import_pisellNumberSelector = __toESM(require("../pisellNumberSelector"));
46
44
  var import_noteModal = __toESM(require("../../plus/noteModal"));
47
45
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
46
+ var import_priceKeyboard = require("../priceKeyboard");
48
47
  var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
49
48
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
50
49
  const [open, setOpen] = (0, import_react.useState)(false);
@@ -301,26 +300,23 @@ var SkuDetailModal = ({ onConfirm, onRemove, onClose }, ref) => {
301
300
  onDelete: onNoteDelete
302
301
  }
303
302
  ),
304
- showPriceAdjustModal && (0, import_react_dom.createPortal)(
305
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-price-adjust-overlay" }, /* @__PURE__ */ import_react.default.createElement(
306
- "div",
307
- {
308
- className: "pisell-price-adjust-backdrop",
309
- onMouseDown: (e) => {
310
- e.preventDefault();
311
- setShowPriceAdjustModal(false);
312
- }
313
- }
314
- ), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-price-adjust-container" }, /* @__PURE__ */ import_react.default.createElement(
315
- import_materials2.PisellAdjustPrice,
316
- {
317
- originValue: priceOverride,
318
- value: priceOverride,
319
- onChange: handlePriceAdjustConfirm,
320
- selectType: "dark"
321
- }
322
- ))),
323
- document.body
303
+ /* @__PURE__ */ import_react.default.createElement(
304
+ import_priceKeyboard.DiscountKeyboard,
305
+ {
306
+ containerProps: {
307
+ renderType: "modal",
308
+ open: showPriceAdjustModal,
309
+ onCancel: () => setShowPriceAdjustModal(false)
310
+ },
311
+ enableExceedMaxAmount: true,
312
+ originalValue: priceOverride,
313
+ defaultValue: priceOverride,
314
+ onEnter: (discountAmount) => {
315
+ const finalPrice = new import_decimal.default(priceOverride || 0).minus(discountAmount).toNumber();
316
+ handlePriceAdjustConfirm(finalPrice);
317
+ },
318
+ selectType: "dark"
319
+ }
324
320
  )
325
321
  ));
326
322
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.4.42",
3
+ "version": "6.4.44",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -60,8 +60,8 @@
60
60
  "react-resizable": "^3.0.5",
61
61
  "styled-components": "^6.0.0-rc.3",
62
62
  "@pisell/icon": "0.0.11",
63
+ "@pisell/materials": "6.4.9",
63
64
  "@pisell/utils": "3.0.2",
64
- "@pisell/materials": "6.4.8",
65
65
  "@pisell/date-picker": "3.0.7"
66
66
  },
67
67
  "peerDependencies": {