@pisell/private-materials 6.3.136 → 6.3.137

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 (163) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/venueBooking/components/Checkout/index.js +36 -5
  8. package/es/components/venueBooking/locales.d.ts +15 -0
  9. package/es/components/venueBooking/locales.js +15 -0
  10. package/lib/components/venueBooking/components/Checkout/index.js +28 -3
  11. package/lib/components/venueBooking/locales.d.ts +15 -0
  12. package/lib/components/venueBooking/locales.js +15 -0
  13. package/package.json +1 -1
  14. package/es/components/appointmentBooking/components/Form/index.d.ts +0 -4
  15. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  16. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  17. package/es/components/appointmentBooking/hooks.d.ts +0 -107
  18. package/es/components/appointmentBooking/utils.d.ts +0 -227
  19. package/es/components/booking/components/footer/utils.d.ts +0 -47
  20. package/es/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  21. package/es/components/booking/components/voucher/index.d.ts +0 -3
  22. package/es/components/booking/info/service/editService/constants.d.ts +0 -1
  23. package/es/components/booking/info/service/editService/index.d.ts +0 -7
  24. package/es/components/booking/info/service2/utils.d.ts +0 -248
  25. package/es/components/booking/info2/index.d.ts +0 -12
  26. package/es/components/booking/info2/service/addService/index.d.ts +0 -11
  27. package/es/components/booking/locales.d.ts +0 -1489
  28. package/es/components/booking/model.d.ts +0 -120
  29. package/es/components/eftposPay/amount.d.ts +0 -20
  30. package/es/components/eftposPay/app.d.ts +0 -10
  31. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  32. package/es/components/eftposPay/component/fail/index.d.ts +0 -3
  33. package/es/components/eftposPay/component/fail/network.d.ts +0 -8
  34. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -9
  35. package/es/components/eftposPay/component/manual/index.d.ts +0 -9
  36. package/es/components/eftposPay/component/signature/index.d.ts +0 -8
  37. package/es/components/eftposPay/device.d.ts +0 -23
  38. package/es/components/eftposPay/index.d.ts +0 -4
  39. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  40. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  41. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  42. package/es/components/eftposPay/pay.d.ts +0 -20
  43. package/es/components/eftposPay/payo/config.d.ts +0 -12
  44. package/es/components/eftposPay/payo/hooks.d.ts +0 -10
  45. package/es/components/eftposPay/payo/payment.d.ts +0 -66
  46. package/es/components/eftposPay/tip.d.ts +0 -9
  47. package/es/components/eftposPay/tyro/index.d.ts +0 -9
  48. package/es/components/eftposPay/utils/payLog.d.ts +0 -81
  49. package/es/components/eftposPay/windcave/receiptAction.d.ts +0 -22
  50. package/es/components/eftposPay/windcave/windcave.d.ts +0 -6
  51. package/es/components/kioskSkuDetail/index.d.ts +0 -39
  52. package/es/components/kioskSkuDetail/locales.d.ts +0 -48
  53. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  54. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  55. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  56. package/es/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +0 -16
  57. package/es/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +0 -15
  58. package/es/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -83
  59. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  60. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  61. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +0 -22
  62. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -25
  63. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -16
  64. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  65. package/es/components/pay/toC/index.d.ts +0 -3
  66. package/es/components/pay/toC/locales.d.ts +0 -631
  67. package/es/components/pay/toC/payGroup.d.ts +0 -59
  68. package/es/components/pay/toC/serve.d.ts +0 -87
  69. package/es/components/pay/toC/utils.d.ts +0 -65
  70. package/es/components/ruleSetting/locales.d.ts +0 -78
  71. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  72. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  73. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  74. package/es/components/ticketBooking/index.d.ts +0 -7
  75. package/es/index.d.ts +0 -87
  76. package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -5
  77. package/es/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -3
  78. package/es/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -15
  79. package/es/plus/skuOptionsSelection/index.d.ts +0 -5
  80. package/es/plus/skuOptionsSelection/locales.d.ts +0 -58
  81. package/es/plus/skuOptionsSelection/types.d.ts +0 -458
  82. package/es/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +0 -19
  83. package/es/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
  84. package/es/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
  85. package/es/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
  86. package/es/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
  87. package/es/pro/Cards/components/SKUCard/index.d.ts +0 -5
  88. package/es/pro/Login2.0/components/phoneValidation.d.ts +0 -17
  89. package/lib/components/appointmentBooking/components/Form/index.d.ts +0 -4
  90. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  91. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  92. package/lib/components/appointmentBooking/hooks.d.ts +0 -107
  93. package/lib/components/appointmentBooking/utils.d.ts +0 -227
  94. package/lib/components/booking/components/footer/utils.d.ts +0 -47
  95. package/lib/components/booking/components/reloadResourceModal/index.d.ts +0 -8
  96. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  97. package/lib/components/booking/info/service/editService/constants.d.ts +0 -1
  98. package/lib/components/booking/info/service/editService/index.d.ts +0 -7
  99. package/lib/components/booking/info/service2/utils.d.ts +0 -248
  100. package/lib/components/booking/info2/index.d.ts +0 -12
  101. package/lib/components/booking/info2/service/addService/index.d.ts +0 -11
  102. package/lib/components/booking/locales.d.ts +0 -1489
  103. package/lib/components/booking/model.d.ts +0 -120
  104. package/lib/components/eftposPay/amount.d.ts +0 -20
  105. package/lib/components/eftposPay/app.d.ts +0 -10
  106. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  107. package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
  108. package/lib/components/eftposPay/component/fail/network.d.ts +0 -8
  109. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -9
  110. package/lib/components/eftposPay/component/manual/index.d.ts +0 -9
  111. package/lib/components/eftposPay/component/signature/index.d.ts +0 -8
  112. package/lib/components/eftposPay/device.d.ts +0 -23
  113. package/lib/components/eftposPay/index.d.ts +0 -4
  114. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  115. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  116. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  117. package/lib/components/eftposPay/pay.d.ts +0 -20
  118. package/lib/components/eftposPay/payo/config.d.ts +0 -12
  119. package/lib/components/eftposPay/payo/hooks.d.ts +0 -10
  120. package/lib/components/eftposPay/payo/payment.d.ts +0 -66
  121. package/lib/components/eftposPay/tip.d.ts +0 -9
  122. package/lib/components/eftposPay/tyro/index.d.ts +0 -9
  123. package/lib/components/eftposPay/utils/payLog.d.ts +0 -81
  124. package/lib/components/eftposPay/windcave/receiptAction.d.ts +0 -22
  125. package/lib/components/eftposPay/windcave/windcave.d.ts +0 -6
  126. package/lib/components/kioskSkuDetail/index.d.ts +0 -39
  127. package/lib/components/kioskSkuDetail/locales.d.ts +0 -48
  128. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  129. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  130. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  131. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/TDSPay/index.d.ts +0 -16
  132. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/index.d.ts +0 -15
  133. package/lib/components/pay/toC/PaymentMethods/MWCreditCard/tds2.d.ts +0 -83
  134. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  135. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  136. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +0 -22
  137. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -25
  138. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -16
  139. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  140. package/lib/components/pay/toC/index.d.ts +0 -3
  141. package/lib/components/pay/toC/locales.d.ts +0 -631
  142. package/lib/components/pay/toC/payGroup.d.ts +0 -59
  143. package/lib/components/pay/toC/serve.d.ts +0 -87
  144. package/lib/components/pay/toC/utils.d.ts +0 -65
  145. package/lib/components/ruleSetting/locales.d.ts +0 -78
  146. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  147. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  148. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -12
  149. package/lib/components/ticketBooking/index.d.ts +0 -7
  150. package/lib/index.d.ts +0 -87
  151. package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +0 -5
  152. package/lib/plus/skuOptionsSelection/components/OptionsCard/OptionItemCard.d.ts +0 -3
  153. package/lib/plus/skuOptionsSelection/components/OptionsModal/index.d.ts +0 -15
  154. package/lib/plus/skuOptionsSelection/index.d.ts +0 -5
  155. package/lib/plus/skuOptionsSelection/locales.d.ts +0 -58
  156. package/lib/plus/skuOptionsSelection/types.d.ts +0 -458
  157. package/lib/plus/skuOptionsSelection/utils/transformBundleGroup.d.ts +0 -19
  158. package/lib/plus/skuOptionsSelection/utils/transformOptionGroup.d.ts +0 -1
  159. package/lib/plus/skuOptionsSelection/utils/transformSelectorValueToValue.d.ts +0 -4
  160. package/lib/plus/skuOptionsSelection/utils/transformValueToSelectorValue.d.ts +0 -4
  161. package/lib/plus/skuOptionsSelection/utils/transformVariantGroup.d.ts +0 -1
  162. package/lib/pro/Cards/components/SKUCard/index.d.ts +0 -5
  163. package/lib/pro/Login2.0/components/phoneValidation.d.ts +0 -17
@@ -251,18 +251,49 @@ function toContactsInfoPayload(formValues) {
251
251
  }
252
252
  }];
253
253
  }
254
+
255
+ /** 将 i18n 模板中的 `{key}` 替换为对应值(与 venueBooking utils 中 hour.format 用法一致) */
256
+ function applyI18nPlaceholders(template, vars) {
257
+ var result = template;
258
+ for (var _i = 0, _Object$entries = Object.entries(vars); _i < _Object$entries.length; _i++) {
259
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
260
+ key = _Object$entries$_i[0],
261
+ value = _Object$entries$_i[1];
262
+ result = result.split("{".concat(key, "}")).join(String(value));
263
+ }
264
+ return result;
265
+ }
266
+
267
+ /** 结算页时长文案:走 locales,英文用 min,中文用 分钟 / 分鐘 等 */
268
+ function formatCheckoutDurationText(totalMinutes) {
269
+ var hours = Math.floor(totalMinutes / 60);
270
+ var minutes = totalMinutes % 60;
271
+ if (hours > 0 && minutes > 0) {
272
+ var _tpl = String(locales.getText('pisell2.venue.checkout.duration.hours_minutes') || '{hours}h {minutes}min');
273
+ return applyI18nPlaceholders(_tpl, {
274
+ hours: hours,
275
+ minutes: minutes
276
+ });
277
+ }
278
+ if (hours > 0) {
279
+ var _tpl2 = String(locales.getText('pisell2.venue.checkout.duration.hours') || '{hours}h');
280
+ return applyI18nPlaceholders(_tpl2, {
281
+ hours: hours
282
+ });
283
+ }
284
+ var tpl = String(locales.getText('pisell2.venue.checkout.duration.minutes') || '{minutes}min');
285
+ return applyI18nPlaceholders(tpl, {
286
+ minutes: minutes
287
+ });
288
+ }
254
289
  function getSessionDisplayText(item) {
255
290
  var startRaw = String((item === null || item === void 0 ? void 0 : item.start_date) || '');
256
291
  var endRaw = String((item === null || item === void 0 ? void 0 : item.end_date) || '');
257
292
  var start = dayjs(startRaw);
258
293
  var end = dayjs(endRaw);
259
294
  if (!start.isValid() || !end.isValid()) return String((item === null || item === void 0 ? void 0 : item.description) || (item === null || item === void 0 ? void 0 : item.subtitle) || '-');
260
-
261
- // 兼容小于 1 小时(30m)、整小时(1h / 2h)、带半小时余数(1h 30m)三种情况
262
295
  var durationMinutes = Math.max(0, end.diff(start, 'minute'));
263
- var hours = Math.floor(durationMinutes / 60);
264
- var minutes = durationMinutes % 60;
265
- var durationText = hours > 0 && minutes > 0 ? "".concat(hours, "h ").concat(minutes, "m") : hours > 0 ? "".concat(hours, "h") : "".concat(minutes, "m");
296
+ var durationText = formatCheckoutDurationText(durationMinutes);
266
297
  return "".concat(start.format('HH:mm'), " ~ ").concat(end.format('HH:mm'), " ").concat(start.format('DD/MM/YYYY'), " (").concat(durationText, ")");
267
298
  }
268
299
  function getVenueResourceName(item) {
@@ -78,6 +78,9 @@ declare const _default: {
78
78
  'pisell2.venue.checkout.hotline': string;
79
79
  'pisell2.venue.checkout.estimated.total': string;
80
80
  'pisell2.venue.checkout.change': string;
81
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
82
+ 'pisell2.venue.checkout.duration.hours': string;
83
+ 'pisell2.venue.checkout.duration.minutes': string;
81
84
  'pisell2.venue.grid.loading': string;
82
85
  'pisell2.venue.legend.product.fallback': string;
83
86
  'pisell2.venue.addons.empty': string;
@@ -199,6 +202,9 @@ declare const _default: {
199
202
  'pisell2.venue.checkout.hotline': string;
200
203
  'pisell2.venue.checkout.estimated.total': string;
201
204
  'pisell2.venue.checkout.change': string;
205
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
206
+ 'pisell2.venue.checkout.duration.hours': string;
207
+ 'pisell2.venue.checkout.duration.minutes': string;
202
208
  'pisell2.venue.grid.loading': string;
203
209
  'pisell2.venue.legend.product.fallback': string;
204
210
  'pisell2.venue.addons.empty': string;
@@ -320,6 +326,9 @@ declare const _default: {
320
326
  'pisell2.venue.checkout.hotline': string;
321
327
  'pisell2.venue.checkout.estimated.total': string;
322
328
  'pisell2.venue.checkout.change': string;
329
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
330
+ 'pisell2.venue.checkout.duration.hours': string;
331
+ 'pisell2.venue.checkout.duration.minutes': string;
323
332
  'pisell2.venue.grid.loading': string;
324
333
  'pisell2.venue.legend.product.fallback': string;
325
334
  'pisell2.venue.addons.empty': string;
@@ -441,6 +450,9 @@ declare const _default: {
441
450
  'pisell2.venue.checkout.hotline': string;
442
451
  'pisell2.venue.checkout.estimated.total': string;
443
452
  'pisell2.venue.checkout.change': string;
453
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
454
+ 'pisell2.venue.checkout.duration.hours': string;
455
+ 'pisell2.venue.checkout.duration.minutes': string;
444
456
  'pisell2.venue.grid.loading': string;
445
457
  'pisell2.venue.legend.product.fallback': string;
446
458
  'pisell2.venue.addons.empty': string;
@@ -562,6 +574,9 @@ declare const _default: {
562
574
  'pisell2.venue.checkout.hotline': string;
563
575
  'pisell2.venue.checkout.estimated.total': string;
564
576
  'pisell2.venue.checkout.change': string;
577
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
578
+ 'pisell2.venue.checkout.duration.hours': string;
579
+ 'pisell2.venue.checkout.duration.minutes': string;
565
580
  'pisell2.venue.grid.loading': string;
566
581
  'pisell2.venue.legend.product.fallback': string;
567
582
  'pisell2.venue.addons.empty': string;
@@ -78,6 +78,9 @@ export default {
78
78
  'pisell2.venue.checkout.hotline': 'Support hotline',
79
79
  'pisell2.venue.checkout.estimated.total': 'Estimated total',
80
80
  'pisell2.venue.checkout.change': 'Change',
81
+ 'pisell2.venue.checkout.duration.hours_minutes': '{hours}h {minutes}min',
82
+ 'pisell2.venue.checkout.duration.hours': '{hours}h',
83
+ 'pisell2.venue.checkout.duration.minutes': '{minutes}min',
81
84
  'pisell2.venue.grid.loading': 'Loading...',
82
85
  'pisell2.venue.legend.product.fallback': 'Product',
83
86
  'pisell2.venue.addons.empty': 'No add-ons available.',
@@ -199,6 +202,9 @@ export default {
199
202
  'pisell2.venue.checkout.hotline': '客服热线',
200
203
  'pisell2.venue.checkout.estimated.total': '预估总价',
201
204
  'pisell2.venue.checkout.change': '修改',
205
+ 'pisell2.venue.checkout.duration.hours_minutes': '{hours}小时{minutes}分钟',
206
+ 'pisell2.venue.checkout.duration.hours': '{hours}小时',
207
+ 'pisell2.venue.checkout.duration.minutes': '{minutes}分钟',
202
208
  'pisell2.venue.grid.loading': '加载中...',
203
209
  'pisell2.venue.legend.product.fallback': '商品',
204
210
  'pisell2.venue.addons.empty': '暂无可选附加商品',
@@ -320,6 +326,9 @@ export default {
320
326
  'pisell2.venue.checkout.hotline': '客服熱線',
321
327
  'pisell2.venue.checkout.estimated.total': '預估總價',
322
328
  'pisell2.venue.checkout.change': '修改',
329
+ 'pisell2.venue.checkout.duration.hours_minutes': '{hours}小時{minutes}分鐘',
330
+ 'pisell2.venue.checkout.duration.hours': '{hours}小時',
331
+ 'pisell2.venue.checkout.duration.minutes': '{minutes}分鐘',
323
332
  'pisell2.venue.grid.loading': '加載中...',
324
333
  'pisell2.venue.legend.product.fallback': '商品',
325
334
  'pisell2.venue.addons.empty': '暫無可選附加商品',
@@ -441,6 +450,9 @@ export default {
441
450
  'pisell2.venue.checkout.hotline': 'サポート窓口',
442
451
  'pisell2.venue.checkout.estimated.total': '見積合計',
443
452
  'pisell2.venue.checkout.change': '変更',
453
+ 'pisell2.venue.checkout.duration.hours_minutes': '{hours}時間{minutes}分',
454
+ 'pisell2.venue.checkout.duration.hours': '{hours}時間',
455
+ 'pisell2.venue.checkout.duration.minutes': '{minutes}分',
444
456
  'pisell2.venue.grid.loading': '読み込み中...',
445
457
  'pisell2.venue.legend.product.fallback': '商品',
446
458
  'pisell2.venue.addons.empty': '追加できる商品がありません。',
@@ -562,6 +574,9 @@ export default {
562
574
  'pisell2.venue.checkout.hotline': 'Central de suporte',
563
575
  'pisell2.venue.checkout.estimated.total': 'Total estimado',
564
576
  'pisell2.venue.checkout.change': 'Alterar',
577
+ 'pisell2.venue.checkout.duration.hours_minutes': '{hours} h {minutes} min',
578
+ 'pisell2.venue.checkout.duration.hours': '{hours} h',
579
+ 'pisell2.venue.checkout.duration.minutes': '{minutes} min',
565
580
  'pisell2.venue.grid.loading': 'Carregando...',
566
581
  'pisell2.venue.legend.product.fallback': 'Produto',
567
582
  'pisell2.venue.addons.empty': 'Nenhum adicional disponível.',
@@ -190,6 +190,33 @@ function toContactsInfoPayload(formValues) {
190
190
  }
191
191
  ];
192
192
  }
193
+ function applyI18nPlaceholders(template, vars) {
194
+ let result = template;
195
+ for (const [key, value] of Object.entries(vars)) {
196
+ result = result.split(`{${key}}`).join(String(value));
197
+ }
198
+ return result;
199
+ }
200
+ function formatCheckoutDurationText(totalMinutes) {
201
+ const hours = Math.floor(totalMinutes / 60);
202
+ const minutes = totalMinutes % 60;
203
+ if (hours > 0 && minutes > 0) {
204
+ const tpl2 = String(
205
+ import_utils.locales.getText("pisell2.venue.checkout.duration.hours_minutes") || "{hours}h {minutes}min"
206
+ );
207
+ return applyI18nPlaceholders(tpl2, { hours, minutes });
208
+ }
209
+ if (hours > 0) {
210
+ const tpl2 = String(
211
+ import_utils.locales.getText("pisell2.venue.checkout.duration.hours") || "{hours}h"
212
+ );
213
+ return applyI18nPlaceholders(tpl2, { hours });
214
+ }
215
+ const tpl = String(
216
+ import_utils.locales.getText("pisell2.venue.checkout.duration.minutes") || "{minutes}min"
217
+ );
218
+ return applyI18nPlaceholders(tpl, { minutes });
219
+ }
193
220
  function getSessionDisplayText(item) {
194
221
  const startRaw = String((item == null ? void 0 : item.start_date) || "");
195
222
  const endRaw = String((item == null ? void 0 : item.end_date) || "");
@@ -198,9 +225,7 @@ function getSessionDisplayText(item) {
198
225
  if (!start.isValid() || !end.isValid())
199
226
  return String((item == null ? void 0 : item.description) || (item == null ? void 0 : item.subtitle) || "-");
200
227
  const durationMinutes = Math.max(0, end.diff(start, "minute"));
201
- const hours = Math.floor(durationMinutes / 60);
202
- const minutes = durationMinutes % 60;
203
- const durationText = hours > 0 && minutes > 0 ? `${hours}h ${minutes}m` : hours > 0 ? `${hours}h` : `${minutes}m`;
228
+ const durationText = formatCheckoutDurationText(durationMinutes);
204
229
  return `${start.format("HH:mm")} ~ ${end.format("HH:mm")} ${start.format("DD/MM/YYYY")} (${durationText})`;
205
230
  }
206
231
  function getVenueResourceName(item) {
@@ -78,6 +78,9 @@ declare const _default: {
78
78
  'pisell2.venue.checkout.hotline': string;
79
79
  'pisell2.venue.checkout.estimated.total': string;
80
80
  'pisell2.venue.checkout.change': string;
81
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
82
+ 'pisell2.venue.checkout.duration.hours': string;
83
+ 'pisell2.venue.checkout.duration.minutes': string;
81
84
  'pisell2.venue.grid.loading': string;
82
85
  'pisell2.venue.legend.product.fallback': string;
83
86
  'pisell2.venue.addons.empty': string;
@@ -199,6 +202,9 @@ declare const _default: {
199
202
  'pisell2.venue.checkout.hotline': string;
200
203
  'pisell2.venue.checkout.estimated.total': string;
201
204
  'pisell2.venue.checkout.change': string;
205
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
206
+ 'pisell2.venue.checkout.duration.hours': string;
207
+ 'pisell2.venue.checkout.duration.minutes': string;
202
208
  'pisell2.venue.grid.loading': string;
203
209
  'pisell2.venue.legend.product.fallback': string;
204
210
  'pisell2.venue.addons.empty': string;
@@ -320,6 +326,9 @@ declare const _default: {
320
326
  'pisell2.venue.checkout.hotline': string;
321
327
  'pisell2.venue.checkout.estimated.total': string;
322
328
  'pisell2.venue.checkout.change': string;
329
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
330
+ 'pisell2.venue.checkout.duration.hours': string;
331
+ 'pisell2.venue.checkout.duration.minutes': string;
323
332
  'pisell2.venue.grid.loading': string;
324
333
  'pisell2.venue.legend.product.fallback': string;
325
334
  'pisell2.venue.addons.empty': string;
@@ -441,6 +450,9 @@ declare const _default: {
441
450
  'pisell2.venue.checkout.hotline': string;
442
451
  'pisell2.venue.checkout.estimated.total': string;
443
452
  'pisell2.venue.checkout.change': string;
453
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
454
+ 'pisell2.venue.checkout.duration.hours': string;
455
+ 'pisell2.venue.checkout.duration.minutes': string;
444
456
  'pisell2.venue.grid.loading': string;
445
457
  'pisell2.venue.legend.product.fallback': string;
446
458
  'pisell2.venue.addons.empty': string;
@@ -562,6 +574,9 @@ declare const _default: {
562
574
  'pisell2.venue.checkout.hotline': string;
563
575
  'pisell2.venue.checkout.estimated.total': string;
564
576
  'pisell2.venue.checkout.change': string;
577
+ 'pisell2.venue.checkout.duration.hours_minutes': string;
578
+ 'pisell2.venue.checkout.duration.hours': string;
579
+ 'pisell2.venue.checkout.duration.minutes': string;
565
580
  'pisell2.venue.grid.loading': string;
566
581
  'pisell2.venue.legend.product.fallback': string;
567
582
  'pisell2.venue.addons.empty': string;
@@ -98,6 +98,9 @@ var locales_default = {
98
98
  "pisell2.venue.checkout.hotline": "Support hotline",
99
99
  "pisell2.venue.checkout.estimated.total": "Estimated total",
100
100
  "pisell2.venue.checkout.change": "Change",
101
+ "pisell2.venue.checkout.duration.hours_minutes": "{hours}h {minutes}min",
102
+ "pisell2.venue.checkout.duration.hours": "{hours}h",
103
+ "pisell2.venue.checkout.duration.minutes": "{minutes}min",
101
104
  "pisell2.venue.grid.loading": "Loading...",
102
105
  "pisell2.venue.legend.product.fallback": "Product",
103
106
  "pisell2.venue.addons.empty": "No add-ons available.",
@@ -219,6 +222,9 @@ var locales_default = {
219
222
  "pisell2.venue.checkout.hotline": "客服热线",
220
223
  "pisell2.venue.checkout.estimated.total": "预估总价",
221
224
  "pisell2.venue.checkout.change": "修改",
225
+ "pisell2.venue.checkout.duration.hours_minutes": "{hours}小时{minutes}分钟",
226
+ "pisell2.venue.checkout.duration.hours": "{hours}小时",
227
+ "pisell2.venue.checkout.duration.minutes": "{minutes}分钟",
222
228
  "pisell2.venue.grid.loading": "加载中...",
223
229
  "pisell2.venue.legend.product.fallback": "商品",
224
230
  "pisell2.venue.addons.empty": "暂无可选附加商品",
@@ -340,6 +346,9 @@ var locales_default = {
340
346
  "pisell2.venue.checkout.hotline": "客服熱線",
341
347
  "pisell2.venue.checkout.estimated.total": "預估總價",
342
348
  "pisell2.venue.checkout.change": "修改",
349
+ "pisell2.venue.checkout.duration.hours_minutes": "{hours}小時{minutes}分鐘",
350
+ "pisell2.venue.checkout.duration.hours": "{hours}小時",
351
+ "pisell2.venue.checkout.duration.minutes": "{minutes}分鐘",
343
352
  "pisell2.venue.grid.loading": "加載中...",
344
353
  "pisell2.venue.legend.product.fallback": "商品",
345
354
  "pisell2.venue.addons.empty": "暫無可選附加商品",
@@ -461,6 +470,9 @@ var locales_default = {
461
470
  "pisell2.venue.checkout.hotline": "サポート窓口",
462
471
  "pisell2.venue.checkout.estimated.total": "見積合計",
463
472
  "pisell2.venue.checkout.change": "変更",
473
+ "pisell2.venue.checkout.duration.hours_minutes": "{hours}時間{minutes}分",
474
+ "pisell2.venue.checkout.duration.hours": "{hours}時間",
475
+ "pisell2.venue.checkout.duration.minutes": "{minutes}分",
464
476
  "pisell2.venue.grid.loading": "読み込み中...",
465
477
  "pisell2.venue.legend.product.fallback": "商品",
466
478
  "pisell2.venue.addons.empty": "追加できる商品がありません。",
@@ -582,6 +594,9 @@ var locales_default = {
582
594
  "pisell2.venue.checkout.hotline": "Central de suporte",
583
595
  "pisell2.venue.checkout.estimated.total": "Total estimado",
584
596
  "pisell2.venue.checkout.change": "Alterar",
597
+ "pisell2.venue.checkout.duration.hours_minutes": "{hours} h {minutes} min",
598
+ "pisell2.venue.checkout.duration.hours": "{hours} h",
599
+ "pisell2.venue.checkout.duration.minutes": "{minutes} min",
585
600
  "pisell2.venue.grid.loading": "Carregando...",
586
601
  "pisell2.venue.legend.product.fallback": "Produto",
587
602
  "pisell2.venue.addons.empty": "Nenhum adicional disponível.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.3.136",
3
+ "version": "6.3.137",
4
4
  "scripts": {
5
5
  "dev": "father dev",
6
6
  "build": "father build",
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Form: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default Form;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Services: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default Services;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const DepositModal: (props: any) => JSX.Element;
3
- export default DepositModal;
@@ -1,107 +0,0 @@
1
- export declare const useAppointmentBooking: () => any;
2
- export declare const useShopDiscount: () => any;
3
- export declare const contextUtils: () => any;
4
- /**
5
- * @title: 监听步骤发生变化
6
- * @description:
7
- * @return {*}
8
- * @Author: WangHan
9
- * @Date: 2025-04-15 11:11
10
- */
11
- export declare const useAppointmentBookingStep: () => {
12
- getStepIndex: (type: string, skipNumber?: number) => any;
13
- stepList: any;
14
- removeStep: (key: string) => any;
15
- addStep: (props: any, stepKey?: string) => any;
16
- updateStep: (key: string, step: any) => void;
17
- nextStep: (isLog?: boolean) => any;
18
- };
19
- /**
20
- * @title: 获取商品数据
21
- * @description:
22
- * @return {*}
23
- * @Author: WangHan
24
- * @Date: 2025-04-15 11:12
25
- */
26
- export declare const useAppointmentBookingProduct: () => {
27
- checkProductType: (productId: number) => Promise<any>;
28
- getProducts: () => Promise<any>;
29
- };
30
- /**
31
- * @title: 更新购物车数据
32
- * @description:
33
- * @return {*}
34
- * @Author: WangHan
35
- * @Date: 2025-04-15 11:12
36
- */
37
- export declare const useAppointmentBookingCart: () => void;
38
- /**
39
- * @title: 获取登录状态
40
- * @description:
41
- * @return {*}
42
- * @Author: WangHan
43
- * @Date: 2025-04-15 11:14
44
- */
45
- export declare const useAppointmentBookingLogin: () => {
46
- isLogin: boolean;
47
- openLoginModal: (params: {
48
- callback: any;
49
- }) => void;
50
- };
51
- /**
52
- * @title: 获取账户
53
- * @description:
54
- * @return {*}
55
- * @Author: WangHan
56
- * @Date: 2025-04-15 11:15
57
- */
58
- export declare const useAppointmentBookingAccount: () => {
59
- accountLists: any;
60
- getHolders: () => Promise<any>;
61
- form_id: any;
62
- addAccount: (val: any, type?: string) => Promise<any>;
63
- checkAccount: (type: any) => any;
64
- };
65
- /**
66
- * @title: 获取资源数据
67
- * @description:
68
- * @return {*}
69
- * @Author: WangHan
70
- * @Date: 2025-04-15 11:29
71
- */
72
- export declare const useAppointmentBookingResource: () => {
73
- getResourceTimeSlot: (index?: number) => Promise<void>;
74
- getResourceList: () => {
75
- resources: any[];
76
- resourceCodes: any;
77
- };
78
- };
79
- /**
80
- * @title: 是否跳过资源选择步骤
81
- * @description:
82
- * @return {*}
83
- * @Author: WangHan
84
- * @Date: 2025-04-21 11:47
85
- */
86
- export declare const useIsSkipResourceStep: () => {
87
- checkSkipResourceStep: () => Promise<boolean>;
88
- };
89
- /**
90
- * @title: 获取预约配置
91
- * @description:
92
- * @return {*}
93
- * @Author: WangHan
94
- * @Date: 2025-04-24 18:15
95
- */
96
- export declare const useAppointmentBookingSetting: () => {
97
- isDateSelectedFirst: boolean;
98
- isFormSubject: boolean;
99
- isRetailTemplate: any;
100
- customPageId: any;
101
- channel: any;
102
- bookingSubject: any;
103
- setOtherData: (key: string, val: any) => any;
104
- getOtherData: (key: string) => any;
105
- formName: any;
106
- bookingSetting: any;
107
- };
@@ -1,227 +0,0 @@
1
- /**
2
- * @title: 格式化holder表数据
3
- * @description:
4
- * @param {any} data
5
- * @return {*}
6
- * @Author: WangHan
7
- * @Date: 2025-05-07 21:22
8
- */
9
- export declare const formatHolder: (data: any[]) => any[];
10
- export declare const formatGuest: (data: any[], products: any) => any[];
11
- /**
12
- * @title: 格式化购物车中资源上挂接的表单数据
13
- * @description:
14
- * @param {any} data
15
- * @param {any} resources
16
- * @return {*}
17
- * @Author: WangHan
18
- * @Date: 2025-05-06 22:22
19
- */
20
- export declare const formatCartsResources: (carts: any[], resources: any[], setPolicyIds: any) => any[];
21
- /**
22
- * @title: 格式化购物车数据
23
- * @description:
24
- * @param {any} data
25
- * @param {any} resources
26
- * @param {any} accountLists
27
- * @return {*}
28
- * @Author: WangHan
29
- * @Date: 2025-05-07 21:22
30
- */
31
- export declare const formatCarts: (data: any[], resources: any[], utils: any, accountLists?: any) => any[];
32
- /**
33
- * @title: 对资源进行排序
34
- * @description:
35
- * @param {any} currentResourcesMap
36
- * @param {any} resourceSort
37
- * @return {*}
38
- * @Author: WangHan
39
- * @Date: 2025-04-14 11:16
40
- */
41
- export declare const sortResources: (resources: any[], resourceSort: any[]) => any[] | undefined;
42
- /**
43
- * @title: 处理资源列表并提取资源代码
44
- * @description: 对资源列表进行排序,并提取 resourceCodes
45
- * @param {any[]} resources - 原始资源列表
46
- * @param {any[]} resourceSort - 资源排序配置
47
- * @return {*} 返回处理后的资源列表和资源代码数组
48
- * @Author: WangHan
49
- * @Date: 2025-11-21 15:33
50
- */
51
- export declare const processResourceList: (resources: any[], resourceSort: any[]) => {
52
- resources: any[];
53
- resourceCodes: any;
54
- };
55
- export declare const getMeAccount: (val: any[]) => any;
56
- export declare const getCustomer: (utils: any) => any;
57
- export declare const formatCustomer: (val: any) => {
58
- id: any;
59
- username: string;
60
- };
61
- export declare const formatCurrentUser: (utils: any) => {
62
- id: any;
63
- username: string;
64
- };
65
- /**
66
- * @title: 定金合并的标点符号
67
- * @description:
68
- * @return {*}
69
- * @Author: WangHan
70
- * @Date: 2025-04-21 17:52
71
- */
72
- export declare const getPunctuationMark: (index: number, totalLength: number, isEn: boolean) => any;
73
- /**
74
- * @title: 判断当前选中的资源中是否有 resource_form_id 表单id,如果有表单则下一步是选择表单
75
- * @description:
76
- * @param {any} array
77
- * @param {any} resources
78
- * @return {*}
79
- * @Author: WangHan
80
- * @Date: 2025-04-25 19:05
81
- */
82
- export declare const hasResourceFormId: (array: any[]) => boolean | undefined;
83
- export declare const formatForms: (array: any[]) => ({
84
- form_id: any;
85
- policy_id: any;
86
- id: any;
87
- cart_id: any;
88
- } | null)[];
89
- /**
90
- * @title: 打开表单
91
- * @description:
92
- * @param {string} title
93
- * @param {any} callback
94
- * @return {*}
95
- * @Author: WangHan
96
- * @Date: 2025-04-26 15:26
97
- */
98
- export declare const openForm: ({ form_id, title, callback, utils }: any) => void;
99
- /**
100
- * @title: 更新数组
101
- * @description:
102
- * @return {*}
103
- * @Author: WangHan
104
- * @Date: 2025-04-26 18:13
105
- */
106
- export declare function updateLists<T extends Record<string, any>>(list: T[], key: string, value: any, newData: Partial<T>): T[];
107
- /**
108
- * @title: 更新表单存储
109
- * @description:
110
- * @param {any} bookingForm
111
- * @param {number} id
112
- * @param {any} newData
113
- * @return {*}
114
- * @Author: WangHan
115
- * @Date: 2025-04-27 17:27
116
- */
117
- export declare const updateBookingFormStorage: (bookingForm: any, id: number | string, newData: any) => any;
118
- export declare const Toast: (text: string) => void;
119
- /**
120
- * @title: 添加或移除表单步骤
121
- * @description:
122
- * @param {any} param1
123
- * @return {*}
124
- * @Author: WangHan
125
- * @Date: 2025-05-06 21:51
126
- */
127
- export declare const checkHasFormStep: ({ setIsErrorHolder, nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId, currentStep, stepList, appointmentBooking, locales, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }: any) => void;
128
- export declare const getCartCurrentResourceData: (cart: any, currentKey: any, resources: any[]) => any;
129
- /**
130
- * @title: 获取购物车资源列表
131
- * @description:
132
- * @return {*}
133
- * @Author: WangHan
134
- * @Date: 2025-05-25 13:56
135
- */
136
- export declare const getMultiResources: (cart: any, currentSelectedResource: any, currentKey: string) => any[];
137
- export declare const getCurrentBoard: (appointmentBooking: any, code: string) => any;
138
- /**
139
- * @title:
140
- * @description: 根据资源code获取资源标题
141
- * @param {any} appointmentBooking
142
- * @param {string} code
143
- * @return {*}
144
- * @Author: WangHan
145
- * @Date: 2025-05-24 18:51
146
- */
147
- export declare const getResourceTitle: (appointmentBooking: any, code: string, utils: any, originResource: any) => string;
148
- /**
149
- * @title: 监测购物车中是否有没有选择资源的
150
- * @description:
151
- * @param {any} carts
152
- * @return {*}
153
- * @Author: WangHan
154
- * @Date: 2025-05-24 18:47
155
- */
156
- export declare const checkAndMarkCartRenderError: (carts: any, appointmentBooking?: any, utils?: any) => {
157
- hasError: boolean;
158
- updatedCartList: any;
159
- } | {
160
- hasError?: undefined;
161
- updatedCartList?: undefined;
162
- };
163
- /**
164
- * @title: 查表表单步骤插入到哪个步骤的后面的key
165
- * @description:
166
- * @param {string} currentKey
167
- * @param {any} stepList
168
- * @return {*}
169
- * @Author: WangHan
170
- * @Date: 2025-05-24 19:05
171
- */
172
- export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[]) => any;
173
- /**
174
- * @title: 监测holder数据
175
- * @description:
176
- * @param {any} isFormSubject
177
- * @param {any} checkAccount
178
- * @param {any} carts
179
- * @return {*}
180
- * @Author: WangHan
181
- * @Date: 2025-05-24 22:46
182
- */
183
- export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
184
- hasError: boolean;
185
- updatedCartList: any[];
186
- };
187
- export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
188
- isRequired: boolean;
189
- isSystem: boolean;
190
- isSkip: boolean;
191
- form_id: number;
192
- form_code: any;
193
- cart_id: string;
194
- resource_form_id: string;
195
- policy_id: string;
196
- } | {
197
- isRequired?: undefined;
198
- isSystem?: undefined;
199
- isSkip?: undefined;
200
- form_id?: undefined;
201
- form_code?: undefined;
202
- cart_id?: undefined;
203
- resource_form_id?: undefined;
204
- policy_id?: undefined;
205
- };
206
- export declare const currentRenderLists: (resources: any[], code: any) => any;
207
- /**
208
- * @title: 更新购物车
209
- * @description:
210
- * @param {any} carts
211
- * @param {any} value
212
- * @return {*}
213
- * @Author: WangHan
214
- * @Date: 2025-05-25 23:17
215
- */
216
- export declare const updateCartResources: (item: any, value?: any, currentSelectedResources?: any) => any;
217
- /**
218
- * @title: 根据步骤key清空数据
219
- * @param {string} key - 当前步骤的key
220
- * @param {any} appointmentBooking - 预约预订实例
221
- * @param {(times: any[]) => void} setTimes - 设置时间列表的回调函数
222
- * @return {string[]} 返回需要清空的数据类型数组
223
- * @Author: WangHan
224
- * @Date: 2025-11-21 15:40
225
- */
226
- export declare const clearDataByStepKey: (key: string, appointmentBooking: any, setTimes?: ((times: any[]) => void) | undefined) => string[] | undefined;
227
- export declare const nextStepLog: (utils: any, title: string, content?: any) => void;