@pisell/private-materials 6.2.16 → 6.2.17

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 (242) 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 +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/businessModel/SalesModel/index.d.ts +1 -0
  8. package/es/components/Sales/Checkout/utils.d.ts +40 -0
  9. package/es/components/Sales/Summary/utils.d.ts +1 -1
  10. package/es/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  11. package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
  12. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  13. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
  15. package/es/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  16. package/es/components/appointmentBooking/hooks.d.ts +106 -0
  17. package/es/components/appointmentBooking/index.d.ts +3 -0
  18. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  19. package/es/components/booking/components/customSelect/index.js +1 -0
  20. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  21. package/es/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  22. package/es/components/booking/components/voucher/index.d.ts +3 -0
  23. package/es/components/booking/forms/table/index.d.ts +1 -0
  24. package/es/components/booking/hooks/useClearCart.js +11 -8
  25. package/es/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  26. package/es/components/booking/info/addServiceVariant/index.d.ts +7 -0
  27. package/es/components/booking/info/client/index.js +3 -2
  28. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  29. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  30. package/es/components/booking/info/hooks/useInfoHolder.js +16 -9
  31. package/es/components/booking/info/index.d.ts +4 -0
  32. package/es/components/booking/info/service/Lists.js +36 -26
  33. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  34. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  35. package/es/components/booking/info/service/like/index.d.ts +1 -0
  36. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  37. package/es/components/booking/info/service2/utils.js +20 -21
  38. package/es/components/booking/info/utils.d.ts +50 -0
  39. package/es/components/booking/info2/index.d.ts +12 -0
  40. package/es/components/booking/info2/index.js +1 -0
  41. package/es/components/booking/info2/service/addService/index.d.ts +11 -0
  42. package/es/components/booking/info2/service/addService/utils.d.ts +98 -0
  43. package/es/components/booking/info2/service/addService/utils.js +6 -3
  44. package/es/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
  45. package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
  46. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  47. package/es/components/booking/info2/service/editService/index.js +258 -165
  48. package/es/components/booking/info2/service/index.js +19 -15
  49. package/es/components/booking/locales.d.ts +828 -0
  50. package/es/components/booking/materiels/duration/index.js +9 -2
  51. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  52. package/es/components/booking/model.d.ts +108 -0
  53. package/es/components/booking/utils.d.ts +2 -2
  54. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  55. package/es/components/eftpos/form/index.d.ts +1 -0
  56. package/es/components/eftpos/group/index.d.ts +1 -0
  57. package/es/components/eftpos/hooks.d.ts +1 -0
  58. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  59. package/es/components/eftpos/icon/device.d.ts +1 -0
  60. package/es/components/eftpos/receipt/index.d.ts +1 -0
  61. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  62. package/es/components/eftposPay/amount.d.ts +1 -1
  63. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  64. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  65. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  66. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  67. package/es/components/eftposPay/const.d.ts +184 -0
  68. package/es/components/eftposPay/device.d.ts +1 -1
  69. package/es/components/eftposPay/hooks.d.ts +35 -0
  70. package/es/components/eftposPay/index.d.ts +4 -0
  71. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  72. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  73. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  74. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  75. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  76. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  77. package/es/components/eftposPay/manufacturer.d.ts +7 -0
  78. package/es/components/eftposPay/pay.d.ts +20 -0
  79. package/es/components/eftposPay/store/index.d.ts +355 -0
  80. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  81. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  82. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  83. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  84. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  85. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  86. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  87. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  88. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  89. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  90. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  91. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  93. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  94. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  95. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  96. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  97. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  98. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  99. package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  100. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  101. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  102. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  103. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  104. package/es/components/productSelect/components/TabProduct/index.d.ts +2 -0
  105. package/es/components/productSelect/index.d.ts +26 -0
  106. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  107. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  108. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  109. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  110. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  111. package/es/components/schedules/products/index.d.ts +1 -0
  112. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  113. package/es/components/shoppingCart/components/Cart/Product.js +48 -41
  114. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  115. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  116. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  117. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  118. package/es/components/ticketBooking/components/addServiceVariant/addService.js +177 -157
  119. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  120. package/es/components/ticketBooking/components/timeBar/index.js +78 -71
  121. package/es/components/ticketBooking/index.d.ts +7 -0
  122. package/es/components/walletList/index.d.ts +28 -0
  123. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  124. package/es/utils/index.d.ts +23 -0
  125. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  126. package/lib/components/Sales/Checkout/utils.d.ts +40 -0
  127. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  128. package/lib/components/appointmentBooking/components/Cart/utils.d.ts +56 -0
  129. package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
  130. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  131. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  132. package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
  133. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +4 -0
  134. package/lib/components/appointmentBooking/hooks.d.ts +106 -0
  135. package/lib/components/appointmentBooking/index.d.ts +3 -0
  136. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  137. package/lib/components/booking/components/customSelect/index.js +1 -0
  138. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  139. package/lib/components/booking/components/reloadResourceModal/index.d.ts +8 -0
  140. package/lib/components/booking/components/voucher/index.d.ts +3 -0
  141. package/lib/components/booking/forms/table/index.d.ts +1 -0
  142. package/lib/components/booking/hooks/useClearCart.js +16 -13
  143. package/lib/components/booking/hooks/useIsBooking4Shop.d.ts +1 -0
  144. package/lib/components/booking/info/addServiceVariant/index.d.ts +7 -0
  145. package/lib/components/booking/info/client/index.js +5 -4
  146. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  147. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  148. package/lib/components/booking/info/hooks/useInfoHolder.js +10 -9
  149. package/lib/components/booking/info/index.d.ts +4 -0
  150. package/lib/components/booking/info/service/Lists.js +35 -23
  151. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  152. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  153. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  154. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  155. package/lib/components/booking/info/service2/utils.js +17 -17
  156. package/lib/components/booking/info/utils.d.ts +50 -0
  157. package/lib/components/booking/info2/index.d.ts +12 -0
  158. package/lib/components/booking/info2/service/addService/index.d.ts +11 -0
  159. package/lib/components/booking/info2/service/addService/utils.d.ts +98 -0
  160. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  161. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +3 -0
  162. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
  163. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  164. package/lib/components/booking/info2/service/editService/index.js +132 -70
  165. package/lib/components/booking/info2/service/index.js +13 -9
  166. package/lib/components/booking/locales.d.ts +828 -0
  167. package/lib/components/booking/materiels/duration/index.js +7 -2
  168. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  169. package/lib/components/booking/model.d.ts +108 -0
  170. package/lib/components/booking/utils.d.ts +2 -2
  171. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  172. package/lib/components/eftpos/form/index.d.ts +1 -0
  173. package/lib/components/eftpos/group/index.d.ts +1 -0
  174. package/lib/components/eftpos/hooks.d.ts +1 -0
  175. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  176. package/lib/components/eftpos/icon/device.d.ts +1 -0
  177. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  178. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  179. package/lib/components/eftposPay/amount.d.ts +1 -1
  180. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  181. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  182. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  183. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  184. package/lib/components/eftposPay/const.d.ts +184 -0
  185. package/lib/components/eftposPay/device.d.ts +1 -1
  186. package/lib/components/eftposPay/hooks.d.ts +35 -0
  187. package/lib/components/eftposPay/index.d.ts +4 -0
  188. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  189. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  190. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  191. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  192. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  193. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  194. package/lib/components/eftposPay/manufacturer.d.ts +7 -0
  195. package/lib/components/eftposPay/pay.d.ts +20 -0
  196. package/lib/components/eftposPay/store/index.d.ts +355 -0
  197. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  198. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  199. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  200. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  201. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  202. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  203. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  204. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  205. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  206. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  207. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  208. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  209. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  210. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  211. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  212. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  213. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  214. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  215. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  216. package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
  217. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  218. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  219. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  220. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  221. package/lib/components/productSelect/components/TabProduct/index.d.ts +2 -0
  222. package/lib/components/productSelect/index.d.ts +26 -0
  223. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  224. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  225. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  226. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  227. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  228. package/lib/components/schedules/products/index.d.ts +1 -0
  229. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  230. package/lib/components/shoppingCart/components/Cart/Product.js +31 -21
  231. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  232. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  233. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  234. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
  235. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +145 -127
  236. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  237. package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
  238. package/lib/components/ticketBooking/index.d.ts +7 -0
  239. package/lib/components/walletList/index.d.ts +28 -0
  240. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  241. package/lib/utils/index.d.ts +23 -0
  242. package/package.json +2 -2
@@ -48,7 +48,7 @@ var import_utils3 = require("../clientVariant/utils");
48
48
  var import_useGetHolderList = __toESM(require("../hooks/useGetHolderList"));
49
49
  var isLoadClient = false;
50
50
  var Client = () => {
51
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
52
52
  const modalRef = (0, import_react.useRef)();
53
53
  const [loadLoading, setLoadLoading] = (0, import_react.useState)(false);
54
54
  const [loading, setLoading] = (0, import_react.useState)(false);
@@ -298,6 +298,7 @@ var Client = () => {
298
298
  )) : null;
299
299
  }, [loadLoading, params, state.client.clients.length]);
300
300
  const customSelect = (0, import_react.useMemo)(() => {
301
+ console.log("render customSelect");
301
302
  return /* @__PURE__ */ import_react.default.createElement(
302
303
  import_customSelect.default,
303
304
  {
@@ -340,7 +341,7 @@ var Client = () => {
340
341
  }
341
342
  }
342
343
  );
343
- }, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
344
+ }, [state.isTerminal, state.modalOpen, (_b = state.client) == null ? void 0 : _b.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
344
345
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
345
346
  "div",
346
347
  {
@@ -357,11 +358,11 @@ var Client = () => {
357
358
  import_antd.Avatar,
358
359
  {
359
360
  className: "pisell-lowcode__booking-client-list-item-avatar",
360
- src: import_utils.image.ali((_b = state.client.value) == null ? void 0 : _b.cover, 100),
361
+ src: import_utils.image.ali((_c = state.client.value) == null ? void 0 : _c.cover, 100),
361
362
  icon: /* @__PURE__ */ import_react.default.createElement(import_User01.default, { className: "pisell-lowcode__booking-client-list-item-avatar-icon" })
362
363
  }
363
364
  ),
364
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_c = state.client.value) == null ? void 0 : _c.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_d = state.client.value) == null ? void 0 : _d.email) : null, ((_e = state.client.value) == null ? void 0 : _e.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_f = state.client.value) == null ? void 0 : _f.phone) : null, !!((_h = (_g = state.client.value) == null ? void 0 : _g.waiver_form) == null ? void 0 : _h.length) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-waiver", title: (0, import_utils3.getWaiverTitle)((_i = state.client.value) == null ? void 0 : _i.waiver_form) }, (_l = (_k = (_j = state.client.value) == null ? void 0 : _j.waiver_form) == null ? void 0 : _k.map) == null ? void 0 : _l.call(_k, (item) => {
365
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-left" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-name" }, getNickname(state.client.value)), isWalkIn ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-desc" }, import_utils.locales.getText("pisell2.text.leave-empty-for-walk-in")) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, ((_d = state.client.value) == null ? void 0 : _d.email) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-email" }, (_e = state.client.value) == null ? void 0 : _e.email) : null, ((_f = state.client.value) == null ? void 0 : _f.phone) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-info-phone" }, (_g = state.client.value) == null ? void 0 : _g.phone) : null, !!((_i = (_h = state.client.value) == null ? void 0 : _h.waiver_form) == null ? void 0 : _i.length) && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__booking-client-waiver", title: (0, import_utils3.getWaiverTitle)((_j = state.client.value) == null ? void 0 : _j.waiver_form) }, (_m = (_l = (_k = state.client.value) == null ? void 0 : _k.waiver_form) == null ? void 0 : _l.map) == null ? void 0 : _m.call(_l, (item) => {
365
366
  return /* @__PURE__ */ import_react.default.createElement("span", null, item.form_title, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode__booking-client-waiver-colon" }, ":"), item.is_filled ? /* @__PURE__ */ import_react.default.createElement(
366
367
  "span",
367
368
  {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useIsLowSpeedNetwork: () => import("react").MutableRefObject<boolean>;
2
3
  export default useIsLowSpeedNetwork;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -32,6 +32,7 @@ __export(useInfoHolder_exports, {
32
32
  default: () => useInfoHolder_default
33
33
  });
34
34
  module.exports = __toCommonJS(useInfoHolder_exports);
35
+ var import_ahooks = require("ahooks");
35
36
  var import_react = require("react");
36
37
  var import_useHolderConfig = __toESM(require("./useHolderConfig"));
37
38
  var import_utils = require("../utils");
@@ -54,21 +55,21 @@ var useInfoHolder = (state, dispatch) => {
54
55
  };
55
56
  }, [(_d = (_c = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _c.config) == null ? void 0 : _d.information_tab]);
56
57
  const showAddTimeModal = (0, import_react.useMemo)(() => {
57
- return (0, import_utils.isOpenAddTime)(state);
58
+ return (0, import_utils.isOpenAddTime)(state) && !state.isBookingTicket2;
58
59
  }, [state, appointment_card.quick_time]);
59
- const handleEdit = (cacheItem, type) => {
60
- setTimeout(() => {
61
- var _a2, _b2;
62
- (_b2 = (_a2 = detailRef.current) == null ? void 0 : _a2.init) == null ? void 0 : _b2.call(_a2, cacheItem, false, type === "edit_product");
63
- }, 100);
64
- };
60
+ const handleEdit = (0, import_ahooks.useMemoizedFn)((cacheItem, type) => {
61
+ var _a2, _b2;
62
+ console.time("handleEdit");
63
+ console.log(performance.now() - window.pp1, "打开商品4");
64
+ (_b2 = (_a2 = detailRef.current) == null ? void 0 : _a2.init) == null ? void 0 : _b2.call(_a2, cacheItem, false, type === "edit_product");
65
+ });
65
66
  const dispatchService = (type, payload) => {
66
67
  dispatch({
67
68
  type,
68
69
  payload: { ...payload }
69
70
  });
70
71
  };
71
- const handleAction = (dataSource) => {
72
+ const handleAction = (0, import_ahooks.useMemoizedFn)((dataSource) => {
72
73
  const cacheItem = (0, import_utils2.getProductExtend)({
73
74
  cacheItem: { ...dataSource._origin, new: 0 },
74
75
  state
@@ -80,7 +81,7 @@ var useInfoHolder = (state, dispatch) => {
80
81
  cacheItem
81
82
  }
82
83
  });
83
- };
84
+ });
84
85
  return {
85
86
  detailRef,
86
87
  handleEdit,
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { InfoProps } from './main';
3
+ declare const APP: (props: InfoProps) => JSX.Element;
4
+ export default APP;
@@ -48,10 +48,12 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
48
48
  const { handleAddHolder } = (0, import_useAddHolder.default)(state, dispatch);
49
49
  const handleChange = (0, import_ahooks.useMemoizedFn)(
50
50
  (currentItem, type, other) => {
51
+ console.time("handleChange");
52
+ console.log(window.pp1 = performance.now(), "打开商品");
51
53
  if (state.disabledEdit || state.disableEventBookingEdit) {
52
54
  return;
53
55
  }
54
- let products = (0, import_utils.updateServices)(state, currentItem, type, other, {
56
+ let products2 = (0, import_utils.updateServices)(state, currentItem, type, other, {
55
57
  handleAddHolder
56
58
  });
57
59
  if (type === "view" || type === "edit_product") {
@@ -64,11 +66,11 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
64
66
  });
65
67
  }
66
68
  onChange({ editModal: true, cacheItem });
67
- return onEdit == null ? void 0 : onEdit({ ...product, new: 0 }, type);
69
+ return onEdit == null ? void 0 : onEdit(cacheItem, type);
68
70
  }
69
71
  const params = {
70
72
  editModal: false,
71
- value: products,
73
+ value: products2,
72
74
  edit: true,
73
75
  cacheItem: null
74
76
  };
@@ -95,26 +97,36 @@ var Lists = ({ onEdit, onChange, onAction, isParallelResource }) => {
95
97
  isShowChangeHolder,
96
98
  state.isBookingCreatePage
97
99
  ]);
98
- return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
99
- import_shoppingCart.default,
100
- {
101
- isParallelResource,
102
- onAction,
103
- onChange: handleChange,
104
- isOpenGroup: false,
105
- isHideClearCart: true,
106
- onAddProduct: () => onChange({ addModal: true }),
107
- productParams: {
108
- ...productParams,
109
- products: (0, import_utils.formatProducts)(
110
- ((_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value) || [],
111
- state,
112
- false,
113
- true,
114
- isParallelResource
115
- )
100
+ const products = (0, import_react.useMemo)(() => {
101
+ var _a2;
102
+ console.time("products");
103
+ const p = (0, import_utils.formatProducts)(
104
+ ((_a2 = state == null ? void 0 : state.service) == null ? void 0 : _a2.value) || [],
105
+ state,
106
+ false,
107
+ true,
108
+ isParallelResource
109
+ );
110
+ console.timeEnd("products");
111
+ return p;
112
+ }, [(_a = state == null ? void 0 : state.service) == null ? void 0 : _a.value]);
113
+ return (0, import_react.useMemo)(() => {
114
+ console.log("render List");
115
+ return /* @__PURE__ */ import_react.default.createElement(import_Provider.CartContext.Provider, { value: { state } }, /* @__PURE__ */ import_react.default.createElement(
116
+ import_shoppingCart.default,
117
+ {
118
+ isParallelResource,
119
+ onAction,
120
+ onChange: handleChange,
121
+ isOpenGroup: false,
122
+ isHideClearCart: true,
123
+ onAddProduct: () => onChange({ addModal: true }),
124
+ productParams: {
125
+ ...productParams,
126
+ products
127
+ }
116
128
  }
117
- }
118
- ));
129
+ ));
130
+ }, [products, state, productParams]);
119
131
  };
120
132
  var Lists_default = Lists;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: any;
9
+ locale: string;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Like: ({ status, onChange, className, style, }: {
3
4
  style?: any;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -579,25 +579,25 @@ var formatProducts = (lists, state, isRenderGroup = true, isGeneral, isParallelR
579
579
  _origin: item
580
580
  };
581
581
  };
582
- lists.forEach((item) => {
583
- var _a;
584
- if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
585
- normalList.push(formItem(item));
586
- } else {
587
- groupList.push(item);
588
- }
589
- });
590
- let groups = groupList.reduce((prev, item) => {
591
- var _a;
592
- const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
593
- if (!prev[groupId]) {
594
- prev[groupId] = [];
595
- }
596
- prev[groupId].push(item);
597
- return prev;
598
- }, {});
599
582
  console.log(normalList, "normalList");
600
583
  if (isRenderGroup) {
584
+ lists.forEach((item) => {
585
+ var _a;
586
+ if (!((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId)) {
587
+ normalList.push(formItem(item));
588
+ } else {
589
+ groupList.push(item);
590
+ }
591
+ });
592
+ let groups = groupList.reduce((prev, item) => {
593
+ var _a;
594
+ const groupId = (_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.groupId;
595
+ if (!prev[groupId]) {
596
+ prev[groupId] = [];
597
+ }
598
+ prev[groupId].push(item);
599
+ return prev;
600
+ }, {});
601
601
  return Object.values(groups).map((d) => formItem((0, import_utils3.concatBookings)(d))).concat(normalList);
602
602
  } else {
603
603
  return lists == null ? void 0 : lists.map((item) => formItem(item));
@@ -0,0 +1,50 @@
1
+ export declare const getIsBundleOrCombination: (productDetail: any) => boolean;
2
+ export declare const uniqueByField: (arr: any[], field: string) => any[];
3
+ export declare const moveItemToFront: (arr: any[], targetId: string | number) => any[];
4
+ /**
5
+ * @title: 判断两个时间是否在同一个时间段内
6
+ * @description:
7
+ * @param {number} time1 开始时间
8
+ * @param {number} time2 结束时间
9
+ * @param {number} interval 时间间隔
10
+ * @return {*}
11
+ * @Author: zhiwei.Wang
12
+ * @Date: 2024-08-13 19:37
13
+ */
14
+ export declare const isInterval: (time1: number, time2: number, interval?: number) => boolean;
15
+ /**
16
+ * @title: 根据时间间隔格式化服务列表
17
+ * @description: 防止短时间内添加多个相同服务, 如果两个服务的时间间隔小于1秒,则合并为一个服务
18
+ * @param {any} list 服务列表
19
+ * @return {*}
20
+ * @Author: zhiwei.Wang
21
+ * @Date: 2024-08-13 19:36
22
+ */
23
+ export declare const formatServiceListByTime: (list: any[]) => any[];
24
+ export declare const isBooking4Shop: (shopId: number, renderType?: string, businessUtils?: any) => any;
25
+ declare type DataEntry = {
26
+ total: number;
27
+ origin_total: number;
28
+ num: number;
29
+ quotation_id: number;
30
+ start_date: string;
31
+ end_date: string;
32
+ };
33
+ declare type ResultStructure = Record<string, Record<string, any>>;
34
+ export declare const getMultiDayPrices: (data: DataEntry[]) => ResultStructure;
35
+ /**
36
+ * @title: 是否是跨日预约
37
+ * @description:
38
+ * @param {number} shopId
39
+ * @return {*}
40
+ * @Author: WangHan
41
+ * @Date: 2024-11-29 11:19
42
+ */
43
+ export declare const isDayBooking: (shopId: number) => boolean;
44
+ export declare const isOpenAddTime: (state: any) => boolean;
45
+ export declare const isShowAddTime: (state: any, currentService: any) => boolean;
46
+ export declare const editSessionProduct: (cacheItem: any, session: any) => {
47
+ duration: any;
48
+ start_time: any;
49
+ } | undefined;
50
+ export {};
@@ -0,0 +1,12 @@
1
+ import '../info/index.less';
2
+ export interface InfoProps {
3
+ style: any;
4
+ globalState: any;
5
+ callback: any;
6
+ setGlobalState: any;
7
+ modules: any;
8
+ slot: any;
9
+ setState: any;
10
+ }
11
+ declare const Info: any;
12
+ export default Info;
@@ -0,0 +1,11 @@
1
+ import { PisellDrawerProps } from '../../../components/drawer';
2
+ import '../../../info/service/addService/index.less';
3
+ interface AddServiceProps {
4
+ onEdit: any;
5
+ dispatch?: any;
6
+ state?: any;
7
+ drawerProps?: PisellDrawerProps;
8
+ renderMode?: 'current' | 'drawer';
9
+ }
10
+ declare const Info: (props: AddServiceProps) => JSX.Element;
11
+ export default Info;
@@ -0,0 +1,98 @@
1
+ import dayjs from 'dayjs';
2
+ export declare const getUsableTime: (cacheItem: any) => any;
3
+ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResource, slice, }: any) => {
4
+ startDate: dayjs.Dayjs;
5
+ usableTime: any;
6
+ duration: string | number | {
7
+ type: string;
8
+ value: number;
9
+ };
10
+ locale: string;
11
+ slice: any;
12
+ selectProps: {
13
+ size: string;
14
+ };
15
+ };
16
+ /**
17
+ * @title: 灵活时长选项
18
+ * @description:
19
+ * @param {*} useMemo
20
+ * @return {*}
21
+ * @Author: zhiwei.Wang
22
+ * @Date: 2024-02-23 10:10
23
+ */
24
+ export declare const getFlexibleOption: ({ cacheItem, useStartTime, currentResource, slice, durationProps, }: any) => {
25
+ label: any;
26
+ value: any;
27
+ } | null;
28
+ export declare const getTimeSlices: ({ state }: any) => {
29
+ timeSlices: {
30
+ label: string;
31
+ value: string;
32
+ }[];
33
+ };
34
+ /**
35
+ * @title: 时间切片
36
+ * @description:
37
+ * @return {*}
38
+ * @Author: zhiwei.Wang
39
+ * @Date: 2024-01-09 13:37
40
+ */
41
+ export declare const getTimeObj: ({ cacheItem, useStartTime, currentResource, state, useDuration, durationProps, }: any) => {
42
+ timeSlices: {
43
+ label: string;
44
+ value: string;
45
+ }[];
46
+ durationSlicesBasedOnTime: {
47
+ label: string;
48
+ value: number;
49
+ }[];
50
+ };
51
+ /**
52
+ * @title: 获取资源列表
53
+ * @description:
54
+ * @return {*}
55
+ * @Author: zhiwei.Wang
56
+ * @Date: 2024-01-09 13:38
57
+ */
58
+ export declare const formatResources: ({ cacheItem, resourcesOrigin, id }: any) => {
59
+ list: any;
60
+ maps: any;
61
+ };
62
+ export declare const setDefaultResource: ({ cacheItem, resources }: any) => any;
63
+ /**
64
+ * @title: 设置默认容量
65
+ * @description:
66
+ * @param {any} param1
67
+ * @return {*}
68
+ * @Author: zhiwei.Wang
69
+ * @Date: 2024-09-19 20:26
70
+ */
71
+ export declare const setDefaultCapacitys: ({ capacitys, cacheItem }: any) => any;
72
+ /**
73
+ * @title: 将商品内关联的资源id还原成数据
74
+ * @description:
75
+ * @param {any} resourcesOriginMap
76
+ * @param {any} cacheItem
77
+ * @return {*}
78
+ * @Author: zhiwei.Wang
79
+ * @Date: 2024-09-19 20:23
80
+ */
81
+ export declare const getResourceByIds: (resourcesOriginMap: any, cacheItem: any, extraParams?: any) => any[];
82
+ /**
83
+ * @title: 预生成服务的 extend
84
+ * @description:
85
+ * @param {any} param1
86
+ * @return {*}
87
+ * @Author: zhiwei.Wang
88
+ * @Date: 2024-06-01 13:25
89
+ */
90
+ export declare const getProductExtend: ({ cacheItem, state, isDisabledTime }: any) => any;
91
+ /**
92
+ * @title: 格式化服务列表
93
+ * @description: 后端列表返回的product_resource.resources 的optional_resource等不是最新数据
94
+ * 使用with resourceRelation后 返回的resource_relation是实时数据
95
+ * 这里做一次转换
96
+ * @param list
97
+ */
98
+ export declare const transServiceList: (list: any[]) => any[];
@@ -142,7 +142,8 @@ var getTimeObj = ({
142
142
  cacheItem,
143
143
  useStartTime,
144
144
  currentResource,
145
- state,
145
+ // 没有使用该参数
146
+ // state,
146
147
  durationProps
147
148
  });
148
149
  let obj = (0, import_utils.sliceDayIntoFiveMinutes)(
@@ -242,7 +243,8 @@ var setDefaultResource = ({ cacheItem, resources }) => {
242
243
  }
243
244
  const defaultResource = defaultOriginalResource.map((d) => {
244
245
  return {
245
- ...d,
246
+ // ...d,
247
+ children: d.children,
246
248
  relation_type: d.relation_type,
247
249
  form_id: item.form_id,
248
250
  relation_id: d.id,
@@ -0,0 +1,3 @@
1
+ import '../../../info/service/addTimeModal/index.less';
2
+ declare const AddTimeModal: () => JSX.Element;
3
+ export default AddTimeModal;
@@ -65,6 +65,7 @@ var AddTimeModal = () => {
65
65
  const [number, setNumber] = (0, import_react.useState)(1);
66
66
  const originServices = (0, import_react.useRef)([]);
67
67
  const [renderList, setRenderList] = (0, import_react.useState)([]);
68
+ console.log(renderList, "renderListrenderList");
68
69
  const context = (0, import_useEngineContext.default)();
69
70
  const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
70
71
  const statusMap = {
@@ -126,6 +127,7 @@ var AddTimeModal = () => {
126
127
  }
127
128
  return arr.filter(Boolean);
128
129
  }, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
130
+ console.log(currentResource, "currentResource");
129
131
  const getTimeUsableStatus = (time) => {
130
132
  var _a2, _b2;
131
133
  if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
@@ -206,6 +208,7 @@ var AddTimeModal = () => {
206
208
  setLoading("list");
207
209
  const newList = await _getAddTimeProducts();
208
210
  let list = newList.map((d) => {
211
+ debugger;
209
212
  let isUsable = (0, import_utils2.isUsableProduct)(d.add_time, state.service.cacheItem);
210
213
  return {
211
214
  ...d,
@@ -168,9 +168,11 @@ var Resources = ({
168
168
  const getIsAutoAllocation = (id) => {
169
169
  return (0, import_utils2.getAutoAllocationStorage)(id);
170
170
  };
171
+ console.log("resourcesss");
171
172
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.map((item) => {
172
173
  var _a2;
173
174
  const cur = _value[item.form_id];
175
+ console.log(cur, "curcur");
174
176
  const errors = (cur || []).reduce((pre, d) => {
175
177
  return pre.concat((d == null ? void 0 : d.errors) || []);
176
178
  }, []);