@pisell/private-materials 3.3.78 → 3.3.80

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 (262) 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 +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/businessModel/SalesModel/Sales/index.js +4 -37
  12. package/es/components/Sales/Resource/index.js +2 -2
  13. package/es/components/Sales/Resource/serve.d.ts +0 -7
  14. package/es/components/Sales/Resource/serve.js +0 -10
  15. package/es/components/Sales/Summary/utils.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  17. package/es/components/appointmentBooking/components/Cart/Item/index.js +2 -4
  18. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  19. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  20. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  21. package/es/components/appointmentBooking/components/Header/index.js +14 -8
  22. package/es/components/appointmentBooking/components/Services/index.js +36 -38
  23. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  24. package/es/components/appointmentBooking/components/Voucher/index.js +0 -13
  25. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  26. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +7 -6
  27. package/es/components/appointmentBooking/index.d.ts +0 -1
  28. package/es/components/appointmentBooking/index.js +0 -14
  29. package/es/components/appointmentBooking/index.less +1 -1
  30. package/es/components/appointmentBooking/locales.js +3 -3
  31. package/es/components/booking/addons/index.js +2 -9
  32. package/es/components/booking/addons/model.d.ts +10 -1
  33. package/es/components/booking/addons/model.js +0 -5
  34. package/es/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  35. package/es/components/booking/components/TabProduct/selectProductItem/index.js +1 -3
  36. package/es/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  37. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  38. package/es/components/booking/components/browserSelect/index.js +1 -1
  39. package/es/components/booking/components/footer/amount.js +1 -2
  40. package/es/components/booking/components/footer/index.d.ts +0 -1
  41. package/es/components/booking/components/footer/index.js +3 -9
  42. package/es/components/booking/components/footer/utils.js +36 -74
  43. package/es/components/booking/components/voucher/index.d.ts +0 -1
  44. package/es/components/booking/components/voucher/index.js +66 -110
  45. package/es/components/booking/forms/model.d.ts +10 -1
  46. package/es/components/booking/forms/model.js +5 -5
  47. package/es/components/booking/info/model.d.ts +10 -1
  48. package/es/components/booking/info/service/like/index.js +1 -1
  49. package/es/components/booking/info/service2/utils.js +2 -6
  50. package/es/components/booking/info/utils.js +1 -1
  51. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  52. package/es/components/booking/info2/service/addService/index.js +2 -2
  53. package/es/components/booking/info2/service/editService/index.js +2 -5
  54. package/es/components/booking/info2/utilsByBooking.d.ts +1 -1
  55. package/es/components/booking/info2/utilsByBooking.js +3 -5
  56. package/es/components/booking/locales.d.ts +0 -3
  57. package/es/components/booking/locales.js +3 -6
  58. package/es/components/booking/materiels/startTime/index.js +1 -1
  59. package/es/components/booking/model.d.ts +9 -1
  60. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  61. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  62. package/es/components/booking/notes/model.d.ts +10 -1
  63. package/es/components/booking/notes/model.js +5 -5
  64. package/es/components/booking/payments/model.d.ts +10 -1
  65. package/es/components/booking/payments/model.js +5 -5
  66. package/es/components/eftposPay/amount.d.ts +1 -1
  67. package/es/components/eftposPay/device.d.ts +1 -1
  68. package/es/components/eftposPay/hooks.d.ts +2 -2
  69. package/es/components/eftposPay/store/index.d.ts +4 -4
  70. package/es/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/Event/index.js +4 -13
  72. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -19
  73. package/es/components/eventBooking/index.d.ts +0 -1
  74. package/es/components/eventBooking/index.js +7 -21
  75. package/es/components/eventBooking/locales.js +3 -3
  76. package/es/components/index.d.ts +1 -2
  77. package/es/components/index.js +1 -2
  78. package/es/components/listComponent/index.js +5 -5
  79. package/es/components/pay/toC/PaymentMethods/index.js +4 -5
  80. package/es/components/pay/toC/model.d.ts +9 -1
  81. package/es/components/productExtension/card/index.js +3 -3
  82. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  83. package/es/components/productExtension/fields/Forms/index.js +12 -12
  84. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  85. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  86. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  87. package/es/components/productExtension/server.js +2 -2
  88. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  89. package/es/components/schedules/calendar/index.js +4 -4
  90. package/es/components/schedules/calendar/serve.js +2 -2
  91. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  92. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  93. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  94. package/es/components/schedules/components/ResourceList/index.js +1 -1
  95. package/es/components/schedules/components/Search/index.js +5 -5
  96. package/es/components/schedules/model.d.ts +9 -1
  97. package/es/components/schedules/model.js +5 -5
  98. package/es/components/schedules/openHours/index.js +1 -1
  99. package/es/components/schedules/openHours/serve.js +2 -2
  100. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  101. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  102. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  103. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  104. package/es/components/schedules/products/serve.js +2 -2
  105. package/es/components/schedules/products/utils.js +5 -5
  106. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  107. package/es/components/schedules/resources/detail/index.js +10 -10
  108. package/es/components/schedules/resources/list/index.js +2 -2
  109. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  110. package/es/components/schedules/resources/serve.js +2 -2
  111. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  112. package/es/components/schedules/utils.d.ts +1 -1
  113. package/es/components/schedules/utils.js +4 -4
  114. package/es/components/selectModal/index.js +2 -2
  115. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  116. package/es/components/ticketBooking/components/addServiceVariant/addService.js +5 -6
  117. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  118. package/es/components/ticketBooking/components/ticketBooking/index.js +3 -124
  119. package/es/components/ticketBooking/locales.d.ts +146 -164
  120. package/es/components/ticketBooking/locales.js +147 -195
  121. package/es/components/ticketBooking/utils/index.d.ts +1 -5
  122. package/es/components/ticketBooking/utils/index.js +6 -58
  123. package/es/components/wallet/Detail/model.d.ts +13 -1
  124. package/es/components/wallet/DiscountCard/model.d.ts +14 -1
  125. package/es/components/wallet/PointCard/model.d.ts +13 -1
  126. package/es/components/wallet/RechargeableCard/model.d.ts +29 -1
  127. package/es/components/wallet/Voucher/model.d.ts +13 -1
  128. package/es/components/wallet/model.d.ts +9 -1
  129. package/es/hooks/useComponents.js +1 -1
  130. package/es/index.d.ts +0 -1
  131. package/es/index.js +1 -2
  132. package/es/utils/index.d.ts +1 -1
  133. package/lib/businessModel/SalesModel/Sales/index.js +8 -22
  134. package/lib/components/Sales/Resource/index.js +1 -1
  135. package/lib/components/Sales/Resource/serve.d.ts +0 -7
  136. package/lib/components/Sales/Resource/serve.js +2 -9
  137. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  138. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +0 -1
  139. package/lib/components/appointmentBooking/components/Cart/Item/index.js +4 -5
  140. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  141. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  142. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  143. package/lib/components/appointmentBooking/components/Header/index.js +3 -2
  144. package/lib/components/appointmentBooking/components/Services/index.js +18 -19
  145. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  146. package/lib/components/appointmentBooking/components/Voucher/index.js +0 -9
  147. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  148. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +1 -0
  149. package/lib/components/appointmentBooking/index.d.ts +0 -1
  150. package/lib/components/appointmentBooking/index.js +0 -11
  151. package/lib/components/appointmentBooking/index.less +1 -1
  152. package/lib/components/appointmentBooking/locales.js +3 -3
  153. package/lib/components/booking/addons/index.js +2 -10
  154. package/lib/components/booking/addons/model.d.ts +10 -1
  155. package/lib/components/booking/addons/model.js +0 -3
  156. package/lib/components/booking/components/TabProduct/selectProductItem/index.d.ts +0 -1
  157. package/lib/components/booking/components/TabProduct/selectProductItem/index.js +1 -5
  158. package/lib/components/booking/components/TabProduct/selectProductItem/index.less +0 -6
  159. package/lib/components/booking/components/footer/amount.js +1 -2
  160. package/lib/components/booking/components/footer/index.d.ts +0 -1
  161. package/lib/components/booking/components/footer/index.js +5 -10
  162. package/lib/components/booking/components/footer/utils.js +12 -48
  163. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  164. package/lib/components/booking/components/voucher/index.js +67 -111
  165. package/lib/components/booking/forms/model.d.ts +10 -1
  166. package/lib/components/booking/info/model.d.ts +10 -1
  167. package/lib/components/booking/info/service2/utils.js +1 -3
  168. package/lib/components/booking/info/utils.js +3 -1
  169. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  170. package/lib/components/booking/info2/service/addService/index.js +2 -2
  171. package/lib/components/booking/info2/service/editService/index.js +2 -5
  172. package/lib/components/booking/info2/utilsByBooking.d.ts +1 -1
  173. package/lib/components/booking/info2/utilsByBooking.js +2 -3
  174. package/lib/components/booking/locales.d.ts +0 -3
  175. package/lib/components/booking/locales.js +3 -6
  176. package/lib/components/booking/model.d.ts +9 -1
  177. package/lib/components/booking/notes/model.d.ts +10 -1
  178. package/lib/components/booking/payments/model.d.ts +10 -1
  179. package/lib/components/eftposPay/amount.d.ts +1 -1
  180. package/lib/components/eftposPay/device.d.ts +1 -1
  181. package/lib/components/eftposPay/hooks.d.ts +2 -2
  182. package/lib/components/eftposPay/store/index.d.ts +4 -4
  183. package/lib/components/eventBooking/components/Provider/Event/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/Provider/Event/index.js +3 -10
  185. package/lib/components/eventBooking/components/bookingDetailModal/index.js +3 -9
  186. package/lib/components/eventBooking/index.d.ts +0 -1
  187. package/lib/components/eventBooking/index.js +7 -11
  188. package/lib/components/eventBooking/locales.js +3 -3
  189. package/lib/components/index.d.ts +1 -2
  190. package/lib/components/index.js +0 -3
  191. package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
  192. package/lib/components/pay/toC/model.d.ts +9 -1
  193. package/lib/components/schedules/model.d.ts +9 -1
  194. package/lib/components/schedules/utils.d.ts +1 -1
  195. package/lib/components/schedules/utils.js +1 -1
  196. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -1
  197. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +4 -6
  198. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  199. package/lib/components/ticketBooking/components/ticketBooking/index.js +3 -124
  200. package/lib/components/ticketBooking/locales.d.ts +146 -164
  201. package/lib/components/ticketBooking/locales.js +4 -22
  202. package/lib/components/ticketBooking/utils/index.d.ts +1 -5
  203. package/lib/components/ticketBooking/utils/index.js +5 -48
  204. package/lib/components/wallet/Detail/model.d.ts +13 -1
  205. package/lib/components/wallet/DiscountCard/model.d.ts +14 -1
  206. package/lib/components/wallet/PointCard/model.d.ts +13 -1
  207. package/lib/components/wallet/RechargeableCard/model.d.ts +29 -1
  208. package/lib/components/wallet/Voucher/model.d.ts +13 -1
  209. package/lib/components/wallet/model.d.ts +9 -1
  210. package/lib/index.d.ts +0 -1
  211. package/lib/index.js +0 -3
  212. package/lib/utils/index.d.ts +1 -1
  213. package/package.json +4 -4
  214. package/es/components/booking/components/voucher/utils.d.ts +0 -4
  215. package/es/components/booking/components/voucher/utils.js +0 -15
  216. package/es/components/stepController/components/Content/index.d.ts +0 -7
  217. package/es/components/stepController/components/Content/index.js +0 -9
  218. package/es/components/stepController/components/Content/index.less +0 -8
  219. package/es/components/stepController/components/Footer/index.d.ts +0 -8
  220. package/es/components/stepController/components/Footer/index.js +0 -15
  221. package/es/components/stepController/components/Footer/index.less +0 -39
  222. package/es/components/stepController/components/Header/index.d.ts +0 -20
  223. package/es/components/stepController/components/Header/index.js +0 -97
  224. package/es/components/stepController/components/Header/index.less +0 -21
  225. package/es/components/stepController/index.d.ts +0 -5
  226. package/es/components/stepController/index.js +0 -64
  227. package/es/components/stepController/index.less +0 -11
  228. package/es/components/stepController/locales.d.ts +0 -27
  229. package/es/components/stepController/locales.js +0 -32
  230. package/es/components/stepController/types.d.ts +0 -23
  231. package/es/components/stepController/types.js +0 -1
  232. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  233. package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
  234. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  235. package/es/components/ticketBooking/utils/formatTime.js +0 -144
  236. package/es/hooks/useWindowSize.d.ts +0 -5
  237. package/es/hooks/useWindowSize.js +0 -26
  238. package/lib/components/booking/components/voucher/utils.d.ts +0 -4
  239. package/lib/components/booking/components/voucher/utils.js +0 -43
  240. package/lib/components/stepController/components/Content/index.d.ts +0 -7
  241. package/lib/components/stepController/components/Content/index.js +0 -40
  242. package/lib/components/stepController/components/Content/index.less +0 -8
  243. package/lib/components/stepController/components/Footer/index.d.ts +0 -8
  244. package/lib/components/stepController/components/Footer/index.js +0 -49
  245. package/lib/components/stepController/components/Footer/index.less +0 -39
  246. package/lib/components/stepController/components/Header/index.d.ts +0 -20
  247. package/lib/components/stepController/components/Header/index.js +0 -104
  248. package/lib/components/stepController/components/Header/index.less +0 -21
  249. package/lib/components/stepController/index.d.ts +0 -5
  250. package/lib/components/stepController/index.js +0 -89
  251. package/lib/components/stepController/index.less +0 -11
  252. package/lib/components/stepController/locales.d.ts +0 -27
  253. package/lib/components/stepController/locales.js +0 -50
  254. package/lib/components/stepController/types.d.ts +0 -23
  255. package/lib/components/stepController/types.js +0 -17
  256. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  257. package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
  258. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  259. package/lib/components/ticketBooking/utils/formatTime.js +0 -139
  260. package/lib/hooks/useWindowSize.d.ts +0 -5
  261. package/lib/hooks/useWindowSize.js +0 -51
  262. package/lowcode/step-controller/meta.ts +0 -88
@@ -7,10 +7,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  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; }
8
8
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
9
  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); }
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
13
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
14
10
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
15
11
  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."); }
16
12
  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); }
@@ -26,8 +22,7 @@ import useEngineContext from "../../../../hooks/useEngineContext";
26
22
  import { PisellInput, PisellGoodPassCard, PisellToast } from '@pisell/materials';
27
23
  import { useIsBooking4Shop } from "../../hooks/useIsBooking4Shop";
28
24
  import "./index.less";
29
- import { useMemoizedFn, useDebounceFn, useDebounceEffect } from 'ahooks';
30
- import { getServiceAddons } from "./utils";
25
+ import { useMemoizedFn, useDebounceFn } from 'ahooks';
31
26
  var ShopDiscountHooks = {
32
27
  onInited: 'shopDiscount:onInited',
33
28
  onDestroy: 'shopDiscount:onDestroy',
@@ -40,11 +35,10 @@ var ShopDiscountHooks = {
40
35
  };
41
36
  var services = {};
42
37
  var VoucherCard = function VoucherCard(props) {
43
- var _context$appHelper, _state$client$value, _state$service2;
38
+ var _context$appHelper, _state$client$value;
44
39
  var context = useEngineContext();
45
40
  var state = props.state,
46
- dispatch = props.dispatch,
47
- source = props.source;
41
+ dispatch = props.dispatch;
48
42
  var _useState = useState(false),
49
43
  _useState2 = _slicedToArray(_useState, 2),
50
44
  showDetail = _useState2[0],
@@ -59,27 +53,35 @@ var VoucherCard = function VoucherCard(props) {
59
53
  _useState6 = _slicedToArray(_useState5, 2),
60
54
  discountList = _useState6[0],
61
55
  setDisCountList = _useState6[1];
62
- var serviceValueRef = useRef(state.service.value);
63
- var addonsValueRef = useRef(state.addons.value);
56
+ var productRef = useRef(state.service.value);
64
57
  var isBooking4Shop = useIsBooking4Shop(state);
65
58
  var shopDiscount = pisellos.getModule('shopDiscount');
66
59
  services = state.service;
60
+ var availableData = useMemo(function () {
61
+ if (!isBooking4Shop) return [];
62
+ var shopDiscount = pisellos.getModule('shopDiscount');
63
+ return discountList.filter(function (item) {
64
+ return !!item.isAvailable;
65
+ }).map(function (discount) {
66
+ return _objectSpread(_objectSpread({}, discount), {}, {
67
+ savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
68
+ });
69
+ });
70
+ }, [discountList, isBooking4Shop]);
67
71
 
68
72
  // 设置client
69
- useDebounceEffect(function () {
73
+ useEffect(function () {
70
74
  if (isBooking4Shop) {
71
75
  shopDiscount.setCustomer(state.client.value);
72
76
  }
73
- }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop], {
74
- wait: 200
75
- });
77
+ }, [(_state$client$value = state.client.value) === null || _state$client$value === void 0 ? void 0 : _state$client$value.id, isBooking4Shop]);
76
78
 
77
79
  // 设置productList
78
80
  useEffect(function () {
79
81
  if (isBooking4Shop) {
80
- shopDiscount.setProductList([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
82
+ shopDiscount.setProductList(state.service.value);
81
83
  }
82
- }, [state.service.value, state.addons.value, isBooking4Shop]);
84
+ }, [state.service.value, isBooking4Shop]);
83
85
  var serviceMemo = useMemo(function () {
84
86
  var _ref;
85
87
  var val = (_ref = state.service.value || []) === null || _ref === void 0 ? void 0 : _ref.map(function (value) {
@@ -87,6 +89,7 @@ var VoucherCard = function VoucherCard(props) {
87
89
  return {
88
90
  booking_id: value.booking_id,
89
91
  id: value.id,
92
+ _id: value._id,
90
93
  price: value.price,
91
94
  total: value === null || value === void 0 || (_value$_extend = value._extend) === null || _value$_extend === void 0 ? void 0 : _value$_extend.total,
92
95
  discount_list: value.discount_list,
@@ -95,43 +98,24 @@ var VoucherCard = function VoucherCard(props) {
95
98
  });
96
99
  return val;
97
100
  }, [state.service.value]);
98
- var addonsMemo = useMemo(function () {
99
- var _ref2;
100
- var val = (_ref2 = state.addons.value || []) === null || _ref2 === void 0 ? void 0 : _ref2.map(function (value) {
101
- var _value$_extend3, _value$_extend4;
102
- return {
103
- booking_id: value.booking_id,
104
- id: value.id,
105
- _id: value._id,
106
- price: value.price,
107
- total: value === null || value === void 0 || (_value$_extend3 = value._extend) === null || _value$_extend3 === void 0 ? void 0 : _value$_extend3.total,
108
- discount_list: value.discount_list,
109
- _key: value._key,
110
- num: value === null || value === void 0 || (_value$_extend4 = value._extend) === null || _value$_extend4 === void 0 ? void 0 : _value$_extend4.quantity
111
- };
112
- });
113
- return val;
114
- }, [state.addons.value]);
115
- var disabled = useMemo(function () {
116
- var _state$bookingDetail;
117
- if (['paid', 'partially_paid'].includes((_state$bookingDetail = state.bookingDetail) === null || _state$bookingDetail === void 0 ? void 0 : _state$bookingDetail.payment_status) && [].concat(_toConsumableArray(addonsMemo), _toConsumableArray(serviceMemo)).every(function (item) {
118
- return item.booking_id;
119
- })) {
120
- return true;
121
- }
122
- return false;
123
- }, [state, addonsMemo, serviceMemo]);
124
101
  var _useDebounceFn = useDebounceFn(function () {
125
102
  var _state$service;
126
103
  // console.log('state.service.value1', state.service.value);
127
- if (serviceValueRef.current === state.service.value && addonsValueRef.current === state.addons.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
104
+ if (productRef.current === state.service.value || !((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length)) {
128
105
  return;
129
106
  }
130
107
  if (isBooking4Shop) {
131
- var val = shopDiscount.calcDiscount([].concat(_toConsumableArray(state.service.value), _toConsumableArray(state.addons.value)));
132
- console.log('input: ', state.service.value);
133
- console.log('output: ', val);
134
- productListToValue(val.productList);
108
+ var val = shopDiscount.calcDiscount(state.service.value);
109
+ // console.log('input: ', state.service.value);
110
+ // console.log('output: ', val);
111
+ productRef.current = val.productList;
112
+ // console.log('val.productList', val.productList);
113
+ dispatch({
114
+ type: 'setService',
115
+ payload: _objectSpread(_objectSpread({}, services), {}, {
116
+ value: ((val === null || val === void 0 ? void 0 : val.productList) || []).filter(Boolean)
117
+ })
118
+ });
135
119
  }
136
120
  }, {
137
121
  wait: 500
@@ -141,7 +125,7 @@ var VoucherCard = function VoucherCard(props) {
141
125
  // 更新productList
142
126
  useEffect(function () {
143
127
  run();
144
- }, [JSON.stringify(serviceMemo), JSON.stringify(addonsMemo), isBooking4Shop]);
128
+ }, [JSON.stringify(serviceMemo), isBooking4Shop]);
145
129
  var fn = useMemoizedFn(function (result) {
146
130
  var _result$productList;
147
131
  if (!(result !== null && result !== void 0 && result.productList) || result !== null && result !== void 0 && (_result$productList = result.productList) !== null && _result$productList !== void 0 && _result$productList.some(function (item) {
@@ -149,13 +133,18 @@ var VoucherCard = function VoucherCard(props) {
149
133
  })) {
150
134
  return;
151
135
  }
152
- productListToValue(result.productList);
136
+ dispatch({
137
+ type: 'setService',
138
+ payload: _objectSpread(_objectSpread({}, services), {}, {
139
+ value: result.productList
140
+ })
141
+ });
153
142
  });
154
143
 
155
144
  // 监听customer变化
156
145
  useEffect(function () {
157
146
  if (!isBooking4Shop) return;
158
- var onScanCustomerChange = function onScanCustomerChange(customer) {
147
+ pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, function (customer) {
159
148
  // 更新客户
160
149
  dispatch({
161
150
  type: 'setClient',
@@ -163,49 +152,22 @@ var VoucherCard = function VoucherCard(props) {
163
152
  value: customer
164
153
  }
165
154
  });
166
- };
167
- var onDiscountListChange = function onDiscountListChange(discount) {
168
- setDisCountList(discount);
169
- };
170
- pisellos.effects.on(ShopDiscountHooks.onScanCustomerChange, onScanCustomerChange);
155
+ });
171
156
  pisellos.effects.on(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
172
- pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
157
+ pisellos.effects.on(ShopDiscountHooks.onDiscountListChange, function (discount) {
158
+ setDisCountList(discount);
159
+ });
173
160
  return function () {
174
161
  shopDiscount.clear();
175
- pisellos.effects.off(ShopDiscountHooks.onCustomerChange, onScanCustomerChange);
176
- pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult, fn);
177
- pisellos.effects.off(ShopDiscountHooks.onDiscountListChange, onDiscountListChange);
162
+ pisellos.effects.off(ShopDiscountHooks.onCustomerChange);
163
+ pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
164
+ pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
178
165
  };
179
166
  }, [state.bookingId, isBooking4Shop, fn]);
180
- var productListToValue = useMemoizedFn(function (list, edit) {
181
- var _getServiceAddons = getServiceAddons(list),
182
- serviceList = _getServiceAddons.serviceList,
183
- addonsList = _getServiceAddons.addonsList;
184
- serviceValueRef.current = serviceList;
185
- addonsValueRef.current = addonsList;
186
- var other = {};
187
- if (edit) {
188
- other = {
189
- edit: true
190
- };
191
- }
192
- dispatch({
193
- type: 'setService',
194
- payload: _objectSpread({
195
- value: serviceList
196
- }, other)
197
- });
198
- dispatch({
199
- type: 'setAddons',
200
- payload: _objectSpread({
201
- value: addonsList
202
- }, other)
203
- });
204
- });
205
167
 
206
168
  // apply code
207
169
  var onScanCode = /*#__PURE__*/function () {
208
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
170
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
209
171
  var val;
210
172
  return _regeneratorRuntime().wrap(function _callee$(_context) {
211
173
  while (1) switch (_context.prev = _context.next) {
@@ -216,11 +178,18 @@ var VoucherCard = function VoucherCard(props) {
216
178
  val = _context.sent;
217
179
  console.log(val);
218
180
  if (val !== null && val !== void 0 && val.isAvailable) {
219
- productListToValue(val.productList, true);
181
+ productRef.current = val.productList;
182
+ dispatch({
183
+ type: 'setService',
184
+ payload: {
185
+ value: val.productList,
186
+ edit: true
187
+ }
188
+ });
220
189
  setCode('');
221
190
  } else {
222
191
  PisellToast({
223
- content: val.type === 'server' ? locales.getText('pisell2.text.goodpass.code-invalid') : locales.getText('pisell2.text.goodpass.code-invalid-cart')
192
+ content: locales.getText('pisell2.text.goodpass.code-invalid')
224
193
  });
225
194
  }
226
195
  case 5:
@@ -230,27 +199,10 @@ var VoucherCard = function VoucherCard(props) {
230
199
  }, _callee);
231
200
  }));
232
201
  return function onScanCode() {
233
- return _ref3.apply(this, arguments);
202
+ return _ref2.apply(this, arguments);
234
203
  };
235
204
  }();
236
- var availableData = useMemo(function () {
237
- if (!isBooking4Shop) return [];
238
- var shopDiscount = pisellos.getModule('shopDiscount');
239
- return discountList.filter(function (item) {
240
- return !!item.isAvailable;
241
- }).map(function (discount) {
242
- return _objectSpread(_objectSpread({}, discount), {}, {
243
- isDisabled: discount.isDisabled || discount.isDisabledForProductUsed || disabled,
244
- savedAmount: shopDiscount.calcDiscountApplicableProductTotalPrice(discount)
245
- });
246
- });
247
- }, [discountList, isBooking4Shop, disabled]);
248
205
  if (!isBooking4Shop) return null;
249
- var mixedSort = function mixedSort(val) {
250
- return _toConsumableArray(val).sort(function (a, b) {
251
- return Number(b === null || b === void 0 ? void 0 : b.isSelected) - Number(a === null || a === void 0 ? void 0 : a.isSelected);
252
- });
253
- };
254
206
  return /*#__PURE__*/React.createElement("div", {
255
207
  className: "pisell-lowcode__booking-footer-voucher-container"
256
208
  }, /*#__PURE__*/React.createElement("div", {
@@ -275,8 +227,7 @@ var VoucherCard = function VoucherCard(props) {
275
227
  style: {
276
228
  width: '100%'
277
229
  },
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,
230
+ dataSource: availableData,
280
231
  onChange: function onChange(val) {
281
232
  var shopDiscount = pisellos.getModule('shopDiscount');
282
233
  var detail = shopDiscount.setDiscountSelected({
@@ -284,7 +235,13 @@ var VoucherCard = function VoucherCard(props) {
284
235
  isSelected: val.isSelected
285
236
  });
286
237
  console.log('setDiscountSelected:', detail);
287
- productListToValue(detail.productList, true);
238
+ dispatch({
239
+ type: 'setService',
240
+ payload: {
241
+ edit: true,
242
+ value: detail.productList
243
+ }
244
+ });
288
245
  }
289
246
  }) : null, /*#__PURE__*/React.createElement("div", {
290
247
  className: "voucher-code-input-wrapper"
@@ -301,7 +258,6 @@ var VoucherCard = function VoucherCard(props) {
301
258
  setCode((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
302
259
  },
303
260
  size: "small",
304
- allowClear: true,
305
261
  placeholder: locales.getText('pisell2.text.goodpass.enter-code')
306
262
  // suffix={
307
263
  // <PisellTooltip title="">
@@ -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
+ }>;
@@ -1,9 +1,9 @@
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
4
  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; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
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); }
5
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
7
7
  import { miniRedux } from "@pisell/utils";
8
8
  var defaultState = {};
9
9
  var _miniRedux = miniRedux({
@@ -1,5 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { FormState } from '../model';
1
3
  export declare const walkInData: {
2
4
  id: number;
3
5
  nickname: string;
4
6
  };
5
- export declare const Provider: any, Context: any;
7
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
+ state: FormState;
9
+ } & {
10
+ dispatch: (params: {
11
+ type: string;
12
+ payload: any;
13
+ }) => void;
14
+ }>;
@@ -19,7 +19,7 @@ var Like = function Like(_ref) {
19
19
  }
20
20
  e.preventDefault();
21
21
  e.stopPropagation();
22
- onChange === null || onChange === void 0 || onChange(status === "like" ? "common" : "like");
22
+ onChange === null || onChange === void 0 ? void 0 : onChange(status === "like" ? "common" : "like");
23
23
  }
24
24
  });
25
25
  };
@@ -20,7 +20,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
20
20
  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); }
21
21
  import { getNoResource } from "../../mock";
22
22
  import { getErrorList, getProductTotalPrice } from "../../utils";
23
- import { isArr, locales } from '@pisell/utils';
23
+ import { locales } from '@pisell/utils';
24
24
  import dayjs from 'dayjs';
25
25
  import { appointmentTypes, openingTime } from "./status";
26
26
  import { postMultiDay } from "../service/serve";
@@ -199,9 +199,7 @@ export var handleChangeHolder = function handleChangeHolder(products, currentIte
199
199
  if (item._id === currentItem._id) {
200
200
  return _objectSpread(_objectSpread({}, item), {}, {
201
201
  _extend: _objectSpread(_objectSpread({}, item._extend), {}, {
202
- holder_id: isArr(other) ? other.map(function (item) {
203
- return item.id;
204
- }) : item._extend.quantity > 1 ? [other.id] : other.id
202
+ holder_id: other.id
205
203
  })
206
204
  });
207
205
  }
@@ -612,8 +610,6 @@ var getGeneralParams = function getGeneralParams(item, state, isParallelResource
612
610
  actionText: locales.getText('page.booking.text.add-time'),
613
611
  isMultipleResource: true,
614
612
  multiResources: multiResources,
615
- holderMaxCount: item === null || item === void 0 ? void 0 : item._extend.quantity,
616
- holderMode: (item === null || item === void 0 ? void 0 : item._extend.quantity) > 1 ? 'multiple' : undefined,
617
613
  isErrorHolder: getIsSubjectRequire(state),
618
614
  addHolderButtonText: (formData === null || formData === void 0 || (_formData$ = formData[0]) === null || _formData$ === void 0 || (_formData$ = _formData$.form) === null || _formData$ === void 0 ? void 0 : _formData$.title) || "",
619
615
  holder_id: item === null || item === void 0 || (_item$_extend5 = item._extend) === null || _item$_extend5 === void 0 ? void 0 : _item$_extend5.holder_id,
@@ -95,7 +95,7 @@ export var isBooking4Shop = function isBooking4Shop(shopId, renderType) {
95
95
  if (renderType === 'eventBooking') {
96
96
  return false;
97
97
  }
98
- var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988];
98
+ var booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 8609, 8610, 8782, 1285, 6124, 8727, 5538, 6988, 8872, 6930];
99
99
  return booking4Shops.includes(shopId);
100
100
  };
101
101
  function generateDateRange(start, end) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PisellDrawerProps } from '../../../components/drawer';
3
2
  import '../../../info/service/addService/index.less';
4
3
  interface AddServiceProps {
@@ -33,7 +33,7 @@ import { getProductExtend } from "./utils";
33
33
  import { formatProductListByCategory, getIsEject, getIsOnlySession, getProductTotalPrice, isSessionProduct, request } from "../../../utils";
34
34
  import { locales, getUniqueId } from '@pisell/utils';
35
35
  import { useUpdateEffect } from 'ahooks';
36
- import { getIsShowNumber } from "../../../../ticketBooking/utils";
36
+ import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
37
37
  var shopList = [2886, 4422, 5538, 6930, 6814, 6813, 6812, 6087, 6303, 6080, 6978, 7386, 6848, 6305];
38
38
  var Info = function Info(props) {
39
39
  var _state$client2, _state$service2, _state$service4, _state$service5;
@@ -255,7 +255,7 @@ var Info = function Info(props) {
255
255
  session: isSession,
256
256
  variant: true,
257
257
  package: true,
258
- number: getIsShowNumber(item, state)
258
+ number: isNormalProductByDurationSchedule(item)
259
259
  },
260
260
  is_eject: isEject ? 1 : 0,
261
261
  isOnlySession: isOnlySession,
@@ -35,7 +35,6 @@ import { formatResources, getDurationProps, getFlexibleOption, getTimeObj, setDe
35
35
  import { PisellAdjustPriceInputNumber } from '@pisell/materials';
36
36
  import { editSessionProduct } from "../../../info/utils";
37
37
  import { isNormalProductByDurationSchedule } from "../../../info/service2/utils";
38
- import { addService, genServiceKey, getIsShowNumber } from "../../../../ticketBooking/utils";
39
38
  var submitLock = false;
40
39
  var Info = function Info(_, ref) {
41
40
  var _state$service3, _state$bookingConfig2, _state$service$cacheI4, _state$service$cacheI5, _state$service6, _state$service8, _window$BaseMaterials, _state$service$cacheI6, _state$service9, _state$service$cacheI7, _state$service$cacheI8, _state$service$cacheI9, _state$service$cacheI10, _state$bookingConfig3, _state$service$resour;
@@ -245,15 +244,13 @@ var Info = function Info(_, ref) {
245
244
  }
246
245
  _item._extend = _extend;
247
246
  _item._time = new Date().getTime();
248
- _item._serviceKey = genServiceKey(_item);
249
247
  var _id = _item === null || _item === void 0 ? void 0 : _item._id;
250
248
 
251
249
  // 判断是新增还是编辑
252
250
  if (!_list.some(function (d) {
253
251
  return d._id === _id;
254
252
  })) {
255
- var detail = addService(_list, _item, state);
256
- _list = detail.list;
253
+ _list.push(_item);
257
254
  } else {
258
255
  // 手动改价时移除优惠券使用
259
256
  if (isChangeTotal.current) {
@@ -431,7 +428,7 @@ var Info = function Info(_, ref) {
431
428
  session: isSession,
432
429
  variant: true,
433
430
  package: true,
434
- number: getIsShowNumber(item, state)
431
+ number: isNormalProductByDurationSchedule(item)
435
432
  },
436
433
  isOS: isSession,
437
434
  customer_id: (_state$client = state.client) === null || _state$client === void 0 || (_state$client = _state$client.value) === null || _state$client === void 0 ? void 0 : _state$client.id,
@@ -1,5 +1,5 @@
1
1
  export declare const getResourceTimeIsUsable: (item: any, cacheItem: any, resourceItem: any) => any;
2
- export declare const getSumCapacity: ({ cacheItem }: any, isCalcQuantity?: boolean) => number;
2
+ export declare const getSumCapacity: ({ cacheItem }: any) => number;
3
3
  /**
4
4
  * @title: 查找是否有可用的time
5
5
  * @description:
@@ -162,9 +162,7 @@ export var getResourceTimeIsUsable = function getResourceTimeIsUsable(item, cach
162
162
  return time;
163
163
  };
164
164
  export var getSumCapacity = function getSumCapacity(_ref) {
165
- var _cacheItem$_extend;
166
165
  var cacheItem = _ref.cacheItem;
167
- var isCalcQuantity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
168
166
  var sum = 0;
169
167
  var _iterator = _createForOfIteratorHelper(cacheItem._extend.capacity || []),
170
168
  _step;
@@ -178,7 +176,7 @@ export var getSumCapacity = function getSumCapacity(_ref) {
178
176
  } finally {
179
177
  _iterator.f();
180
178
  }
181
- return sum * (isCalcQuantity ? (cacheItem === null || cacheItem === void 0 || (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.quantity) || 1 : 1);
179
+ return sum;
182
180
  };
183
181
 
184
182
  /**
@@ -304,7 +302,7 @@ export var getAppointmentTimingPreference = function getAppointmentTimingPrefere
304
302
  * @Date: 2024-01-26 14:09
305
303
  */
306
304
  export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTime(state, cacheItem, timeObj) {
307
- var _cacheItem$duration, _cacheItem$_extend2;
305
+ var _cacheItem$duration, _cacheItem$_extend;
308
306
  var appointmentTimingPreference = getAppointmentTimingPreference(state);
309
307
 
310
308
  // 获取上一个服务商品
@@ -372,7 +370,7 @@ export var getServiceStartTimeAndEndTime = function getServiceStartTimeAndEndTim
372
370
  endDate = _getServiceTimes2.endDate;
373
371
  _extend.startDate = startDate;
374
372
  _extend.endDate = endDate;
375
- var session = cacheItem === null || cacheItem === void 0 || (_cacheItem$_extend2 = cacheItem._extend) === null || _cacheItem$_extend2 === void 0 || (_cacheItem$_extend2 = _cacheItem$_extend2.other) === null || _cacheItem$_extend2 === void 0 ? void 0 : _cacheItem$_extend2.session;
373
+ var session = cacheItem === null || cacheItem === void 0 || (_cacheItem$_extend = cacheItem._extend) === null || _cacheItem$_extend === void 0 || (_cacheItem$_extend = _cacheItem$_extend.other) === null || _cacheItem$_extend === void 0 ? void 0 : _cacheItem$_extend.session;
376
374
  if (isSessionProduct(cacheItem) && session) {
377
375
  _extend.start_date = session.start_at;
378
376
  _extend.startDate = session.start_at;
@@ -261,7 +261,6 @@ declare const _default: {
261
261
  'pisell2.text.goodpass.code': string;
262
262
  'pisell2.text.goodpass.enter-code': string;
263
263
  'pisell2.text.goodpass.code-invalid': string;
264
- 'pisell2.text.goodpass.code-invalid-cart': string;
265
264
  'pisell2.text.status.valid': string;
266
265
  'pisell2.text.status.expired': string;
267
266
  'pisell2.text.validity.expired': (str: string) => string;
@@ -532,7 +531,6 @@ declare const _default: {
532
531
  'pisell2.text.goodpass.code': string;
533
532
  'pisell2.text.goodpass.enter-code': string;
534
533
  'pisell2.text.goodpass.code-invalid': string;
535
- 'pisell2.text.goodpass.code-invalid-cart': string;
536
534
  'pisell2.text.status.valid': string;
537
535
  'pisell2.text.status.expired': string;
538
536
  'pisell2.text.validity.expired': (str: string) => string;
@@ -803,7 +801,6 @@ declare const _default: {
803
801
  'pisell2.text.goodpass.code': string;
804
802
  'pisell2.text.goodpass.enter-code': string;
805
803
  'pisell2.text.goodpass.code-invalid': string;
806
- 'pisell2.text.goodpass.code-invalid-cart': string;
807
804
  'pisell2.text.status.valid': string;
808
805
  'pisell2.text.status.expired': string;
809
806
  'pisell2.text.validity.expired': (str: string) => string;
@@ -292,13 +292,12 @@ export default {
292
292
  'pisell2.text.send-form-reminder-tooltip': 'Refresh forms',
293
293
  'pisell2.text.send-form-reminder-refresh': 'Forms refreshed successfully',
294
294
  'pisell2.text.send-form-reminder-error-message': 'Please select at least one reminder method',
295
- 'pisell2.text.goodpass': "Promotion",
295
+ 'pisell2.text.goodpass': "GoodPass",
296
296
  'pisell2.text.goodpass.product-vouchers': "Product Vouchers",
297
297
  'pisell2.text.goodpass.view-more': "View More",
298
298
  'pisell2.text.goodpass.code': "Code",
299
299
  'pisell2.text.goodpass.enter-code': "Enter Code",
300
300
  'pisell2.text.goodpass.code-invalid': "Current code is invalid",
301
- 'pisell2.text.goodpass.code-invalid-cart': "No eligible items in the cart",
302
301
  'pisell2.text.status.valid': 'Valid',
303
302
  'pisell2.text.status.expired': 'Expired',
304
303
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -610,13 +609,12 @@ export default {
610
609
  'pisell2.text.send-form-reminder-tooltip': '刷新表单',
611
610
  'pisell2.text.send-form-reminder-refresh': '已刷新表单',
612
611
  'pisell2.text.send-form-reminder-error-message': '请至少选择一种提醒方式',
613
- 'pisell2.text.goodpass': "促销",
612
+ 'pisell2.text.goodpass': "商品券",
614
613
  'pisell2.text.goodpass.product-vouchers': "商品兑换券",
615
614
  'pisell2.text.goodpass.view-more': "查看更多",
616
615
  'pisell2.text.goodpass.code': "券码",
617
616
  'pisell2.text.goodpass.enter-code': "请输入券码",
618
617
  'pisell2.text.goodpass.code-invalid': "当前券码不可用",
619
- 'pisell2.text.goodpass.code-invalid-cart': "当前购物车中无可用商品",
620
618
  'pisell2.text.status.valid': '有效',
621
619
  'pisell2.text.status.expired': '已过期',
622
620
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -928,13 +926,12 @@ export default {
928
926
  'pisell2.text.send-form-reminder-tooltip': '刷新表單',
929
927
  'pisell2.text.send-form-reminder-refresh': '已刷新表單',
930
928
  'pisell2.text.send-form-reminder-error-message': '請至少選擇一種提醒方式',
931
- 'pisell2.text.goodpass': "促銷",
929
+ 'pisell2.text.goodpass': "商品券",
932
930
  'pisell2.text.goodpass.product-vouchers': "商品兌換券",
933
931
  'pisell2.text.goodpass.view-more': "查看更多",
934
932
  'pisell2.text.goodpass.code': "券碼",
935
933
  'pisell2.text.goodpass.enter-code': "請輸入券碼",
936
934
  'pisell2.text.goodpass.code-invalid': "當前券碼不可用",
937
- 'pisell2.text.goodpass.code-invalid-cart': "當前購物車中無可用商品",
938
935
  'pisell2.text.status.valid': '有效',
939
936
  'pisell2.text.status.expired': '已過期',
940
937
  'pisell2.text.validity.expired': function pisell2TextValidityExpired(str) {
@@ -25,7 +25,7 @@ var StartTime = function StartTime(props) {
25
25
  return sliceDayIntoFiveMinutes(slice, locale);
26
26
  }, [slice, locale]);
27
27
  useEffect(function () {
28
- timeObjChange === null || timeObjChange === void 0 || timeObjChange(timeObj);
28
+ timeObjChange === null || timeObjChange === void 0 ? void 0 : timeObjChange(timeObj);
29
29
  }, [timeObj]);
30
30
  var renderOptions = useCallback(function (array) {
31
31
  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "value";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface FormState {
2
3
  amountSymbol: string;
3
4
  apis: {
@@ -104,4 +105,11 @@ export declare const walkInData: {
104
105
  id: number;
105
106
  nickname: string;
106
107
  };
107
- export declare const Provider: any, Context: any;
108
+ export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
109
+ state: FormState;
110
+ } & {
111
+ dispatch: (params: {
112
+ type: string;
113
+ payload: any;
114
+ }) => void;
115
+ }>;
@@ -18,7 +18,7 @@ var NoteItem = function NoteItem(props) {
18
18
  _props$menus = props.menus,
19
19
  menus = _props$menus === void 0 ? defaultMenus : _props$menus;
20
20
  var menuChange = function menuChange(e) {
21
- onChange === null || onChange === void 0 || onChange(item, e.key);
21
+ onChange === null || onChange === void 0 ? void 0 : onChange(item, e.key);
22
22
  };
23
23
  return /*#__PURE__*/React.createElement("div", {
24
24
  className: "pisell-lowcode__booking-notes-item"