@pisell/private-materials 3.3.88 → 3.3.89

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 (255) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +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/businessModel/SalesModel/Sales/index.js +37 -4
  12. package/es/components/Sales/Cart/index.js +5 -1
  13. package/es/components/Sales/Cart/utils.d.ts +40 -0
  14. package/es/components/Sales/Cart/utils.js +167 -0
  15. package/es/components/Sales/Checkout/index.d.ts +4 -0
  16. package/es/components/Sales/Checkout/index.js +52 -8
  17. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  18. package/es/components/Sales/Checkout/serve.js +16 -2
  19. package/es/components/Sales/Checkout/utils.js +7 -1
  20. package/es/components/Sales/Resource/index.js +2 -2
  21. package/es/components/Sales/Resource/serve.d.ts +7 -0
  22. package/es/components/Sales/Resource/serve.js +10 -0
  23. package/es/components/Sales/Summary/index.d.ts +10 -0
  24. package/es/components/Sales/Summary/index.js +17 -2
  25. package/es/components/Sales/Summary/serve.d.ts +1 -0
  26. package/es/components/Sales/Summary/serve.js +6 -0
  27. package/es/components/Sales/Summary/utils.d.ts +15 -0
  28. package/es/components/Sales/Summary/utils.js +43 -1
  29. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  30. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  31. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  32. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  33. package/es/components/appointmentBooking/components/Services/index.js +23 -27
  34. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  35. package/es/components/appointmentBooking/deposit/index.js +4 -2
  36. package/es/components/appointmentBooking/index.js +14 -0
  37. package/es/components/appointmentBooking/index.less +1 -1
  38. package/es/components/booking/components/footer/utils.d.ts +1 -0
  39. package/es/components/booking/components/footer/utils.js +1 -1
  40. package/es/components/booking/components/voucher/index.js +2 -2
  41. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  42. package/es/components/booking/editBookingModal/index.js +386 -0
  43. package/es/components/booking/editBookingModal/index.less +8 -0
  44. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  45. package/es/components/booking/editBookingModal/locales.js +20 -0
  46. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  47. package/es/components/booking/editBookingModal/mock.js +2993 -0
  48. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  49. package/es/components/booking/editBookingModal/serve.js +288 -0
  50. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  51. package/es/components/booking/editBookingModal/type.js +1 -0
  52. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  53. package/es/components/booking/editBookingModal/utils.js +157 -0
  54. package/es/components/booking/info/service2/utils.js +3 -2
  55. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  56. package/es/components/booking/info2/service/addService/utils.js +44 -13
  57. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  58. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  59. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  60. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  61. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  62. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  63. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  64. package/es/components/booking/info2/utilsByBooking.js +9 -0
  65. package/es/components/booking/locales.d.ts +3 -0
  66. package/es/components/booking/locales.js +3 -0
  67. package/es/components/eftposPay/const.d.ts +4 -1
  68. package/es/components/eftposPay/const.js +3 -1
  69. package/es/components/eftposPay/hooks.d.ts +1 -1
  70. package/es/components/eftposPay/hooks.js +3 -1
  71. package/es/components/eftposPay/index.js +1 -1
  72. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  73. package/es/components/eftposPay/linkly/const.js +82 -0
  74. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  75. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  76. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  77. package/es/components/eftposPay/linkly/hooks/normal.js +318 -0
  78. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  79. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  80. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  81. package/es/components/eftposPay/linkly/index.js +197 -0
  82. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  83. package/es/components/eftposPay/linkly/service.js +73 -0
  84. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  85. package/es/components/eftposPay/manufacturer.js +4 -0
  86. package/es/components/eftposPay/pay.d.ts +1 -1
  87. package/es/components/eftposPay/pay.js +6 -2
  88. package/es/components/eftposPay/store/index.d.ts +1 -1
  89. package/es/components/eftposPay/windcave/windcave.js +12 -2
  90. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
  91. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  92. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  93. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  94. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  95. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  96. package/es/components/eventBooking/components/bookingDetailModal/index.js +22 -4
  97. package/es/components/eventBooking/index.js +21 -7
  98. package/es/components/eventBooking/locales.d.ts +24 -0
  99. package/es/components/eventBooking/locales.js +30 -6
  100. package/es/components/index.d.ts +3 -1
  101. package/es/components/index.js +3 -1
  102. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  103. package/es/components/stepController/components/Content/index.d.ts +7 -0
  104. package/es/components/stepController/components/Content/index.js +9 -0
  105. package/es/components/stepController/components/Content/index.less +8 -0
  106. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  107. package/es/components/stepController/components/Footer/index.js +15 -0
  108. package/es/components/stepController/components/Footer/index.less +39 -0
  109. package/es/components/stepController/components/Header/index.d.ts +20 -0
  110. package/es/components/stepController/components/Header/index.js +97 -0
  111. package/es/components/stepController/components/Header/index.less +21 -0
  112. package/es/components/stepController/index.d.ts +5 -0
  113. package/es/components/stepController/index.js +64 -0
  114. package/es/components/stepController/index.less +11 -0
  115. package/es/components/stepController/locales.d.ts +27 -0
  116. package/es/components/stepController/locales.js +32 -0
  117. package/es/components/stepController/types.d.ts +23 -0
  118. package/es/components/stepController/types.js +1 -0
  119. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  120. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  121. package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
  122. package/es/components/ticketBooking/locales.d.ts +164 -146
  123. package/es/components/ticketBooking/locales.js +195 -147
  124. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  125. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  126. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  127. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  128. package/es/hooks/useWindowSize.d.ts +5 -0
  129. package/es/hooks/useWindowSize.js +26 -0
  130. package/es/index.d.ts +2 -0
  131. package/es/index.js +3 -1
  132. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  133. package/lib/components/Sales/Cart/index.js +1 -0
  134. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  135. package/lib/components/Sales/Cart/utils.js +117 -0
  136. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  137. package/lib/components/Sales/Checkout/index.js +39 -7
  138. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  139. package/lib/components/Sales/Checkout/serve.js +7 -2
  140. package/lib/components/Sales/Checkout/utils.js +2 -0
  141. package/lib/components/Sales/Resource/index.js +1 -1
  142. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  143. package/lib/components/Sales/Resource/serve.js +9 -2
  144. package/lib/components/Sales/Summary/index.d.ts +10 -0
  145. package/lib/components/Sales/Summary/index.js +7 -1
  146. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  147. package/lib/components/Sales/Summary/serve.js +32 -0
  148. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  149. package/lib/components/Sales/Summary/utils.js +30 -1
  150. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  151. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  152. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  153. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  154. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  155. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  156. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  157. package/lib/components/appointmentBooking/index.js +11 -0
  158. package/lib/components/appointmentBooking/index.less +1 -1
  159. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  160. package/lib/components/booking/components/footer/utils.js +2 -0
  161. package/lib/components/booking/components/voucher/index.js +2 -2
  162. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  163. package/lib/components/booking/editBookingModal/index.js +363 -0
  164. package/lib/components/booking/editBookingModal/index.less +8 -0
  165. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  166. package/lib/components/booking/editBookingModal/locales.js +44 -0
  167. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  168. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  169. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  170. package/lib/components/booking/editBookingModal/serve.js +178 -0
  171. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  172. package/lib/components/booking/editBookingModal/type.js +17 -0
  173. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  174. package/lib/components/booking/editBookingModal/utils.js +158 -0
  175. package/lib/components/booking/info/service2/utils.js +2 -2
  176. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  177. package/lib/components/booking/info2/service/addService/utils.js +27 -4
  178. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  179. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  180. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  181. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  182. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  183. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  184. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  185. package/lib/components/booking/info2/utilsByBooking.js +6 -0
  186. package/lib/components/booking/locales.d.ts +3 -0
  187. package/lib/components/booking/locales.js +3 -0
  188. package/lib/components/eftposPay/const.d.ts +4 -1
  189. package/lib/components/eftposPay/const.js +2 -0
  190. package/lib/components/eftposPay/hooks.d.ts +1 -1
  191. package/lib/components/eftposPay/hooks.js +11 -4
  192. package/lib/components/eftposPay/index.js +1 -1
  193. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  194. package/lib/components/eftposPay/linkly/const.js +102 -0
  195. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  196. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  197. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  198. package/lib/components/eftposPay/linkly/hooks/normal.js +239 -0
  199. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  200. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  201. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  202. package/lib/components/eftposPay/linkly/index.js +208 -0
  203. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  204. package/lib/components/eftposPay/linkly/service.js +55 -0
  205. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  206. package/lib/components/eftposPay/manufacturer.js +6 -0
  207. package/lib/components/eftposPay/pay.d.ts +1 -1
  208. package/lib/components/eftposPay/pay.js +13 -2
  209. package/lib/components/eftposPay/store/index.d.ts +1 -1
  210. package/lib/components/eftposPay/windcave/windcave.js +11 -0
  211. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
  212. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  213. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
  214. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  215. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  216. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  217. package/lib/components/eventBooking/components/bookingDetailModal/index.js +10 -4
  218. package/lib/components/eventBooking/index.js +11 -7
  219. package/lib/components/eventBooking/locales.d.ts +24 -0
  220. package/lib/components/eventBooking/locales.js +30 -6
  221. package/lib/components/index.d.ts +3 -1
  222. package/lib/components/index.js +6 -0
  223. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  224. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  225. package/lib/components/stepController/components/Content/index.js +40 -0
  226. package/lib/components/stepController/components/Content/index.less +8 -0
  227. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  228. package/lib/components/stepController/components/Footer/index.js +49 -0
  229. package/lib/components/stepController/components/Footer/index.less +39 -0
  230. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  231. package/lib/components/stepController/components/Header/index.js +104 -0
  232. package/lib/components/stepController/components/Header/index.less +21 -0
  233. package/lib/components/stepController/index.d.ts +5 -0
  234. package/lib/components/stepController/index.js +89 -0
  235. package/lib/components/stepController/index.less +11 -0
  236. package/lib/components/stepController/locales.d.ts +27 -0
  237. package/lib/components/stepController/locales.js +50 -0
  238. package/lib/components/stepController/types.d.ts +23 -0
  239. package/lib/components/stepController/types.js +17 -0
  240. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  241. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  242. package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
  243. package/lib/components/ticketBooking/locales.d.ts +164 -146
  244. package/lib/components/ticketBooking/locales.js +22 -4
  245. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  246. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  247. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  248. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  249. package/lib/hooks/useWindowSize.d.ts +5 -0
  250. package/lib/hooks/useWindowSize.js +51 -0
  251. package/lib/index.d.ts +2 -0
  252. package/lib/index.js +6 -0
  253. package/lowcode/edit-booking-modal/meta.ts +53 -0
  254. package/lowcode/step-controller/meta.ts +88 -0
  255. package/package.json +3 -3
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/Sales/Summary/utils.ts
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
+ calculateDeposit: () => calculateDeposit,
32
33
  calculatePriceDetails: () => calculatePriceDetails,
33
34
  calculateSubtotal: () => calculateSubtotal,
34
35
  calculateTaxFee: () => calculateTaxFee
@@ -65,16 +66,44 @@ var calculatePriceDetails = (shopInfo, items) => {
65
66
  const totalTaxFee = new import_decimal.default(calculateTaxFee(shopInfo, items));
66
67
  console.log("totalTaxFee", totalTaxFee.toFixed(2));
67
68
  const total = (shopInfo == null ? void 0 : shopInfo.is_price_include_tax) ? subtotal : subtotal.plus(totalTaxFee);
69
+ const deposit = calculateDeposit(items);
68
70
  return {
69
71
  subtotal: subtotal.toFixed(2),
70
72
  total: total.toFixed(2),
71
73
  taxTitle: shopInfo == null ? void 0 : shopInfo.tax_title,
72
74
  totalTaxFee: totalTaxFee.toFixed(2),
73
- isPriceIncludeTax: shopInfo == null ? void 0 : shopInfo.is_price_include_tax
75
+ isPriceIncludeTax: shopInfo == null ? void 0 : shopInfo.is_price_include_tax,
76
+ deposit
74
77
  };
75
78
  };
79
+ var calculateDeposit = (items) => {
80
+ if (!(items == null ? void 0 : items.length)) {
81
+ return void 0;
82
+ }
83
+ const protocols = [];
84
+ let hasDeposit = false;
85
+ const total = items.reduce((sum, item) => {
86
+ var _a, _b, _c;
87
+ if (item == null ? void 0 : item.deposit) {
88
+ hasDeposit = true;
89
+ const cartItemTotalPrice = new import_decimal.default(((_a = item == null ? void 0 : item.deposit) == null ? void 0 : _a.total) || 0);
90
+ (_c = (_b = item == null ? void 0 : item.deposit) == null ? void 0 : _b.protocols) == null ? void 0 : _c.forEach((protocol) => {
91
+ if (protocols.findIndex((p) => p.id === protocol.id) === -1) {
92
+ protocols.push(protocol);
93
+ }
94
+ });
95
+ return sum.plus(cartItemTotalPrice);
96
+ }
97
+ return sum;
98
+ }, new import_decimal.default(0));
99
+ if (hasDeposit) {
100
+ return { total: total.toFixed(2), protocols, hasDeposit };
101
+ }
102
+ return void 0;
103
+ };
76
104
  // Annotate the CommonJS export names for ESM import in node:
77
105
  0 && (module.exports = {
106
+ calculateDeposit,
78
107
  calculatePriceDetails,
79
108
  calculateSubtotal,
80
109
  calculateTaxFee
@@ -1,5 +1,5 @@
1
1
  .appointment-cart-item-wrap {
2
- height: calc(100vh - 100px);
2
+ height: calc(var(--vh, 1vh) * 100 - 100px);
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
 
@@ -39,7 +39,7 @@
39
39
  flex-direction: column;
40
40
  align-items: start;
41
41
 
42
- >div {
42
+ > div {
43
43
  display: flex;
44
44
  align-items: center;
45
45
  justify-content: space-between;
@@ -105,4 +105,4 @@
105
105
  flex: none;
106
106
  z-index: 10;
107
107
  }
108
- }
108
+ }
@@ -107,7 +107,7 @@
107
107
  margin-top: 0;
108
108
 
109
109
  .appointment-cart-item-wrap {
110
- height: calc(100vh - 16px) !important;
110
+ height: calc(var(--vh, 1vh) * 100 - 16px) !important;
111
111
  }
112
112
  }
113
113
  }
@@ -1,3 +1,9 @@
1
1
  import './index.less';
2
+ export declare const DepositContent: (props: {
3
+ isAgreeDepositPolicy: boolean;
4
+ setIsAgreeDepositPolicy: (value: boolean) => void;
5
+ deposit: any;
6
+ depositProtocolRequest?: any;
7
+ }) => JSX.Element;
2
8
  declare const Deposit: () => JSX.Element;
3
9
  export default Deposit;
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/appointmentBooking/components/Deposit/index.tsx
30
30
  var Deposit_exports = {};
31
31
  __export(Deposit_exports, {
32
+ DepositContent: () => DepositContent,
32
33
  default: () => Deposit_default
33
34
  });
34
35
  module.exports = __toCommonJS(Deposit_exports);
@@ -38,9 +39,13 @@ var import_deposit = __toESM(require("../../deposit"));
38
39
  var import_context = require("../../context");
39
40
  var import_utils = require("@pisell/utils");
40
41
  var import_index = require("./index.less");
41
- var Deposit = () => {
42
- const { setIsAgreeDepositPolicy, isAgreeDepositPolicy, summary } = (0, import_context.useAppointmentBookingContext)();
43
- const { deposit } = summary;
42
+ var DepositContent = (props) => {
43
+ const {
44
+ isAgreeDepositPolicy,
45
+ setIsAgreeDepositPolicy,
46
+ deposit,
47
+ depositProtocolRequest
48
+ } = props;
44
49
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-top" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit")), /* @__PURE__ */ import_react.default.createElement(
45
50
  import_materials.PisellText.Amount,
46
51
  {
@@ -54,8 +59,35 @@ var Deposit = () => {
54
59
  total: deposit == null ? void 0 : deposit.total,
55
60
  protocols: deposit == null ? void 0 : deposit.protocols,
56
61
  isAgreePolicy: isAgreeDepositPolicy,
57
- onChange: (value) => setIsAgreeDepositPolicy(value)
62
+ onChange: (value) => setIsAgreeDepositPolicy(value),
63
+ depositProtocolRequest
58
64
  }
59
65
  ));
60
66
  };
67
+ var Deposit = () => {
68
+ const {
69
+ setIsAgreeDepositPolicy,
70
+ isAgreeDepositPolicy,
71
+ summary,
72
+ appointmentBooking
73
+ } = (0, import_context.useAppointmentBookingContext)();
74
+ const { deposit } = summary;
75
+ const depositProtocolRequest = (id) => {
76
+ var _a;
77
+ return (_a = appointmentBooking == null ? void 0 : appointmentBooking.getProtocol) == null ? void 0 : _a.call(appointmentBooking, id);
78
+ };
79
+ return /* @__PURE__ */ import_react.default.createElement(
80
+ DepositContent,
81
+ {
82
+ isAgreeDepositPolicy: !!isAgreeDepositPolicy,
83
+ setIsAgreeDepositPolicy,
84
+ deposit,
85
+ depositProtocolRequest
86
+ }
87
+ );
88
+ };
61
89
  var Deposit_default = Deposit;
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ DepositContent
93
+ });
@@ -74,9 +74,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
74
74
  let type = "";
75
75
  if (!isRetailTemplate) {
76
76
  type = await checkProductType(item == null ? void 0 : item.id);
77
- if (type === "session") {
78
- appointmentBooking.openProductDetail(item.id);
79
- }
77
+ appointmentBooking.openProductDetail(item.id);
80
78
  }
81
79
  utils == null ? void 0 : utils.action({
82
80
  type: "pisell1.productDetail",
@@ -86,6 +84,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
86
84
  },
87
85
  callback: async (data) => {
88
86
  var _a, _b;
87
+ if (data.isCancel) {
88
+ appointmentBooking.closeProductDetail();
89
+ return;
90
+ }
89
91
  const product = {
90
92
  ...data,
91
93
  options: (data == null ? void 0 : data.option) || []
@@ -96,13 +98,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
96
98
  appointmentBooking.storeProduct(product);
97
99
  return;
98
100
  }
99
- if (data == null ? void 0 : data.isCancel) {
100
- if (type === "session") {
101
- appointmentBooking.closeProductDetail();
102
- appointmentBooking.getAvailableDate();
103
- }
104
- return;
105
- }
106
101
  const session = data == null ? void 0 : data.session;
107
102
  if (session) {
108
103
  const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
@@ -114,7 +109,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
114
109
  endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
115
110
  }
116
111
  });
117
- appointmentBooking.closeProductDetail();
118
112
  await appointmentBooking.getAvailableDate({
119
113
  startDate,
120
114
  endDate
@@ -132,6 +126,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
132
126
  await appointmentBooking.getAvailableDate();
133
127
  }
134
128
  }
129
+ appointmentBooking.closeProductDetail();
135
130
  if (isDateSelectedFirst) {
136
131
  const index = (currentStep == null ? void 0 : currentStep.index) + 2;
137
132
  if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
- var import_context = require("../../../context");
40
39
  var import_index = require("./index.less");
41
40
  var DepositModal = (props) => {
42
41
  const {
@@ -45,9 +44,10 @@ var DepositModal = (props) => {
45
44
  item,
46
45
  onChange,
47
46
  onConfirm,
48
- isHideCheckout = true
47
+ isHideCheckout = true,
48
+ depositProtocolRequest
49
+ // 定金协议请求
49
50
  } = props;
50
- const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
51
51
  const [policy, setPolicy] = (0, import_react.useState)(null);
52
52
  const [loading, setLoading] = (0, import_react.useState)(false);
53
53
  const [disabled, setDisabled] = (0, import_react.useState)(false);
@@ -55,9 +55,13 @@ var DepositModal = (props) => {
55
55
  setDisabled(!isHideCheckout);
56
56
  }, [isHideCheckout]);
57
57
  const getPolicy = async (id) => {
58
+ if (!depositProtocolRequest) {
59
+ console.error("depositProtocolRequest is not defined");
60
+ return;
61
+ }
58
62
  setLoading(true);
59
63
  try {
60
- const { data } = await appointmentBooking.getProtocol(id);
64
+ const { data } = await (depositProtocolRequest == null ? void 0 : depositProtocolRequest(id));
61
65
  setPolicy(data);
62
66
  onChange && onChange(data);
63
67
  } catch (error) {
@@ -48,7 +48,8 @@ var Deposit = (props) => {
48
48
  title,
49
49
  isAgreePolicy = true,
50
50
  isShowTitle = true,
51
- onChange
51
+ onChange,
52
+ depositProtocolRequest
52
53
  } = props;
53
54
  const context = (0, import_useEngineContext.default)();
54
55
  const [visible, setVisible] = (0, import_react.useState)(false);
@@ -102,7 +103,8 @@ var Deposit = (props) => {
102
103
  {
103
104
  open: visible,
104
105
  onCancel: () => setVisible(false),
105
- item: policyItem
106
+ item: policyItem,
107
+ depositProtocolRequest
106
108
  }
107
109
  ));
108
110
  };
@@ -58,6 +58,17 @@ var AppointmentBooking = () => {
58
58
  }
59
59
  });
60
60
  }, []);
61
+ (0, import_react.useEffect)(() => {
62
+ const setRealVH = () => {
63
+ const vh = window.innerHeight * 0.01;
64
+ document.documentElement.style.setProperty("--vh", `${vh}px`);
65
+ };
66
+ setRealVH();
67
+ window.addEventListener("resize", setRealVH);
68
+ return () => {
69
+ window.removeEventListener("resize", setRealVH);
70
+ };
71
+ }, []);
61
72
  return /* @__PURE__ */ import_react.default.createElement(
62
73
  "div",
63
74
  {
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  background: #ffffff;
6
- height: 100vh;
6
+ height: calc(var(--vh, 1vh) * 100);
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-section-headers {
@@ -27,6 +27,7 @@ export interface ResourceItem {
27
27
  * @Author: jinglin.tan
28
28
  */
29
29
  export declare const checkSubResourcesCapacity: (resource: ResourceItem) => void;
30
+ export declare const checkResourcesFormat: (resources: any[], service: any, isChild?: boolean) => any[];
30
31
  /**
31
32
  * @title: 格式化商品单价
32
33
  * @description:
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
32
  checkHolderIsError: () => checkHolderIsError,
33
+ checkResourcesFormat: () => checkResourcesFormat,
33
34
  checkSubResourcesCapacity: () => checkSubResourcesCapacity,
34
35
  formatProductBundle: () => formatProductBundle,
35
36
  formatProductOption: () => formatProductOption,
@@ -473,6 +474,7 @@ var checkHolderIsError = (state) => {
473
474
  // Annotate the CommonJS export names for ESM import in node:
474
475
  0 && (module.exports = {
475
476
  checkHolderIsError,
477
+ checkResourcesFormat,
476
478
  checkSubResourcesCapacity,
477
479
  formatProductBundle,
478
480
  formatProductOption,
@@ -41,8 +41,8 @@ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContex
41
41
  var import_materials = require("@pisell/materials");
42
42
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
43
43
  var import_index = require("./index.less");
44
- var import_utils2 = require("./utils");
45
44
  var import_ahooks = require("ahooks");
45
+ var import_utils2 = require("./utils");
46
46
  var ShopDiscountHooks = {
47
47
  onInited: "shopDiscount:onInited",
48
48
  onDestroy: "shopDiscount:onDestroy",
@@ -274,8 +274,8 @@ var VoucherCard = (props) => {
274
274
  import_materials.PisellGoodPassCard,
275
275
  {
276
276
  style: { width: "100%" },
277
- mixedSort,
278
277
  dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
278
+ mixedSort,
279
279
  onChange: (val) => {
280
280
  const shopDiscount2 = pisellos.getModule("shopDiscount");
281
281
  const detail = shopDiscount2.setDiscountSelected({
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { EditBookingModalProps } from './type';
3
+ import './index.less';
4
+ declare const _default: React.ForwardRefExoticComponent<EditBookingModalProps & React.RefAttributes<unknown>>;
5
+ export default _default;