@pisell/private-materials 6.2.18 → 6.2.19

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 (258) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.js +2 -2
  8. package/build/lowcode/view.js +8 -8
  9. package/es/businessModel/SalesModel/index.d.ts +1 -0
  10. package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  11. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  12. package/es/components/booking/addons/model.d.ts +1 -10
  13. package/es/components/booking/components/TabProduct/index.d.ts +1 -0
  14. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  15. package/es/components/booking/components/browserSelect/index.js +1 -1
  16. package/es/components/booking/components/customSelect/index.js +1 -0
  17. package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  18. package/es/components/booking/editBookingModal/index.js +29 -58
  19. package/es/components/booking/editBookingModal/serve.d.ts +0 -1
  20. package/es/components/booking/editBookingModal/serve.js +11 -19
  21. package/es/components/booking/forms/model.d.ts +1 -10
  22. package/es/components/booking/forms/model.js +5 -5
  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/info/addServiceVariant/index.d.ts +1 -0
  26. package/es/components/booking/info/client/index.js +3 -2
  27. package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  28. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  29. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  30. package/es/components/booking/info/hooks/useInfoHolder.js +16 -9
  31. package/es/components/booking/info/index.d.ts +1 -0
  32. package/es/components/booking/info/model.d.ts +1 -10
  33. package/es/components/booking/info/service/Lists.js +36 -26
  34. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  35. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  36. package/es/components/booking/info/service/like/index.d.ts +1 -0
  37. package/es/components/booking/info/service/like/index.js +1 -1
  38. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  39. package/es/components/booking/info/service2/utils.js +20 -21
  40. package/es/components/booking/info2/index.js +1 -0
  41. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  42. package/es/components/booking/info2/service/addService/utils.js +7 -4
  43. package/es/components/booking/info2/service/addTimeModal/index.js +3 -0
  44. package/es/components/booking/info2/service/editService/Resources/index.js +5 -0
  45. package/es/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  46. package/es/components/booking/info2/service/editService/index.js +258 -165
  47. package/es/components/booking/info2/service/index.js +19 -15
  48. package/es/components/booking/materiels/duration/index.js +9 -2
  49. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  50. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  51. package/es/components/booking/materiels/startTime/index.js +1 -1
  52. package/es/components/booking/model.d.ts +1 -9
  53. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  54. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  55. package/es/components/booking/notes/model.d.ts +1 -10
  56. package/es/components/booking/notes/model.js +5 -5
  57. package/es/components/booking/payments/model.d.ts +1 -10
  58. package/es/components/booking/payments/model.js +5 -5
  59. package/es/components/eftpos/deviceList/index.d.ts +1 -0
  60. package/es/components/eftpos/form/index.d.ts +1 -0
  61. package/es/components/eftpos/group/index.d.ts +1 -0
  62. package/es/components/eftpos/hooks.d.ts +1 -0
  63. package/es/components/eftpos/icon/apiKey.d.ts +1 -0
  64. package/es/components/eftpos/icon/device.d.ts +1 -0
  65. package/es/components/eftpos/receipt/index.d.ts +1 -0
  66. package/es/components/eftpos/surcharge/index.d.ts +1 -0
  67. package/es/components/eftposPay/app.d.ts +1 -0
  68. package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
  69. package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
  70. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  71. package/es/components/eftposPay/component/step/step.d.ts +1 -0
  72. package/es/components/eftposPay/store/index.d.ts +1 -1
  73. package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
  74. package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  75. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  76. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  78. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  79. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  80. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  81. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  82. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  83. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  84. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  85. package/es/components/listComponent/index.js +5 -5
  86. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  87. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  88. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  89. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  90. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  91. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  92. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  93. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  94. package/es/components/pay/toC/model.d.ts +1 -9
  95. package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  96. package/es/components/productExtension/card/index.js +3 -3
  97. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  98. package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
  99. package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
  100. package/es/components/productExtension/fields/Forms/index.js +12 -12
  101. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  102. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  103. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  104. package/es/components/productExtension/server.js +2 -2
  105. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  106. package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
  107. package/es/components/schedules/calendar/index.js +4 -4
  108. package/es/components/schedules/calendar/serve.js +2 -2
  109. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  110. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  111. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  112. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  113. package/es/components/schedules/components/ResourceList/index.js +1 -1
  114. package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  115. package/es/components/schedules/components/Search/index.js +5 -5
  116. package/es/components/schedules/model.d.ts +1 -9
  117. package/es/components/schedules/model.js +5 -5
  118. package/es/components/schedules/openHours/index.js +1 -1
  119. package/es/components/schedules/openHours/serve.js +2 -2
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  121. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  122. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  123. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  124. package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  125. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  126. package/es/components/schedules/products/index.d.ts +1 -0
  127. package/es/components/schedules/products/serve.js +2 -2
  128. package/es/components/schedules/products/utils.js +5 -5
  129. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  130. package/es/components/schedules/resources/detail/index.js +10 -10
  131. package/es/components/schedules/resources/list/index.js +2 -2
  132. package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
  133. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  134. package/es/components/schedules/resources/serve.js +2 -2
  135. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  136. package/es/components/schedules/utils.js +4 -4
  137. package/es/components/selectModal/index.js +2 -2
  138. package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  139. package/es/components/shoppingCart/components/Cart/Product.js +48 -41
  140. package/es/components/shoppingCart/components/Cart/index.js +21 -18
  141. package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
  142. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  143. package/es/components/ticketBooking/components/addServiceVariant/addService.js +177 -157
  144. package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  145. package/es/components/ticketBooking/components/timeBar/index.js +78 -71
  146. package/es/components/wallet/Detail/model.d.ts +1 -13
  147. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  148. package/es/components/wallet/PointCard/model.d.ts +1 -13
  149. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  150. package/es/components/wallet/Voucher/model.d.ts +1 -13
  151. package/es/components/wallet/model.d.ts +1 -9
  152. package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
  153. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  154. package/es/hooks/useComponents.js +1 -1
  155. package/lib/businessModel/SalesModel/index.d.ts +1 -0
  156. package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
  157. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
  158. package/lib/components/booking/addons/model.d.ts +1 -10
  159. package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
  160. package/lib/components/booking/components/customSelect/index.js +1 -0
  161. package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
  162. package/lib/components/booking/editBookingModal/index.js +21 -56
  163. package/lib/components/booking/editBookingModal/serve.d.ts +0 -1
  164. package/lib/components/booking/editBookingModal/serve.js +6 -12
  165. package/lib/components/booking/forms/model.d.ts +1 -10
  166. package/lib/components/booking/forms/table/index.d.ts +1 -0
  167. package/lib/components/booking/hooks/useClearCart.js +16 -13
  168. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  169. package/lib/components/booking/info/client/index.js +5 -4
  170. package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
  171. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  172. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  173. package/lib/components/booking/info/hooks/useInfoHolder.js +10 -9
  174. package/lib/components/booking/info/index.d.ts +1 -0
  175. package/lib/components/booking/info/model.d.ts +1 -10
  176. package/lib/components/booking/info/service/Lists.js +35 -23
  177. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  178. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  179. package/lib/components/booking/info/service/like/index.d.ts +1 -0
  180. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  181. package/lib/components/booking/info/service2/utils.js +17 -17
  182. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  183. package/lib/components/booking/info2/service/addService/utils.js +5 -3
  184. package/lib/components/booking/info2/service/addTimeModal/index.js +3 -0
  185. package/lib/components/booking/info2/service/editService/Resources/index.js +2 -0
  186. package/lib/components/booking/info2/service/editService/ResourcesV2/index.js +1 -1
  187. package/lib/components/booking/info2/service/editService/index.js +132 -70
  188. package/lib/components/booking/info2/service/index.js +13 -9
  189. package/lib/components/booking/materiels/duration/index.js +7 -2
  190. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  191. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  192. package/lib/components/booking/model.d.ts +1 -9
  193. package/lib/components/booking/notes/model.d.ts +1 -10
  194. package/lib/components/booking/payments/model.d.ts +1 -10
  195. package/lib/components/eftpos/deviceList/index.d.ts +1 -0
  196. package/lib/components/eftpos/form/index.d.ts +1 -0
  197. package/lib/components/eftpos/group/index.d.ts +1 -0
  198. package/lib/components/eftpos/hooks.d.ts +1 -0
  199. package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
  200. package/lib/components/eftpos/icon/device.d.ts +1 -0
  201. package/lib/components/eftpos/receipt/index.d.ts +1 -0
  202. package/lib/components/eftpos/surcharge/index.d.ts +1 -0
  203. package/lib/components/eftposPay/app.d.ts +1 -0
  204. package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
  205. package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
  206. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  207. package/lib/components/eftposPay/component/step/step.d.ts +1 -0
  208. package/lib/components/eftposPay/store/index.d.ts +1 -1
  209. package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
  210. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
  211. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +1 -0
  212. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
  213. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/index.d.ts +1 -0
  214. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
  215. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
  216. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
  217. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
  218. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
  219. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
  220. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  221. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
  222. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
  223. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
  224. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
  225. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
  226. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
  227. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
  228. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
  229. package/lib/components/pay/toC/model.d.ts +1 -9
  230. package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
  231. package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
  232. package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
  233. package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
  234. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  235. package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
  236. package/lib/components/schedules/model.d.ts +1 -9
  237. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
  238. package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
  239. package/lib/components/schedules/products/index.d.ts +1 -0
  240. package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
  241. package/lib/components/schedules/utils.js +1 -1
  242. package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
  243. package/lib/components/shoppingCart/components/Cart/Product.js +31 -21
  244. package/lib/components/shoppingCart/components/Cart/index.js +18 -15
  245. package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
  246. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  247. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +145 -127
  248. package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
  249. package/lib/components/ticketBooking/components/timeBar/index.js +95 -88
  250. package/lib/components/wallet/Detail/model.d.ts +1 -13
  251. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  252. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  253. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  254. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  255. package/lib/components/wallet/model.d.ts +1 -9
  256. package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
  257. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
  258. package/package.json +4 -4
@@ -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 Footer: ({ onNext, isOpen }: any) => JSX.Element;
3
4
  export default Footer;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const GuestOptionsModal: (props: any) => JSX.Element;
3
4
  export default GuestOptionsModal;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface TabProductProps {
3
4
  list: any[];
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
2
2
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
3
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
4
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import React, { useMemo, useState, useEffect, forwardRef, useImperativeHandle } from "react";
8
8
  import classNames from "classnames";
@@ -13,6 +13,10 @@ import "./index.less";
13
13
 
14
14
  // tabs 子组件定义
15
15
 
16
+ // 定义主键类型
17
+
18
+ // Tabs 可传递的参数
19
+
16
20
  var Tabs = function Tabs(_ref, ref) {
17
21
  var renderTab = _ref.renderTab,
18
22
  rowKey = _ref.rowKey,
@@ -29,7 +29,7 @@ var BrowserSelect = function BrowserSelect(props) {
29
29
  onChange: function onChange(e) {
30
30
  var _resetProps$onChange;
31
31
  e.persist();
32
- (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 ? void 0 : _resetProps$onChange.call(resetProps, e);
32
+ (_resetProps$onChange = resetProps.onChange) === null || _resetProps$onChange === void 0 || _resetProps$onChange.call(resetProps, e);
33
33
  }
34
34
  }), _options);
35
35
  };
@@ -74,6 +74,7 @@ var CustomSelect = function CustomSelect(props, ref) {
74
74
  showDropDown = _props$showDropDown === void 0 ? true : _props$showDropDown,
75
75
  propsHandleOpenModal = props.handleOpenModal,
76
76
  handleDayChange = props.handleDayChange;
77
+ console.log('custom select');
77
78
  var searchRef = useRef();
78
79
 
79
80
  // 当前选择的值
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const FormItemChildrenWrap: (props: any) => JSX.Element;
2
3
  export default FormItemChildrenWrap;
@@ -69,8 +69,8 @@ var EditBookingModal = function EditBookingModal(props, ref) {
69
69
  });
70
70
  var getInitData = /*#__PURE__*/function () {
71
71
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
72
- var _data$fromResource, _data$toResource;
73
- var mockProps, _data, _initResourceVal, fromResourceFormId, toResourceFormId, _form_id, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx, _sameResource;
72
+ var _data$toResource;
73
+ var mockProps, _data, _initResourceVal, toResourceFormId, _data$toResource2, _formatResources, list, maps, currentForm, relation_id, _currentForm$renderLi, _currentForm$renderLi2, _currentForm$renderLi3, _currentForm$renderLi4, _targetResource, _cloned, _idx;
74
74
  return _regeneratorRuntime().wrap(function _callee$(_context) {
75
75
  while (1) switch (_context.prev = _context.next) {
76
76
  case 0:
@@ -82,25 +82,20 @@ var EditBookingModal = function EditBookingModal(props, ref) {
82
82
  setData(_data);
83
83
 
84
84
  // 初始预期资源(日历放置点对应的资源)
85
- _initResourceVal = _data.childrenBooking._extend.resource; // 源资源所在 from_id
86
- fromResourceFormId = (_data$fromResource = _data.fromResource) === null || _data$fromResource === void 0 ? void 0 : _data$fromResource.form_id; // 目标资源所在 form_id
87
- toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 若 1. 无资源移入具体资源
88
- // 或 2. 具体资源移入无资源
89
- // 则其中有一个 form_id 为 0,那么选择不为 0 的那个
90
- _form_id = toResourceFormId || fromResourceFormId; // 若 1. 起止资源不同(必有一个不为 ‘no resource’)
91
- // 且 2. 能通过目标资源id找到所在资源组
85
+ _initResourceVal = _data.childrenBooking._extend.resource; // 目标资源所在 form_id
86
+ toResourceFormId = (_data$toResource = _data.toResource) === null || _data$toResource === void 0 ? void 0 : _data$toResource.form_id; // 1. 起止资源不同 且2. 能通过目标资源id找到所在资源组
92
87
  // 则查找放置点所对应资源信息
93
- if (params.fromResourceId !== params.toResourceId && !!_form_id) {
88
+ if (params.fromResourceId !== params.toResourceId && toResourceFormId) {
94
89
  _formatResources = formatResources({
95
90
  cacheItem: _data.childrenBooking,
96
91
  resourcesOrigin: _data.resourcesOrigin
97
92
  }), list = _formatResources.list, maps = _formatResources.maps;
98
- currentForm = maps[_form_id];
93
+ currentForm = maps[toResourceFormId];
99
94
  relation_id = (_data$toResource2 = _data.toResource) === null || _data$toResource2 === void 0 ? void 0 : _data$toResource2.id;
100
- if (currentForm && (relation_id || relation_id === 0)) {
95
+ if (currentForm && relation_id) {
101
96
  _targetResource = {
102
97
  relation_type: ((_currentForm$renderLi = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi === void 0 || (_currentForm$renderLi = _currentForm$renderLi.usable) === null || _currentForm$renderLi === void 0 ? void 0 : _currentForm$renderLi.relation_type) || 'form',
103
- form_id: _form_id,
98
+ form_id: toResourceFormId,
104
99
  relation_id: relation_id,
105
100
  like_status: 'common',
106
101
  children: (_currentForm$renderLi2 = currentForm.renderListMaps) === null || _currentForm$renderLi2 === void 0 || (_currentForm$renderLi2 = _currentForm$renderLi2[relation_id]) === null || _currentForm$renderLi2 === void 0 ? void 0 : _currentForm$renderLi2.children,
@@ -109,31 +104,20 @@ var EditBookingModal = function EditBookingModal(props, ref) {
109
104
  resource_name: (_currentForm$renderLi4 = currentForm.renderListMaps[relation_id]) === null || _currentForm$renderLi4 === void 0 ? void 0 : _currentForm$renderLi4.main_field
110
105
  })
111
106
  }; // 同一类型关联多个资源
112
- if (Array.isArray(_initResourceVal[_form_id])) {
113
- _cloned = _toConsumableArray(_initResourceVal[_form_id]);
107
+ if (Array.isArray(_initResourceVal[toResourceFormId])) {
108
+ _cloned = _toConsumableArray(_initResourceVal[toResourceFormId]);
114
109
  _idx = _cloned.findIndex(function (rs) {
115
- var _rs$children;
116
- return rs.relation_id == params.fromResourceId || ((_rs$children = rs.children) === null || _rs$children === void 0 ? void 0 : _rs$children.find(function (child) {
117
- return child.relation_id == params.fromResourceId;
118
- }));
110
+ return rs.relation_id == params.fromResourceId;
119
111
  });
120
112
  if (_idx !== -1) {
121
- // 去重: 同一资源类型下,设置了该类型的某个资源 A,以及无资源,当从无资源拖放至 A 上时需要去重
122
- _sameResource = _cloned.find(function (_clonedItem) {
123
- return _clonedItem.relation_id === (_targetResource === null || _targetResource === void 0 ? void 0 : _targetResource.relation_id);
124
- });
125
- if (_sameResource) {
126
- _cloned.splice(_idx, 1);
127
- } else {
128
- _cloned[_idx] = _targetResource; // 替换现有对象
129
- }
113
+ _cloned[_idx] = _targetResource; // 替换现有对象
130
114
  } else {
131
115
  _cloned.push(_targetResource); // 添加新对象
132
116
  }
133
- _initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, _cloned));
117
+ _initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, _cloned));
134
118
  } else {
135
119
  // 单选
136
- _initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, _form_id, [_targetResource]));
120
+ _initResourceVal = _objectSpread(_objectSpread({}, _initResourceVal), {}, _defineProperty({}, toResourceFormId, [_targetResource]));
137
121
  }
138
122
  }
139
123
  }
@@ -144,7 +128,7 @@ var EditBookingModal = function EditBookingModal(props, ref) {
144
128
  toDate: [dayjs(mockProps.toStartDate), dayjs(mockProps.toEndDate)]
145
129
  });
146
130
  }, 100);
147
- case 11:
131
+ case 9:
148
132
  case "end":
149
133
  return _context.stop();
150
134
  }
@@ -234,11 +218,12 @@ var EditBookingModal = function EditBookingModal(props, ref) {
234
218
  };
235
219
  var onOk = /*#__PURE__*/function () {
236
220
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
237
- var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time, id, relation_id, like_status, relation_type, is_all, schedule_id, sub_type, select_date, number, metadata;
221
+ var values, _data$childrenBooking, _extend, order_id, start_date, start_time, end_date, end_time;
238
222
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
239
223
  while (1) switch (_context2.prev = _context2.next) {
240
224
  case 0:
241
- values = form.getFieldsValue();
225
+ values = form.getFieldsValue(); // console.log('values', values, data, cacheItem);
226
+ // return;
242
227
  setUpdating(true);
243
228
  _context2.prev = 2;
244
229
  _data$childrenBooking = data.childrenBooking, _extend = _data$childrenBooking._extend, order_id = _data$childrenBooking.order_id;
@@ -246,20 +231,8 @@ var EditBookingModal = function EditBookingModal(props, ref) {
246
231
  start_time = values.toDate[0].format('HH:mm');
247
232
  end_date = values.toDate[1].format('YYYY-MM-DD');
248
233
  end_time = values.toDate[1].format('HH:mm');
249
- console.log('extend data', _extend);
250
- id = _extend.id, relation_id = _extend.relation_id, like_status = _extend.like_status, relation_type = _extend.relation_type, is_all = _extend.is_all, schedule_id = _extend.schedule_id, sub_type = _extend.sub_type, select_date = _extend.select_date, number = _extend.number, metadata = _extend.metadata;
251
- _context2.next = 12;
252
- return updateChildBooking(order_id, {
253
- id: id,
254
- relation_id: relation_id,
255
- like_status: like_status,
256
- relation_type: relation_type,
257
- is_all: is_all,
258
- schedule_id: schedule_id,
259
- sub_type: sub_type,
260
- select_date: select_date,
261
- number: number,
262
- metadata: metadata,
234
+ _context2.next = 10;
235
+ return updateChildBooking(order_id, _objectSpread(_objectSpread({}, _extend), {}, {
263
236
  resources: Object.values(values.resource).reduce(function (pre, cur) {
264
237
  var newList = checkResourcesFormat(cur, cacheItem);
265
238
  pre = pre.concat(newList);
@@ -270,24 +243,23 @@ var EditBookingModal = function EditBookingModal(props, ref) {
270
243
  end_date: end_date,
271
244
  end_time: end_time,
272
245
  duration: values.toDate[1].diff(values.toDate[0], 'minutes')
273
- });
274
- case 12:
275
- // 清空,防止下次打开时看到残留数据
276
- initState();
246
+ }));
247
+ case 10:
248
+ setOpen(false);
277
249
  props === null || props === void 0 || props.onOk();
278
- _context2.next = 19;
250
+ _context2.next = 17;
279
251
  break;
280
- case 16:
281
- _context2.prev = 16;
252
+ case 14:
253
+ _context2.prev = 14;
282
254
  _context2.t0 = _context2["catch"](2);
283
255
  console.error(_context2.t0);
284
- case 19:
256
+ case 17:
285
257
  setUpdating(false);
286
- case 20:
258
+ case 18:
287
259
  case "end":
288
260
  return _context2.stop();
289
261
  }
290
- }, _callee2, null, [[2, 16]]);
262
+ }, _callee2, null, [[2, 14]]);
291
263
  }));
292
264
  return function onOk() {
293
265
  return _ref2.apply(this, arguments);
@@ -405,7 +377,6 @@ var EditBookingModal = function EditBookingModal(props, ref) {
405
377
  onClick: onOk,
406
378
  block: true,
407
379
  size: "large",
408
- disabled: !data,
409
380
  loading: updating,
410
381
  style: {
411
382
  borderRadius: 20
@@ -46,7 +46,6 @@ export declare const init: (params: EditBookingModalParams) => Promise<{
46
46
  start_date: any;
47
47
  };
48
48
  resourcesOrigin: any[];
49
- fromResource: any;
50
49
  toResource: any;
51
50
  }>;
52
51
  export declare const createCacheItem: (cacheItem: any, values?: any) => any;
@@ -197,8 +197,7 @@ export var updateResourceErrors = function updateResourceErrors(resourceMaps, ca
197
197
  };
198
198
  export var init = /*#__PURE__*/function () {
199
199
  var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
200
- var _childrenBooking$_ext;
201
- var toStartDate, toEndDate, event, fromResourceId, toResourceId, bookingOrigin, booking, resources, childrenBooking, fromResource, toResource, extraParams, _eventResources, resourcesOrigin;
200
+ var toStartDate, toEndDate, event, fromResourceId, toResourceId, bookingOrigin, booking, resources, childrenBooking, extraParams, fromResource, toResource, resourcesOrigin;
202
201
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
203
202
  while (1) switch (_context7.prev = _context7.next) {
204
203
  case 0:
@@ -217,24 +216,19 @@ export var init = /*#__PURE__*/function () {
217
216
  // 筛选出当前的子预约
218
217
  childrenBooking = getChildrenBookingById(booking.service.value, event.id);
219
218
  console.log('childrenBooking', childrenBooking);
220
- fromResource = resources.listMap[fromResourceId];
221
- toResource = resources.listMap[toResourceId]; // 默认的资源渲染列表的获取,只会从 product_resource 获取后台配置的资源
222
- // 对于没有配置但是有需要被展示的,则需要额外传入
219
+
220
+ // 假如移入未绑定的资源中,需要特殊处理
223
221
  extraParams = {
224
222
  extraResources: []
225
- }; // 1. 当某个预约同时设置了A B C 三个资源, 但预约商品本身并未关联B C
226
- _eventResources = (_childrenBooking$_ext = childrenBooking._extend) === null || _childrenBooking$_ext === void 0 ? void 0 : _childrenBooking$_ext.event_resources;
227
- if (Array.isArray(_eventResources)) {
228
- // 简化操作,所有资源全部加入到额外资源中,由接下来的方法内部进行去重
229
- _eventResources.forEach(function (item) {
230
- extraParams.extraResources.push({
231
- id: item.relation_id,
232
- form_id: item.form_id
233
- });
223
+ };
224
+ fromResource = resources.listMap[fromResourceId];
225
+ toResource = resources.listMap[toResourceId];
226
+ if (fromResource) {
227
+ extraParams.extraResources.push({
228
+ form_id: fromResource.form_id,
229
+ id: fromResource.id
234
230
  });
235
231
  }
236
-
237
- // 2. 移入未绑定的资源中
238
232
  if (toResource) {
239
233
  extraParams.extraResources.push({
240
234
  form_id: toResource.form_id,
@@ -258,12 +252,10 @@ export var init = /*#__PURE__*/function () {
258
252
  },
259
253
  // 总资源列表
260
254
  resourcesOrigin: resourcesOrigin,
261
- // 源资源
262
- fromResource: fromResource,
263
255
  // 目标资源
264
256
  toResource: toResource
265
257
  });
266
- case 18:
258
+ case 17:
267
259
  case "end":
268
260
  return _context7.stop();
269
261
  }
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,9 +1,9 @@
1
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
3
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
6
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { miniRedux } from "@pisell/utils";
8
8
  var defaultState = {};
9
9
  var _miniRedux = miniRedux({
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare const Table: ({ value, onChange, field, mode, onAdd }: any) => JSX.Element;
3
4
  export default Table;
@@ -2,12 +2,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
3
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
4
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
- import React from 'react';
5
+ import React, { useMemo } from 'react';
6
6
  import classNames from 'classnames';
7
7
  import { Iconfont } from '@pisell/materials';
8
8
  import { locales } from "@pisell/utils";
9
9
  var useClearCart = function useClearCart(state, dispatch) {
10
- var _state$service, _state$service2;
10
+ var _state$service3;
11
11
  var handleClear = function handleClear() {
12
12
  // 清除购物车
13
13
  dispatch({
@@ -17,11 +17,14 @@ var useClearCart = function useClearCart(state, dispatch) {
17
17
  }
18
18
  });
19
19
  };
20
- return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
21
- className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
22
- onClick: handleClear
23
- }, /*#__PURE__*/React.createElement(Iconfont, {
24
- type: "pisell2-trash-01"
25
- }), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
20
+ return useMemo(function () {
21
+ var _state$service, _state$service2;
22
+ return !!((_state$service = state.service) !== null && _state$service !== void 0 && (_state$service = _state$service.value) !== null && _state$service !== void 0 && _state$service.length) && !state.channelDisabledEdit && /*#__PURE__*/React.createElement("span", {
23
+ className: classNames('pisell-lowcode__booking-service-clear-btn', _defineProperty({}, 'pisell-lowcode__booking-service-clear-btn-disabled', !((_state$service2 = state.service) !== null && _state$service2 !== void 0 && (_state$service2 = _state$service2.value) !== null && _state$service2 !== void 0 && _state$service2.length))),
24
+ onClick: handleClear
25
+ }, /*#__PURE__*/React.createElement(Iconfont, {
26
+ type: "pisell2-trash-01"
27
+ }), " ", /*#__PURE__*/React.createElement("span", null, locales.getText('pisell2.booking.info.text.clear-cart')));
28
+ }, [(_state$service3 = state.service) === null || _state$service3 === void 0 || (_state$service3 = _state$service3.value) === null || _state$service3 === void 0 ? void 0 : _state$service3.length, state.channelDisabledEdit]);
26
29
  };
27
30
  export default useClearCart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -36,7 +36,7 @@ import { getWaiverTitle } from "../clientVariant/utils";
36
36
  import useGetHolderList from "../hooks/useGetHolderList";
37
37
  var isLoadClient = false;
38
38
  var Client = function Client() {
39
- var _state$client$value2, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
39
+ var _state$client$value2, _state$client4, _state$client$value3, _state$client$value4, _state$client$value5, _state$client$value6, _state$client$value7, _state$client$value8, _state$client$value9, _state$client$value10, _state$client$value11;
40
40
  var modalRef = useRef();
41
41
  var _useState = useState(false),
42
42
  _useState2 = _slicedToArray(_useState, 2),
@@ -397,6 +397,7 @@ var Client = function Client() {
397
397
  }, locales.getText('pisell2.text.load-more'))) : null;
398
398
  }, [loadLoading, params, state.client.clients.length]);
399
399
  var customSelect = useMemo(function () {
400
+ console.log('render customSelect');
400
401
  return /*#__PURE__*/React.createElement(CustomSelect, {
401
402
  autoFocus: !state.isTerminal,
402
403
  modalOpen: state.modalOpen,
@@ -459,7 +460,7 @@ var Client = function Client() {
459
460
  return true;
460
461
  }
461
462
  });
462
- }, [state, renderList, loading, franchiseeLoading, params.search, loadMore]);
463
+ }, [state.isTerminal, state.modalOpen, (_state$client4 = state.client) === null || _state$client4 === void 0 ? void 0 : _state$client4.value, state.drawerMask, renderList, loading, franchiseeLoading, params.search, loadMore]);
463
464
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
464
465
  className: "pisell-lowcode__booking-client",
465
466
  onClick: function onClick() {
@@ -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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { EditServiceRef } from "../service/editService";
2
3
  declare const useInfoHolder: (state: any, dispatch: any) => {
3
4
  detailRef: import("react").MutableRefObject<EditServiceRef | undefined>;
@@ -4,6 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import { useMemoizedFn } from "ahooks";
7
8
  import { useEffect, useMemo, useRef } from "react";
8
9
  import useHolderConfig from "./useHolderConfig";
9
10
  import { isOpenAddTime } from "../utils";
@@ -29,21 +30,27 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
29
30
  };
30
31
  }, [state === null || state === void 0 || (_state$bookingConfig2 = state.bookingConfig) === null || _state$bookingConfig2 === void 0 || (_state$bookingConfig2 = _state$bookingConfig2.config) === null || _state$bookingConfig2 === void 0 ? void 0 : _state$bookingConfig2.information_tab]);
31
32
  var showAddTimeModal = useMemo(function () {
32
- return isOpenAddTime(state);
33
+ return isOpenAddTime(state) && !state.isBookingTicket2;
33
34
  }, [state, appointment_card.quick_time]);
34
- var handleEdit = function handleEdit(cacheItem, type) {
35
- setTimeout(function () {
36
- var _detailRef$current, _detailRef$current$in;
37
- (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
38
- }, 100);
39
- };
35
+ var handleEdit = useMemoizedFn(function (cacheItem, type) {
36
+ var _detailRef$current, _detailRef$current$in;
37
+ // console.timeEnd('handleChange');
38
+ console.time('handleEdit');
39
+ console.log(performance.now() - window.pp1, '打开商品4');
40
+ (_detailRef$current = detailRef.current) === null || _detailRef$current === void 0 || (_detailRef$current$in = _detailRef$current.init) === null || _detailRef$current$in === void 0 || _detailRef$current$in.call(_detailRef$current, cacheItem, false, type === 'edit_product');
41
+ // setTimeout(() => {
42
+ // console.log(performance.now() - window.pp1, '打开商品5');
43
+ // console.timeEnd('handleEdit')
44
+ // detailRef.current?.init?.(cacheItem, false, type === 'edit_product');
45
+ // }, );
46
+ });
40
47
  var dispatchService = function dispatchService(type, payload) {
41
48
  dispatch({
42
49
  type: type,
43
50
  payload: _objectSpread({}, payload)
44
51
  });
45
52
  };
46
- var handleAction = function handleAction(dataSource) {
53
+ var handleAction = useMemoizedFn(function (dataSource) {
47
54
  var cacheItem = getProductExtend({
48
55
  cacheItem: _objectSpread(_objectSpread({}, dataSource._origin), {}, {
49
56
  new: 0
@@ -57,7 +64,7 @@ var useInfoHolder = function useInfoHolder(state, dispatch) {
57
64
  cacheItem: cacheItem
58
65
  }
59
66
  });
60
- };
67
+ });
61
68
  return {
62
69
  detailRef: detailRef,
63
70
  handleEdit: handleEdit,
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -14,7 +14,7 @@ import { useMemoizedFn } from 'ahooks';
14
14
  import { getProductExtend } from "../../info2/service/addService/utils";
15
15
  import useAddHolder from "../hooks/useAddHolder";
16
16
  var Lists = function Lists(_ref) {
17
- var _state$service;
17
+ var _state$service2;
18
18
  var onEdit = _ref.onEdit,
19
19
  onChange = _ref.onChange,
20
20
  onAction = _ref.onAction,
@@ -36,6 +36,8 @@ var Lists = function Lists(_ref) {
36
36
  * @Date: 2024-11-29 16:35
37
37
  */
38
38
  var handleChange = useMemoizedFn(function (currentItem, type, other) {
39
+ console.time('handleChange');
40
+ console.log(window.pp1 = performance.now(), '打开商品');
39
41
  if (state.disabledEdit || state.disableEventBookingEdit) {
40
42
  return;
41
43
  }
@@ -59,9 +61,7 @@ var Lists = function Lists(_ref) {
59
61
  editModal: true,
60
62
  cacheItem: cacheItem
61
63
  });
62
- return onEdit === null || onEdit === void 0 ? void 0 : onEdit(_objectSpread(_objectSpread({}, product), {}, {
63
- new: 0
64
- }), type);
64
+ return onEdit === null || onEdit === void 0 ? void 0 : onEdit(cacheItem, type);
65
65
  }
66
66
  var params = {
67
67
  editModal: false,
@@ -95,27 +95,37 @@ var Lists = function Lists(_ref) {
95
95
  isShowEditProduct: !state.isBookingCreatePage
96
96
  };
97
97
  }, [state === null || state === void 0 ? void 0 : state.bookingId, state === null || state === void 0 ? void 0 : state.disabledEdit, isShowChangeHolder, state.isBookingCreatePage]);
98
- return /*#__PURE__*/React.createElement(CartContext.Provider, {
99
- value: {
100
- state: state
101
- }
102
- }, /*#__PURE__*/React.createElement(ShoppingCart, {
103
- isParallelResource: isParallelResource,
104
- onAction: onAction,
105
- onChange: handleChange,
106
- isOpenGroup: false,
107
- isHideClearCart: true,
108
- onAddProduct: function onAddProduct() {
109
- return onChange({
110
- addModal: true
111
- });
112
- }
113
- // onActiveKey={handleActiveKey}
114
- // collapseParams={CollapseParams}
115
- ,
116
- productParams: _objectSpread(_objectSpread({}, productParams), {}, {
117
- products: formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource)
118
- })
119
- }));
98
+ var products = useMemo(function () {
99
+ var _state$service;
100
+ console.time('products');
101
+ var p = formatProducts((state === null || state === void 0 || (_state$service = state.service) === null || _state$service === void 0 ? void 0 : _state$service.value) || [], state, false, true, isParallelResource);
102
+ console.timeEnd('products');
103
+ return p;
104
+ }, [state === null || state === void 0 || (_state$service2 = state.service) === null || _state$service2 === void 0 ? void 0 : _state$service2.value, state]);
105
+ return useMemo(function () {
106
+ console.log('render List');
107
+ return /*#__PURE__*/React.createElement(CartContext.Provider, {
108
+ value: {
109
+ state: state
110
+ }
111
+ }, /*#__PURE__*/React.createElement(ShoppingCart, {
112
+ isParallelResource: isParallelResource,
113
+ onAction: onAction,
114
+ onChange: handleChange,
115
+ isOpenGroup: false,
116
+ isHideClearCart: true,
117
+ onAddProduct: function onAddProduct() {
118
+ return onChange({
119
+ addModal: true
120
+ });
121
+ }
122
+ // onActiveKey={handleActiveKey}
123
+ // collapseParams={CollapseParams}
124
+ ,
125
+ productParams: _objectSpread(_objectSpread({}, productParams), {}, {
126
+ products: products
127
+ })
128
+ }));
129
+ }, [products, state, productParams]);
120
130
  };
121
131
  export default Lists;