@pisell/private-materials 6.4.73 → 6.4.74

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 (95) 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 +4 -4
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +5 -5
  11. package/es/components/booking/components/footer/index.js +62 -53
  12. package/es/components/booking/info/service2/utils.d.ts +1 -1
  13. package/es/components/booking/utils.d.ts +2 -2
  14. package/es/components/checkout/PaymentModal.js +178 -108
  15. package/es/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  16. package/es/components/checkout/components/AdditionalModule/index.js +44 -12
  17. package/es/components/checkout/components/AmountSummary/index.js +9 -76
  18. package/es/components/checkout/components/AmountSummary/index.less +1 -1
  19. package/es/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  20. package/es/components/checkout/components/CashPaymentModule/index.js +5 -2
  21. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  22. package/es/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +6 -1
  23. package/es/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  24. package/es/components/checkout/components/PaymentOptionsModule/index.js +2 -1
  25. package/es/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  26. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  27. package/es/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +31 -8
  28. package/es/components/checkout/components/PaymentResultToast/index.js +6 -6
  29. package/es/components/checkout/components/PaymentResultToast/index.less +94 -33
  30. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  31. package/es/components/checkout/index.less +1 -1
  32. package/es/components/checkout/locales.d.ts +3 -0
  33. package/es/components/checkout/locales.js +3 -0
  34. package/es/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  35. package/es/components/eftposPay/amount.d.ts +1 -1
  36. package/es/components/eftposPay/device.d.ts +1 -1
  37. package/es/components/eftposPay/hooks.d.ts +1 -1
  38. package/es/components/eftposPay/store/index.d.ts +2 -2
  39. package/es/components/ticketBooking/components/timeBar/index.js +112 -7
  40. package/es/components/ticketBooking/components/timeBar/index.less +59 -0
  41. package/es/components/ticketBooking/locales.d.ts +6 -0
  42. package/es/components/ticketBooking/locales.js +9 -3
  43. package/es/components/ticketBooking/utils/index.d.ts +1 -1
  44. package/es/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +11 -7
  45. package/es/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  46. package/es/pro/priceKeyboard/components/cashKeyboard/index.js +4 -2
  47. package/es/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  48. package/es/pro/priceKeyboard/components/discountKeyboard/index.js +10 -1
  49. package/es/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  50. package/es/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  51. package/es/pro/priceKeyboard/components/shortcuts/index.js +5 -2
  52. package/es/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  53. package/lib/components/booking/components/footer/index.js +15 -8
  54. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  55. package/lib/components/booking/utils.d.ts +2 -2
  56. package/lib/components/checkout/PaymentModal.js +73 -11
  57. package/lib/components/checkout/components/AdditionalModule/index.d.ts +3 -1
  58. package/lib/components/checkout/components/AdditionalModule/index.js +44 -11
  59. package/lib/components/checkout/components/AmountSummary/index.js +5 -46
  60. package/lib/components/checkout/components/AmountSummary/index.less +1 -1
  61. package/lib/components/checkout/components/CashPaymentModule/index.d.ts +3 -1
  62. package/lib/components/checkout/components/CashPaymentModule/index.js +5 -2
  63. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.d.ts +2 -0
  64. package/lib/components/checkout/components/PaymentOptionsModule/PaymentMethodItem.js +5 -1
  65. package/lib/components/checkout/components/PaymentOptionsModule/index.d.ts +1 -0
  66. package/lib/components/checkout/components/PaymentOptionsModule/index.js +6 -0
  67. package/lib/components/checkout/components/PaymentOptionsModule/index.less +4 -0
  68. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.d.ts +4 -0
  69. package/lib/components/checkout/components/PaymentResultToast/PaymentResultToastProvider.js +23 -5
  70. package/lib/components/checkout/components/PaymentResultToast/index.js +4 -4
  71. package/lib/components/checkout/components/PaymentResultToast/index.less +94 -33
  72. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  73. package/lib/components/checkout/index.less +1 -1
  74. package/lib/components/checkout/locales.d.ts +3 -0
  75. package/lib/components/checkout/locales.js +3 -0
  76. package/lib/components/checkout/utils/PaymentResultToastUtils.js +11 -1
  77. package/lib/components/eftposPay/amount.d.ts +1 -1
  78. package/lib/components/eftposPay/device.d.ts +1 -1
  79. package/lib/components/eftposPay/hooks.d.ts +1 -1
  80. package/lib/components/eftposPay/store/index.d.ts +2 -2
  81. package/lib/components/ticketBooking/components/timeBar/index.js +105 -4
  82. package/lib/components/ticketBooking/components/timeBar/index.less +59 -0
  83. package/lib/components/ticketBooking/locales.d.ts +6 -0
  84. package/lib/components/ticketBooking/locales.js +9 -3
  85. package/lib/components/ticketBooking/utils/index.d.ts +1 -1
  86. package/lib/pro/priceKeyboard/components/cashKeyboard/CashKeyboardIntact.js +9 -5
  87. package/lib/pro/priceKeyboard/components/cashKeyboard/index.d.ts +1 -0
  88. package/lib/pro/priceKeyboard/components/cashKeyboard/index.js +3 -2
  89. package/lib/pro/priceKeyboard/components/cashKeyboard/types.d.ts +1 -0
  90. package/lib/pro/priceKeyboard/components/discountKeyboard/index.js +8 -1
  91. package/lib/pro/priceKeyboard/components/discountKeyboard/index.less +14 -0
  92. package/lib/pro/priceKeyboard/components/shortcuts/index.d.ts +1 -0
  93. package/lib/pro/priceKeyboard/components/shortcuts/index.js +3 -2
  94. package/lib/pro/priceKeyboard/components/shortcuts/index.less +4 -0
  95. package/package.json +1 -1
@@ -17,6 +17,7 @@
17
17
  margin: 0 !important;
18
18
  pointer-events: none !important; // 让Toast Modal Wrap点击穿透
19
19
 
20
+ // 非 mask 模式下的样式
20
21
  .ant-modal {
21
22
  position: static !important;
22
23
  top: auto !important;
@@ -32,11 +33,47 @@
32
33
  }
33
34
  }
34
35
 
36
+ // mask 模式下的全局样式(Modal 渲染到 body)
37
+ .toast-modal-wrap-with-mask {
38
+ position: fixed !important;
39
+ top: 0 !important;
40
+ left: 0 !important;
41
+ right: 0 !important;
42
+ bottom: 0 !important;
43
+ width: 100vw !important;
44
+ height: 100vh !important;
45
+ display: flex !important;
46
+ align-items: center !important;
47
+ justify-content: center !important;
48
+ pointer-events: auto !important; // mask 模式下需要响应点击
49
+
50
+ .ant-modal-mask {
51
+ position: fixed !important;
52
+ top: 0 !important;
53
+ left: 0 !important;
54
+ right: 0 !important;
55
+ bottom: 0 !important;
56
+ width: 100vw !important;
57
+ height: 100vh !important;
58
+ }
59
+
60
+ .ant-modal {
61
+ position: relative !important;
62
+ top: auto !important;
63
+ left: auto !important;
64
+ transform: none !important;
65
+ margin: 0 !important;
66
+ padding: 0 !important;
67
+ width: auto !important;
68
+ max-width: none !important;
69
+ pointer-events: auto !important; // Modal 内容可以响应点击
70
+ }
71
+ }
72
+
35
73
  // Toast容器样式 - 用于多实例定位
36
74
  [data-toast-id] {
37
75
  z-index: 1000;
38
76
  position: fixed !important;
39
- left: 96px !important;
40
77
  /* 注意:不设置bottom的!important,让JavaScript可以动态更新 */
41
78
  /* 移除强制的z-index设置,让Toast使用默认层级 */
42
79
  pointer-events: none !important; // 让Toast容器本身点击穿透
@@ -45,6 +82,23 @@
45
82
  width: auto !important;
46
83
  height: auto !important;
47
84
 
85
+ // 非 mask 模式下使用左下角定位
86
+ &:not([data-mask="true"]) {
87
+ left: 96px !important;
88
+ }
89
+
90
+ // mask 模式下,Modal 会渲染到 body,容器只作为占位符
91
+ // 不需要设置定位,因为 Modal 已经独立渲染
92
+ &[data-mask="true"] {
93
+ // 容器在 mask 模式下不需要定位,Modal 会独立渲染到 body
94
+ position: static !important;
95
+ left: auto !important;
96
+ top: auto !important;
97
+ bottom: auto !important;
98
+ right: auto !important;
99
+ transform: none !important;
100
+ }
101
+
48
102
  /* 新Toast进入动画 */
49
103
  &.toast-entering {
50
104
  opacity: 0;
@@ -81,42 +135,49 @@
81
135
  }
82
136
 
83
137
  // 强制覆盖Ant Design Modal的默认定位
84
- .ant-modal-wrap {
85
- position: static !important;
86
- pointer-events: none !important; // 让Modal wrap点击穿透
87
- }
138
+ // 非 mask 模式下使用 static 定位
139
+ &:not([data-mask="true"]) {
140
+ .ant-modal-wrap {
141
+ position: static !important;
142
+ pointer-events: none !important; // 让Modal wrap点击穿透
143
+ }
88
144
 
89
- .ant-modal {
90
- position: static !important;
91
- top: auto !important;
92
- left: auto !important;
93
- transform: none !important;
94
- margin: 0 !important;
95
- padding: 0 !important;
96
- pointer-events: none !important; // 让Modal本身点击穿透
145
+ .ant-modal {
146
+ position: static !important;
147
+ top: auto !important;
148
+ left: auto !important;
149
+ transform: none !important;
150
+ margin: 0 !important;
151
+ padding: 0 !important;
152
+ pointer-events: none !important; // 让Modal本身点击穿透
153
+ }
97
154
  }
98
155
 
156
+ // mask 模式下,Modal 会渲染到 body,容器内的样式不再需要
157
+ // 样式已通过全局 .toast-modal-wrap-with-mask 类名设置
99
158
 
100
- // 覆盖所有可能的Ant Design Modal定位
101
- .ant-modal-wrap {
102
- position: static !important;
103
- display: block !important;
104
- overflow: visible !important;
105
- pointer-events: none !important; // 让Modal wrap点击穿透
106
- }
159
+ // 覆盖所有可能的Ant Design Modal定位(非 mask 模式)
160
+ &:not([data-mask="true"]) {
161
+ .ant-modal-wrap {
162
+ position: static !important;
163
+ display: block !important;
164
+ overflow: visible !important;
165
+ pointer-events: none !important; // 让Modal wrap点击穿透
166
+ }
107
167
 
108
- .ant-modal {
109
- position: static !important;
110
- top: auto !important;
111
- left: auto !important;
112
- right: auto !important;
113
- bottom: auto !important;
114
- transform: none !important;
115
- margin: 0 !important;
116
- padding: 0 !important;
117
- width: 100% !important;
118
- max-width: none !important;
119
- pointer-events: none !important; // 让Modal点击穿透
168
+ .ant-modal {
169
+ position: static !important;
170
+ top: auto !important;
171
+ left: auto !important;
172
+ right: auto !important;
173
+ bottom: auto !important;
174
+ transform: none !important;
175
+ margin: 0 !important;
176
+ padding: 0 !important;
177
+ width: 100% !important;
178
+ max-width: none !important;
179
+ pointer-events: none !important; // 让Modal点击穿透
180
+ }
120
181
  }
121
182
 
122
183
  // Toast进入动画
@@ -401,7 +462,7 @@
401
462
  // 副标题样式
402
463
  &-subtitle {
403
464
  &-text {
404
- font-size: 30px; // 与图片一致
465
+ font-size: 48px; // 与图片一致
405
466
  font-weight: 600; // 与图片一致
406
467
  text-shadow: none; // 移除阴影
407
468
 
@@ -17,7 +17,7 @@ export declare const useWalletPass: (props: {
17
17
  cardData: any;
18
18
  handleSelectWallet: (value: number[]) => void;
19
19
  selectedWalletIds: any[];
20
- expiredWalletIds: any;
20
+ expiredWalletIds: any[];
21
21
  expiredWalletData: any;
22
22
  disabledWalletData: any[];
23
23
  clearAllSelectedWallet: () => void;
@@ -71,7 +71,7 @@
71
71
  grid-template-rows: auto auto;
72
72
  gap: 8px 16px;
73
73
  background-color: #f6f2ff;
74
- padding: 16px 16px 0 16px;
74
+ padding: 16px 16px 8px 16px;
75
75
  border-radius: 0 0 12px 12px;
76
76
  width: 100%; // 确保容器占满宽度
77
77
 
@@ -141,6 +141,7 @@ declare const _default: {
141
141
  'pisell2.checkout.modal.close-price-adjustment': string;
142
142
  'pisell2.checkout.modal.reset-price-adjustment': string;
143
143
  'pisell2.checkout.modal.done-price-adjustment': string;
144
+ 'pisell2.checkout.modal.price-adjustment-tips': string;
144
145
  'pisell2.checkout.send-payment-link.modal-title': string;
145
146
  'pisell2.checkout.send-payment-link.email-address': string;
146
147
  'pisell2.checkout.send-payment-link.email-placeholder': string;
@@ -302,6 +303,7 @@ declare const _default: {
302
303
  'pisell2.checkout.modal.close-price-adjustment': string;
303
304
  'pisell2.checkout.modal.reset-price-adjustment': string;
304
305
  'pisell2.checkout.modal.done-price-adjustment': string;
306
+ 'pisell2.checkout.modal.price-adjustment-tips': string;
305
307
  'pisell2.checkout.send-payment-link.modal-title': string;
306
308
  'pisell2.checkout.send-payment-link.email-address': string;
307
309
  'pisell2.checkout.send-payment-link.email-placeholder': string;
@@ -479,6 +481,7 @@ declare const _default: {
479
481
  'pisell2.checkout.modal.close-price-adjustment': string;
480
482
  'pisell2.checkout.modal.reset-price-adjustment': string;
481
483
  'pisell2.checkout.modal.done-price-adjustment': string;
484
+ 'pisell2.checkout.modal.price-adjustment-tips': string;
482
485
  'pisell2.checkout.send-payment-link.modal-title': string;
483
486
  'pisell2.checkout.send-payment-link.email-address': string;
484
487
  'pisell2.checkout.send-payment-link.email-placeholder': string;
@@ -192,6 +192,7 @@ var locales_default = {
192
192
  "pisell2.checkout.modal.close-price-adjustment": "Close price adjustment modal",
193
193
  "pisell2.checkout.modal.reset-price-adjustment": "Reset",
194
194
  "pisell2.checkout.modal.done-price-adjustment": "Done",
195
+ "pisell2.checkout.modal.price-adjustment-tips": "Changing amount will update order total",
195
196
  // Send Payment Link Modal
196
197
  "pisell2.checkout.send-payment-link.modal-title": "Send Payment Link",
197
198
  "pisell2.checkout.send-payment-link.email-address": "Email Address",
@@ -382,6 +383,7 @@ var locales_default = {
382
383
  "pisell2.checkout.modal.close-price-adjustment": "关闭价格调整弹窗",
383
384
  "pisell2.checkout.modal.reset-price-adjustment": "重置",
384
385
  "pisell2.checkout.modal.done-price-adjustment": "完成",
386
+ "pisell2.checkout.modal.price-adjustment-tips": "修改金额将更新订单总额",
385
387
  // Send Payment Link Modal
386
388
  "pisell2.checkout.send-payment-link.modal-title": "发送支付链接",
387
389
  "pisell2.checkout.send-payment-link.email-address": "邮箱地址",
@@ -604,6 +606,7 @@ var locales_default = {
604
606
  "pisell2.checkout.modal.close-price-adjustment": "關閉價格調整彈窗",
605
607
  "pisell2.checkout.modal.reset-price-adjustment": "重置",
606
608
  "pisell2.checkout.modal.done-price-adjustment": "完成",
609
+ "pisell2.checkout.modal.price-adjustment-tips": "修改金額將更新訂單總額",
607
610
  // Send Payment Link Modal
608
611
  "pisell2.checkout.send-payment-link.modal-title": "發送支付鏈接",
609
612
  "pisell2.checkout.send-payment-link.email-address": "郵箱地址",
@@ -150,6 +150,7 @@ var displayPaymentResultToast = async (params, config) => {
150
150
  const { getData, onToastClose } = config;
151
151
  if (paymentStatus === "paid") {
152
152
  await (0, import_PaymentResultToast.showPaymentResultToastSuccess)({
153
+ mask: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
153
154
  title: calculateTitle(paymentStatus),
154
155
  subtitle: calculateSubtitle(
155
156
  paymentStatus,
@@ -159,16 +160,18 @@ var displayPaymentResultToast = async (params, config) => {
159
160
  ),
160
161
  autoClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
161
162
  autoCloseDelay: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoCloseDelay) || 3e3,
163
+ clickOutsideToClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
162
164
  showCountdownProgress: true,
163
165
  actionButtons: actionButtons || [],
164
166
  onClose: onToastClose || (() => {
165
167
  }),
166
168
  // 提供默认空函数
167
- closable: false
169
+ closable: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose)
168
170
  // 控制关闭按钮显示
169
171
  });
170
172
  } else if (paymentStatus === "partially_paid") {
171
173
  await (0, import_PaymentResultToast.showPaymentResultToastSuccess)({
174
+ mask: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
172
175
  title: calculateTitle(paymentStatus),
173
176
  subtitle: calculateSubtitle(
174
177
  paymentStatus,
@@ -178,12 +181,16 @@ var displayPaymentResultToast = async (params, config) => {
178
181
  ),
179
182
  autoClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
180
183
  actionButtons: actionButtons || [],
184
+ clickOutsideToClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
185
+ closable: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose),
186
+ // 控制关闭按钮显示
181
187
  onClose: onToastClose || (() => {
182
188
  })
183
189
  // 提供默认空函数
184
190
  });
185
191
  } else if (paymentStatus === "failed" || paymentStatus === "error") {
186
192
  await (0, import_PaymentResultToast.showPaymentResultToastFailed)({
193
+ mask: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
187
194
  title: calculateTitle(paymentStatus, failureReason),
188
195
  subtitle: calculateSubtitle(
189
196
  paymentStatus,
@@ -193,6 +200,9 @@ var displayPaymentResultToast = async (params, config) => {
193
200
  ),
194
201
  autoClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
195
202
  actionButtons: actionButtons || [],
203
+ clickOutsideToClose: (autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose) || false,
204
+ closable: !(autoCloseConfig == null ? void 0 : autoCloseConfig.autoClose),
205
+ // 控制关闭按钮显示
196
206
  onClose: onToastClose || (() => {
197
207
  })
198
208
  // 提供默认空函数
@@ -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;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, containerStyle, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
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
  };
@@ -295,9 +295,9 @@ 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?: "pay" | "refund" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -41,9 +41,43 @@ var import_dayjs = __toESM(require("dayjs"));
41
41
  var import_classnames = __toESM(require("classnames"));
42
42
  var import_utils = require("@pisell/utils");
43
43
  var import_index = require("./index.less");
44
+ var import_materials2 = require("@pisell/materials");
44
45
  var TimeBar = (props) => {
45
46
  var _a, _b;
46
47
  const { globalState: state, setGlobalState, locale, onCreateClick } = props;
48
+ const [collapsed, setCollapsed] = (0, import_react.useState)(true);
49
+ const [scaleCompensation, setScaleCompensation] = (0, import_react.useState)(1);
50
+ (0, import_react.useEffect)(() => {
51
+ const getBodyScale = () => {
52
+ const body = document.body;
53
+ const computedStyle = window.getComputedStyle(body);
54
+ const transform = computedStyle.transform;
55
+ if (transform && transform !== "none") {
56
+ const matrix = transform.match(/matrix\(([^)]+)\)/);
57
+ if (matrix) {
58
+ const values = matrix[1].split(",").map((v) => parseFloat(v.trim()));
59
+ const scale = values[0] || 1;
60
+ return scale;
61
+ }
62
+ }
63
+ return 1;
64
+ };
65
+ const updateScale = () => {
66
+ const scale = getBodyScale();
67
+ setScaleCompensation(scale);
68
+ };
69
+ updateScale();
70
+ const observer = new MutationObserver(updateScale);
71
+ observer.observe(document.body, {
72
+ attributes: true,
73
+ attributeFilter: ["style", "class"]
74
+ });
75
+ window.addEventListener("resize", updateScale);
76
+ return () => {
77
+ observer.disconnect();
78
+ window.removeEventListener("resize", updateScale);
79
+ };
80
+ }, []);
47
81
  const _onClickNext = (0, import_ahooks.useMemoizedFn)(() => {
48
82
  var _a2, _b2, _c, _d;
49
83
  const currentTime = (_b2 = (_a2 = state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
@@ -77,8 +111,62 @@ var TimeBar = (props) => {
77
111
  });
78
112
  (_d = props.setIntervalTime) == null ? void 0 : _d.call(props, timeString === (0, import_dayjs.default)().format("HH:mm"));
79
113
  });
114
+ const _onToggleCollapse = (0, import_ahooks.useMemoizedFn)(() => {
115
+ setCollapsed(!collapsed);
116
+ });
80
117
  return (0, import_react.useMemo)(() => {
81
- var _a2, _b2, _c, _d;
118
+ var _a2, _b2, _c, _d, _e, _f;
119
+ if (collapsed) {
120
+ const currentDate = (_b2 = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value;
121
+ const isToday = currentDate && currentDate.isSame((0, import_dayjs.default)(), "day");
122
+ const displayText = isToday ? import_utils.locales.getText("pisell2.ticket-booking.today") : (currentDate == null ? void 0 : currentDate.format("YYYY-MM-DD")) || "";
123
+ const targetHeight = 40;
124
+ const compensatedHeight = targetHeight / scaleCompensation;
125
+ return /* @__PURE__ */ import_react.default.createElement(
126
+ "div",
127
+ {
128
+ className: (0, import_classnames.default)("pisell-ticket-booking-time-bar", "collapsed"),
129
+ style: {
130
+ height: `${compensatedHeight}px`,
131
+ minHeight: `${compensatedHeight}px`,
132
+ maxHeight: `${compensatedHeight}px`
133
+ }
134
+ },
135
+ /* @__PURE__ */ import_react.default.createElement(
136
+ "div",
137
+ {
138
+ className: "pisell-ticket-booking-time-bar-collapsed-content",
139
+ style: {
140
+ height: `${compensatedHeight}px`
141
+ }
142
+ },
143
+ /* @__PURE__ */ import_react.default.createElement(
144
+ "span",
145
+ {
146
+ className: "pisell-ticket-booking-time-bar-collapsed-today",
147
+ style: {
148
+ lineHeight: `${compensatedHeight}px`
149
+ }
150
+ },
151
+ displayText
152
+ ),
153
+ /* @__PURE__ */ import_react.default.createElement(
154
+ import_antd.Button,
155
+ {
156
+ type: "link",
157
+ size: "small",
158
+ className: "pisell-ticket-booking-time-bar-collapsed-expand",
159
+ onClick: _onToggleCollapse,
160
+ style: {
161
+ lineHeight: `${compensatedHeight}px`
162
+ }
163
+ },
164
+ /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.ticket-booking.expand")),
165
+ /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-chevron-right-double" })
166
+ )
167
+ )
168
+ );
169
+ }
82
170
  return /* @__PURE__ */ import_react.default.createElement(
83
171
  "div",
84
172
  {
@@ -114,7 +202,7 @@ var TimeBar = (props) => {
114
202
  import_materials.DatePicker,
115
203
  {
116
204
  inputReadOnly: true,
117
- value: (_b2 = (_a2 = state == null ? void 0 : state.modalState) == null ? void 0 : _a2.date) == null ? void 0 : _b2.value,
205
+ value: (_d = (_c = state == null ? void 0 : state.modalState) == null ? void 0 : _c.date) == null ? void 0 : _d.value,
118
206
  format: locale === "en" ? "dddd, DD MMM YYYY" : "YYYY年MM月DD日",
119
207
  onChange: props == null ? void 0 : props.onDateChange,
120
208
  size: "large",
@@ -140,7 +228,7 @@ var TimeBar = (props) => {
140
228
  /* @__PURE__ */ import_react.default.createElement(
141
229
  import_materials.SelectTime,
142
230
  {
143
- value: (_d = (_c = state == null ? void 0 : state.modalState) == null ? void 0 : _c.date) == null ? void 0 : _d.value.format("HH:mm"),
231
+ value: (_f = (_e = state == null ? void 0 : state.modalState) == null ? void 0 : _e.date) == null ? void 0 : _f.value.format("HH:mm"),
144
232
  onChange: _onDateTimeChange,
145
233
  popoverProps: {
146
234
  style: { zoom: 0.8 }
@@ -170,14 +258,27 @@ var TimeBar = (props) => {
170
258
  type: "primary"
171
259
  },
172
260
  import_utils.locales.getText("pisell2.ticket-booking.create-new")
261
+ ),
262
+ /* @__PURE__ */ import_react.default.createElement(
263
+ import_antd.Button,
264
+ {
265
+ type: "link",
266
+ style: { marginLeft: "auto" },
267
+ onClick: _onToggleCollapse
268
+ },
269
+ /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.ticket-booking.collapse")),
270
+ /* @__PURE__ */ import_react.default.createElement(import_materials2.Iconfont, { type: "pisell2-chevron-left-double" })
173
271
  )
174
272
  );
175
273
  }, [
274
+ collapsed,
176
275
  (_b = (_a = state.modalState) == null ? void 0 : _a.date) == null ? void 0 : _b.value,
177
276
  state.intervalSetTime,
178
277
  state.isTimeChange,
179
278
  state.isDateChange,
180
- locale
279
+ locale,
280
+ _onToggleCollapse,
281
+ scaleCompensation
181
282
  ]);
182
283
  };
183
284
  var timeBar_default = TimeBar;
@@ -20,4 +20,63 @@
20
20
  }
21
21
  }
22
22
  }
23
+
24
+ // 收起状态
25
+ &.collapsed {
26
+ position: fixed;
27
+ bottom: 0;
28
+ left: 86px;
29
+ padding: 0;
30
+ background-color: transparent;
31
+ display: block;
32
+ // 高度通过内联样式动态设置以补偿 body 的 scale
33
+
34
+ .pisell-ticket-booking-time-bar-collapsed-content {
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: space-between;
38
+ width: 100%;
39
+ // 高度通过内联样式动态设置以补偿 body 的 scale
40
+ padding: 0 16px;
41
+ background-color: #fff;
42
+ border-radius: 0 8px 8px 0;
43
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
44
+ box-sizing: border-box;
45
+ overflow: hidden;
46
+
47
+ .pisell-ticket-booking-time-bar-collapsed-today {
48
+ font-weight: 600;
49
+ font-size: 18px;
50
+ color: #000;
51
+ flex-shrink: 0;
52
+ margin-right: 16px;
53
+ // line-height 通过内联样式动态设置
54
+ }
55
+
56
+ .pisell-ticket-booking-time-bar-collapsed-expand {
57
+ color: #7F56DA;
58
+ padding: 0;
59
+ margin: 0;
60
+ height: auto;
61
+ font-size: 18px;
62
+ font-weight: 500;
63
+ display: inline-flex;
64
+ align-items: center;
65
+ flex-shrink: 0;
66
+ // line-height 通过内联样式动态设置
67
+
68
+ &:hover {
69
+ color: #6941c6;
70
+ }
71
+
72
+ span {
73
+ margin-right: 2px;
74
+ }
75
+ .anticon {
76
+ margin-left: 0px;
77
+ margin-right: 0px;
78
+ }
79
+ }
80
+ }
81
+ }
23
82
  }
@@ -61,6 +61,8 @@ declare const _default: {
61
61
  'pisell2.ticket-booking.terminal-upgrade-description': string;
62
62
  'pisell2.ticket-booking.terminal-upgrade-ok': string;
63
63
  'pisell2.ticket-booking.terminal-upgrade-cancel': string;
64
+ 'pisell2.ticket-booking.collapse': string;
65
+ 'pisell2.ticket-booking.expand': string;
64
66
  };
65
67
  'zh-CN': {
66
68
  'pisell2.ticket-booking.info': string;
@@ -124,6 +126,8 @@ declare const _default: {
124
126
  'pisell2.ticket-booking.terminal-upgrade-description': string;
125
127
  'pisell2.ticket-booking.terminal-upgrade-ok': string;
126
128
  'pisell2.ticket-booking.terminal-upgrade-cancel': string;
129
+ 'pisell2.ticket-booking.collapse': string;
130
+ 'pisell2.ticket-booking.expand': string;
127
131
  };
128
132
  'zh-HK': {
129
133
  'pisell2.ticket-booking.info': string;
@@ -187,6 +191,8 @@ declare const _default: {
187
191
  'pisell2.ticket-booking.terminal-upgrade-description': string;
188
192
  'pisell2.ticket-booking.terminal-upgrade-ok': string;
189
193
  'pisell2.ticket-booking.terminal-upgrade-cancel': string;
194
+ 'pisell2.ticket-booking.collapse': string;
195
+ 'pisell2.ticket-booking.expand': string;
190
196
  };
191
197
  };
192
198
  export default _default;
@@ -87,7 +87,9 @@ var locales_default = {
87
87
  "pisell2.ticket-booking.terminal-upgrade-title": "Terminal Version Reminder",
88
88
  "pisell2.ticket-booking.terminal-upgrade-description": "Your Terminal version is outdated. Please upgrade Terminal to use all features.",
89
89
  "pisell2.ticket-booking.terminal-upgrade-ok": "I understand",
90
- "pisell2.ticket-booking.terminal-upgrade-cancel": "Cancel"
90
+ "pisell2.ticket-booking.terminal-upgrade-cancel": "Cancel",
91
+ "pisell2.ticket-booking.collapse": "Collapse",
92
+ "pisell2.ticket-booking.expand": "Expand"
91
93
  },
92
94
  "zh-CN": {
93
95
  "pisell2.ticket-booking.info": "信息",
@@ -153,7 +155,9 @@ var locales_default = {
153
155
  "pisell2.ticket-booking.terminal-upgrade-title": "Terminal版本提醒",
154
156
  "pisell2.ticket-booking.terminal-upgrade-description": "检测到您的Terminal版本较低,请升级Terminal以使用完整功能",
155
157
  "pisell2.ticket-booking.terminal-upgrade-ok": "我知道了",
156
- "pisell2.ticket-booking.terminal-upgrade-cancel": "取消"
158
+ "pisell2.ticket-booking.terminal-upgrade-cancel": "取消",
159
+ "pisell2.ticket-booking.collapse": "收起",
160
+ "pisell2.ticket-booking.expand": "展开"
157
161
  },
158
162
  "zh-HK": {
159
163
  "pisell2.ticket-booking.info": "資訊",
@@ -219,6 +223,8 @@ var locales_default = {
219
223
  "pisell2.ticket-booking.terminal-upgrade-title": "Terminal版本提醒",
220
224
  "pisell2.ticket-booking.terminal-upgrade-description": "檢測到您的Terminal版本較低,請升級Terminal以使用完整功能",
221
225
  "pisell2.ticket-booking.terminal-upgrade-ok": "我知道了",
222
- "pisell2.ticket-booking.terminal-upgrade-cancel": "取消"
226
+ "pisell2.ticket-booking.terminal-upgrade-cancel": "取消",
227
+ "pisell2.ticket-booking.collapse": "收起",
228
+ "pisell2.ticket-booking.expand": "展開"
223
229
  }
224
230
  };
@@ -41,7 +41,7 @@ declare type ScanData = {
41
41
  };
42
42
  };
43
43
  export declare const formatScanCustomer: (data: ScanData) => {
44
- searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
44
+ searchType: "product" | "customer" | "wallet" | "walletPass" | "local_product";
45
45
  data: any;
46
46
  scanCode: string;
47
47
  } | null;