@pisell/private-materials 3.3.21 → 3.3.23

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 (214) 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/render/default/view.js +4 -4
  7. package/build/lowcode/view.js +4 -4
  8. package/es/businessModel/SalesModel/index.d.ts +1 -0
  9. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Cart/Item/index.js +19 -7
  11. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  12. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +2 -1
  13. package/es/components/appointmentBooking/components/Content/index.d.ts +4 -0
  14. package/es/components/appointmentBooking/components/Content/index.js +0 -1
  15. package/es/components/appointmentBooking/components/Date/index.d.ts +4 -0
  16. package/es/components/appointmentBooking/components/Date/index.js +1 -5
  17. package/es/components/appointmentBooking/components/Date/state.d.ts +63 -0
  18. package/es/components/appointmentBooking/components/Form/index.d.ts +4 -0
  19. package/es/components/appointmentBooking/components/Form/index.js +4 -3
  20. package/es/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  21. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  22. package/es/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  23. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  24. package/es/components/appointmentBooking/components/Services/index.js +21 -11
  25. package/es/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  26. package/es/components/appointmentBooking/context.d.ts +35 -0
  27. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  28. package/es/components/appointmentBooking/hooks.d.ts +106 -0
  29. package/es/components/appointmentBooking/hooks.js +12 -18
  30. package/es/components/appointmentBooking/index.d.ts +1 -0
  31. package/es/components/appointmentBooking/index.js +3 -5
  32. package/es/components/appointmentBooking/locales.d.ts +354 -0
  33. package/es/components/appointmentBooking/utils.d.ts +114 -0
  34. package/es/components/appointmentBooking/utils.js +15 -15
  35. package/es/components/booking/addons/model.d.ts +1 -10
  36. package/es/components/booking/addons/model.js +5 -5
  37. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  38. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  39. package/es/components/booking/components/browserSelect/index.js +1 -1
  40. package/es/components/booking/components/voucher/index.js +4 -2
  41. package/es/components/booking/deposit/index.d.ts +3 -0
  42. package/es/components/booking/forms/model.d.ts +1 -10
  43. package/es/components/booking/forms/model.js +5 -5
  44. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  45. package/es/components/booking/forms/single/index.d.ts +0 -1
  46. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  47. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  48. package/es/components/booking/info/model.d.ts +1 -10
  49. package/es/components/booking/info/service/addService/index.js +14 -16
  50. package/es/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  51. package/es/components/booking/info/service/like/index.js +1 -1
  52. package/es/components/booking/info/service/serviceList/index.d.ts +1 -0
  53. package/es/components/booking/info/service2/utils.d.ts +1 -1
  54. package/es/components/booking/info/service2/utils.js +1 -0
  55. package/es/components/booking/info2/service/addService/index.js +30 -17
  56. package/es/components/booking/materiels/startTime/index.js +1 -1
  57. package/es/components/booking/model.d.ts +1 -9
  58. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  59. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  60. package/es/components/booking/notes/model.d.ts +1 -10
  61. package/es/components/booking/notes/model.js +5 -5
  62. package/es/components/booking/payments/model.d.ts +1 -10
  63. package/es/components/booking/payments/model.js +5 -5
  64. package/es/components/eftposPay/amount.d.ts +2 -1
  65. package/es/components/eftposPay/app.d.ts +1 -0
  66. package/es/components/eftposPay/component/fail/unknow.d.ts +0 -1
  67. package/es/components/eftposPay/device.d.ts +2 -1
  68. package/es/components/eftposPay/hooks.d.ts +2 -2
  69. package/es/components/eftposPay/payo/config.d.ts +13 -0
  70. package/es/components/eftposPay/payo/hooks.d.ts +10 -0
  71. package/es/components/eftposPay/store/index.d.ts +6 -6
  72. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  73. package/es/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  74. package/es/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  75. package/es/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  76. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  77. package/es/components/eventBooking/index.d.ts +1 -0
  78. package/es/components/listComponent/index.js +5 -5
  79. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  80. package/es/components/pay/toC/model.d.ts +1 -9
  81. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  82. package/es/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  83. package/es/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  84. package/es/components/productExtension/card/index.js +3 -3
  85. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  86. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  87. package/es/components/productExtension/fields/Forms/index.js +12 -12
  88. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  89. package/es/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  90. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  91. package/es/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  92. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  93. package/es/components/productExtension/index.d.ts +1 -0
  94. package/es/components/productExtension/server.js +2 -2
  95. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  96. package/es/components/schedules/calendar/index.js +4 -4
  97. package/es/components/schedules/calendar/serve.js +2 -2
  98. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  99. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  100. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  101. package/es/components/schedules/components/ResourceList/index.js +1 -1
  102. package/es/components/schedules/components/Search/index.js +5 -5
  103. package/es/components/schedules/model.d.ts +1 -9
  104. package/es/components/schedules/model.js +5 -5
  105. package/es/components/schedules/openHours/index.js +1 -1
  106. package/es/components/schedules/openHours/serve.js +2 -2
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  109. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  110. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  111. package/es/components/schedules/products/serve.js +2 -2
  112. package/es/components/schedules/products/utils.js +5 -5
  113. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  114. package/es/components/schedules/resources/detail/index.js +10 -10
  115. package/es/components/schedules/resources/list/index.js +2 -2
  116. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  117. package/es/components/schedules/resources/serve.js +2 -2
  118. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  119. package/es/components/schedules/utils.js +4 -4
  120. package/es/components/selectModal/index.js +2 -2
  121. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  122. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  123. package/es/components/ticketBooking/components/timeBar/index.js +1 -0
  124. package/es/components/ticketBooking/index.d.ts +1 -0
  125. package/es/components/wallet/Detail/model.d.ts +1 -13
  126. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  127. package/es/components/wallet/PointCard/model.d.ts +1 -13
  128. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  129. package/es/components/wallet/Voucher/model.d.ts +1 -13
  130. package/es/components/wallet/hooks/useWalletCard.d.ts +1 -0
  131. package/es/components/wallet/model.d.ts +1 -9
  132. package/es/hooks/useComponents.js +1 -1
  133. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  134. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  135. package/lib/components/appointmentBooking/components/Cart/Item/index.js +12 -9
  136. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  137. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +7 -1
  138. package/lib/components/appointmentBooking/components/Content/index.d.ts +4 -0
  139. package/lib/components/appointmentBooking/components/Content/index.js +1 -1
  140. package/lib/components/appointmentBooking/components/Date/index.d.ts +4 -0
  141. package/lib/components/appointmentBooking/components/Date/index.js +1 -1
  142. package/lib/components/appointmentBooking/components/Date/state.d.ts +63 -0
  143. package/lib/components/appointmentBooking/components/Form/index.d.ts +4 -0
  144. package/lib/components/appointmentBooking/components/Form/index.js +3 -2
  145. package/lib/components/appointmentBooking/components/Guest/index.d.ts +4 -0
  146. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  147. package/lib/components/appointmentBooking/components/Resource/index.d.ts +7 -0
  148. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  149. package/lib/components/appointmentBooking/components/Services/index.js +8 -1
  150. package/lib/components/appointmentBooking/components/TimeSlicing/index.d.ts +4 -0
  151. package/lib/components/appointmentBooking/context.d.ts +35 -0
  152. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  153. package/lib/components/appointmentBooking/hooks.d.ts +106 -0
  154. package/lib/components/appointmentBooking/hooks.js +2 -6
  155. package/lib/components/appointmentBooking/index.d.ts +1 -0
  156. package/lib/components/appointmentBooking/index.js +2 -2
  157. package/lib/components/appointmentBooking/locales.d.ts +354 -0
  158. package/lib/components/appointmentBooking/utils.d.ts +114 -0
  159. package/lib/components/appointmentBooking/utils.js +14 -23
  160. package/lib/components/booking/addons/model.d.ts +1 -10
  161. package/lib/components/booking/components/voucher/index.js +4 -2
  162. package/lib/components/booking/deposit/index.d.ts +3 -0
  163. package/lib/components/booking/forms/model.d.ts +1 -10
  164. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  165. package/lib/components/booking/forms/single/index.d.ts +0 -1
  166. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  167. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  168. package/lib/components/booking/info/model.d.ts +1 -10
  169. package/lib/components/booking/info/service/addService/index.js +14 -14
  170. package/lib/components/booking/info/service/addTimeModal/index.d.ts +0 -1
  171. package/lib/components/booking/info/service/serviceList/index.d.ts +1 -0
  172. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  173. package/lib/components/booking/info/service2/utils.js +1 -0
  174. package/lib/components/booking/info2/service/addService/index.js +27 -15
  175. package/lib/components/booking/model.d.ts +1 -9
  176. package/lib/components/booking/notes/model.d.ts +1 -10
  177. package/lib/components/booking/payments/model.d.ts +1 -10
  178. package/lib/components/eftposPay/amount.d.ts +2 -1
  179. package/lib/components/eftposPay/app.d.ts +1 -0
  180. package/lib/components/eftposPay/component/fail/unknow.d.ts +0 -1
  181. package/lib/components/eftposPay/device.d.ts +2 -1
  182. package/lib/components/eftposPay/hooks.d.ts +2 -2
  183. package/lib/components/eftposPay/payo/config.d.ts +13 -0
  184. package/lib/components/eftposPay/payo/hooks.d.ts +10 -0
  185. package/lib/components/eftposPay/store/index.d.ts +6 -6
  186. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  187. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +1 -0
  188. package/lib/components/eventBooking/components/Provider/SelectHolderModal.d.ts +1 -0
  189. package/lib/components/eventBooking/components/bookingDetailModal/components/Resource.d.ts +1 -0
  190. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  191. package/lib/components/eventBooking/index.d.ts +1 -0
  192. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  193. package/lib/components/pay/toC/model.d.ts +1 -9
  194. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  195. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/index.d.ts +1 -0
  196. package/lib/components/pisellSelectCustomerModal/RightPanel/index.d.ts +1 -0
  197. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  198. package/lib/components/productExtension/fields/SelectProducts/index.d.ts +1 -0
  199. package/lib/components/productExtension/fields/SelectResourcesTable/index.d.ts +1 -0
  200. package/lib/components/productExtension/index.d.ts +1 -0
  201. package/lib/components/schedules/model.d.ts +1 -9
  202. package/lib/components/schedules/utils.js +1 -1
  203. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  204. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  205. package/lib/components/ticketBooking/components/timeBar/index.js +1 -0
  206. package/lib/components/ticketBooking/index.d.ts +1 -0
  207. package/lib/components/wallet/Detail/model.d.ts +1 -13
  208. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  209. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  210. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  211. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  212. package/lib/components/wallet/hooks/useWalletCard.d.ts +1 -0
  213. package/lib/components/wallet/model.d.ts +1 -9
  214. package/package.json +3 -3
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
30
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
- global_wallet: WalletListProps;
32
- } & {
33
- dispatch: (params: {
34
- type: string;
35
- payload: any;
36
- }) => void;
37
- }>;
29
+ export declare const Provider: any, Context: any;
@@ -8,7 +8,7 @@ var useComponents = function useComponents(params) {
8
8
  var _utils$getComponents;
9
9
  var _ref = appHelper || {},
10
10
  utils = _ref.utils;
11
- return (utils === null || utils === void 0 ? void 0 : (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
11
+ return (utils === null || utils === void 0 || (_utils$getComponents = utils.getComponents) === null || _utils$getComponents === void 0 ? void 0 : _utils$getComponents.call(utils, components)) || [];
12
12
  }, [components]);
13
13
  return Cpt;
14
14
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const SalesModel: ({ children, hooks, config }: any) => JSX.Element;
2
3
  export * from './Sales';
3
4
  export default SalesModel;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: ({ onNext }: any) => JSX.Element;
3
4
  export default CartItem;
@@ -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,4 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ declare const Layout: () => JSX.Element;
4
+ 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,63 @@
1
+ /**
2
+ * @title: 获取包括今天的后七天日期
3
+ * @description:
4
+ * @param {*}
5
+ * @return {*}
6
+ * @Author: 严文强
7
+ * @Date: 2024-02-01 11:00
8
+ */
9
+ export declare const getNextSevenDaysList: (defaultDay: string) => string[];
10
+ /**
11
+ * @title: 将年月日信息只展示为天
12
+ * @description: 如果为今天 则返回ToDay
13
+ * @param {*}
14
+ * @return {*}
15
+ * @Author: 严文强
16
+ * @Date: 2024-02-01 11:00
17
+ */
18
+ export declare const ShowDayOnly: (date: string) => string;
19
+ /**
20
+ * @title: 日历星期多语言
21
+ * @description:
22
+ * @param {*}
23
+ * @return {*}
24
+ * @Author: 严文强
25
+ * @Date: 2024-02-01 18:42
26
+ */
27
+ export declare const weekListText: string[];
28
+ /**
29
+ * @title: 不同状态颜色值
30
+ * @description:
31
+ * @param {*}
32
+ * @return {*}
33
+ * @Author: xiangxiang.shao
34
+ * @Date: 2024-02-19 11:35
35
+ */
36
+ export declare const statusColor: {
37
+ call_to_book: string;
38
+ lots_of_space: string;
39
+ filling_up_fast: string;
40
+ sold_out: string;
41
+ };
42
+ /**
43
+ * @title: 根据预约量数据判断当前状态
44
+ * @description:
45
+ * @param {*}
46
+ * @return {*}
47
+ * @Author: xiangxiang.shao
48
+ * @Date: 2024-02-19 11:35
49
+ */
50
+ export declare const getStatus: (dateLimit: any, currentDate: string, cutTime: any) => {
51
+ status: string;
52
+ disabled: boolean;
53
+ };
54
+ /**
55
+ * @title: 根据当前日期以设定判断当前是否是call_to_book状态
56
+ * @description:
57
+ * @param {*}
58
+ * @return {*}
59
+ * @Author: xiangxiang.shao
60
+ * @Date: 2024-02-21 10:10
61
+ */
62
+ export declare const getCallToBookStatus: (currentDate: string, dateLimitData: any, cutTime: any) => boolean;
63
+ export declare const localeTypes: any;
@@ -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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Header: () => JSX.Element;
3
4
  export default Header;
@@ -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 {};
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DepositModal: (props: any) => JSX.Element;
3
+ export default DepositModal;
@@ -0,0 +1,106 @@
1
+ export declare const useAppointmentBooking: () => any;
2
+ export declare const useShopDiscount: () => any;
3
+ export declare const contextUtils: () => any;
4
+ /**
5
+ * @title: 监听步骤发生变化
6
+ * @description:
7
+ * @return {*}
8
+ * @Author: WangHan
9
+ * @Date: 2025-04-15 11:11
10
+ */
11
+ export declare const useAppointmentBookingStep: () => {
12
+ getStepIndex: (type: string, skipNumber?: number) => any;
13
+ stepList: any;
14
+ removeStep: (key: string) => any;
15
+ addStep: (props: any, stepKey?: string) => any;
16
+ updateStep: (key: string, step: any) => void;
17
+ nextStep: () => void;
18
+ };
19
+ /**
20
+ * @title: 获取商品数据
21
+ * @description:
22
+ * @return {*}
23
+ * @Author: WangHan
24
+ * @Date: 2025-04-15 11:12
25
+ */
26
+ export declare const useAppointmentBookingProduct: () => {
27
+ checkProductType: (productId: number) => Promise<any>;
28
+ getProducts: () => Promise<any>;
29
+ };
30
+ /**
31
+ * @title: 更新购物车数据
32
+ * @description:
33
+ * @return {*}
34
+ * @Author: WangHan
35
+ * @Date: 2025-04-15 11:12
36
+ */
37
+ export declare const useAppointmentBookingCart: () => void;
38
+ /**
39
+ * @title: 获取登录状态
40
+ * @description:
41
+ * @return {*}
42
+ * @Author: WangHan
43
+ * @Date: 2025-04-15 11:14
44
+ */
45
+ export declare const useAppointmentBookingLogin: () => {
46
+ isLogin: boolean;
47
+ openLoginModal: (params: {
48
+ callback: any;
49
+ }) => void;
50
+ };
51
+ /**
52
+ * @title: 获取账户
53
+ * @description:
54
+ * @return {*}
55
+ * @Author: WangHan
56
+ * @Date: 2025-04-15 11:15
57
+ */
58
+ export declare const useAppointmentBookingAccount: () => {
59
+ accountLists: any;
60
+ getHolders: () => Promise<any>;
61
+ form_id: any;
62
+ addAccount: (val: any, type?: string) => Promise<any>;
63
+ checkAccount: (type: any) => any;
64
+ };
65
+ /**
66
+ * @title: 获取资源数据
67
+ * @description:
68
+ * @return {*}
69
+ * @Author: WangHan
70
+ * @Date: 2025-04-15 11:29
71
+ */
72
+ export declare const useAppointmentBookingResource: () => {
73
+ getResourceTimeSlot: (index?: number) => Promise<void>;
74
+ getResourceList: () => {
75
+ resources: any;
76
+ resourceCodes: any;
77
+ };
78
+ autoSelectAllProductResources: (index?: number) => Promise<any>;
79
+ };
80
+ /**
81
+ * @title: 是否跳过资源选择步骤
82
+ * @description:
83
+ * @return {*}
84
+ * @Author: WangHan
85
+ * @Date: 2025-04-21 11:47
86
+ */
87
+ export declare const useIsSkipResourceStep: () => {
88
+ checkSkipResourceStep: (isSkipUpdateFormStep?: boolean) => Promise<boolean>;
89
+ };
90
+ /**
91
+ * @title: 获取预约配置
92
+ * @description:
93
+ * @return {*}
94
+ * @Author: WangHan
95
+ * @Date: 2025-04-24 18:15
96
+ */
97
+ export declare const useAppointmentBookingSetting: () => {
98
+ isDateSelectedFirst: boolean;
99
+ isFormSubject: boolean;
100
+ customPageId: any;
101
+ channel: any;
102
+ bookingSubject: any;
103
+ setOtherData: (key: string, val: any) => any;
104
+ getOtherData: (key: string) => any;
105
+ formName: any;
106
+ };
@@ -221,7 +221,6 @@ var useAppointmentBookingAccount = () => {
221
221
  const [accountLists, setAccountLists] = (0, import_react.useState)([]);
222
222
  const { bookingSubject } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
223
223
  const form_id = bookingSubject == null ? void 0 : bookingSubject.form_id;
224
- const customer = (0, import_utils2.getCustomer)();
225
224
  const getAccountLists = async () => {
226
225
  const data = await appointmentBooking.getAccounts();
227
226
  setAccountLists(data || []);
@@ -241,6 +240,7 @@ var useAppointmentBookingAccount = () => {
241
240
  const getHolders = async () => {
242
241
  var _a2, _b, _c;
243
242
  const shop_id = (_c = (_b = (_a2 = utils.getStore().getState()) == null ? void 0 : _a2.global) == null ? void 0 : _b.shop) == null ? void 0 : _c.id;
243
+ const customer = (0, import_utils2.getCustomer)(utils);
244
244
  if (!shop_id || !form_id || !(customer == null ? void 0 : customer.id)) return [];
245
245
  const params = {
246
246
  url: "/form/data/v1",
@@ -260,6 +260,7 @@ var useAppointmentBookingAccount = () => {
260
260
  return newData || [];
261
261
  };
262
262
  const addAccount = async (val, type) => {
263
+ const customer = (0, import_utils2.getCustomer)(utils);
263
264
  const result = await appointmentBooking.addAccount(val, { type, customerId: customer == null ? void 0 : customer.id });
264
265
  return result;
265
266
  };
@@ -348,10 +349,6 @@ var useAppointmentBookingSetting = () => {
348
349
  const utils = contextUtils();
349
350
  const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
350
351
  const { bookingProcess, bookingSubject, customPageId, channel } = ((_a = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a.productModuleParams) || {};
351
- const getLoadAllSchedule = () => {
352
- const res = appointmentBooking.loadAllSchedule();
353
- console.log(res, "loadAllSchedule");
354
- };
355
352
  const setOtherData = (key, val) => {
356
353
  return appointmentBooking.setOtherData(key, val);
357
354
  };
@@ -368,7 +365,6 @@ var useAppointmentBookingSetting = () => {
368
365
  isFormSubject: (bookingSubject == null ? void 0 : bookingSubject.type) === "form",
369
366
  customPageId,
370
367
  channel,
371
- getLoadAllSchedule,
372
368
  bookingSubject,
373
369
  setOtherData,
374
370
  getOtherData,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AppointmentBooking: () => JSX.Element;
3
4
  export default AppointmentBooking;
@@ -45,15 +45,15 @@ var AppointmentBooking = () => {
45
45
  var _a, _b;
46
46
  const context = (0, import_useEngineContext.default)();
47
47
  import_utils.locales.init(import_locales.default, ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en");
48
+ const utils = (0, import_hooks.contextUtils)();
48
49
  const appointmentBooking = (0, import_hooks.useAppointmentBooking)();
49
- appointmentBooking.loadAllSchedule();
50
- const currentUser = (0, import_utils2.formatCurrentUser)();
51
50
  (0, import_react.useEffect)(() => {
52
51
  var _a2;
53
52
  const { bookingSubject } = ((_a2 = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _a2.productModuleParams) || {};
54
53
  if ((bookingSubject == null ? void 0 : bookingSubject.type) === "form") return;
55
54
  appointmentBooking.getAccounts().then((data) => {
56
55
  if (!data.length) {
56
+ const currentUser = (0, import_utils2.formatCurrentUser)(utils);
57
57
  appointmentBooking.addAccounts([currentUser]);
58
58
  }
59
59
  });