@pisell/private-materials 6.2.29 → 6.2.30

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 (89) 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 +29 -13
  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/components/actionButtons/index.d.ts +2 -0
  13. package/es/components/booking/components/actionButtons/index.js +105 -14
  14. package/es/components/booking/components/actionButtons/index.less +71 -4
  15. package/es/components/booking/components/footer/index.js +8 -4
  16. package/es/components/booking/components/footer/index.less +3 -2
  17. package/es/components/booking/components/footer/utils.js +1 -0
  18. package/es/components/booking/components/tabPane/index.js +6 -20
  19. package/es/components/booking/components/tabPane/index.less +1 -1
  20. package/es/components/booking/components/voucher/index.js +7 -4
  21. package/es/components/booking/components/voucherModal/index.d.ts +19 -0
  22. package/es/components/booking/components/voucherModal/index.js +47 -0
  23. package/es/components/booking/components/voucherModal/index.less +23 -0
  24. package/es/components/booking/forms/forms.js +1 -1
  25. package/es/components/booking/info/index.less +1 -1
  26. package/es/components/booking/info/pet/index.less +1 -1
  27. package/es/components/booking/info/service/index.less +1 -1
  28. package/es/components/booking/locales.d.ts +3 -0
  29. package/es/components/booking/locales.js +13 -7
  30. package/es/components/booking/utils.d.ts +2 -2
  31. package/es/components/eftposPay/amount.d.ts +1 -1
  32. package/es/components/eftposPay/device.d.ts +1 -1
  33. package/es/components/eftposPay/hooks.d.ts +2 -2
  34. package/es/components/eftposPay/store/index.d.ts +6 -6
  35. package/es/components/productSelect/components/productGroup/index.js +20 -4
  36. package/es/components/productSelect/components/productGroup/index.less +17 -0
  37. package/es/components/schedules/utils.d.ts +1 -1
  38. package/es/components/shoppingCart/components/Cart/Product.js +4 -1
  39. package/es/components/shoppingCart/components/Cart/index.less +1 -1
  40. package/es/components/ticketBooking/components/ticketBooking/index.js +6 -1
  41. package/es/components/ticketBooking/components/ticketBooking/index.less +1 -1
  42. package/es/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
  43. package/es/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  44. package/es/components/ticketBooking/hooks/pisellos/useScanManager.js +20 -0
  45. package/es/components/ticketBooking/locales.d.ts +3 -0
  46. package/es/components/ticketBooking/locales.js +3 -0
  47. package/es/plus/clientCard/index.less +0 -6
  48. package/es/pro/pisellNumberSelector/index.js +40 -21
  49. package/es/utils/index.d.ts +1 -1
  50. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  51. package/lib/components/booking/components/actionButtons/index.d.ts +2 -0
  52. package/lib/components/booking/components/actionButtons/index.js +73 -12
  53. package/lib/components/booking/components/actionButtons/index.less +71 -4
  54. package/lib/components/booking/components/footer/index.js +4 -1
  55. package/lib/components/booking/components/footer/index.less +3 -2
  56. package/lib/components/booking/components/footer/utils.js +1 -0
  57. package/lib/components/booking/components/tabPane/index.js +5 -26
  58. package/lib/components/booking/components/tabPane/index.less +1 -1
  59. package/lib/components/booking/components/voucher/index.js +5 -4
  60. package/lib/components/booking/components/voucherModal/index.d.ts +19 -0
  61. package/lib/components/booking/components/voucherModal/index.js +83 -0
  62. package/lib/components/booking/components/voucherModal/index.less +23 -0
  63. package/lib/components/booking/forms/forms.js +1 -1
  64. package/lib/components/booking/info/index.less +1 -1
  65. package/lib/components/booking/info/pet/index.less +1 -1
  66. package/lib/components/booking/info/service/index.less +1 -1
  67. package/lib/components/booking/locales.d.ts +3 -0
  68. package/lib/components/booking/locales.js +13 -7
  69. package/lib/components/booking/utils.d.ts +2 -2
  70. package/lib/components/eftposPay/amount.d.ts +1 -1
  71. package/lib/components/eftposPay/device.d.ts +1 -1
  72. package/lib/components/eftposPay/hooks.d.ts +2 -2
  73. package/lib/components/eftposPay/store/index.d.ts +6 -6
  74. package/lib/components/productSelect/components/productGroup/index.js +16 -3
  75. package/lib/components/productSelect/components/productGroup/index.less +17 -0
  76. package/lib/components/schedules/utils.d.ts +1 -1
  77. package/lib/components/shoppingCart/components/Cart/Product.js +3 -1
  78. package/lib/components/shoppingCart/components/Cart/index.less +1 -1
  79. package/lib/components/ticketBooking/components/ticketBooking/index.js +5 -1
  80. package/lib/components/ticketBooking/components/ticketBooking/index.less +1 -1
  81. package/lib/components/ticketBooking/hooks/pisellos/useCustomer.js +5 -2
  82. package/lib/components/ticketBooking/hooks/pisellos/useScanManager.d.ts +6 -0
  83. package/lib/components/ticketBooking/hooks/pisellos/useScanManager.js +44 -0
  84. package/lib/components/ticketBooking/locales.d.ts +3 -0
  85. package/lib/components/ticketBooking/locales.js +3 -0
  86. package/lib/plus/clientCard/index.less +0 -6
  87. package/lib/pro/pisellNumberSelector/index.js +27 -17
  88. package/lib/utils/index.d.ts +1 -1
  89. package/package.json +4 -4
@@ -77,7 +77,7 @@ var locales_default = {
77
77
  "pisell2.text.holder": "Holder",
78
78
  "pisell2.text.warnings": "Warnings",
79
79
  "pisell2.text.order-notes": "Order notes",
80
- "pisell2.text.add-order-notes": "Add Order note",
80
+ "pisell2.text.add-order-notes": "Add Order Note",
81
81
  "pisell2.text.add-internal-notes": "Add Internal note",
82
82
  "pisell2.text.add-notes": "Add Notes",
83
83
  "pisell2.text.notes": "Notes",
@@ -299,8 +299,8 @@ var locales_default = {
299
299
  "pisell2.text.cancel": "Cancel",
300
300
  // Action Buttons
301
301
  "pisell2.action-buttons.clear": "Clear",
302
- "pisell2.action-buttons.manuel-order": "Manual\nOrder $",
303
- "pisell2.action-buttons.customise-item": "Customise Item",
302
+ "pisell2.action-buttons.manuel-order": "Manual\nOrder $",
303
+ "pisell2.action-buttons.customise-item": "Cust.\nItem",
304
304
  "pisell2.action-buttons.no-items-to-adjust": "No items in cart to adjust price.",
305
305
  "pisell2.action-buttons.adjust-order-price": "Adjust Order Price",
306
306
  "pisell2.action-buttons.price-adjusted-success": "Order price adjusted successfully.",
@@ -324,6 +324,8 @@ var locales_default = {
324
324
  "pisell2.clear-cart-modal.clear-items-only": "Clear Items Only",
325
325
  "pisell2.clear-cart-modal.clear-all-reset": "Clear All &\nReset Cart",
326
326
  "pisell2.clear-cart-modal.empty-cart-tip": "Cart is empty",
327
+ // Voucher Modal
328
+ "pisell2.voucher-modal.title": "Vouchers & Discounts",
327
329
  "pisell2.text.change.pet.title": "You have changed the holder information. Do you want to keep the items under their name?",
328
330
  "pisell2.text.change.pet.content": "Selecting “Keep” will move the items to Open Items. Selecting “Discard” will clear all items under the holder’s name.",
329
331
  "pisell2.text.change.pet.content1": "Reservation-type items cannot be added to the Open Items cart and will be removed.",
@@ -636,8 +638,8 @@ var locales_default = {
636
638
  "pisell2.text.cancel": "取消",
637
639
  // Action Buttons
638
640
  "pisell2.action-buttons.clear": "清空",
639
- "pisell2.action-buttons.manuel-order": "手动\n订单 $",
640
- "pisell2.action-buttons.customise-item": "自定义商品",
641
+ "pisell2.action-buttons.manuel-order": "手动\n订单 $",
642
+ "pisell2.action-buttons.customise-item": "自定义\n商品",
641
643
  "pisell2.action-buttons.no-items-to-adjust": "购物车中没有商品可调整价格。",
642
644
  "pisell2.action-buttons.adjust-order-price": "调整订单价格",
643
645
  "pisell2.action-buttons.price-adjusted-success": "订单价格调整成功。",
@@ -661,6 +663,8 @@ var locales_default = {
661
663
  "pisell2.clear-cart-modal.clear-items-only": "仅清空商品",
662
664
  "pisell2.clear-cart-modal.clear-all-reset": "清空所有内容\n并重置购物车",
663
665
  "pisell2.clear-cart-modal.empty-cart-tip": "当前购物车为空",
666
+ // Voucher Modal
667
+ "pisell2.voucher-modal.title": "券码管理",
664
668
  "pisell2.text.change.pet.title": "您已变更持有人信息,是否保留该持有人名下的商品?",
665
669
  "pisell2.text.change.pet.content": "选择“保留”将商品添加到未分配商品(公共购物车)中;选择“不保留”将清空该持有人名下的所有商品。",
666
670
  "pisell2.text.change.pet.content1": "预约类商品无法添加到公共购物车,将会被删除。",
@@ -973,8 +977,8 @@ var locales_default = {
973
977
  "pisell2.text.cancel": "取消",
974
978
  // Action Buttons
975
979
  "pisell2.action-buttons.clear": "清空",
976
- "pisell2.action-buttons.manuel-order": "手動\n訂單 $",
977
- "pisell2.action-buttons.customise-item": "自定義商品",
980
+ "pisell2.action-buttons.manuel-order": "手動\n訂單 $",
981
+ "pisell2.action-buttons.customise-item": "自定義\n商品",
978
982
  "pisell2.action-buttons.no-items-to-adjust": "購物車中沒有商品可調整價格。",
979
983
  "pisell2.action-buttons.adjust-order-price": "調整訂單價格",
980
984
  "pisell2.action-buttons.price-adjusted-success": "訂單價格調整成功。",
@@ -998,6 +1002,8 @@ var locales_default = {
998
1002
  "pisell2.clear-cart-modal.clear-items-only": "僅清空商品",
999
1003
  "pisell2.clear-cart-modal.clear-all-reset": "清空所有內容\n並重置購物車",
1000
1004
  "pisell2.clear-cart-modal.empty-cart-tip": "當前購物車為空",
1005
+ // Voucher Modal
1006
+ "pisell2.voucher-modal.title": "券碼管理",
1001
1007
  "pisell2.text.change.pet.title": "您已變更持有人信息,是否保留該持有人名下的商品?",
1002
1008
  "pisell2.text.change.pet.content": "選擇“保留”將商品添加到未分配商品(公共購物車)中;選擇“不保留”將清空該持有人名下的所有商品。",
1003
1009
  "pisell2.text.change.pet.content1": "預約類商品無法添加到公共購物車,將會被刪除。",
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | {
168
+ }) => number | "flexible" | {
169
169
  type: string;
170
170
  value: number;
171
- } | "flexible";
171
+ };
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  export {};
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "success" | "loading" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -295,20 +295,20 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
298
+ mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
301
- action?: "amount" | "deviceList" | "pay" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
301
+ action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "step" | "unset" | undefined;
306
+ type?: "unset" | "step" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -71,6 +71,12 @@ var ProductGroup = ({
71
71
  }
72
72
  return `${import_utils.locales.getText("pisell2.product-select.stock")}:${item.stock_quantity}`;
73
73
  };
74
+ const getTextCover = (title) => {
75
+ if (!title) return "";
76
+ const cleanTitle = title.trim();
77
+ if (cleanTitle.length === 0) return "";
78
+ return cleanTitle.substring(0, 2).toUpperCase();
79
+ };
74
80
  const renderPrice = (item) => {
75
81
  const {
76
82
  price: _price,
@@ -93,11 +99,11 @@ var ProductGroup = ({
93
99
  className: (0, import_classnames.default)("product-card", {
94
100
  selected: currentProductId && item.id === currentProductId
95
101
  }),
96
- onClick: () => {
102
+ onPointerUp: () => {
97
103
  onSelectProduct == null ? void 0 : onSelectProduct(item);
98
104
  }
99
105
  },
100
- isProductCover && item.cover ? /* @__PURE__ */ import_react.default.createElement(
106
+ isProductCover ? /* @__PURE__ */ import_react.default.createElement(
101
107
  "div",
102
108
  {
103
109
  className: "card-left",
@@ -106,13 +112,20 @@ var ProductGroup = ({
106
112
  height: imgHeight || "auto"
107
113
  }
108
114
  },
109
- /* @__PURE__ */ import_react.default.createElement(
115
+ item.cover ? /* @__PURE__ */ import_react.default.createElement(
110
116
  "img",
111
117
  {
112
118
  loading: "lazy",
113
119
  src: item.cover,
114
120
  style: { borderRadius: radius }
115
121
  }
122
+ ) : /* @__PURE__ */ import_react.default.createElement(
123
+ "div",
124
+ {
125
+ className: "text-cover",
126
+ style: { borderRadius: radius }
127
+ },
128
+ getTextCover(item.title)
116
129
  )
117
130
  ) : null,
118
131
  /* @__PURE__ */ import_react.default.createElement("div", { className: "card-right" }, !!isTitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "title" }, item.title) : null, !!isSubtitle && item.subtitle ? /* @__PURE__ */ import_react.default.createElement("div", { className: "subtitle" }, item.subtitle) : null, !!isStock && !!item.is_track ? /* @__PURE__ */ import_react.default.createElement("div", { className: "stock" }, getStockText(item)) : null, renderPrice(item))
@@ -106,6 +106,23 @@
106
106
  height: 100%;
107
107
  object-fit: cover;
108
108
  }
109
+
110
+ .text-cover {
111
+ width: 100%;
112
+ height: 100%;
113
+ display: flex;
114
+ align-items: center;
115
+ justify-content: center;
116
+ background: #dedede;
117
+ color: #6c6c6c;
118
+ font-size: 60px;
119
+ font-weight: 600;
120
+ text-align: center;
121
+ line-height: 1;
122
+ letter-spacing: 1px;
123
+ border-radius: 8px;
124
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
125
+ }
109
126
  }
110
127
 
111
128
  .card-right {
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -127,6 +127,7 @@ var Product = (props) => {
127
127
  color: "#667085"
128
128
  }
129
129
  ],
130
+ escapeDom: ".pisell-number-selector-popover",
130
131
  key: item._id,
131
132
  dataSource: item,
132
133
  onAction: (e) => onAction == null ? void 0 : onAction(e),
@@ -139,7 +140,8 @@ var Product = (props) => {
139
140
  onChangeHolder: (e) => handleChange(item, "change_holder", e),
140
141
  onAddHolder: (e) => handleChange(item, "add_holder", e),
141
142
  ...productParams,
142
- ...getProductCardStyleProps(isRetail ? "retail" : "appointment")
143
+ ...getProductCardStyleProps(isRetail ? "retail" : "appointment"),
144
+ scenario: state.scenario
143
145
  }
144
146
  );
145
147
  }), !hideAddBtn && platform !== "h5" && isAdd ? (0, import_useAddService.default)(id, "more") : null);
@@ -18,7 +18,7 @@
18
18
  .pisell-lowcode__shopping-cart-content {
19
19
  display: flex;
20
20
  flex-direction: column;
21
- gap: 16px;
21
+ gap: 8px;
22
22
 
23
23
  .pisell-lowcode-product-card {
24
24
  margin-bottom: 0;
@@ -58,6 +58,7 @@ var import_index = require("./index.less");
58
58
  var import_utils4 = require("../bookingDataPanel/bookingList/utils");
59
59
  var import_pisellos = require("../../hooks/pisellos");
60
60
  var import_ahooks = require("ahooks");
61
+ var import_useScanManager = __toESM(require("../../hooks/pisellos/useScanManager"));
61
62
  var _formatBookingDetail = (data, modalState) => {
62
63
  var _a, _b, _c, _d;
63
64
  let {
@@ -263,6 +264,7 @@ var TicketBooking = () => {
263
264
  const bookingTicket = (0, import_bookingTicket.useBookingTicket)();
264
265
  const { openScan, closeScan } = (0, import_useScanGlobal.default)();
265
266
  const handleScan = (0, import_useScanGlobalHandle.default)();
267
+ const { enableAllScanListeners } = (0, import_useScanManager.default)();
266
268
  const changeCustomerToGlobalState = (0, import_ahooks.useMemoizedFn)(() => {
267
269
  });
268
270
  const { selectCustomer } = (0, import_pisellos.useCustomer)({
@@ -314,6 +316,7 @@ var TicketBooking = () => {
314
316
  _initFn(() => {
315
317
  });
316
318
  selectCustomer(null);
319
+ enableAllScanListeners();
317
320
  }
318
321
  );
319
322
  (_e2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _e2.mountFunction(
@@ -321,6 +324,7 @@ var TicketBooking = () => {
321
324
  "voidBooking",
322
325
  (orderId) => {
323
326
  (0, import_serve.voidAppointment)(orderId);
327
+ enableAllScanListeners();
324
328
  }
325
329
  );
326
330
  return () => {
@@ -998,7 +1002,7 @@ var TicketBooking = () => {
998
1002
  {
999
1003
  style: {
1000
1004
  flexShrink: 0,
1001
- width: 355
1005
+ width: 400
1002
1006
  }
1003
1007
  },
1004
1008
  /* @__PURE__ */ import_react.default.createElement(
@@ -11,7 +11,7 @@
11
11
  }
12
12
  }
13
13
  .pisell-lowcode__booking-tab-pane-footer {
14
- padding: 16px;
14
+ padding: 8px 10px;
15
15
  }
16
16
  .create-booking-page-info-wrap-create {
17
17
  background-color: #1b1b1b;
@@ -106,10 +106,13 @@ var useCustomer = (props) => {
106
106
  setLoading(false);
107
107
  });
108
108
  const selectCustomer = (0, import_ahooks.useMemoizedFn)((customer) => {
109
- bookingTicket.setActiveCustomer(customer);
109
+ var _a, _b;
110
+ (_a = bookingTicket == null ? void 0 : bookingTicket.setActiveCustomer) == null ? void 0 : _a.call(bookingTicket, customer);
111
+ (_b = props.changeCustomerToGlobalState) == null ? void 0 : _b.call(props, customer);
110
112
  });
111
113
  const addCustomerToFirst = (0, import_ahooks.useMemoizedFn)((customer) => {
112
- bookingTicket.addCustomerToFirst(customer);
114
+ var _a;
115
+ (_a = bookingTicket == null ? void 0 : bookingTicket.addCustomerToFirst) == null ? void 0 : _a.call(bookingTicket, customer);
113
116
  });
114
117
  return {
115
118
  // 客户列表
@@ -0,0 +1,6 @@
1
+ declare const useScanManager: () => {
2
+ disableAllScanListeners: () => void;
3
+ enableAllScanListeners: () => void;
4
+ clearAllScanListenersTaskQueue: () => void;
5
+ };
6
+ export default useScanManager;
@@ -0,0 +1,44 @@
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/components/ticketBooking/hooks/pisellos/useScanManager.ts
20
+ var useScanManager_exports = {};
21
+ __export(useScanManager_exports, {
22
+ default: () => useScanManager_default
23
+ });
24
+ module.exports = __toCommonJS(useScanManager_exports);
25
+ var import_bookingTicket = require("./bookingTicket");
26
+ var import_ahooks = require("ahooks");
27
+ var useScanManager = () => {
28
+ const bookingTicket = (0, import_bookingTicket.useBookingTicket)();
29
+ const disableAllScanListeners = (0, import_ahooks.useMemoizedFn)(() => {
30
+ bookingTicket.disableAllScanListeners();
31
+ });
32
+ const enableAllScanListeners = (0, import_ahooks.useMemoizedFn)(() => {
33
+ bookingTicket.enableAllScanListeners();
34
+ });
35
+ const clearAllScanListenersTaskQueue = (0, import_ahooks.useMemoizedFn)(() => {
36
+ bookingTicket.clearAllScanListenersTaskQueue();
37
+ });
38
+ return {
39
+ disableAllScanListeners,
40
+ enableAllScanListeners,
41
+ clearAllScanListenersTaskQueue
42
+ };
43
+ };
44
+ var useScanManager_default = useScanManager;
@@ -2,6 +2,7 @@ declare const _default: {
2
2
  en: {
3
3
  'pisell2.ticket-booking.info': string;
4
4
  'pisell2.ticket-booking.notes': string;
5
+ 'pisell2.ticket-booking.note': string;
5
6
  'pisell2.ticket-booking.forms': string;
6
7
  'pisell2.ticket-booking.sales': string;
7
8
  'pisell2.ticket-booking.payment': string;
@@ -60,6 +61,7 @@ declare const _default: {
60
61
  'zh-CN': {
61
62
  'pisell2.ticket-booking.info': string;
62
63
  'pisell2.ticket-booking.notes': string;
64
+ 'pisell2.ticket-booking.note': string;
63
65
  'pisell2.ticket-booking.forms': string;
64
66
  'pisell2.ticket-booking.sales': string;
65
67
  'pisell2.ticket-booking.payment': string;
@@ -118,6 +120,7 @@ declare const _default: {
118
120
  'zh-HK': {
119
121
  'pisell2.ticket-booking.info': string;
120
122
  'pisell2.ticket-booking.notes': string;
123
+ 'pisell2.ticket-booking.note': string;
121
124
  'pisell2.ticket-booking.forms': string;
122
125
  'pisell2.ticket-booking.sales': string;
123
126
  'pisell2.ticket-booking.payment': string;
@@ -26,6 +26,7 @@ var locales_default = {
26
26
  en: {
27
27
  "pisell2.ticket-booking.info": "Info",
28
28
  "pisell2.ticket-booking.notes": "Notes",
29
+ "pisell2.ticket-booking.note": "Note",
29
30
  "pisell2.ticket-booking.forms": "Forms",
30
31
  "pisell2.ticket-booking.sales": "Sales",
31
32
  "pisell2.ticket-booking.payment": "Payment",
@@ -84,6 +85,7 @@ var locales_default = {
84
85
  "zh-CN": {
85
86
  "pisell2.ticket-booking.info": "信息",
86
87
  "pisell2.ticket-booking.notes": "备注",
88
+ "pisell2.ticket-booking.note": "备注",
87
89
  "pisell2.ticket-booking.forms": "表单",
88
90
  "pisell2.ticket-booking.sales": "销售",
89
91
  "pisell2.ticket-booking.payment": "付款",
@@ -142,6 +144,7 @@ var locales_default = {
142
144
  "zh-HK": {
143
145
  "pisell2.ticket-booking.info": "資訊",
144
146
  "pisell2.ticket-booking.notes": "備註",
147
+ "pisell2.ticket-booking.note": "備註",
145
148
  "pisell2.ticket-booking.forms": "表单",
146
149
  "pisell2.ticket-booking.sales": "銷售",
147
150
  "pisell2.ticket-booking.payment": "付款",
@@ -411,12 +411,6 @@
411
411
  text-align: center;
412
412
  }
413
413
 
414
- .pisell-client-card__name-tags {
415
- justify-content: center;
416
- flex-direction: column;
417
- gap: 8px;
418
- }
419
-
420
414
  .pisell-client-card__fields {
421
415
  align-items: center;
422
416
  }
@@ -55,6 +55,7 @@ var PisellNumberSelector = ({
55
55
  }) => {
56
56
  const [open, setOpen] = (0, import_react.useState)(false);
57
57
  const [inputValue, setInputValue] = (0, import_react.useState)(value.toString());
58
+ const [tempValue, setTempValue] = (0, import_react.useState)(value.toString());
58
59
  const KeyboardItems = (0, import_react.useMemo)(() => {
59
60
  return [
60
61
  {
@@ -145,20 +146,21 @@ var PisellNumberSelector = ({
145
146
  };
146
147
  const handleChange = (e) => {
147
148
  if (!e) {
148
- onChange == null ? void 0 : onChange(min);
149
+ setTempValue(min.toString());
149
150
  return;
150
151
  }
151
152
  if (e === "delete") {
152
- onChange == null ? void 0 : onChange(Number(inputValue.slice(0, -1)));
153
+ const newTempValue = tempValue.slice(0, -1);
154
+ setTempValue(newTempValue || "0");
153
155
  return;
154
156
  } else if (e === "verify") {
155
- const newValue = parseInt(inputValue) || 0;
157
+ const newValue = parseInt(tempValue) || 0;
156
158
  const clampedValue = Math.max(min, Math.min(max, newValue));
157
159
  onChange == null ? void 0 : onChange(clampedValue);
158
160
  setOpen(false);
159
161
  return;
160
162
  } else {
161
- onChange == null ? void 0 : onChange(Number(e));
163
+ setTempValue(e);
162
164
  }
163
165
  };
164
166
  const adjustPriceContent = (0, import_react.useMemo)(() => {
@@ -166,20 +168,35 @@ var PisellNumberSelector = ({
166
168
  return /* @__PURE__ */ import_react.default.createElement(
167
169
  import_numberKeyboard.default,
168
170
  {
169
- selectType: "dark",
170
- value: value.toString(),
171
+ value: tempValue,
171
172
  max,
172
173
  onChange: handleChange,
173
174
  onOk: () => {
175
+ const newValue = parseInt(tempValue) || 0;
176
+ const clampedValue = Math.max(min, Math.min(max, newValue));
177
+ onChange == null ? void 0 : onChange(clampedValue);
174
178
  setOpen(false);
175
179
  }
176
180
  }
177
181
  );
178
- }, [enablePriceAdjust, inputValue, KeyboardItems, max]);
182
+ }, [enablePriceAdjust, tempValue, max, handleChange]);
179
183
  const handleNumberClick = () => {
180
184
  if (disabled) return;
181
185
  if (enablePriceAdjust) {
182
- setInputValue(value.toString());
186
+ setTempValue(value.toString());
187
+ }
188
+ };
189
+ const handleOpenChange = (visible) => {
190
+ setOpen(visible);
191
+ if (visible) {
192
+ setTempValue(value.toString());
193
+ } else {
194
+ const tempNumber = parseInt(tempValue) || 0;
195
+ const clampedValue = Math.max(min, Math.min(max, tempNumber));
196
+ if (clampedValue !== value) {
197
+ onChange == null ? void 0 : onChange(clampedValue);
198
+ }
199
+ setTempValue(value.toString());
183
200
  }
184
201
  };
185
202
  const numberDisplayElement = enablePriceAdjust ? /* @__PURE__ */ import_react.default.createElement(
@@ -209,20 +226,13 @@ var PisellNumberSelector = ({
209
226
  content: adjustPriceContent,
210
227
  trigger: ["click"],
211
228
  overlayInnerStyle: { padding: 0 },
212
- onOpenChange: (visible) => {
213
- setOpen(visible);
214
- if (visible) {
215
- setInputValue(value.toString());
216
- } else {
217
- setInputValue(value.toString());
218
- }
219
- },
220
229
  destroyTooltipOnHide: true,
221
230
  arrow: false,
222
231
  align: {
223
232
  offset: [0, 0]
224
233
  },
225
- overlayClassName: "pisell-number-selector-popover"
234
+ overlayClassName: "pisell-number-selector-popover",
235
+ onOpenChange: handleOpenChange
226
236
  },
227
237
  numberDisplayElement
228
238
  ) : numberDisplayElement;
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.2.29",
3
+ "version": "6.2.30",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "react-resizable": "^3.0.5",
61
61
  "styled-components": "^6.0.0-rc.3",
62
+ "@pisell/materials": "6.2.29",
62
63
  "@pisell/icon": "0.0.11",
63
- "@pisell/materials": "6.2.28",
64
- "@pisell/utils": "3.0.0",
65
- "@pisell/date-picker": "3.0.4"
64
+ "@pisell/date-picker": "3.0.4",
65
+ "@pisell/utils": "3.0.0"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",