@pisell/private-materials 3.3.85 → 3.3.86

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 (292) hide show
  1. package/build/lowcode/index.js +1 -1
  2. package/build/lowcode/meta.js +1 -1
  3. package/build/lowcode/preview.js +13 -13
  4. package/build/lowcode/render/default/view.css +1 -1
  5. package/build/lowcode/render/default/view.js +11 -11
  6. package/build/lowcode/view.css +1 -1
  7. package/build/lowcode/view.js +11 -11
  8. package/es/businessModel/SalesModel/Sales/index.js +37 -4
  9. package/es/components/Sales/Resource/index.js +2 -2
  10. package/es/components/Sales/Resource/serve.d.ts +7 -0
  11. package/es/components/Sales/Resource/serve.js +10 -0
  12. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  13. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  14. package/es/components/appointmentBooking/components/Header/index.d.ts +3 -0
  15. package/es/components/appointmentBooking/components/Services/index.js +23 -27
  16. package/es/components/appointmentBooking/components/Voucher/index.js +1 -1
  17. package/es/components/appointmentBooking/index.js +14 -0
  18. package/es/components/appointmentBooking/index.less +1 -1
  19. package/es/components/appointmentBooking/locales.d.ts +0 -3
  20. package/es/components/appointmentBooking/locales.js +0 -3
  21. package/es/components/booking/addons/model.d.ts +10 -1
  22. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  23. package/es/components/booking/components/browserSelect/index.js +1 -1
  24. package/es/components/booking/components/footer/utils.d.ts +1 -0
  25. package/es/components/booking/components/footer/utils.js +1 -1
  26. package/es/components/booking/components/voucher/index.js +2 -2
  27. package/es/components/booking/editBookingModal/index.d.ts +5 -0
  28. package/es/components/booking/editBookingModal/index.js +386 -0
  29. package/es/components/booking/editBookingModal/index.less +8 -0
  30. package/es/components/booking/editBookingModal/locales.d.ts +21 -0
  31. package/es/components/booking/editBookingModal/locales.js +20 -0
  32. package/es/components/booking/editBookingModal/mock.d.ts +807 -0
  33. package/es/components/booking/editBookingModal/mock.js +2993 -0
  34. package/es/components/booking/editBookingModal/serve.d.ts +51 -0
  35. package/es/components/booking/editBookingModal/serve.js +288 -0
  36. package/es/components/booking/editBookingModal/type.d.ts +12 -0
  37. package/es/components/booking/editBookingModal/type.js +1 -0
  38. package/es/components/booking/editBookingModal/utils.d.ts +12 -0
  39. package/es/components/booking/editBookingModal/utils.js +157 -0
  40. package/es/components/booking/forms/model.d.ts +10 -1
  41. package/es/components/booking/forms/model.js +5 -5
  42. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  43. package/es/components/booking/info/model.d.ts +10 -1
  44. package/es/components/booking/info/service/like/index.js +1 -1
  45. package/es/components/booking/info/service2/utils.d.ts +1 -1
  46. package/es/components/booking/info/service2/utils.js +3 -2
  47. package/es/components/booking/info2/service/addService/utils.d.ts +10 -0
  48. package/es/components/booking/info2/service/addService/utils.js +44 -13
  49. package/es/components/booking/info2/service/editService/Resources/index.js +22 -8
  50. package/es/components/booking/info2/service/editService/Resources/index.less +6 -0
  51. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  52. package/es/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +26 -0
  53. package/es/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  54. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +308 -0
  55. package/es/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  56. package/es/components/booking/info2/utilsByBooking.js +9 -0
  57. package/es/components/booking/locales.d.ts +3 -0
  58. package/es/components/booking/locales.js +3 -0
  59. package/es/components/booking/materiels/startTime/index.js +1 -1
  60. package/es/components/booking/model.d.ts +9 -1
  61. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  62. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  63. package/es/components/booking/notes/model.d.ts +10 -1
  64. package/es/components/booking/notes/model.js +5 -5
  65. package/es/components/booking/payments/model.d.ts +10 -1
  66. package/es/components/booking/payments/model.js +5 -5
  67. package/es/components/booking/utils.d.ts +2 -2
  68. package/es/components/eftposPay/const.d.ts +4 -1
  69. package/es/components/eftposPay/const.js +3 -1
  70. package/es/components/eftposPay/hooks.d.ts +1 -1
  71. package/es/components/eftposPay/hooks.js +3 -1
  72. package/es/components/eftposPay/index.js +1 -1
  73. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  74. package/es/components/eftposPay/linkly/const.js +82 -0
  75. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  76. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  77. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  78. package/es/components/eftposPay/linkly/hooks/normal.js +318 -0
  79. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  80. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  81. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  82. package/es/components/eftposPay/linkly/index.js +197 -0
  83. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  84. package/es/components/eftposPay/linkly/service.js +73 -0
  85. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  86. package/es/components/eftposPay/manufacturer.js +4 -0
  87. package/es/components/eftposPay/pay.d.ts +1 -1
  88. package/es/components/eftposPay/pay.js +6 -2
  89. package/es/components/eftposPay/store/index.d.ts +1 -1
  90. package/es/components/eventBooking/components/Provider/Event/index.js +13 -4
  91. package/es/components/eventBooking/components/bookingDetailModal/index.js +19 -3
  92. package/es/components/eventBooking/index.js +21 -7
  93. package/es/components/eventBooking/locales.js +3 -3
  94. package/es/components/index.d.ts +3 -1
  95. package/es/components/index.js +3 -1
  96. package/es/components/listComponent/index.js +5 -5
  97. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  98. package/es/components/pay/toC/model.d.ts +9 -1
  99. package/es/components/productExtension/card/index.js +3 -3
  100. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  101. package/es/components/productExtension/fields/Forms/index.js +12 -12
  102. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  103. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  104. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  105. package/es/components/productExtension/server.js +2 -2
  106. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  107. package/es/components/schedules/calendar/index.js +4 -4
  108. package/es/components/schedules/calendar/serve.js +2 -2
  109. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  110. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  111. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  112. package/es/components/schedules/components/ResourceList/index.js +1 -1
  113. package/es/components/schedules/components/Search/index.js +5 -5
  114. package/es/components/schedules/model.d.ts +9 -1
  115. package/es/components/schedules/model.js +5 -5
  116. package/es/components/schedules/openHours/index.js +1 -1
  117. package/es/components/schedules/openHours/serve.js +2 -2
  118. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  119. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  121. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  122. package/es/components/schedules/products/serve.js +2 -2
  123. package/es/components/schedules/products/utils.js +5 -5
  124. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  125. package/es/components/schedules/resources/detail/index.js +10 -10
  126. package/es/components/schedules/resources/list/index.js +2 -2
  127. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  128. package/es/components/schedules/resources/serve.js +2 -2
  129. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  130. package/es/components/schedules/utils.d.ts +1 -1
  131. package/es/components/schedules/utils.js +4 -4
  132. package/es/components/selectModal/index.js +2 -2
  133. package/es/components/stepController/components/Content/index.d.ts +7 -0
  134. package/es/components/stepController/components/Content/index.js +9 -0
  135. package/es/components/stepController/components/Content/index.less +8 -0
  136. package/es/components/stepController/components/Footer/index.d.ts +8 -0
  137. package/es/components/stepController/components/Footer/index.js +15 -0
  138. package/es/components/stepController/components/Footer/index.less +39 -0
  139. package/es/components/stepController/components/Header/index.d.ts +20 -0
  140. package/es/components/stepController/components/Header/index.js +97 -0
  141. package/es/components/stepController/components/Header/index.less +21 -0
  142. package/es/components/stepController/index.d.ts +5 -0
  143. package/es/components/stepController/index.js +64 -0
  144. package/es/components/stepController/index.less +11 -0
  145. package/es/components/stepController/locales.d.ts +27 -0
  146. package/es/components/stepController/locales.js +32 -0
  147. package/es/components/stepController/types.d.ts +23 -0
  148. package/es/components/stepController/types.js +1 -0
  149. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  150. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  151. package/es/components/ticketBooking/components/ticketBooking/index.js +257 -138
  152. package/es/components/ticketBooking/locales.d.ts +164 -146
  153. package/es/components/ticketBooking/locales.js +195 -147
  154. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  155. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  156. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  157. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  158. package/es/components/wallet/Detail/model.d.ts +13 -1
  159. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  160. package/es/components/wallet/PointCard/model.d.ts +13 -1
  161. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  162. package/es/components/wallet/Voucher/model.d.ts +13 -1
  163. package/es/components/wallet/model.d.ts +9 -1
  164. package/es/hooks/useComponents.js +1 -1
  165. package/es/hooks/useWindowSize.d.ts +5 -0
  166. package/es/hooks/useWindowSize.js +26 -0
  167. package/es/index.d.ts +2 -0
  168. package/es/index.js +3 -1
  169. package/es/utils/index.d.ts +1 -1
  170. package/lib/businessModel/SalesModel/Sales/index.js +22 -8
  171. package/lib/components/Sales/Resource/index.js +1 -1
  172. package/lib/components/Sales/Resource/serve.d.ts +7 -0
  173. package/lib/components/Sales/Resource/serve.js +9 -2
  174. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  175. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  176. package/lib/components/appointmentBooking/components/Header/index.d.ts +3 -0
  177. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  178. package/lib/components/appointmentBooking/components/Voucher/index.js +1 -1
  179. package/lib/components/appointmentBooking/index.js +11 -0
  180. package/lib/components/appointmentBooking/index.less +1 -1
  181. package/lib/components/appointmentBooking/locales.d.ts +0 -3
  182. package/lib/components/appointmentBooking/locales.js +0 -3
  183. package/lib/components/booking/addons/model.d.ts +10 -1
  184. package/lib/components/booking/components/footer/utils.d.ts +1 -0
  185. package/lib/components/booking/components/footer/utils.js +2 -0
  186. package/lib/components/booking/components/voucher/index.js +11 -23
  187. package/lib/components/booking/editBookingModal/index.d.ts +5 -0
  188. package/lib/components/booking/editBookingModal/index.js +363 -0
  189. package/lib/components/booking/editBookingModal/index.less +8 -0
  190. package/lib/components/booking/editBookingModal/locales.d.ts +21 -0
  191. package/lib/components/booking/editBookingModal/locales.js +44 -0
  192. package/lib/components/booking/editBookingModal/mock.d.ts +807 -0
  193. package/lib/components/booking/editBookingModal/mock.js +3314 -0
  194. package/lib/components/booking/editBookingModal/serve.d.ts +51 -0
  195. package/lib/components/booking/editBookingModal/serve.js +178 -0
  196. package/lib/components/booking/editBookingModal/type.d.ts +12 -0
  197. package/lib/components/booking/editBookingModal/type.js +17 -0
  198. package/lib/components/booking/editBookingModal/utils.d.ts +12 -0
  199. package/lib/components/booking/editBookingModal/utils.js +158 -0
  200. package/lib/components/booking/forms/model.d.ts +10 -1
  201. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  202. package/lib/components/booking/info/model.d.ts +10 -1
  203. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  204. package/lib/components/booking/info/service2/utils.js +2 -2
  205. package/lib/components/booking/info2/service/addService/utils.d.ts +10 -0
  206. package/lib/components/booking/info2/service/addService/utils.js +27 -4
  207. package/lib/components/booking/info2/service/editService/Resources/index.js +54 -10
  208. package/lib/components/booking/info2/service/editService/Resources/index.less +6 -0
  209. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.d.ts +7 -0
  210. package/lib/components/booking/info2/service/editService/ResourcesV2/MaxLengthSelect/index.js +53 -0
  211. package/lib/components/booking/info2/service/editService/ResourcesV2/index.d.ts +10 -0
  212. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +311 -0
  213. package/lib/components/booking/info2/service/editService/ResourcesV2/index.less +44 -0
  214. package/lib/components/booking/info2/utilsByBooking.js +6 -0
  215. package/lib/components/booking/locales.d.ts +3 -0
  216. package/lib/components/booking/locales.js +3 -0
  217. package/lib/components/booking/model.d.ts +9 -1
  218. package/lib/components/booking/notes/model.d.ts +10 -1
  219. package/lib/components/booking/payments/model.d.ts +10 -1
  220. package/lib/components/booking/utils.d.ts +2 -2
  221. package/lib/components/eftposPay/const.d.ts +4 -1
  222. package/lib/components/eftposPay/const.js +2 -0
  223. package/lib/components/eftposPay/hooks.d.ts +1 -1
  224. package/lib/components/eftposPay/hooks.js +11 -4
  225. package/lib/components/eftposPay/index.js +1 -1
  226. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  227. package/lib/components/eftposPay/linkly/const.js +102 -0
  228. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  229. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  230. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  231. package/lib/components/eftposPay/linkly/hooks/normal.js +239 -0
  232. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  233. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  234. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  235. package/lib/components/eftposPay/linkly/index.js +208 -0
  236. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  237. package/lib/components/eftposPay/linkly/service.js +55 -0
  238. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  239. package/lib/components/eftposPay/manufacturer.js +6 -0
  240. package/lib/components/eftposPay/pay.d.ts +1 -1
  241. package/lib/components/eftposPay/pay.js +13 -2
  242. package/lib/components/eftposPay/store/index.d.ts +1 -1
  243. package/lib/components/eventBooking/components/Provider/Event/index.js +10 -3
  244. package/lib/components/eventBooking/components/bookingDetailModal/index.js +9 -3
  245. package/lib/components/eventBooking/index.js +11 -7
  246. package/lib/components/eventBooking/locales.js +3 -3
  247. package/lib/components/index.d.ts +3 -1
  248. package/lib/components/index.js +6 -0
  249. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  250. package/lib/components/pay/toC/model.d.ts +9 -1
  251. package/lib/components/schedules/model.d.ts +9 -1
  252. package/lib/components/schedules/utils.d.ts +1 -1
  253. package/lib/components/schedules/utils.js +1 -1
  254. package/lib/components/stepController/components/Content/index.d.ts +7 -0
  255. package/lib/components/stepController/components/Content/index.js +40 -0
  256. package/lib/components/stepController/components/Content/index.less +8 -0
  257. package/lib/components/stepController/components/Footer/index.d.ts +8 -0
  258. package/lib/components/stepController/components/Footer/index.js +49 -0
  259. package/lib/components/stepController/components/Footer/index.less +39 -0
  260. package/lib/components/stepController/components/Header/index.d.ts +20 -0
  261. package/lib/components/stepController/components/Header/index.js +104 -0
  262. package/lib/components/stepController/components/Header/index.less +21 -0
  263. package/lib/components/stepController/index.d.ts +5 -0
  264. package/lib/components/stepController/index.js +89 -0
  265. package/lib/components/stepController/index.less +11 -0
  266. package/lib/components/stepController/locales.d.ts +27 -0
  267. package/lib/components/stepController/locales.js +50 -0
  268. package/lib/components/stepController/types.d.ts +23 -0
  269. package/lib/components/stepController/types.js +17 -0
  270. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  271. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +1 -0
  272. package/lib/components/ticketBooking/components/ticketBooking/index.js +263 -139
  273. package/lib/components/ticketBooking/locales.d.ts +164 -146
  274. package/lib/components/ticketBooking/locales.js +22 -4
  275. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  276. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  277. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  278. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  279. package/lib/components/wallet/Detail/model.d.ts +13 -1
  280. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  281. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  282. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  283. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  284. package/lib/components/wallet/model.d.ts +9 -1
  285. package/lib/hooks/useWindowSize.d.ts +5 -0
  286. package/lib/hooks/useWindowSize.js +51 -0
  287. package/lib/index.d.ts +2 -0
  288. package/lib/index.js +6 -0
  289. package/lib/utils/index.d.ts +1 -1
  290. package/lowcode/edit-booking-modal/meta.ts +53 -0
  291. package/lowcode/step-controller/meta.ts +88 -0
  292. package/package.json +4 -4
@@ -11,6 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
11
11
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { createContext, useRef, useState } from 'react';
14
+ import useEngineContext from "../../../hooks/useEngineContext";
14
15
  var defaultData = {};
15
16
  var SALES_MODEL_SESSION_STORAGE_KEY = 'shop_h5_sales_model_data';
16
17
  export var SalesContext = /*#__PURE__*/createContext({});
@@ -26,23 +27,55 @@ export var SalesProvider = function SalesProvider(props) {
26
27
  _useState4 = _slicedToArray(_useState3, 2),
27
28
  hooks = _useState4[0],
28
29
  setHooks = _useState4[1];
30
+ var context = useEngineContext();
31
+ var utils = context.appHelper.utils || {};
29
32
  var _setData = function _setData(newData) {
30
33
  dataRef.current = _objectSpread(_objectSpread({}, dataRef.current), newData);
31
34
  console.log('sales_model_newData', dataRef.current);
32
35
  if (config !== null && config !== void 0 && config.useSessionStorage) {
33
- sessionStorage.setItem(SALES_MODEL_SESSION_STORAGE_KEY, JSON.stringify(dataRef.current || {}));
36
+ setSessionStorage();
34
37
  }
35
38
  setData(_objectSpread({}, dataRef.current));
36
39
  };
37
40
  var getCurrentData = function getCurrentData() {
38
41
  return dataRef.current;
39
42
  };
43
+
44
+ /**
45
+ * @title 设置sessionStorage
46
+ * @description 获取路由参数中的cacheId,并设置到sessionStorage中
47
+ */
40
48
  var setSessionStorage = function setSessionStorage() {
41
- sessionStorage.setItem(SALES_MODEL_SESSION_STORAGE_KEY, JSON.stringify(dataRef.current || {}));
49
+ var _utils$getHistory, _history$location;
50
+ var history = (utils === null || utils === void 0 || (_utils$getHistory = utils.getHistory) === null || _utils$getHistory === void 0 ? void 0 : _utils$getHistory.call(utils)) || {};
51
+ var cacheId = (history === null || history === void 0 || (_history$location = history.location) === null || _history$location === void 0 || (_history$location = _history$location.query) === null || _history$location === void 0 ? void 0 : _history$location.cacheId) || '';
52
+ var sessionData = _objectSpread(_objectSpread({}, dataRef.current || {}), {}, {
53
+ cacheId: cacheId
54
+ });
55
+ sessionStorage.setItem("".concat(SALES_MODEL_SESSION_STORAGE_KEY), JSON.stringify(sessionData || {}));
42
56
  };
57
+
58
+ /**
59
+ * @title 获取sessionStorage
60
+ * @description 获取路由参数中的cacheId并与sessionStorage中的cacheId进行匹配,如果匹配成功,则返回sessionStorage中的数据
61
+ */
43
62
  var getSessionStorage = function getSessionStorage() {
44
- var result = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
45
- return JSON.parse(result || '{}');
63
+ var _utils$getHistory2, _history$location2;
64
+ var history = (utils === null || utils === void 0 || (_utils$getHistory2 = utils.getHistory) === null || _utils$getHistory2 === void 0 ? void 0 : _utils$getHistory2.call(utils)) || {};
65
+ var strResult = sessionStorage.getItem(SALES_MODEL_SESSION_STORAGE_KEY);
66
+ var result = strResult ? JSON.parse(strResult || '{}') : {};
67
+ var cacheId = (history === null || history === void 0 || (_history$location2 = history.location) === null || _history$location2 === void 0 || (_history$location2 = _history$location2.query) === null || _history$location2 === void 0 ? void 0 : _history$location2.cacheId) || '';
68
+
69
+ // cacheId 为空,且sessionStorage中cacheId也为空,则返回sessionStorage中的数据
70
+ if (!cacheId && !(result !== null && result !== void 0 && result.cacheId)) {
71
+ return result;
72
+ }
73
+
74
+ // cacheId 不为空,需要比对sessionStorage中的cacheId与路由参数中的cacheId是否一致
75
+ if (cacheId && (result === null || result === void 0 ? void 0 : result.cacheId) === cacheId) {
76
+ return result;
77
+ }
78
+ return {};
46
79
  };
47
80
  var removeSessionStorage = function removeSessionStorage() {
48
81
  sessionStorage.removeItem(SALES_MODEL_SESSION_STORAGE_KEY);
@@ -6,7 +6,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  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); }
7
7
  import React, { createContext } from 'react';
8
8
  import { useSales } from "../../../businessModel/SalesModel";
9
- import { getResourceListApi } from "./serve";
9
+ import { getSpecialResourceListApi } from "./serve";
10
10
  import { useRequest } from 'ahooks';
11
11
  import { useCart } from "../Cart";
12
12
  import { getIamgeFromMedia } from "../utils";
@@ -73,7 +73,7 @@ export var ResourceProvider = function ResourceProvider(_ref) {
73
73
  });
74
74
  return renderData;
75
75
  };
76
- var getResourceList = useRequest(getResourceListApi, {
76
+ var getResourceList = useRequest(getSpecialResourceListApi, {
77
77
  manual: true,
78
78
  onSuccess: function onSuccess(res) {
79
79
  var formatData = formatResourceList(res);
@@ -3,3 +3,10 @@ export declare const getResourceListApi: (params: {
3
3
  shop_id: string;
4
4
  form_data_status: string;
5
5
  }) => Promise<any>;
6
+ /**
7
+ * @title: 获取特殊资源列表
8
+ * @Author: xiangfeng.xue
9
+ */
10
+ export declare const getSpecialResourceListApi: (params: {
11
+ event_item_ids?: string | number[];
12
+ }) => Promise<any>;
@@ -5,4 +5,14 @@ export var getResourceListApi = function getResourceListApi(params) {
5
5
  return request.getRequest().get('/h5/form/data/v1', params, {
6
6
  useCache: true
7
7
  });
8
+ };
9
+
10
+ /**
11
+ * @title: 获取特殊资源列表
12
+ * @Author: xiangfeng.xue
13
+ */
14
+ export var getSpecialResourceListApi = function getSpecialResourceListApi(params) {
15
+ return request.getRequest().get('/h5/eventbookingv2/item/specify-resources', params, {
16
+ useCache: true
17
+ });
8
18
  };
@@ -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
  }
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Header: () => JSX.Element;
3
+ export default Header;
@@ -85,9 +85,7 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
85
85
  return checkProductType(item === null || item === void 0 ? void 0 : item.id);
86
86
  case 4:
87
87
  type = _context2.sent;
88
- if (type === 'session') {
89
- appointmentBooking.openProductDetail(item.id);
90
- }
88
+ appointmentBooking.openProductDetail(item.id);
91
89
  case 6:
92
90
  utils === null || utils === void 0 || utils.action({
93
91
  type: 'pisell1.productDetail',
@@ -105,6 +103,13 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
105
103
  return _regeneratorRuntime().wrap(function _callee$(_context) {
106
104
  while (1) switch (_context.prev = _context.next) {
107
105
  case 0:
106
+ if (!data.isCancel) {
107
+ _context.next = 3;
108
+ break;
109
+ }
110
+ appointmentBooking.closeProductDetail();
111
+ return _context.abrupt("return");
112
+ case 3:
108
113
  product = _objectSpread(_objectSpread({}, data), {}, {
109
114
  options: (data === null || data === void 0 ? void 0 : data.option) || []
110
115
  });
@@ -112,31 +117,21 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
112
117
 
113
118
  // 零售模版,直接加入购物车
114
119
  if (!isRetailTemplate) {
115
- _context.next = 7;
120
+ _context.next = 10;
116
121
  break;
117
122
  }
118
123
  if (!(data !== null && data !== void 0 && data.isCancel)) {
119
- _context.next = 5;
124
+ _context.next = 8;
120
125
  break;
121
126
  }
122
127
  return _context.abrupt("return");
123
- case 5:
128
+ case 8:
124
129
  appointmentBooking.storeProduct(product);
125
130
  return _context.abrupt("return");
126
- case 7:
127
- if (!(data !== null && data !== void 0 && data.isCancel)) {
128
- _context.next = 10;
129
- break;
130
- }
131
- if (type === 'session') {
132
- appointmentBooking.closeProductDetail();
133
- appointmentBooking.getAvailableDate();
134
- }
135
- return _context.abrupt("return");
136
131
  case 10:
137
132
  session = data === null || data === void 0 ? void 0 : data.session;
138
133
  if (!session) {
139
- _context.next = 20;
134
+ _context.next = 19;
140
135
  break;
141
136
  }
142
137
  startDate = dayjs(session === null || session === void 0 ? void 0 : session.start_at).format('YYYY-MM-DD');
@@ -148,35 +143,36 @@ var Services = /*#__PURE__*/forwardRef(function (props, ref) {
148
143
  endTime: "".concat(endDate, " ").concat(session === null || session === void 0 ? void 0 : session.end_time)
149
144
  }
150
145
  });
151
- appointmentBooking.closeProductDetail();
152
- _context.next = 18;
146
+ _context.next = 17;
153
147
  return appointmentBooking.getAvailableDate({
154
148
  startDate: startDate,
155
149
  endDate: endDate
156
150
  });
157
- case 18:
158
- _context.next = 28;
151
+ case 17:
152
+ _context.next = 27;
159
153
  break;
160
- case 20:
154
+ case 19:
161
155
  resources = (data === null || data === void 0 || (_data$origin = data.origin) === null || _data$origin === void 0 || (_data$origin = _data$origin.product_resource) === null || _data$origin === void 0 ? void 0 : _data$origin.resources) || [];
162
156
  activeStatus = resources.find(function (item) {
163
157
  return item.status === 1;
164
158
  });
165
159
  if (!(!activeStatus && !appointmentBooking.isTargetNormalProduct(data === null || data === void 0 ? void 0 : data.origin))) {
166
- _context.next = 24;
160
+ _context.next = 23;
167
161
  break;
168
162
  }
169
163
  return _context.abrupt("return", Toast(locales.getText('pisell2.appointment.no.available.service')));
170
- case 24:
164
+ case 23:
171
165
  appointmentBooking.storeProduct(product);
172
166
  // duration 类型的商品,要获取一下资源,在先选日期的 duration 步骤里目前只能通过这个动作拉取
173
167
  if (!(type === 'duration')) {
174
- _context.next = 28;
168
+ _context.next = 27;
175
169
  break;
176
170
  }
177
- _context.next = 28;
171
+ _context.next = 27;
178
172
  return appointmentBooking.getAvailableDate();
179
- case 28:
173
+ case 27:
174
+ appointmentBooking.closeProductDetail();
175
+
180
176
  // 先选择日期流程
181
177
  if (isDateSelectedFirst) {
182
178
  index = (currentStep === null || currentStep === void 0 ? void 0 : currentStep.index) + 2; //先选择日期流程:如果商品类型是duration的商品,则需要增加选择时间步骤
@@ -150,7 +150,7 @@ var VoucherCard = function VoucherCard(props) {
150
150
  setCode('');
151
151
  } else {
152
152
  PisellToast({
153
- content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
153
+ content: locales.getText('pisell2.text.goodpass.code-invalid')
154
154
  });
155
155
  }
156
156
  case 4:
@@ -27,6 +27,20 @@ var AppointmentBooking = function AppointmentBooking() {
27
27
  }
28
28
  });
29
29
  }, []);
30
+ useEffect(function () {
31
+ var setRealVH = function setRealVH() {
32
+ // window.innerHeight 会返回视口真实的高度(不包括工具栏)
33
+ var vh = window.innerHeight * 0.01;
34
+ document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
35
+ };
36
+
37
+ // 页面加载和窗口大小变化时都重新计算
38
+ setRealVH();
39
+ window.addEventListener('resize', setRealVH);
40
+ return function () {
41
+ window.removeEventListener('resize', setRealVH);
42
+ };
43
+ }, []);
30
44
  return /*#__PURE__*/React.createElement("div", {
31
45
  className: "parallel-booking-wrap ".concat(isMobile() ? 'parallel-booking-mobile-wrap' : '')
32
46
  }, /*#__PURE__*/React.createElement(AppointmentBookingProvider, null, /*#__PURE__*/React.createElement(Content, null)));
@@ -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 {
@@ -114,7 +114,6 @@ declare const _default: {
114
114
  'pisell2.text.goodpass.code': string;
115
115
  'pisell2.text.goodpass.enter-code': string;
116
116
  'pisell2.text.goodpass.code-invalid': string;
117
- 'pisell2.text.goodpass.code-invalid-cart': string;
118
117
  'pisell2.text.goodpass.login': string;
119
118
  'pisell2.text.goodpass.login-tip': string;
120
119
  };
@@ -233,7 +232,6 @@ declare const _default: {
233
232
  'pisell2.text.goodpass.code': string;
234
233
  'pisell2.text.goodpass.enter-code': string;
235
234
  'pisell2.text.goodpass.code-invalid': string;
236
- 'pisell2.text.goodpass.code-invalid-cart': string;
237
235
  'pisell2.text.goodpass.login': string;
238
236
  'pisell2.text.goodpass.login-tip': string;
239
237
  };
@@ -352,7 +350,6 @@ declare const _default: {
352
350
  'pisell2.text.goodpass.code': string;
353
351
  'pisell2.text.goodpass.enter-code': string;
354
352
  'pisell2.text.goodpass.code-invalid': string;
355
- 'pisell2.text.goodpass.code-invalid-cart': string;
356
353
  'pisell2.text.goodpass.login': string;
357
354
  'pisell2.text.goodpass.login-tip': string;
358
355
  };
@@ -132,7 +132,6 @@ export default {
132
132
  'pisell2.text.goodpass.code': 'Code',
133
133
  'pisell2.text.goodpass.enter-code': 'Enter Code',
134
134
  'pisell2.text.goodpass.code-invalid': 'Current code is invalid',
135
- 'pisell2.text.goodpass.code-invalid-cart': "No eligible items in the cart",
136
135
  'pisell2.text.goodpass.login': 'Login',
137
136
  'pisell2.text.goodpass.login-tip': ' for member benefit Or use account credit'
138
137
  },
@@ -269,7 +268,6 @@ export default {
269
268
  'pisell2.text.goodpass.code': '券码',
270
269
  'pisell2.text.goodpass.enter-code': '请输入券码',
271
270
  'pisell2.text.goodpass.code-invalid': '当前券码不可用',
272
- 'pisell2.text.goodpass.code-invalid-cart': "当前购物车中无可用商品",
273
271
  'pisell2.text.goodpass.login': '登录',
274
272
  'pisell2.text.goodpass.login-tip': '以获取会员福利或使用账户积分'
275
273
  },
@@ -406,7 +404,6 @@ export default {
406
404
  'pisell2.text.goodpass.code': '券碼',
407
405
  'pisell2.text.goodpass.enter-code': '請輸入券碼',
408
406
  'pisell2.text.goodpass.code-invalid': '當前券碼不可用',
409
- 'pisell2.text.goodpass.code-invalid-cart': "當前購物車中無可用商品",
410
407
  'pisell2.text.goodpass.login': '登錄',
411
408
  'pisell2.text.goodpass.login-tip': '以獲取會員福利或使用賬戶積分'
412
409
  }
@@ -1 +1,10 @@
1
- export declare const Provider: any, Context: any;
1
+ /// <reference types="react" />
2
+ import { FormState } from "../model";
3
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
+ state: FormState;
5
+ } & {
6
+ dispatch: (params: {
7
+ type: string;
8
+ payload: any;
9
+ }) => void;
10
+ }>;
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
5
+ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
8
8
  import classNames from "classnames";
@@ -13,10 +13,6 @@ import "./index.less";
13
13
 
14
14
  // tabs 子组件定义
15
15
 
16
- // 定义主键类型
17
-
18
- // Tabs 可传递的参数
19
-
20
16
  var Tabs = function Tabs(_ref, ref) {
21
17
  var renderTab = _ref.renderTab,
22
18
  rowKey = _ref.rowKey,
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
29
29
  onChange: function onChange(e) {
30
30
  var _resetProps$onChange;
31
31
  e.persist();
32
- (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
32
+ (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
33
33
  }
34
34
  }), _options);
35
35
  };
@@ -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:
@@ -152,7 +152,7 @@ export var checkSubResourcesCapacity = function checkSubResourcesCapacity(resour
152
152
  });
153
153
  }
154
154
  };
155
- var checkResourcesFormat = function checkResourcesFormat(resources, service, isChild) {
155
+ export var checkResourcesFormat = function checkResourcesFormat(resources, service, isChild) {
156
156
  return resources.map(function (resource) {
157
157
  var _resource$children;
158
158
  if (!isChild) {
@@ -26,8 +26,8 @@ import useEngineContext from "../../../../hooks/useEngineContext";
26
26
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
27
27
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
28
28
  import "./index.less";
29
- import { getServiceAddons } from "./utils";
30
29
  import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
30
+ import { getServiceAddons } from "./utils";
31
31
  var ShopDiscountHooks = {
32
32
  onInited: 'shopDiscount:onInited',
33
33
  onDestroy: 'shopDiscount:onDestroy',
@@ -275,8 +275,8 @@ var VoucherCard = function VoucherCard(props) {
275
275
  style: {
276
276
  width: '100%'
277
277
  },
278
- mixedSort: mixedSort,
279
278
  dataSource: (_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length ? availableData : [],
279
+ mixedSort: mixedSort,
280
280
  onChange: function onChange(val) {
281
281
  var shopDiscount = pisellos.getModule('shopDiscount');
282
282
  var detail = shopDiscount.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;