@pisell/private-materials 3.3.21 → 3.3.22

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 (199) 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/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +2 -2
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/appointmentBooking/components/Cart/Item/index.js +19 -7
  8. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  9. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -1
  10. package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
  11. package/es/components/appointmentBooking/components/Content/index.js +0 -1
  12. package/es/components/appointmentBooking/components/Date/index.d.ts +4 -0
  13. package/es/components/appointmentBooking/components/Date/index.js +1 -5
  14. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  15. package/es/components/appointmentBooking/components/Form/index.js +4 -3
  16. package/es/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  17. package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  18. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  19. package/es/components/appointmentBooking/components/Services/index.js +21 -11
  20. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  21. package/es/components/appointmentBooking/context.d.ts +35 -0
  22. package/es/components/appointmentBooking/hooks.d.ts +106 -0
  23. package/es/components/appointmentBooking/hooks.js +12 -18
  24. package/es/components/appointmentBooking/index.js +3 -5
  25. package/es/components/appointmentBooking/utils.d.ts +114 -0
  26. package/es/components/appointmentBooking/utils.js +15 -15
  27. package/es/components/booking/components/TabProduct/index.d.ts +0 -1
  28. package/es/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  29. package/es/components/booking/components/footer/index.d.ts +0 -1
  30. package/es/components/booking/components/voucher/index.js +4 -2
  31. package/es/components/booking/deposit/index.d.ts +2 -0
  32. package/es/components/booking/forms/single/index.d.ts +0 -1
  33. package/es/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  34. package/es/components/booking/info/date/index.d.ts +0 -1
  35. package/es/components/booking/info/index.d.ts +0 -1
  36. package/es/components/booking/info/notes/index.d.ts +0 -1
  37. package/es/components/booking/info/service/Lists.d.ts +0 -1
  38. package/es/components/booking/info/service/actions/index.d.ts +0 -1
  39. package/es/components/booking/info/service/addService/index.js +14 -16
  40. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  41. package/es/components/booking/info/service2/Lists.d.ts +0 -1
  42. package/es/components/booking/info/service2/utils.d.ts +1 -1
  43. package/es/components/booking/info/service2/utils.js +1 -0
  44. package/es/components/booking/info2/service/actions/index.d.ts +0 -1
  45. package/es/components/booking/info2/service/addService/index.d.ts +0 -1
  46. package/es/components/booking/info2/service/addService/index.js +14 -15
  47. package/es/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  48. package/es/components/booking/info2/service/serviceList/index.d.ts +0 -1
  49. package/es/components/booking/materiels/duration/index.d.ts +0 -1
  50. package/es/components/booking/materiels/holder/index.d.ts +0 -1
  51. package/es/components/booking/materiels/startTime/index.d.ts +0 -1
  52. package/es/components/booking/utils.d.ts +2 -2
  53. package/es/components/productExtension/fields/Forms/index.d.ts +0 -1
  54. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  55. package/es/components/ticketBooking/components/timeBar/index.js +1 -0
  56. package/lib/components/appointmentBooking/components/Cart/Item/index.js +12 -9
  57. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  58. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +7 -1
  59. package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
  60. package/lib/components/appointmentBooking/components/Content/index.js +1 -1
  61. package/lib/components/appointmentBooking/components/Date/index.d.ts +4 -0
  62. package/lib/components/appointmentBooking/components/Date/index.js +1 -1
  63. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  64. package/lib/components/appointmentBooking/components/Form/index.js +3 -2
  65. package/lib/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  66. package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  67. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  68. package/lib/components/appointmentBooking/components/Services/index.js +8 -1
  69. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  70. package/lib/components/appointmentBooking/context.d.ts +35 -0
  71. package/lib/components/appointmentBooking/hooks.d.ts +106 -0
  72. package/lib/components/appointmentBooking/hooks.js +2 -6
  73. package/lib/components/appointmentBooking/index.js +2 -2
  74. package/lib/components/appointmentBooking/utils.d.ts +114 -0
  75. package/lib/components/appointmentBooking/utils.js +14 -23
  76. package/lib/components/booking/components/TabProduct/index.d.ts +0 -1
  77. package/lib/components/booking/components/TabProduct/productItem/index.d.ts +0 -1
  78. package/lib/components/booking/components/footer/index.d.ts +0 -1
  79. package/lib/components/booking/components/voucher/index.js +4 -2
  80. package/lib/components/booking/deposit/index.d.ts +2 -0
  81. package/lib/components/booking/forms/single/index.d.ts +0 -1
  82. package/lib/components/booking/info/clientVariant/hooks/useClientFn.d.ts +0 -1
  83. package/lib/components/booking/info/date/index.d.ts +0 -1
  84. package/lib/components/booking/info/index.d.ts +0 -1
  85. package/lib/components/booking/info/notes/index.d.ts +0 -1
  86. package/lib/components/booking/info/service/Lists.d.ts +0 -1
  87. package/lib/components/booking/info/service/actions/index.d.ts +0 -1
  88. package/lib/components/booking/info/service/addService/index.js +14 -14
  89. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  90. package/lib/components/booking/info/service2/Lists.d.ts +0 -1
  91. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  92. package/lib/components/booking/info/service2/utils.js +1 -0
  93. package/lib/components/booking/info2/service/actions/index.d.ts +0 -1
  94. package/lib/components/booking/info2/service/addService/index.d.ts +0 -1
  95. package/lib/components/booking/info2/service/addService/index.js +15 -13
  96. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +0 -1
  97. package/lib/components/booking/info2/service/serviceList/index.d.ts +0 -1
  98. package/lib/components/booking/materiels/duration/index.d.ts +0 -1
  99. package/lib/components/booking/materiels/holder/index.d.ts +0 -1
  100. package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
  101. package/lib/components/booking/utils.d.ts +2 -2
  102. package/lib/components/productExtension/fields/Forms/index.d.ts +0 -1
  103. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -1
  104. package/lib/components/ticketBooking/components/timeBar/index.js +1 -0
  105. package/package.json +3 -3
  106. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
  107. package/es/components/booking/components/customSelect/index.d.ts +0 -38
  108. package/es/components/booking/forms/footer.d.ts +0 -6
  109. package/es/components/booking/forms/sendModal/index.d.ts +0 -27
  110. package/es/components/booking/info/clientVariant/utils.d.ts +0 -1
  111. package/es/components/booking/info2/utils.d.ts +0 -4
  112. package/es/components/booking/locales.d.ts +0 -807
  113. package/es/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  114. package/es/components/eftposPay/component/fail/index.d.ts +0 -3
  115. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -10
  116. package/es/components/eftposPay/hooks.d.ts +0 -35
  117. package/es/components/eftposPay/index.d.ts +0 -4
  118. package/es/components/eftposPay/locales.d.ts +0 -330
  119. package/es/components/eftposPay/pay.d.ts +0 -20
  120. package/es/components/eftposPay/tyro/index.d.ts +0 -9
  121. package/es/components/eftposPay/windcave/helper.d.ts +0 -23
  122. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  123. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  124. package/es/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
  125. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  126. package/es/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
  127. package/es/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
  128. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  129. package/es/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
  130. package/es/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
  131. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  132. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
  133. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  134. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
  135. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
  136. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
  137. package/es/components/pay/toC/index.d.ts +0 -3
  138. package/es/components/pay/toC/utils.d.ts +0 -49
  139. package/es/components/ruleSetting/index.d.ts +0 -9
  140. package/es/components/ruleSetting/server.d.ts +0 -4
  141. package/es/components/shoppingCart/Provider.d.ts +0 -3
  142. package/es/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  143. package/es/components/shoppingCart/components/Render/index.d.ts +0 -3
  144. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
  145. package/es/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
  146. package/es/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  147. package/es/components/workSpaceList/components/Card/constants.d.ts +0 -2
  148. package/es/components/workSpaceList/components/EditableString/index.d.ts +0 -21
  149. package/es/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
  150. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
  151. package/es/components/workSpaceList/components/Sort/index.d.ts +0 -7
  152. package/es/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
  153. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -3
  154. package/lib/components/booking/components/customSelect/index.d.ts +0 -38
  155. package/lib/components/booking/forms/footer.d.ts +0 -6
  156. package/lib/components/booking/forms/sendModal/index.d.ts +0 -27
  157. package/lib/components/booking/info/clientVariant/utils.d.ts +0 -1
  158. package/lib/components/booking/info2/utils.d.ts +0 -4
  159. package/lib/components/booking/locales.d.ts +0 -807
  160. package/lib/components/eftposPay/component/fail/failCustom.d.ts +0 -3
  161. package/lib/components/eftposPay/component/fail/index.d.ts +0 -3
  162. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -10
  163. package/lib/components/eftposPay/hooks.d.ts +0 -35
  164. package/lib/components/eftposPay/index.d.ts +0 -4
  165. package/lib/components/eftposPay/locales.d.ts +0 -330
  166. package/lib/components/eftposPay/pay.d.ts +0 -20
  167. package/lib/components/eftposPay/tyro/index.d.ts +0 -9
  168. package/lib/components/eftposPay/windcave/helper.d.ts +0 -23
  169. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -3
  170. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/index.d.ts +0 -10
  171. package/lib/components/pay/toC/PaymentMethods/GlobePayAliPayH5/serve.d.ts +0 -2
  172. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/index.d.ts +0 -10
  173. package/lib/components/pay/toC/PaymentMethods/GlobePayPaypalH5/serve.d.ts +0 -2
  174. package/lib/components/pay/toC/PaymentMethods/GlobePayQrcode/serve.d.ts +0 -2
  175. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/index.d.ts +0 -10
  176. package/lib/components/pay/toC/PaymentMethods/GlobePayWxH5/serve.d.ts +0 -2
  177. package/lib/components/pay/toC/PaymentMethods/StripePay/serve.d.ts +0 -2
  178. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.d.ts +0 -10
  179. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/serve.d.ts +0 -2
  180. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.d.ts +0 -10
  181. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/serve.d.ts +0 -2
  182. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -111
  183. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.d.ts +0 -3
  184. package/lib/components/pay/toC/index.d.ts +0 -3
  185. package/lib/components/pay/toC/utils.d.ts +0 -49
  186. package/lib/components/ruleSetting/index.d.ts +0 -9
  187. package/lib/components/ruleSetting/server.d.ts +0 -4
  188. package/lib/components/shoppingCart/Provider.d.ts +0 -3
  189. package/lib/components/shoppingCart/components/Cart/Product.d.ts +0 -3
  190. package/lib/components/shoppingCart/components/Render/index.d.ts +0 -3
  191. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -2
  192. package/lib/components/workSpaceList/components/AppearanceEdit/IconPanel.d.ts +0 -11
  193. package/lib/components/workSpaceList/components/AppearanceEdit/constants.d.ts +0 -8
  194. package/lib/components/workSpaceList/components/Card/constants.d.ts +0 -2
  195. package/lib/components/workSpaceList/components/EditableString/index.d.ts +0 -21
  196. package/lib/components/workSpaceList/components/SearchBar/index.d.ts +0 -17
  197. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -3
  198. package/lib/components/workSpaceList/components/Sort/index.d.ts +0 -7
  199. package/lib/components/workSpaceList/components/WorkspaceItem/index.d.ts +0 -22
@@ -12,8 +12,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
12
12
  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); }
13
13
  import { getUniqueId, locales } from "@pisell/utils";
14
14
  import { PisellToast } from '@pisell/materials';
15
- import useEngineContext from "../../hooks/useEngineContext";
16
-
17
15
  /**
18
16
  * @title: 格式化holder表数据
19
17
  * @description:
@@ -102,11 +100,10 @@ export var formatCartsResources = function formatCartsResources(carts, resources
102
100
  * @Author: WangHan
103
101
  * @Date: 2025-05-07 21:22
104
102
  */
105
- export var formatCarts = function formatCarts(data, resources, accountLists) {
103
+ export var formatCarts = function formatCarts(data, resources, utils, accountLists) {
106
104
  try {
107
105
  var _utils$storage;
108
- var context = useEngineContext();
109
- var utils = context.appHelper.utils || {};
106
+ if (!utils || !(data !== null && data !== void 0 && data.length)) return [];
110
107
  var locale = (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
111
108
  var symbol = (utils === null || utils === void 0 ? void 0 : utils.getSymbolic()) || '$';
112
109
  var newCarts = data === null || data === void 0 ? void 0 : data.map(function (d) {
@@ -182,14 +179,17 @@ export var getMeAccount = function getMeAccount(val) {
182
179
  return !(d !== null && d !== void 0 && d.isGuest);
183
180
  });
184
181
  };
185
- export var getCustomer = function getCustomer() {
186
- var _utils$getStore$getSt, _userInfo;
187
- var context = useEngineContext();
188
- var utils = context.appHelper.utils || {};
189
- var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
190
- var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
191
- userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
192
- return userInfo;
182
+ export var getCustomer = function getCustomer(utils) {
183
+ try {
184
+ var _utils$getStore$getSt, _userInfo;
185
+ if (!utils) return;
186
+ var userInfo = (_utils$getStore$getSt = utils.getStore().getState()) === null || _utils$getStore$getSt === void 0 || (_utils$getStore$getSt = _utils$getStore$getSt.global) === null || _utils$getStore$getSt === void 0 ? void 0 : _utils$getStore$getSt.userInfo;
187
+ var localUserInfo = JSON.parse(utils.storage.get('customer') || '{}');
188
+ userInfo = (_userInfo = userInfo) !== null && _userInfo !== void 0 && _userInfo.id ? userInfo : localUserInfo;
189
+ return userInfo;
190
+ } catch (error) {
191
+ console.log("getCustomer ".concat(error));
192
+ }
193
193
  };
194
194
  export var formatCustomer = function formatCustomer(val) {
195
195
  var currentUserName = "".concat((val === null || val === void 0 ? void 0 : val.first_name) || '').concat(val !== null && val !== void 0 && val.last_name ? " ".concat(val === null || val === void 0 ? void 0 : val.last_name) : '');
@@ -199,8 +199,8 @@ export var formatCustomer = function formatCustomer(val) {
199
199
  username: currentUserName
200
200
  };
201
201
  };
202
- export var formatCurrentUser = function formatCurrentUser() {
203
- var userInfo = getCustomer();
202
+ export var formatCurrentUser = function formatCurrentUser(utils) {
203
+ var userInfo = getCustomer(utils);
204
204
  var customer = formatCustomer(userInfo);
205
205
  return customer;
206
206
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  interface TabProductProps {
4
3
  list: any[];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ProductItem: ({ item, onClick, amountSymbol, style, className, }: any) => JSX.Element;
4
3
  export default ProductItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 底部
@@ -39,7 +39,7 @@ var VoucherCard = function VoucherCard(props) {
39
39
  var context = useEngineContext();
40
40
  var state = props.state,
41
41
  dispatch = props.dispatch;
42
- var _useState = useState(!state.bookingId),
42
+ var _useState = useState(false),
43
43
  _useState2 = _slicedToArray(_useState, 2),
44
44
  showDetail = _useState2[0],
45
45
  setShowDetail = _useState2[1];
@@ -169,10 +169,12 @@ var VoucherCard = function VoucherCard(props) {
169
169
  val = _context.sent;
170
170
  console.log(val);
171
171
  if (val !== null && val !== void 0 && val.isAvailable) {
172
+ productRef.current = val.productList;
172
173
  dispatch({
173
174
  type: 'setService',
174
175
  payload: {
175
- value: val.productList
176
+ value: val.productList,
177
+ edit: true
176
178
  }
177
179
  });
178
180
  setCode('');
@@ -0,0 +1,2 @@
1
+ declare const Deposit: (props: any) => JSX.Element;
2
+ export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  /**
4
3
  * @title: 表单选择器
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FormState } from '../../../model';
3
2
  interface useClientFnParams {
4
3
  state: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  export declare const updateServiceDate: (services: any[], date: any, isTime: boolean) => any[];
4
3
  declare const DateCom: () => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Notes: () => JSX.Element | null;
3
2
  export default Notes;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
3
2
  export default Lists;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -251,7 +251,7 @@ var Info = function Info(props) {
251
251
  dayParams.customer_id = customerId;
252
252
  }
253
253
  _context2.next = 9;
254
- return state.apis.getServices(_objectSpread(_objectSpread({
254
+ return state.apis.getServices(_objectSpread({
255
255
  skip: 1,
256
256
  num: 500,
257
257
  extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'session_product', 'session_ticket'],
@@ -261,14 +261,9 @@ var Info = function Info(props) {
261
261
  with_schedule: 1,
262
262
  with_count: ['bundleGroup', 'optionGroup'],
263
263
  order_by_string: 'sort:desc',
264
- status: 'published'
265
- }, state.isBookingCreatePage ? {
264
+ status: 'published',
266
265
  schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
267
- } : {
268
- _config: {
269
- useCache: true
270
- }
271
- }), dayParams));
266
+ }, dayParams));
272
267
  case 9:
273
268
  data = _context2.sent;
274
269
  setLoading(false);
@@ -408,16 +403,17 @@ var Info = function Info(props) {
408
403
  var showAddButton = useMemo(function () {
409
404
  return !state.disabledEdit && !state.channelDisabledEdit;
410
405
  }, [state.disabledEdit, state.channelDisabledEdit]);
406
+ var currentDate = useMemo(function () {
407
+ return state.date.value.format('YYYY-MM-DD');
408
+ }, [state.date.value]);
411
409
  useUpdateEffect(function () {
412
410
  if (state.service.addModal) {
413
- getServices();
411
+ getServices({
412
+ schedule_date: currentDate
413
+ });
414
414
  setSearch('');
415
415
  }
416
- }, [state.service.addModal]);
417
- var currentDate = useMemo(function () {
418
- return state.date.value.format('YYYY-MM-DD');
419
- }, [state.date.value]);
420
- console.log(currentDate, 'currentDate');
416
+ }, [state.service.addModal, currentDate]);
421
417
  useEffect(function () {
422
418
  if (renderMode === 'current') {
423
419
  getServices({
@@ -427,9 +423,11 @@ var Info = function Info(props) {
427
423
  }, [renderMode, currentDate]);
428
424
  useEffect(function () {
429
425
  if (state.renderType === 'eventBooking' && state.modalOpen) {
430
- getServices();
426
+ getServices({
427
+ schedule_date: currentDate
428
+ });
431
429
  }
432
- }, [state.renderType, state.modalOpen]);
430
+ }, [state.renderType, state.modalOpen, currentDate]);
433
431
  var addButton = useMemo(function () {
434
432
  // 跨日预约不显示添加服务按钮
435
433
  if (isDay) {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
3
2
  export default Lists;
@@ -240,4 +240,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
240
240
  * @Author: WangHan
241
241
  * @Date: 2024-12-24 11:32
242
242
  */
243
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
243
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -348,6 +348,7 @@ export var updateServices = function updateServices(state, currentItem, type, ot
348
348
  // 更新holder
349
349
  if (type === 'change_holder') {
350
350
  products = handleChangeHolder(products, currentItem, other);
351
+ return products;
351
352
  }
352
353
  if (type === 'add_holder') {
353
354
  var _actions$handleAddHol;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/actions/index.less';
3
2
  declare const Actions: ({ currentService }: {
4
3
  currentService: any;
@@ -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 {
@@ -171,7 +171,7 @@ var Info = function Info(props) {
171
171
  return _context2.abrupt("return");
172
172
  case 5:
173
173
  _context2.next = 7;
174
- return state.apis.getServices(_objectSpread({
174
+ return state.apis.getServices({
175
175
  skip: 1,
176
176
  num: 500,
177
177
  extension_type: state.renderType === 'eventBooking' ? undefined : ['product_appointment', 'appointment_ticket', 'service_product', 'session_product', 'session_ticket'],
@@ -181,14 +181,9 @@ var Info = function Info(props) {
181
181
  with_schedule: 1,
182
182
  with_count: ['bundleGroup', 'optionGroup'],
183
183
  order_by_string: 'sort:desc',
184
- status: 'published'
185
- }, state.isBookingCreatePage ? {
184
+ status: 'published',
186
185
  schedule_date: params === null || params === void 0 ? void 0 : params.schedule_date
187
- } : {
188
- _config: {
189
- useCache: true
190
- }
191
- }));
186
+ });
192
187
  case 7:
193
188
  data = _context2.sent;
194
189
  setLoading(false);
@@ -354,15 +349,17 @@ var Info = function Info(props) {
354
349
  var showAddButton = useMemo(function () {
355
350
  return !state.disabledEdit && !state.channelDisabledEdit;
356
351
  }, [state.disabledEdit, state.channelDisabledEdit]);
352
+ var currentDate = useMemo(function () {
353
+ return state.date.value.format('YYYY-MM-DD');
354
+ }, [state.date.value]);
357
355
  useUpdateEffect(function () {
358
356
  if (state.service.addModal) {
359
- getServices();
357
+ getServices({
358
+ schedule_date: currentDate
359
+ });
360
360
  setSearch('');
361
361
  }
362
- }, [state.service.addModal]);
363
- var currentDate = useMemo(function () {
364
- return state.date.value.format('YYYY-MM-DD');
365
- }, [state.date.value]);
362
+ }, [state.service.addModal, currentDate]);
366
363
  useEffect(function () {
367
364
  if (renderMode === 'current') {
368
365
  getServices({
@@ -372,9 +369,11 @@ var Info = function Info(props) {
372
369
  }, [renderMode, currentDate]);
373
370
  useEffect(function () {
374
371
  if (state.renderType === 'eventBooking' && state.modalOpen) {
375
- getServices();
372
+ getServices({
373
+ schedule_date: currentDate
374
+ });
376
375
  }
377
- }, [state.renderType, state.modalOpen]);
376
+ }, [state.renderType, state.modalOpen, currentDate]);
378
377
  var addButton = useMemo(function () {
379
378
  if (state.isBookingCreatePage) {
380
379
  return /*#__PURE__*/React.createElement("div", {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import '../../../info/service/addTimeModal/index.less';
3
2
  declare const AddTimeModal: () => JSX.Element;
4
3
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceList: ({ onEdit }: {
4
3
  onEdit: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface DurationProps extends SelectProps {
4
3
  locale?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from 'antd';
3
2
  interface HolderProps extends SelectProps {
4
3
  selectProps?: SelectProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SelectProps } from "antd";
3
2
  interface StartTimeProps extends SelectProps {
4
3
  locale?: string;
@@ -163,10 +163,10 @@ export declare const getProductTotalPrice: (item: any) => number;
163
163
  export declare const getDuration: (duration: number | {
164
164
  type: string;
165
165
  value: number;
166
- }) => number | {
166
+ }) => number | "flexible" | {
167
167
  type: string;
168
168
  value: number;
169
- } | "flexible";
169
+ };
170
170
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
171
171
  export declare const getIsEdit: (state: any) => boolean;
172
172
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface InfoProps {
3
2
  relation_id: any;
4
3
  action: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const TicketBooking: () => JSX.Element;
4
3
  export default TicketBooking;
@@ -76,6 +76,7 @@ var TimeBar = function TimeBar(props) {
76
76
  flexShrink: 0
77
77
  }
78
78
  }, /*#__PURE__*/React.createElement(DatePicker, {
79
+ inputReadOnly: true,
79
80
  value: state === null || state === void 0 || (_state$modalState4 = state.modalState) === null || _state$modalState4 === void 0 || (_state$modalState4 = _state$modalState4.date) === null || _state$modalState4 === void 0 ? void 0 : _state$modalState4.value,
80
81
  format: locale === 'en' ? 'dddd, DD MMM YYYY' : 'YYYY年MM月DD日',
81
82
  onChange: props === null || props === void 0 ? void 0 : props.onDateChange,
@@ -43,11 +43,10 @@ var import_utils2 = require("../../../utils");
43
43
  var import_Voucher = __toESM(require("../../Voucher"));
44
44
  var import_Total = __toESM(require("./Total"));
45
45
  var import_Deposit = __toESM(require("../../Deposit"));
46
- var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
47
46
  var import_utils3 = require("../utils");
48
47
  var import_index = require("./index.less");
49
48
  var CartItem = ({ onNext }) => {
50
- var _a, _b, _c, _d;
49
+ var _a, _b, _c;
51
50
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
52
51
  const {
53
52
  carts,
@@ -62,11 +61,12 @@ var CartItem = ({ onNext }) => {
62
61
  const { getResourceList } = (0, import_hooks2.useAppointmentBookingResource)();
63
62
  const { isFormSubject, bookingSubject } = (0, import_hooks2.useAppointmentBookingSetting)();
64
63
  const { isLogin } = (0, import_hooks2.useAppointmentBookingLogin)();
65
- const context = (0, import_useEngineContext.default)();
66
- const utils = (_a = context.appHelper) == null ? void 0 : _a.utils;
64
+ const utils = (0, import_hooks2.contextUtils)();
67
65
  const { businessUtils } = utils;
68
- const currentUser = (0, import_utils2.formatCurrentUser)();
69
66
  const { deposit } = summary;
67
+ const currentUser = (0, import_react.useMemo)(() => {
68
+ return (0, import_utils2.formatCurrentUser)(utils) || {};
69
+ }, []);
70
70
  const holderIds = (0, import_react.useMemo)(() => {
71
71
  if (isFormSubject) return [];
72
72
  return accountLists.map((item) => item.id);
@@ -75,7 +75,7 @@ var CartItem = ({ onNext }) => {
75
75
  if (isFormSubject) return [];
76
76
  return (0, import_utils2.formatHolder)(accountLists);
77
77
  }, [accountLists, isFormSubject]);
78
- const hasGoodPassApp = !!((_b = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _b.call(businessUtils, "goodpass"));
78
+ const hasGoodPassApp = !!((_a = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a.call(businessUtils, "goodpass"));
79
79
  const handleClickCard = (e, type, val) => {
80
80
  console.log(e, type, val, "handleClickCard");
81
81
  if (type === "note") {
@@ -149,6 +149,9 @@ var CartItem = ({ onNext }) => {
149
149
  });
150
150
  }
151
151
  };
152
+ const products = (0, import_react.useMemo)(() => {
153
+ return (0, import_utils2.formatCarts)(carts, resources, utils, accountLists);
154
+ }, [carts, resources, accountLists]);
152
155
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
153
156
  "div",
154
157
  {
@@ -158,12 +161,12 @@ var CartItem = ({ onNext }) => {
158
161
  import_shoppingCart.default,
159
162
  {
160
163
  productParams: {
161
- products: (0, import_utils2.formatCarts)(carts, resources, accountLists),
164
+ products,
162
165
  hideAddBtn: false,
163
166
  holders,
164
167
  disabledEdit: isLastStep,
165
- isShowChangeResource: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-resource",
166
- isShowDelete: ((_d = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _d.key) === "select-service",
168
+ isShowChangeResource: ((_b = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _b.key) === "select-resource",
169
+ isShowDelete: ((_c = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _c.key) === "select-service",
167
170
  isShowPackageNote: false,
168
171
  isShowChangeHolder: isLastStep ? false : isFormSubject && isLogin,
169
172
  isShowHolder: isFormSubject,
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const ConfirmInformation: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default ConfirmInformation;
@@ -104,6 +104,12 @@ var ConfirmInformation = (0, import_react.forwardRef)((props, ref) => {
104
104
  (0, import_react.useImperativeHandle)(ref, () => ({
105
105
  next: handleNext
106
106
  }));
107
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleNext }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement("img", { src: `${config == null ? void 0 : config.awsStatic}/checkout_confirm.png` })), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips" }, import_utils.locales.getText("pisell2.appointment.tips")), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips-content" }, import_utils.locales.getText("pisell2.appointment.tips.content"))));
107
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-wrap" }, (0, import_utils.isMobile)() ? /* @__PURE__ */ import_react.default.createElement(import_Item.default, { onNext: handleNext }) : /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-confirm-information-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "image" }, /* @__PURE__ */ import_react.default.createElement(
108
+ "img",
109
+ {
110
+ src: `${config == null ? void 0 : config.awsStatic}/checkout_confirm.png`,
111
+ loading: "lazy"
112
+ }
113
+ )), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips" }, import_utils.locales.getText("pisell2.appointment.tips")), /* @__PURE__ */ import_react.default.createElement("span", { className: "tips-content" }, import_utils.locales.getText("pisell2.appointment.tips.content"))));
108
114
  });
109
115
  var ConfirmInformation_default = ConfirmInformation;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Layout: () => JSX.Element;
3
+ export default Layout;
@@ -62,7 +62,7 @@ var Layout = () => {
62
62
  policyParams,
63
63
  closePolicy
64
64
  } = (0, import_context.useAppointmentBookingContext)();
65
- const { getLoadAllSchedule, isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
65
+ const { isDateSelectedFirst, isFormSubject } = (0, import_hooks.useAppointmentBookingSetting)();
66
66
  const { isLogin } = (0, import_hooks.useAppointmentBookingLogin)();
67
67
  const { getHolders } = (0, import_hooks.useAppointmentBookingAccount)();
68
68
  const { removeStep, stepList } = (0, import_hooks.useAppointmentBookingStep)();
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Date: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default Date;
@@ -53,7 +53,7 @@ var Date = (0, import_react.forwardRef)((props, ref) => {
53
53
  const [dateMonthList, setDateMonthList] = (0, import_react.useState)([]);
54
54
  const [currentMonth, setCurrentMonth] = (0, import_react.useState)();
55
55
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
56
- const { isDateSelectedFirst, customPageId, getLoadAllSchedule, channel } = (0, import_hooks.useAppointmentBookingSetting)();
56
+ const { isDateSelectedFirst, customPageId, channel } = (0, import_hooks.useAppointmentBookingSetting)();
57
57
  const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
58
58
  const context = (0, import_useEngineContext.default)();
59
59
  (0, import_react.useImperativeHandle)(ref, () => ({
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Form: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
+ export default Form;
@@ -51,6 +51,7 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
51
51
  const { getResourceList } = (0, import_hooks.useAppointmentBookingResource)();
52
52
  const { setOtherData, getOtherData } = (0, import_hooks.useAppointmentBookingSetting)();
53
53
  const { nextStep } = (0, import_hooks.useAppointmentBookingStep)();
54
+ const utils = (0, import_hooks.contextUtils)();
54
55
  (0, import_react.useImperativeHandle)(ref, () => ({
55
56
  next: () => {
56
57
  var _a, _b;
@@ -64,11 +65,11 @@ var Form = (0, import_react.forwardRef)((props, ref) => {
64
65
  const _resource = getResourceList();
65
66
  return (_resource == null ? void 0 : _resource.resources) || [];
66
67
  }, []);
67
- const newCarts = (0, import_utils.formatCarts)(carts, resources);
68
68
  const forms = (0, import_react.useMemo)(() => {
69
+ const newCarts = (0, import_utils.formatCarts)(carts, resources, utils);
69
70
  if (!(newCarts == null ? void 0 : newCarts.length) || !(resources == null ? void 0 : resources.length)) return [];
70
71
  return (0, import_utils.formatForms)(newCarts) || [];
71
- }, [newCarts, resources]);
72
+ }, [carts, resources]);
72
73
  (0, import_react.useEffect)(() => {
73
74
  var _a;
74
75
  if (!(forms == null ? void 0 : forms.length)) return;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Guest: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default Guest;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface ResourceProps {
4
+ onChange?: (val: any) => void;
5
+ }
6
+ declare const Resource: React.ForwardRefExoticComponent<ResourceProps & React.RefAttributes<any>>;
7
+ export default Resource;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Services: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default Services;
@@ -78,12 +78,19 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
78
78
  },
79
79
  callback: async (data) => {
80
80
  var _a, _b;
81
+ if (data == null ? void 0 : data.isCancel) {
82
+ if (type === "session") {
83
+ appointmentBooking.closeProductDetail();
84
+ appointmentBooking.getAvailableDate();
85
+ }
86
+ return;
87
+ }
88
+ const session = data == null ? void 0 : data.session;
81
89
  const product = {
82
90
  ...data,
83
91
  options: (data == null ? void 0 : data.option) || []
84
92
  };
85
93
  delete product.option;
86
- const session = data == null ? void 0 : data.session;
87
94
  if (session) {
88
95
  const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
89
96
  const endDate = (0, import_dayjs.default)(session == null ? void 0 : session.end_at).format("YYYY-MM-DD");
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const TimeSlicing: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
+ export default TimeSlicing;
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react';
2
+ import { TasksManager } from '../../utils/tasks';
3
+ interface AppointmentBookingContextType {
4
+ appointmentBooking: any;
5
+ times: any[];
6
+ resources: any[];
7
+ setTimes: (times: any[]) => void;
8
+ setResources: (lists: any[]) => void;
9
+ carts: any[];
10
+ summary: any;
11
+ setCarts: (val: any[]) => void;
12
+ setSummary: (val: any) => void;
13
+ currentStep: any;
14
+ setCurrentStep: (val: any) => void;
15
+ appHelper?: any;
16
+ symbolic?: any;
17
+ resourceOtherParams?: any;
18
+ setResourceOtherParams: (val: any) => void;
19
+ selectedTime: any;
20
+ setSelectedTime: (val: any) => void;
21
+ isAgreeDepositPolicy: boolean;
22
+ setIsAgreeDepositPolicy: (val: boolean) => void;
23
+ isLastStep: boolean;
24
+ tasksManager: TasksManager;
25
+ policyParams: any;
26
+ setPolicyParams: (val: any) => void;
27
+ openPolicy: (content: any, callback?: any) => void;
28
+ closePolicy: (val?: boolean) => void;
29
+ [key: string]: any;
30
+ }
31
+ export declare const AppointmentBookingProvider: ({ children, }: {
32
+ children: ReactNode;
33
+ }) => JSX.Element;
34
+ export declare const useAppointmentBookingContext: () => AppointmentBookingContextType | undefined;
35
+ export {};