@pisell/pisellos 2.1.118 → 2.1.119

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 (106) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/modules/Cart/types.d.ts +0 -2
  4. package/dist/modules/Cart/utils/cartProduct.js +24 -56
  5. package/dist/modules/Discount/types.d.ts +0 -18
  6. package/dist/modules/Payment/index.d.ts +1 -2
  7. package/dist/modules/Payment/index.js +7 -10
  8. package/dist/modules/Payment/utils.js +0 -3
  9. package/dist/modules/Payment/walletpass.d.ts +0 -23
  10. package/dist/modules/Payment/walletpass.js +95 -191
  11. package/dist/modules/Product/index.d.ts +1 -1
  12. package/dist/modules/Rules/index.d.ts +5 -9
  13. package/dist/modules/Rules/index.js +162 -674
  14. package/dist/modules/Rules/types.d.ts +0 -2
  15. package/dist/modules/Summary/types.d.ts +0 -2
  16. package/dist/modules/Summary/utils.d.ts +0 -6
  17. package/dist/modules/Summary/utils.js +0 -21
  18. package/dist/plugins/window.d.ts +0 -2
  19. package/dist/solution/BookingByStep/index.d.ts +0 -1
  20. package/dist/solution/BookingByStep/index.js +44 -42
  21. package/dist/solution/BookingByStep/utils/timeslots.d.ts +3 -1
  22. package/dist/solution/BookingByStep/utils/timeslots.js +19 -12
  23. package/dist/solution/BookingTicket/index.d.ts +1 -1
  24. package/dist/solution/Checkout/index.js +0 -2
  25. package/dist/solution/ShopDiscount/index.d.ts +0 -1
  26. package/dist/solution/ShopDiscount/index.js +7 -23
  27. package/dist/solution/ShopDiscount/types.d.ts +0 -1
  28. package/dist/solution/ShopDiscount/types.js +1 -2
  29. package/dist/solution/ShopDiscount/utils.js +12 -26
  30. package/lib/index.d.ts +0 -1
  31. package/lib/index.js +1 -3
  32. package/lib/modules/Cart/types.d.ts +0 -2
  33. package/lib/modules/Cart/utils/cartProduct.js +11 -39
  34. package/lib/modules/Discount/types.d.ts +0 -18
  35. package/lib/modules/Payment/index.d.ts +1 -2
  36. package/lib/modules/Payment/index.js +0 -1
  37. package/lib/modules/Payment/utils.js +0 -3
  38. package/lib/modules/Payment/walletpass.d.ts +0 -23
  39. package/lib/modules/Payment/walletpass.js +17 -94
  40. package/lib/modules/Product/index.d.ts +1 -1
  41. package/lib/modules/Rules/index.d.ts +5 -9
  42. package/lib/modules/Rules/index.js +284 -779
  43. package/lib/modules/Rules/types.d.ts +0 -2
  44. package/lib/modules/Summary/types.d.ts +0 -2
  45. package/lib/modules/Summary/utils.d.ts +0 -6
  46. package/lib/modules/Summary/utils.js +0 -15
  47. package/lib/plugins/window.d.ts +0 -2
  48. package/lib/solution/BookingByStep/index.d.ts +0 -1
  49. package/lib/solution/BookingByStep/index.js +4 -2
  50. package/lib/solution/BookingByStep/utils/timeslots.d.ts +3 -1
  51. package/lib/solution/BookingByStep/utils/timeslots.js +19 -11
  52. package/lib/solution/BookingTicket/index.d.ts +1 -1
  53. package/lib/solution/Checkout/index.js +0 -2
  54. package/lib/solution/ShopDiscount/index.d.ts +0 -1
  55. package/lib/solution/ShopDiscount/index.js +8 -22
  56. package/lib/solution/ShopDiscount/types.d.ts +0 -1
  57. package/lib/solution/ShopDiscount/utils.js +6 -10
  58. package/package.json +1 -1
  59. package/dist/model/index.d.ts +0 -1
  60. package/dist/model/index.js +0 -1
  61. package/dist/model/strategy/adapter/index.d.ts +0 -3
  62. package/dist/model/strategy/adapter/index.js +0 -4
  63. package/dist/model/strategy/adapter/type.d.ts +0 -28
  64. package/dist/model/strategy/adapter/type.js +0 -1
  65. package/dist/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
  66. package/dist/model/strategy/adapter/walletPass/evaluator.js +0 -499
  67. package/dist/model/strategy/adapter/walletPass/example.d.ts +0 -4
  68. package/dist/model/strategy/adapter/walletPass/example.js +0 -258
  69. package/dist/model/strategy/adapter/walletPass/index.d.ts +0 -32
  70. package/dist/model/strategy/adapter/walletPass/index.js +0 -182
  71. package/dist/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  72. package/dist/model/strategy/adapter/walletPass/locales.js +0 -26
  73. package/dist/model/strategy/adapter/walletPass/type.d.ts +0 -187
  74. package/dist/model/strategy/adapter/walletPass/type.js +0 -1
  75. package/dist/model/strategy/adapter/walletPass/utils.d.ts +0 -50
  76. package/dist/model/strategy/adapter/walletPass/utils.js +0 -1104
  77. package/dist/model/strategy/index.d.ts +0 -94
  78. package/dist/model/strategy/index.js +0 -551
  79. package/dist/model/strategy/strategy-example.d.ts +0 -5
  80. package/dist/model/strategy/strategy-example.js +0 -331
  81. package/dist/model/strategy/type.d.ts +0 -228
  82. package/dist/model/strategy/type.js +0 -94
  83. package/lib/model/index.d.ts +0 -1
  84. package/lib/model/index.js +0 -23
  85. package/lib/model/strategy/adapter/index.d.ts +0 -3
  86. package/lib/model/strategy/adapter/index.js +0 -45
  87. package/lib/model/strategy/adapter/type.d.ts +0 -28
  88. package/lib/model/strategy/adapter/type.js +0 -17
  89. package/lib/model/strategy/adapter/walletPass/evaluator.d.ts +0 -84
  90. package/lib/model/strategy/adapter/walletPass/evaluator.js +0 -423
  91. package/lib/model/strategy/adapter/walletPass/example.d.ts +0 -4
  92. package/lib/model/strategy/adapter/walletPass/example.js +0 -207
  93. package/lib/model/strategy/adapter/walletPass/index.d.ts +0 -32
  94. package/lib/model/strategy/adapter/walletPass/index.js +0 -142
  95. package/lib/model/strategy/adapter/walletPass/locales.d.ts +0 -1
  96. package/lib/model/strategy/adapter/walletPass/locales.js +0 -54
  97. package/lib/model/strategy/adapter/walletPass/type.d.ts +0 -187
  98. package/lib/model/strategy/adapter/walletPass/type.js +0 -17
  99. package/lib/model/strategy/adapter/walletPass/utils.d.ts +0 -50
  100. package/lib/model/strategy/adapter/walletPass/utils.js +0 -791
  101. package/lib/model/strategy/index.d.ts +0 -94
  102. package/lib/model/strategy/index.js +0 -413
  103. package/lib/model/strategy/strategy-example.d.ts +0 -5
  104. package/lib/model/strategy/strategy-example.js +0 -318
  105. package/lib/model/strategy/type.d.ts +0 -228
  106. package/lib/model/strategy/type.js +0 -44
@@ -1,50 +0,0 @@
1
- import { Product, Voucher } from './type';
2
- /** 订单商品数量 */
3
- export declare const getProductQuantity: (product: any) => any;
4
- /**
5
- * 订单商品行唯一键,用于 maxPassesPerItem 按行、按件配额(同 SPU 不同规格视为不同行)。
6
- */
7
- export declare function resolveWalletPassLineKey(product: any, indexInOrder: number): string;
8
- export declare const getApplicableProductIds: (voucher: Voucher) => number[] | null;
9
- /**
10
- * 优惠券处理函数
11
- * @param applicableVouchers 可用的券列表
12
- * @param orderTotalAmount 订单总金额
13
- * @param products 订单商品列表
14
- * @returns 返回推荐券列表和全部列表,每个券包含 _available_max_amount 和 _unified_available_status
15
- */
16
- export declare function processVouchers(applicableVouchers: Voucher[], orderTotalAmount: number, products: Product[]): {
17
- recommended: any[];
18
- transformList: any[];
19
- };
20
- /**
21
- * 重新计算优惠券状态(基于已选券的增量计算)
22
- * @param allVouchers 所有原始券列表
23
- * @param selectedVouchers 已选中的券列表(按选中顺序)
24
- * @param orderTotalAmount 订单总金额
25
- * @param products 订单商品列表
26
- * @returns 返回更新后的所有券列表和已选券的详细抵扣信息
27
- */
28
- export declare function recalculateVouchers(allVouchers: any[], selectedVouchers: any[], orderTotalAmount: number, products: any[]): {
29
- allWithUpdatedStatus: any[];
30
- selectedWithDetails: any[];
31
- };
32
- /**
33
- * 获取主商品价格(单价,不含舍入余数)
34
- * @param product 商品
35
- * @param isDeductTaxAndFee 是否抵扣税费与附加费
36
- * @returns 商品单价
37
- */
38
- export declare const getMainProductPrice: (product: Product, isDeductTaxAndFee: boolean) => number;
39
- /**
40
- * 获取套餐子商品价格(不含舍入余数)
41
- * @param bundleItem 套餐子商品
42
- * @param parentQuantity 父商品数量
43
- * @param isDeductTaxAndFee 是否抵扣税费与附加费
44
- * @returns 子商品总价格(不含舍入余数)
45
- */
46
- export declare const getBundleItemPrice: (bundleItem: any, parentQuantity: number, isDeductTaxAndFee: boolean) => number;
47
- export declare const getBundleItemIsOriginalPrice: (item: any) => boolean;
48
- export declare const getBundleItemIsMarkupPrice: (item: any) => boolean;
49
- export declare const getBundleItemIsDiscountPrice: (item: any) => boolean;
50
- export declare const getBundleItemIsMarkupOrDiscountPrice: (item: any) => boolean;