@pisell/private-materials 6.6.59 → 6.6.61

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 +2 -2
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/booking/components/footer/utils.js +79 -75
  12. package/es/components/eftposPay/hooks.d.ts +1 -1
  13. package/es/components/eftposPay/store/index.d.ts +2 -2
  14. package/es/components/index.d.ts +2 -1
  15. package/es/components/index.js +2 -1
  16. package/es/components/pisellCashCounting/PisellCashCounting.d.ts +5 -0
  17. package/es/components/pisellCashCounting/PisellCashCounting.js +121 -0
  18. package/es/components/pisellCashCounting/PisellCashCounting.less +263 -0
  19. package/es/components/pisellCashCounting/components/CashCountingModal/index.d.ts +20 -0
  20. package/es/components/pisellCashCounting/components/CashCountingModal/index.js +250 -0
  21. package/es/components/pisellCashCounting/components/CashCountingModal/index.less +279 -0
  22. package/es/components/pisellCashCounting/hooks.d.ts +21 -0
  23. package/es/components/pisellCashCounting/hooks.js +193 -0
  24. package/es/components/pisellCashCounting/index.d.ts +2 -0
  25. package/es/components/pisellCashCounting/index.js +1 -0
  26. package/es/components/pisellCashCounting/locales.d.ts +118 -0
  27. package/es/components/pisellCashCounting/locales.js +117 -0
  28. package/es/components/pisellCashCounting/types.d.ts +85 -0
  29. package/es/components/pisellCashCounting/types.js +1 -0
  30. package/es/components/pisellCashCounting/utils.d.ts +10 -0
  31. package/es/components/pisellCashCounting/utils.js +40 -0
  32. package/es/hooks/useResponsive.d.ts +8 -0
  33. package/es/hooks/useResponsive.js +43 -0
  34. package/es/hooks/useThemeTokens.d.ts +7 -0
  35. package/es/hooks/useThemeTokens.js +20 -0
  36. package/es/index.d.ts +1 -0
  37. package/es/index.js +2 -1
  38. package/es/pro/NumericStepper/index.d.ts +75 -0
  39. package/es/pro/NumericStepper/index.js +301 -0
  40. package/es/pro/NumericStepper/index.less +364 -0
  41. package/es/pro/keyboards/index.d.ts +2 -0
  42. package/es/pro/keyboards/index.js +1 -0
  43. package/es/pro/keyboards/locales.d.ts +38 -0
  44. package/es/pro/keyboards/locales.js +57 -0
  45. package/es/pro/keyboards/numberKeyboard/index.d.ts +16 -0
  46. package/es/pro/keyboards/numberKeyboard/index.js +523 -0
  47. package/es/pro/keyboards/numberKeyboard/index.less +59 -0
  48. package/es/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  49. package/es/pro/keyboards/numberKeyboard/types.js +1 -0
  50. package/es/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +3 -1
  51. package/es/pro/pisellPriceKeyboardModal/types.d.ts +2 -0
  52. package/lib/components/booking/components/footer/utils.js +6 -3
  53. package/lib/components/eftposPay/hooks.d.ts +1 -1
  54. package/lib/components/eftposPay/store/index.d.ts +2 -2
  55. package/lib/components/index.d.ts +2 -1
  56. package/lib/components/index.js +3 -0
  57. package/lib/components/pisellCashCounting/PisellCashCounting.d.ts +5 -0
  58. package/lib/components/pisellCashCounting/PisellCashCounting.js +168 -0
  59. package/lib/components/pisellCashCounting/PisellCashCounting.less +263 -0
  60. package/lib/components/pisellCashCounting/components/CashCountingModal/index.d.ts +20 -0
  61. package/lib/components/pisellCashCounting/components/CashCountingModal/index.js +171 -0
  62. package/lib/components/pisellCashCounting/components/CashCountingModal/index.less +279 -0
  63. package/lib/components/pisellCashCounting/hooks.d.ts +21 -0
  64. package/lib/components/pisellCashCounting/hooks.js +189 -0
  65. package/lib/components/pisellCashCounting/index.d.ts +2 -0
  66. package/lib/components/pisellCashCounting/index.js +35 -0
  67. package/lib/components/pisellCashCounting/locales.d.ts +118 -0
  68. package/lib/components/pisellCashCounting/locales.js +141 -0
  69. package/lib/components/pisellCashCounting/types.d.ts +85 -0
  70. package/lib/components/pisellCashCounting/types.js +17 -0
  71. package/lib/components/pisellCashCounting/utils.d.ts +10 -0
  72. package/lib/components/pisellCashCounting/utils.js +59 -0
  73. package/lib/hooks/useResponsive.d.ts +8 -0
  74. package/lib/hooks/useResponsive.js +48 -0
  75. package/lib/hooks/useThemeTokens.d.ts +7 -0
  76. package/lib/hooks/useThemeTokens.js +40 -0
  77. package/lib/index.d.ts +1 -0
  78. package/lib/index.js +3 -0
  79. package/lib/pro/NumericStepper/index.d.ts +75 -0
  80. package/lib/pro/NumericStepper/index.js +338 -0
  81. package/lib/pro/NumericStepper/index.less +364 -0
  82. package/lib/pro/keyboards/index.d.ts +2 -0
  83. package/lib/pro/keyboards/index.js +39 -0
  84. package/lib/pro/keyboards/locales.d.ts +38 -0
  85. package/lib/pro/keyboards/locales.js +61 -0
  86. package/lib/pro/keyboards/numberKeyboard/index.d.ts +16 -0
  87. package/lib/pro/keyboards/numberKeyboard/index.js +400 -0
  88. package/lib/pro/keyboards/numberKeyboard/index.less +59 -0
  89. package/lib/pro/keyboards/numberKeyboard/types.d.ts +63 -0
  90. package/lib/pro/keyboards/numberKeyboard/types.js +17 -0
  91. package/lib/pro/pisellPriceKeyboardModal/PisellPriceKeyboardModal.js +3 -1
  92. package/lib/pro/pisellPriceKeyboardModal/types.d.ts +2 -0
  93. package/lowcode/pisell-cash-counting/meta.ts +167 -0
  94. package/lowcode/pisell-cash-counting/snippets.ts +13 -0
  95. package/package.json +4 -4
@@ -287,9 +287,13 @@ var formatHolders = function formatHolders(state, item, values) {
287
287
  * @Date: 2024-12-23 12:05
288
288
  */
289
289
  export var formatProductPrice = function formatProductPrice(item) {
290
- var _item$_extend6, _item$price, _item$_extend7, _item$variant;
290
+ var _item$_extend6, _item$price, _item$_extend7, _item$_extend8, _item$_extend9, _item$variant;
291
291
  var other = (_item$_extend6 = item._extend) === null || _item$_extend6 === void 0 ? void 0 : _item$_extend6.other;
292
292
  var price = Number((_item$price = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price !== void 0 ? _item$price : item === null || item === void 0 || (_item$_extend7 = item._extend) === null || _item$_extend7 === void 0 ? void 0 : _item$_extend7.price);
293
+ if (isString((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.priceOverride) || isNumber((_item$_extend9 = item._extend) === null || _item$_extend9 === void 0 ? void 0 : _item$_extend9.priceOverride)) {
294
+ var _item$_extend10;
295
+ price = Number(item === null || item === void 0 || (_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.price);
296
+ }
293
297
 
294
298
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
295
299
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant = item.variant) === null || _item$variant === void 0 ? void 0 : _item$variant.length) > 0) {
@@ -317,8 +321,8 @@ export var formatProductPrice = function formatProductPrice(item) {
317
321
  * @returns
318
322
  */
319
323
  export var formatOriginalPrice = function formatOriginalPrice(item) {
320
- var _item$_extend8;
321
- return Number((_item$_extend8 = item._extend) === null || _item$_extend8 === void 0 ? void 0 : _item$_extend8.origin_total);
324
+ var _item$_extend11;
325
+ return Number((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.origin_total);
322
326
  };
323
327
 
324
328
  /**
@@ -327,12 +331,12 @@ export var formatOriginalPrice = function formatOriginalPrice(item) {
327
331
  * @returns
328
332
  */
329
333
  var getBundleProductDiscountDifference = function getBundleProductDiscountDifference(item) {
330
- var _item$_extend9, _item$_extend10, _item$_extend11;
331
- if (!((_item$_extend9 = item._extend) !== null && _item$_extend9 !== void 0 && (_item$_extend9 = _item$_extend9.other) !== null && _item$_extend9 !== void 0 && _item$_extend9.bundle) || !isArr((_item$_extend10 = item._extend) === null || _item$_extend10 === void 0 || (_item$_extend10 = _item$_extend10.other) === null || _item$_extend10 === void 0 ? void 0 : _item$_extend10.bundle)) {
334
+ var _item$_extend12, _item$_extend13, _item$_extend14;
335
+ if (!((_item$_extend12 = item._extend) !== null && _item$_extend12 !== void 0 && (_item$_extend12 = _item$_extend12.other) !== null && _item$_extend12 !== void 0 && _item$_extend12.bundle) || !isArr((_item$_extend13 = item._extend) === null || _item$_extend13 === void 0 || (_item$_extend13 = _item$_extend13.other) === null || _item$_extend13 === void 0 ? void 0 : _item$_extend13.bundle)) {
332
336
  return new Decimal(0).toNumber();
333
337
  }
334
338
  var discountDifference = new Decimal(0);
335
- getBundleDiscountList(((_item$_extend11 = item._extend) === null || _item$_extend11 === void 0 || (_item$_extend11 = _item$_extend11.other) === null || _item$_extend11 === void 0 ? void 0 : _item$_extend11.bundle) || []).forEach(function (cur) {
339
+ getBundleDiscountList(((_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 || (_item$_extend14 = _item$_extend14.other) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.bundle) || []).forEach(function (cur) {
336
340
  var _cur$metadata2;
337
341
  discountDifference = discountDifference.add(new Decimal(((_cur$metadata2 = cur.metadata) === null || _cur$metadata2 === void 0 ? void 0 : _cur$metadata2.product_discount_difference) || 0));
338
342
  });
@@ -345,28 +349,28 @@ var getBundleProductDiscountDifference = function getBundleProductDiscountDiffer
345
349
  * @returns
346
350
  */
347
351
  export var formatSellingPrice = function formatSellingPrice(item) {
348
- var _item$_extend12;
349
- return Number((_item$_extend12 = item._extend) === null || _item$_extend12 === void 0 ? void 0 : _item$_extend12.total);
352
+ var _item$_extend15;
353
+ return Number((_item$_extend15 = item._extend) === null || _item$_extend15 === void 0 ? void 0 : _item$_extend15.total);
350
354
  };
351
355
  var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
352
- var _item$_extend13, _item$_extend$holder_, _item$_extend14, _item$_extend15, _item$_extend17;
356
+ var _item$_extend16, _item$_extend$holder_, _item$_extend17, _item$_extend18, _item$_extend20;
353
357
  var metadata = {};
354
- if ((_item$_extend13 = item._extend) !== null && _item$_extend13 !== void 0 && _item$_extend13.capacity) {
358
+ if ((_item$_extend16 = item._extend) !== null && _item$_extend16 !== void 0 && _item$_extend16.capacity) {
355
359
  metadata.capacity = item._extend.capacity;
356
360
  }
357
361
  if (item._extend.groupId) {
358
362
  metadata.groupId = item._extend.groupId;
359
363
  }
360
364
  // if (item._extend?.holder_id) {
361
- metadata.holder_id = (_item$_extend$holder_ = (_item$_extend14 = item._extend) === null || _item$_extend14 === void 0 ? void 0 : _item$_extend14.holder_id) !== null && _item$_extend$holder_ !== void 0 ? _item$_extend$holder_ : null;
365
+ metadata.holder_id = (_item$_extend$holder_ = (_item$_extend17 = item._extend) === null || _item$_extend17 === void 0 ? void 0 : _item$_extend17.holder_id) !== null && _item$_extend$holder_ !== void 0 ? _item$_extend$holder_ : null;
362
366
  // }
363
- if (isMultiDayPrices && (_item$_extend15 = item._extend) !== null && _item$_extend15 !== void 0 && _item$_extend15.multiDayPrices) {
364
- var _item$_extend16;
365
- metadata.multiDayPrices = (_item$_extend16 = item._extend) === null || _item$_extend16 === void 0 ? void 0 : _item$_extend16.multiDayPrices;
367
+ if (isMultiDayPrices && (_item$_extend18 = item._extend) !== null && _item$_extend18 !== void 0 && _item$_extend18.multiDayPrices) {
368
+ var _item$_extend19;
369
+ metadata.multiDayPrices = (_item$_extend19 = item._extend) === null || _item$_extend19 === void 0 ? void 0 : _item$_extend19.multiDayPrices;
366
370
  }
367
- if ((_item$_extend17 = item._extend) !== null && _item$_extend17 !== void 0 && _item$_extend17.unique_identification_number) {
368
- var _item$_extend18;
369
- metadata.unique_identification_number = (_item$_extend18 = item._extend) === null || _item$_extend18 === void 0 ? void 0 : _item$_extend18.unique_identification_number;
371
+ if ((_item$_extend20 = item._extend) !== null && _item$_extend20 !== void 0 && _item$_extend20.unique_identification_number) {
372
+ var _item$_extend21;
373
+ metadata.unique_identification_number = (_item$_extend21 = item._extend) === null || _item$_extend21 === void 0 ? void 0 : _item$_extend21.unique_identification_number;
370
374
  }
371
375
  if (item.discount_list && isArr(item.discount_list)) {
372
376
  metadata.product_discount_difference = item.discount_list.filter(function (item) {
@@ -380,37 +384,37 @@ var formatMetaData = function formatMetaData(item, isMultiDayPrices) {
380
384
  return metadata;
381
385
  };
382
386
  var formatProductMetadata = function formatProductMetadata(item) {
383
- var _item$_extend19, _item$_extend21, _item$_extend23, _item$_extend25, _item$_extend27, _item$_extend29;
387
+ var _item$_extend22, _item$_extend24, _item$_extend26, _item$_extend28, _item$_extend30, _item$_extend32;
384
388
  var metadata = {};
385
389
 
386
390
  // 主商品+非原价(加减价)子商品附加费
387
- if ((_item$_extend19 = item._extend) !== null && _item$_extend19 !== void 0 && _item$_extend19.surcharge_fee) {
388
- var _item$_extend20;
389
- metadata.main_product_attached_bundle_surcharge_fee = (_item$_extend20 = item._extend) === null || _item$_extend20 === void 0 ? void 0 : _item$_extend20.surcharge_fee;
391
+ if ((_item$_extend22 = item._extend) !== null && _item$_extend22 !== void 0 && _item$_extend22.surcharge_fee) {
392
+ var _item$_extend23;
393
+ metadata.main_product_attached_bundle_surcharge_fee = (_item$_extend23 = item._extend) === null || _item$_extend23 === void 0 ? void 0 : _item$_extend23.surcharge_fee;
390
394
  }
391
395
 
392
396
  // 主商品+非原价(加减价)子商品税费
393
- if ((_item$_extend21 = item._extend) !== null && _item$_extend21 !== void 0 && _item$_extend21.main_product_attached_bundle_tax_fee) {
394
- var _item$_extend22;
395
- metadata.main_product_attached_bundle_tax_fee = (_item$_extend22 = item._extend) === null || _item$_extend22 === void 0 ? void 0 : _item$_extend22.main_product_attached_bundle_tax_fee;
397
+ if ((_item$_extend24 = item._extend) !== null && _item$_extend24 !== void 0 && _item$_extend24.main_product_attached_bundle_tax_fee) {
398
+ var _item$_extend25;
399
+ metadata.main_product_attached_bundle_tax_fee = (_item$_extend25 = item._extend) === null || _item$_extend25 === void 0 ? void 0 : _item$_extend25.main_product_attached_bundle_tax_fee;
396
400
  }
397
401
 
398
402
  // 可选,附加费均摊舍入金额
399
- if ((_item$_extend23 = item._extend) !== null && _item$_extend23 !== void 0 && _item$_extend23.surcharge_rounding_remainder) {
400
- var _item$_extend24;
401
- metadata.surcharge_rounding_remainder = (_item$_extend24 = item._extend) === null || _item$_extend24 === void 0 ? void 0 : _item$_extend24.surcharge_rounding_remainder;
403
+ if ((_item$_extend26 = item._extend) !== null && _item$_extend26 !== void 0 && _item$_extend26.surcharge_rounding_remainder) {
404
+ var _item$_extend27;
405
+ metadata.surcharge_rounding_remainder = (_item$_extend27 = item._extend) === null || _item$_extend27 === void 0 ? void 0 : _item$_extend27.surcharge_rounding_remainder;
402
406
  }
403
407
 
404
408
  // 可选,税费均摊舍入金额(折后税费)
405
- if ((_item$_extend25 = item._extend) !== null && _item$_extend25 !== void 0 && _item$_extend25.tax_fee_rounding_remainder) {
406
- var _item$_extend26;
407
- metadata.tax_fee_rounding_remainder = (_item$_extend26 = item._extend) === null || _item$_extend26 === void 0 ? void 0 : _item$_extend26.tax_fee_rounding_remainder;
409
+ if ((_item$_extend28 = item._extend) !== null && _item$_extend28 !== void 0 && _item$_extend28.tax_fee_rounding_remainder) {
410
+ var _item$_extend29;
411
+ metadata.tax_fee_rounding_remainder = (_item$_extend29 = item._extend) === null || _item$_extend29 === void 0 ? void 0 : _item$_extend29.tax_fee_rounding_remainder;
408
412
  }
409
413
 
410
414
  // 使用的附加费id列表
411
- if ((_item$_extend27 = item._extend) !== null && _item$_extend27 !== void 0 && _item$_extend27.relation_surcharge_ids) {
412
- var _item$_extend28;
413
- metadata.relation_surcharge_ids = (_item$_extend28 = item._extend) === null || _item$_extend28 === void 0 ? void 0 : _item$_extend28.relation_surcharge_ids;
415
+ if ((_item$_extend30 = item._extend) !== null && _item$_extend30 !== void 0 && _item$_extend30.relation_surcharge_ids) {
416
+ var _item$_extend31;
417
+ metadata.relation_surcharge_ids = (_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.relation_surcharge_ids;
414
418
  }
415
419
  if (item.discount_list && isArr(item.discount_list)) {
416
420
  metadata.product_discount_difference = item.discount_list.filter(function (item) {
@@ -423,17 +427,17 @@ var formatProductMetadata = function formatProductMetadata(item) {
423
427
  }
424
428
 
425
429
  // 如果 _extend 有unique_identification_number,往 metadata 里补充一个
426
- if ((_item$_extend29 = item._extend) !== null && _item$_extend29 !== void 0 && _item$_extend29.unique_identification_number) {
427
- var _item$_extend30;
428
- metadata.unique_identification_number = (_item$_extend30 = item._extend) === null || _item$_extend30 === void 0 ? void 0 : _item$_extend30.unique_identification_number;
430
+ if ((_item$_extend32 = item._extend) !== null && _item$_extend32 !== void 0 && _item$_extend32.unique_identification_number) {
431
+ var _item$_extend33;
432
+ metadata.unique_identification_number = (_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.unique_identification_number;
429
433
  }
430
434
  return metadata;
431
435
  };
432
436
  // 获取商品价格 包含组合规格
433
437
  export var getSourceProductPrice = function getSourceProductPrice(item) {
434
- var _item$_extend31, _item$price2, _item$_extend32, _item$variant2;
435
- var other = (_item$_extend31 = item._extend) === null || _item$_extend31 === void 0 ? void 0 : _item$_extend31.other;
436
- var price = Number((_item$price2 = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price2 !== void 0 ? _item$price2 : (_item$_extend32 = item._extend) === null || _item$_extend32 === void 0 ? void 0 : _item$_extend32.price);
438
+ var _item$_extend34, _item$price2, _item$_extend35, _item$variant2;
439
+ var other = (_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.other;
440
+ var price = Number((_item$price2 = item === null || item === void 0 ? void 0 : item.price) !== null && _item$price2 !== void 0 ? _item$price2 : (_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.price);
437
441
 
438
442
  // 组合规格: 根据当前选择的组合规格id 和商品的组合规格列表 获取当前商品的价格
439
443
  if ((other === null || other === void 0 ? void 0 : other.product_variant_id) > 0 && (item === null || item === void 0 || (_item$variant2 = item.variant) === null || _item$variant2 === void 0 ? void 0 : _item$variant2.length) > 0) {
@@ -449,8 +453,8 @@ export var getSourceProductPrice = function getSourceProductPrice(item) {
449
453
 
450
454
  // 获取主商品价格 要增加option
451
455
  export var getMainProductSellingPrice = function getMainProductSellingPrice(item) {
452
- var _item$_extend33, _item$_extend34, _item$_extend$other, _item$_extend$other2, _item$_extend35;
453
- if (!isNumber((_item$_extend33 = item._extend) === null || _item$_extend33 === void 0 ? void 0 : _item$_extend33.main_product_selling_price) && !isString((_item$_extend34 = item._extend) === null || _item$_extend34 === void 0 ? void 0 : _item$_extend34.main_product_selling_price)) {
456
+ var _item$_extend36, _item$_extend37, _item$_extend$other, _item$_extend$other2, _item$_extend38;
457
+ if (!isNumber((_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.main_product_selling_price) && !isString((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.main_product_selling_price)) {
454
458
  return undefined;
455
459
  }
456
460
  var optionPrice = new Decimal(0);
@@ -466,7 +470,7 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
466
470
  optionPrice = optionPrice.sub(getOptionDiscountAmount((item === null || item === void 0 ? void 0 : item.discount_list) || []));
467
471
  }
468
472
  }
469
- return new Decimal((_item$_extend35 = item._extend) === null || _item$_extend35 === void 0 ? void 0 : _item$_extend35.main_product_selling_price).add(optionPrice).toNumber();
473
+ return new Decimal((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.main_product_selling_price).add(optionPrice).toNumber();
470
474
  };
471
475
 
472
476
  /**
@@ -478,11 +482,11 @@ export var getMainProductSellingPrice = function getMainProductSellingPrice(item
478
482
  * @Date: 2024-12-07 14:21
479
483
  */
480
484
  var formatProducts = function formatProducts(item, quantity) {
481
- var _item$_extend36, _getMainProductSellin, _item$_extend37, _item$_extend38, _item$_extend39, _item$_extend40;
485
+ var _item$_extend39, _getMainProductSellin, _item$_extend40, _item$_extend41, _item$_extend42, _item$_extend43;
482
486
  var total = Number(item._extend.total);
483
487
  var origin_total = Number(item._extend.origin_total);
484
488
  var discount_amount = origin_total - total;
485
- var bundleDiscountList = getBundleDiscountList(((_item$_extend36 = item._extend) === null || _item$_extend36 === void 0 || (_item$_extend36 = _item$_extend36.other) === null || _item$_extend36 === void 0 ? void 0 : _item$_extend36.bundle) || []);
489
+ var bundleDiscountList = getBundleDiscountList(((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 || (_item$_extend39 = _item$_extend39.other) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.bundle) || []);
486
490
  var discount_list = _toConsumableArray((item === null || item === void 0 ? void 0 : item.discount_list) || []);
487
491
  discount_list.push.apply(discount_list, _toConsumableArray(bundleDiscountList));
488
492
 
@@ -511,15 +515,15 @@ var formatProducts = function formatProducts(item, quantity) {
511
515
  "discount_amount": notManualDiscount.length > 0 ? 0 : discount_amount,
512
516
  "product_discount_reason": item._extend.discount_reason || '',
513
517
  "is_charge_tax": item.is_charge_tax,
514
- "note": ((_item$_extend37 = item._extend) === null || _item$_extend37 === void 0 ? void 0 : _item$_extend37.note) || '',
518
+ "note": ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.note) || '',
515
519
  "discountway": item._extend.discountway || "num",
516
520
  "discount_per": item._extend.discount_per,
517
521
  "discount_type": item._extend.discount_type || discount_type,
518
522
  "order_detail_id": item._extend.order_detail_id || 0,
519
- "product_bundle": formatProductBundle((_item$_extend38 = item._extend) === null || _item$_extend38 === void 0 || (_item$_extend38 = _item$_extend38.other) === null || _item$_extend38 === void 0 ? void 0 : _item$_extend38.bundle),
523
+ "product_bundle": formatProductBundle((_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 || (_item$_extend41 = _item$_extend41.other) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.bundle),
520
524
  "bundle_edit": item._extend.bundle_edit || bundleDiscountList.length ? 1 : 0,
521
- "product_option_item": formatProductOption((_item$_extend39 = item._extend) === null || _item$_extend39 === void 0 || (_item$_extend39 = _item$_extend39.other) === null || _item$_extend39 === void 0 ? void 0 : _item$_extend39.option),
522
- "product_variant_id": ((_item$_extend40 = item._extend) === null || _item$_extend40 === void 0 || (_item$_extend40 = _item$_extend40.other) === null || _item$_extend40 === void 0 ? void 0 : _item$_extend40.product_variant_id) || 0,
525
+ "product_option_item": formatProductOption((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 || (_item$_extend42 = _item$_extend42.other) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.option),
526
+ "product_variant_id": ((_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 || (_item$_extend43 = _item$_extend43.other) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.product_variant_id) || 0,
523
527
  "discount_list": notManualDiscount,
524
528
  metadata: formatProductMetadata(item),
525
529
  // checkout 需求新增字段
@@ -544,8 +548,8 @@ var formatDayRelationProducts = function formatDayRelationProducts(data, booking
544
548
 
545
549
  // 过滤出卡片中的普通商品
546
550
  var relation_products = list === null || list === void 0 ? void 0 : list.filter(function (item) {
547
- var _item$_extend41;
548
- var holderId = (_item$_extend41 = item._extend) === null || _item$_extend41 === void 0 ? void 0 : _item$_extend41.holder_id;
551
+ var _item$_extend44;
552
+ var holderId = (_item$_extend44 = item._extend) === null || _item$_extend44 === void 0 ? void 0 : _item$_extend44.holder_id;
549
553
  var bookingHolderId = booking_item._extend.holder_id;
550
554
  var isDayBookingProduct = appointmentTypes.includes(item.extension_type);
551
555
  return holderId && holderId === bookingHolderId && !isDayBookingProduct;
@@ -571,15 +575,15 @@ var formatAppointmentProductLists = function formatAppointmentProductLists(data)
571
575
 
572
576
  // 找出预约商品
573
577
  list = list.filter(function (item) {
574
- var _item$_extend42;
575
- return ((_item$_extend42 = item._extend) === null || _item$_extend42 === void 0 ? void 0 : _item$_extend42.holder_id) && !isNormalProductByDurationSchedule(item);
578
+ var _item$_extend45;
579
+ return ((_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.holder_id) && !isNormalProductByDurationSchedule(item);
576
580
  });
577
581
 
578
582
  // 对预约商品列表根据holder_id进行分组
579
583
  var groupMap = new Map();
580
584
  list.forEach(function (item) {
581
- var _item$_extend43;
582
- var key = (_item$_extend43 = item._extend) === null || _item$_extend43 === void 0 ? void 0 : _item$_extend43.holder_id; // 分组键
585
+ var _item$_extend46;
586
+ var key = (_item$_extend46 = item._extend) === null || _item$_extend46 === void 0 ? void 0 : _item$_extend46.holder_id; // 分组键
583
587
  if (!groupMap.has(key)) {
584
588
  groupMap.set(key, []);
585
589
  }
@@ -615,8 +619,8 @@ var getHolderByIndex = function getHolderByIndex(holder, index) {
615
619
  export var getHasMultiDayProduct = function getHasMultiDayProduct(data) {
616
620
  var list = data.service.value;
617
621
  var isHas = list.some(function (item) {
618
- var _item$_extend44;
619
- return (_item$_extend44 = item._extend) === null || _item$_extend44 === void 0 ? void 0 : _item$_extend44.groupId;
622
+ var _item$_extend47;
623
+ return (_item$_extend47 = item._extend) === null || _item$_extend47 === void 0 ? void 0 : _item$_extend47.groupId;
620
624
  });
621
625
  return isHas;
622
626
  };
@@ -656,7 +660,7 @@ var formatBookings = function formatBookings(data, values) {
656
660
  var bookings = [];
657
661
  var obj = {};
658
662
  list.forEach(function (item) {
659
- var _item$_extend45, _item$_extend50, _item$_extend51;
663
+ var _item$_extend48, _item$_extend53, _item$_extend54;
660
664
  // 自定义商品直接使用 _extend 中的数据,并将 id 转换为 0 提交给后端
661
665
  if (item.isCustomItem) {
662
666
  bookings.push(_objectSpread(_objectSpread({}, item._extend), {}, {
@@ -666,7 +670,7 @@ var formatBookings = function formatBookings(data, values) {
666
670
  }
667
671
 
668
672
  // 当前商品是跨日预约商品
669
- var isMultiDay = (_item$_extend45 = item._extend) === null || _item$_extend45 === void 0 ? void 0 : _item$_extend45.groupId;
673
+ var isMultiDay = (_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.groupId;
670
674
  var start_date = item._extend.startDate.format('YYYY-MM-DD');
671
675
  var end_date = item._extend.endDate.format('YYYY-MM-DD');
672
676
  var end_time = item._extend.endDate.format('HH:mm');
@@ -680,9 +684,9 @@ var formatBookings = function formatBookings(data, values) {
680
684
 
681
685
  // 跨日预约下的普通商品
682
686
  if (isDay) {
683
- var _item$_extend46, _item$_extend47, _item$_extend48, _item$_extend49;
684
- var startDate = ((_item$_extend46 = item._extend) === null || _item$_extend46 === void 0 ? void 0 : _item$_extend46.startDate) || ((_item$_extend47 = item._extend) === null || _item$_extend47 === void 0 ? void 0 : _item$_extend47.start_date);
685
- var endDate = ((_item$_extend48 = item._extend) === null || _item$_extend48 === void 0 ? void 0 : _item$_extend48.endDate) || ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.end_date);
687
+ var _item$_extend49, _item$_extend50, _item$_extend51, _item$_extend52;
688
+ var startDate = ((_item$_extend49 = item._extend) === null || _item$_extend49 === void 0 ? void 0 : _item$_extend49.startDate) || ((_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.start_date);
689
+ var endDate = ((_item$_extend51 = item._extend) === null || _item$_extend51 === void 0 ? void 0 : _item$_extend51.endDate) || ((_item$_extend52 = item._extend) === null || _item$_extend52 === void 0 ? void 0 : _item$_extend52.end_date);
686
690
  var _formatDayTime = formatDayTime({
687
691
  startDate: startDate,
688
692
  endDate: endDate
@@ -708,8 +712,8 @@ var formatBookings = function formatBookings(data, values) {
708
712
  // 跨日预约处理: 跨日预约所有数据都在list中, 每一组预约通过groupId进行分组
709
713
  // 通过obj 记录下每个GroupId第一次出现的时机, 第一次出现需要设置 metadata.multiDayPrices
710
714
  // 后续出现不需要设置 metadata.multiDayPrices. 节省体积
711
- var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend50 = item._extend) === null || _item$_extend50 === void 0 ? void 0 : _item$_extend50.groupId];
712
- if (!((_item$_extend51 = item._extend) !== null && _item$_extend51 !== void 0 && _item$_extend51.unique_identification_number)) {
715
+ var isSetGroupId = obj[item === null || item === void 0 || (_item$_extend53 = item._extend) === null || _item$_extend53 === void 0 ? void 0 : _item$_extend53.groupId];
716
+ if (!((_item$_extend54 = item._extend) !== null && _item$_extend54 !== void 0 && _item$_extend54.unique_identification_number)) {
713
717
  var unique_identification_number = getUniqueId();
714
718
  item._extend.unique_identification_number = unique_identification_number;
715
719
  }
@@ -788,16 +792,16 @@ var formatRelationProducts = function formatRelationProducts(data, type) {
788
792
  var list = ((_data$service = data.service) === null || _data$service === void 0 ? void 0 : _data$service.value) || [];
789
793
  // open items 下的商品
790
794
  list = list.filter(function (item) {
791
- var _item$_extend52;
795
+ var _item$_extend55;
792
796
  return (
793
797
  // 跨日预约把普通商品加在relationProducts 活动预约按之前逻辑
794
- type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend52 = item._extend) === null || _item$_extend52 === void 0 ? void 0 : _item$_extend52.holder_id) && appointmentTypes.includes(item.extension_type)
798
+ type === 'day' ? isNormalProductByDurationSchedule(item) : ((_item$_extend55 = item._extend) === null || _item$_extend55 === void 0 ? void 0 : _item$_extend55.holder_id) && appointmentTypes.includes(item.extension_type)
795
799
  );
796
800
  });
797
801
  var relationProducts = [];
798
802
  relationProducts = list.map(function (item) {
799
- var _item$_extend53;
800
- if (!((_item$_extend53 = item._extend) !== null && _item$_extend53 !== void 0 && _item$_extend53.unique_identification_number)) {
803
+ var _item$_extend56;
804
+ if (!((_item$_extend56 = item._extend) !== null && _item$_extend56 !== void 0 && _item$_extend56.unique_identification_number)) {
801
805
  var unique_identification_number = getUniqueId();
802
806
  item._extend.unique_identification_number = unique_identification_number;
803
807
  }
@@ -816,8 +820,8 @@ var formatNormalProducts = function formatNormalProducts(data) {
816
820
  });
817
821
  var relationProducts = [];
818
822
  relationProducts = list.map(function (item) {
819
- var _item$_extend54;
820
- if (!((_item$_extend54 = item._extend) !== null && _item$_extend54 !== void 0 && _item$_extend54.unique_identification_number)) {
823
+ var _item$_extend57;
824
+ if (!((_item$_extend57 = item._extend) !== null && _item$_extend57 !== void 0 && _item$_extend57.unique_identification_number)) {
821
825
  var unique_identification_number = getUniqueId();
822
826
  item._extend.unique_identification_number = unique_identification_number;
823
827
  }
@@ -942,19 +946,19 @@ export var checkHolderIsError = function checkHolderIsError(state) {
942
946
  var _state$client;
943
947
  var errorRowKey = '';
944
948
  var holderError = state.service.value.some(function (item) {
945
- var _item$_extend$holder_2, _item$_extend56;
949
+ var _item$_extend$holder_2, _item$_extend59;
946
950
  // 普通商品不需要检测holder
947
951
  if (isNormalProductByDurationSchedule(item)) {
948
952
  return false;
949
953
  }
950
954
  if (item._extend.quantity === 1 && (!item._extend.holder_id || ((_item$_extend$holder_2 = item._extend.holder_id) === null || _item$_extend$holder_2 === void 0 ? void 0 : _item$_extend$holder_2.length) === 0)) {
951
- var _item$_extend55;
952
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend55 = item._extend) === null || _item$_extend55 === void 0 || (_item$_extend55 = _item$_extend55.other) === null || _item$_extend55 === void 0 ? void 0 : _item$_extend55.rowKey);
955
+ var _item$_extend58;
956
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend58 = item._extend) === null || _item$_extend58 === void 0 || (_item$_extend58 = _item$_extend58.other) === null || _item$_extend58 === void 0 ? void 0 : _item$_extend58.rowKey);
953
957
  return true;
954
958
  }
955
- if (item._extend.quantity > 1 && ((_item$_extend56 = item._extend) === null || _item$_extend56 === void 0 || (_item$_extend56 = _item$_extend56.holder_id) === null || _item$_extend56 === void 0 ? void 0 : _item$_extend56.length) !== item._extend.quantity) {
956
- var _item$_extend57;
957
- errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend57 = item._extend) === null || _item$_extend57 === void 0 || (_item$_extend57 = _item$_extend57.other) === null || _item$_extend57 === void 0 ? void 0 : _item$_extend57.rowKey);
959
+ if (item._extend.quantity > 1 && ((_item$_extend59 = item._extend) === null || _item$_extend59 === void 0 || (_item$_extend59 = _item$_extend59.holder_id) === null || _item$_extend59 === void 0 ? void 0 : _item$_extend59.length) !== item._extend.quantity) {
960
+ var _item$_extend60;
961
+ errorRowKey = genRowKey(item === null || item === void 0 || (_item$_extend60 = item._extend) === null || _item$_extend60 === void 0 || (_item$_extend60 = _item$_extend60.other) === null || _item$_extend60 === void 0 ? void 0 : _item$_extend60.rowKey);
958
962
  return true;
959
963
  }
960
964
  return false;
@@ -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<"stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu">;
22
+ readonly eftposRef: React.MutableRefObject<"stripe" | "tyro" | "windcave" | "payo" | "linkly" | "huifu">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -301,8 +301,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
301
301
  amount?: string | number | undefined;
302
302
  mode?: "pay" | "refund" | "fullPay" | "query" | undefined;
303
303
  order_id?: string | number | undefined;
304
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | "linkly" | "huifu" | undefined;
305
- action?: "pay" | "amount" | "deviceList" | undefined;
304
+ eftpos?: "stripe" | "tyro" | "windcave" | "payo" | "linkly" | "huifu" | undefined;
305
+ action?: "amount" | "pay" | "deviceList" | undefined;
306
306
  key?: number | undefined;
307
307
  step?: number | undefined;
308
308
  title?: string | undefined;
@@ -20,4 +20,5 @@ import PinModal from './pinModal';
20
20
  import PinVerifyModal from './pinVerifyModal';
21
21
  import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from './authentication/admin';
22
22
  import Registry from './systemSettings/registry';
23
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, };
23
+ import PisellCashCounting from './pisellCashCounting';
24
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, PisellCashCounting, };
@@ -20,4 +20,5 @@ import PinModal from "./pinModal";
20
20
  import PinVerifyModal from "./pinVerifyModal";
21
21
  import { OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth } from "./authentication/admin";
22
22
  import Registry from "./systemSettings/registry";
23
- export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry };
23
+ import PisellCashCounting from "./pisellCashCounting";
24
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController, PinModal, PinVerifyModal, OAuthConfig, SaaSAdminAuth, OrgAdminAuth, CustomerAuth, CustomerOAuthConfig, DeviceAuth, POSOperatorAuth, OnlineShopAuth, SaaSManagermentAuth, Registry, PisellCashCounting };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { PisellCashCountingProps } from './types';
3
+ import './PisellCashCounting.less';
4
+ declare const PisellCashCounting: React.FC<PisellCashCountingProps>;
5
+ export default PisellCashCounting;
@@ -0,0 +1,121 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ import React from 'react';
7
+ import { Button, InputNumber } from 'antd';
8
+ import classNames from 'classnames';
9
+ import { locales } from '@pisell/utils';
10
+ import PisellPriceKeyboardModal from "../../pro/pisellPriceKeyboardModal";
11
+ import localeTexts from "./locales";
12
+ import { PisellModal } from '@pisell/materials';
13
+ import CashCountingModal from "./components/CashCountingModal/index";
14
+ import useEngineContext from "../../hooks/useEngineContext";
15
+ import { usePisellCashCounting } from "./hooks";
16
+ import "./PisellCashCounting.less";
17
+ var PREFIX = 'pisell-private-cash-counting';
18
+ var PisellCashCounting = function PisellCashCounting(props) {
19
+ var _context$engine;
20
+ var context = useEngineContext();
21
+ locales.init(localeTexts, (context === null || context === void 0 || (_context$engine = context.engine) === null || _context$engine === void 0 || (_context$engine = _context$engine.props) === null || _context$engine === void 0 ? void 0 : _context$engine.locale) || 'en');
22
+ var _props$disabled = props.disabled,
23
+ disabled = _props$disabled === void 0 ? false : _props$disabled,
24
+ _props$countDisabled = props.countDisabled,
25
+ countDisabled = _props$countDisabled === void 0 ? false : _props$countDisabled,
26
+ placeholder = props.placeholder,
27
+ _props$layout = props.layout,
28
+ layout = _props$layout === void 0 ? 'vertical' : _props$layout,
29
+ countCashButtonText = props.countCashButtonText,
30
+ _props$showCurrencySy = props.showCurrencySymbol,
31
+ showCurrencySymbol = _props$showCurrencySy === void 0 ? true : _props$showCurrencySy,
32
+ _props$useThousandsSe = props.useThousandsSeparator,
33
+ useThousandsSeparator = _props$useThousandsSe === void 0 ? false : _props$useThousandsSe,
34
+ inputNumberProps = props.inputNumberProps,
35
+ buttonProps = props.buttonProps,
36
+ className = props.className,
37
+ style = props.style,
38
+ modalWidth = props.modalWidth;
39
+ var _usePisellCashCountin = usePisellCashCounting(props),
40
+ modalRef = _usePisellCashCountin.modalRef,
41
+ triggerRef = _usePisellCashCountin.triggerRef,
42
+ keyboardOpen = _usePisellCashCountin.keyboardOpen,
43
+ setKeyboardOpen = _usePisellCashCountin.setKeyboardOpen,
44
+ currencyDenominations = _usePisellCashCountin.currencyDenominations,
45
+ decimalPlaces = _usePisellCashCountin.decimalPlaces,
46
+ symbol = _usePisellCashCountin.symbol,
47
+ currencyCode = _usePisellCashCountin.currencyCode,
48
+ currentValue = _usePisellCashCountin.currentValue,
49
+ handleAmountChange = _usePisellCashCountin.handleAmountChange,
50
+ handleKeyboardClose = _usePisellCashCountin.handleKeyboardClose,
51
+ openCountModal = _usePisellCashCountin.openCountModal,
52
+ handleCountCancel = _usePisellCashCountin.handleCountCancel,
53
+ handleCountConfirm = _usePisellCashCountin.handleCountConfirm,
54
+ manualCountMismatchOpen = _usePisellCashCountin.manualCountMismatchOpen,
55
+ confirmUseCountedTotal = _usePisellCashCountin.confirmUseCountedTotal,
56
+ confirmKeepManualAmount = _usePisellCashCountin.confirmKeepManualAmount;
57
+ return /*#__PURE__*/React.createElement("div", {
58
+ className: classNames(PREFIX, className),
59
+ style: style
60
+ }, /*#__PURE__*/React.createElement("div", {
61
+ className: classNames("".concat(PREFIX, "__field"), _defineProperty({}, "".concat(PREFIX, "__field--horizontal"), layout === 'horizontal')),
62
+ ref: triggerRef
63
+ }, /*#__PURE__*/React.createElement(InputNumber, _extends({}, inputNumberProps, {
64
+ controls: false,
65
+ disabled: disabled,
66
+ precision: decimalPlaces,
67
+ value: currentValue,
68
+ placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : locales.getText('pisell-cash-counting.placeholder'),
69
+ className: classNames("".concat(PREFIX, "__input"), inputNumberProps === null || inputNumberProps === void 0 ? void 0 : inputNumberProps.className),
70
+ readOnly: true,
71
+ addonBefore: symbol,
72
+ size: "large",
73
+ style: {
74
+ width: '100%'
75
+ },
76
+ onClick: function onClick() {
77
+ if (!disabled) {
78
+ setKeyboardOpen(true);
79
+ }
80
+ },
81
+ onChange: handleAmountChange
82
+ })), /*#__PURE__*/React.createElement(Button, _extends({}, buttonProps, {
83
+ type: "primary",
84
+ disabled: disabled || countDisabled || (buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.disabled),
85
+ className: classNames("".concat(PREFIX, "__button"), buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.className),
86
+ onClick: function onClick(event) {
87
+ var _buttonProps$onClick;
88
+ buttonProps === null || buttonProps === void 0 || (_buttonProps$onClick = buttonProps.onClick) === null || _buttonProps$onClick === void 0 || _buttonProps$onClick.call(buttonProps, event);
89
+ openCountModal();
90
+ }
91
+ }), countCashButtonText !== null && countCashButtonText !== void 0 ? countCashButtonText : locales.getText('pisell-cash-counting.countCash'))), /*#__PURE__*/React.createElement(PisellPriceKeyboardModal, {
92
+ symbol: symbol,
93
+ visible: keyboardOpen,
94
+ value: currentValue,
95
+ triggerRef: triggerRef,
96
+ showCurrencySymbol: showCurrencySymbol,
97
+ useThousandsSeparator: useThousandsSeparator,
98
+ onChange: handleAmountChange,
99
+ onClose: handleKeyboardClose
100
+ }), /*#__PURE__*/React.createElement(PisellModal.Information, {
101
+ open: manualCountMismatchOpen,
102
+ closable: false,
103
+ maskClosable: false,
104
+ title: locales.getText('pisell-cash-counting.manual-vs-count-message-title'),
105
+ describe: locales.getText('pisell-cash-counting.manual-vs-count-message'),
106
+ okText: locales.getText('pisell-cash-counting.keep-manual-amount'),
107
+ cancelText: locales.getText('pisell-cash-counting.use-count-total'),
108
+ onOk: confirmKeepManualAmount,
109
+ onCancel: confirmUseCountedTotal
110
+ }), /*#__PURE__*/React.createElement(CashCountingModal, {
111
+ ref: modalRef,
112
+ modalWidth: modalWidth,
113
+ currencyCode: currencyCode,
114
+ currencyDenominations: currencyDenominations,
115
+ decimalPlaces: decimalPlaces,
116
+ symbol: symbol,
117
+ onCancel: handleCountCancel,
118
+ onConfirm: handleCountConfirm
119
+ }));
120
+ };
121
+ export default PisellCashCounting;