@pisell/private-materials 3.3.33 → 3.3.34

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 (209) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +13 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +6 -6
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +25 -4
  12. package/es/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  14. package/es/components/appointmentBooking/components/Cart/Item/index.js +25 -45
  15. package/es/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  16. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  17. package/es/components/appointmentBooking/components/Content/index.js +36 -53
  18. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  19. package/es/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  20. package/es/components/appointmentBooking/components/Form/index.js +161 -61
  21. package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  22. package/es/components/appointmentBooking/components/Header/index.d.ts +1 -0
  23. package/es/components/appointmentBooking/components/Header/index.js +50 -64
  24. package/es/components/appointmentBooking/components/Resource/index.js +102 -119
  25. package/es/components/appointmentBooking/components/TimeSlicing/index.js +12 -5
  26. package/es/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  27. package/es/components/appointmentBooking/context.js +3 -43
  28. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  29. package/es/components/appointmentBooking/deposit/index.d.ts +0 -1
  30. package/es/components/appointmentBooking/hooks.d.ts +3 -2
  31. package/es/components/appointmentBooking/hooks.js +209 -293
  32. package/es/components/appointmentBooking/index.d.ts +1 -0
  33. package/es/components/appointmentBooking/utils.d.ts +2 -88
  34. package/es/components/appointmentBooking/utils.js +63 -325
  35. package/es/components/booking/addons/model.js +5 -5
  36. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  37. package/es/components/booking/components/TabProduct/tabs/index.js +1 -5
  38. package/es/components/booking/components/browserSelect/index.js +1 -1
  39. package/es/components/booking/components/footer/index.d.ts +1 -0
  40. package/es/components/booking/components/voucher/index.d.ts +0 -1
  41. package/es/components/booking/deposit/index.d.ts +1 -0
  42. package/es/components/booking/forms/model.js +5 -5
  43. package/es/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  44. package/es/components/booking/hooks/useClearCart.d.ts +0 -1
  45. package/es/components/booking/info/dateRange/index.d.ts +0 -1
  46. package/es/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  47. package/es/components/booking/info/index.d.ts +1 -0
  48. package/es/components/booking/info/service/Lists.d.ts +1 -0
  49. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  50. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  51. package/es/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  52. package/es/components/booking/info/service/like/index.js +1 -1
  53. package/es/components/booking/info/service/serviceItem/index.d.ts +0 -1
  54. package/es/components/booking/info/utils.js +1 -1
  55. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  56. package/es/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  57. package/es/components/booking/materiels/startTime/index.js +1 -1
  58. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  59. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  60. package/es/components/booking/notes/model.js +5 -5
  61. package/es/components/booking/payments/model.js +5 -5
  62. package/es/components/eftposPay/amount.d.ts +1 -1
  63. package/es/components/eftposPay/device.d.ts +1 -1
  64. package/es/components/eftposPay/hooks.d.ts +1 -1
  65. package/es/components/eftposPay/store/index.d.ts +3 -3
  66. package/es/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  67. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  68. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  69. package/es/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  70. package/es/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  71. package/es/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  72. package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  73. package/es/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  74. package/es/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  75. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  76. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  77. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  78. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  79. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  80. package/es/components/eventBooking/index.d.ts +1 -0
  81. package/es/components/listComponent/index.js +5 -5
  82. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  83. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  84. package/es/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  85. package/es/components/pisellSelectCustomerModal/index.d.ts +0 -1
  86. package/es/components/productExtension/card/index.js +3 -3
  87. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  88. package/es/components/productExtension/fields/Forms/index.js +12 -12
  89. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  90. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  91. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  92. package/es/components/productExtension/server.js +2 -2
  93. package/es/components/productSelect/components/TabProduct/index.d.ts +0 -1
  94. package/es/components/productSelect/components/productGroup/index.d.ts +0 -1
  95. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  96. package/es/components/schedules/calendar/index.js +4 -4
  97. package/es/components/schedules/calendar/serve.js +2 -2
  98. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  99. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  100. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  101. package/es/components/schedules/components/ResourceList/index.js +1 -1
  102. package/es/components/schedules/components/Search/index.js +5 -5
  103. package/es/components/schedules/model.js +5 -5
  104. package/es/components/schedules/openHours/index.js +1 -1
  105. package/es/components/schedules/openHours/serve.js +2 -2
  106. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  109. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  110. package/es/components/schedules/products/serve.js +2 -2
  111. package/es/components/schedules/products/utils.js +5 -5
  112. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  113. package/es/components/schedules/resources/detail/index.js +10 -10
  114. package/es/components/schedules/resources/list/index.js +2 -2
  115. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  116. package/es/components/schedules/resources/serve.js +2 -2
  117. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  118. package/es/components/schedules/utils.d.ts +1 -1
  119. package/es/components/schedules/utils.js +4 -4
  120. package/es/components/selectModal/index.js +2 -2
  121. package/es/components/shoppingCart/components/Cart/index.d.ts +0 -1
  122. package/es/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  123. package/es/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  124. package/es/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  125. package/es/components/workSpaceList/components/Modal/index.d.ts +0 -1
  126. package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  127. package/es/hooks/useComponents.js +1 -1
  128. package/es/utils/index.d.ts +1 -1
  129. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +5 -0
  130. package/lib/components/appointmentBooking/components/Cart/Item/Total.d.ts +0 -1
  131. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  132. package/lib/components/appointmentBooking/components/Cart/Item/index.js +9 -33
  133. package/lib/components/appointmentBooking/components/Cart/index.d.ts +0 -1
  134. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  135. package/lib/components/appointmentBooking/components/Content/index.js +21 -35
  136. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -1
  137. package/lib/components/appointmentBooking/components/Footer/index.d.ts +0 -1
  138. package/lib/components/appointmentBooking/components/Form/index.js +98 -54
  139. package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +0 -1
  140. package/lib/components/appointmentBooking/components/Header/index.d.ts +1 -0
  141. package/lib/components/appointmentBooking/components/Header/index.js +20 -39
  142. package/lib/components/appointmentBooking/components/Resource/index.js +59 -41
  143. package/lib/components/appointmentBooking/components/TimeSlicing/index.js +7 -1
  144. package/lib/components/appointmentBooking/components/Voucher/index.d.ts +0 -1
  145. package/lib/components/appointmentBooking/context.js +4 -48
  146. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -1
  147. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -1
  148. package/lib/components/appointmentBooking/hooks.d.ts +3 -2
  149. package/lib/components/appointmentBooking/hooks.js +57 -143
  150. package/lib/components/appointmentBooking/index.d.ts +1 -0
  151. package/lib/components/appointmentBooking/utils.d.ts +2 -88
  152. package/lib/components/appointmentBooking/utils.js +51 -191
  153. package/lib/components/booking/components/footer/index.d.ts +1 -0
  154. package/lib/components/booking/components/voucher/index.d.ts +0 -1
  155. package/lib/components/booking/deposit/index.d.ts +1 -0
  156. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +0 -1
  157. package/lib/components/booking/hooks/useClearCart.d.ts +0 -1
  158. package/lib/components/booking/info/dateRange/index.d.ts +0 -1
  159. package/lib/components/booking/info/hooks/useInfoHolder.d.ts +1 -0
  160. package/lib/components/booking/info/index.d.ts +1 -0
  161. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  162. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  163. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  164. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +0 -1
  165. package/lib/components/booking/info/service/serviceItem/index.d.ts +0 -1
  166. package/lib/components/booking/info/utils.js +1 -1
  167. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  168. package/lib/components/booking/info2/service/serviceItem/index.d.ts +0 -1
  169. package/lib/components/eftposPay/amount.d.ts +1 -1
  170. package/lib/components/eftposPay/device.d.ts +1 -1
  171. package/lib/components/eftposPay/hooks.d.ts +1 -1
  172. package/lib/components/eftposPay/store/index.d.ts +3 -3
  173. package/lib/components/eventBooking/components/ErrorTip/index.d.ts +0 -1
  174. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -1
  175. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +0 -1
  176. package/lib/components/eventBooking/components/Provider/EmptyHolderModal/index.d.ts +0 -1
  177. package/lib/components/eventBooking/components/Provider/Footer/index.d.ts +0 -1
  178. package/lib/components/eventBooking/components/Provider/Information/index.d.ts +0 -1
  179. package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +0 -1
  180. package/lib/components/eventBooking/components/Provider/OrderProductModal/index.d.ts +0 -1
  181. package/lib/components/eventBooking/components/Provider/RemoveOptionConfirmModal.d.ts +0 -1
  182. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +0 -1
  183. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +0 -1
  184. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +0 -1
  185. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.d.ts +0 -1
  186. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  187. package/lib/components/eventBooking/index.d.ts +1 -0
  188. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +0 -1
  189. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  190. package/lib/components/pisellSelectCustomerModal/RightPanel/List/index.d.ts +0 -1
  191. package/lib/components/pisellSelectCustomerModal/index.d.ts +0 -1
  192. package/lib/components/productSelect/components/TabProduct/index.d.ts +0 -1
  193. package/lib/components/productSelect/components/productGroup/index.d.ts +0 -1
  194. package/lib/components/schedules/utils.d.ts +1 -1
  195. package/lib/components/schedules/utils.js +1 -1
  196. package/lib/components/shoppingCart/components/Cart/index.d.ts +0 -1
  197. package/lib/components/shoppingCart/hooks/useAddService.d.ts +0 -1
  198. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +0 -1
  199. package/lib/components/ticketBooking/components/timeBar/index.d.ts +0 -1
  200. package/lib/components/workSpaceList/components/Modal/index.d.ts +0 -1
  201. package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +0 -1
  202. package/lib/utils/index.d.ts +1 -1
  203. package/package.json +4 -4
  204. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  205. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +0 -77
  206. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
  207. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +0 -4
  208. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +0 -69
  209. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +0 -131
@@ -20,11 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  var utils_exports = {};
21
21
  __export(utils_exports, {
22
22
  Toast: () => Toast,
23
- checkAndGoNext: () => checkAndGoNext,
24
- checkAndMarkCartRenderError: () => checkAndMarkCartRenderError,
25
23
  checkHasFormStep: () => checkHasFormStep,
26
- currentAppointmentBoard: () => currentAppointmentBoard,
27
- currentRenderLists: () => currentRenderLists,
28
24
  formatCarts: () => formatCarts,
29
25
  formatCartsResources: () => formatCartsResources,
30
26
  formatCurrentUser: () => formatCurrentUser,
@@ -32,19 +28,13 @@ __export(utils_exports, {
32
28
  formatForms: () => formatForms,
33
29
  formatGuest: () => formatGuest,
34
30
  formatHolder: () => formatHolder,
35
- getCartCurrentResourceData: () => getCartCurrentResourceData,
36
- getCurrentBoard: () => getCurrentBoard,
37
31
  getCustomer: () => getCustomer,
38
- getFormInsertBeforeKey: () => getFormInsertBeforeKey,
39
32
  getMeAccount: () => getMeAccount,
40
- getMultiResources: () => getMultiResources,
41
33
  getPunctuationMark: () => getPunctuationMark,
42
- getResourceTitle: () => getResourceTitle,
43
34
  hasResourceFormId: () => hasResourceFormId,
44
35
  openForm: () => openForm,
45
36
  sortResources: () => sortResources,
46
37
  updateBookingFormStorage: () => updateBookingFormStorage,
47
- updateCartResources: () => updateCartResources,
48
38
  updateLists: () => updateLists
49
39
  });
50
40
  module.exports = __toCommonJS(utils_exports);
@@ -286,192 +276,68 @@ var Toast = (text) => {
286
276
  var checkHasFormStep = ({ nextStep, isSkip, checkHolder, checkAccount, carts, setCarts, hasResourceFormId: hasResourceFormId2, currentStep, stepList, appointmentBooking, locales: locales2, isLogin, openLoginModal, isFormSubject, utils, accountLists, getHolders }) => {
287
277
  var _a, _b, _c;
288
278
  let isNext = false;
289
- const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
290
- };
291
- var getCartCurrentResourceData = (cart, currentKey, resources) => {
292
- var _a, _b, _c, _d, _e, _f, _g;
293
- try {
294
- const currentFormId = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
295
- const form_id = Number((currentFormId == null ? void 0 : currentFormId[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
296
- if (!form_id || !resources.length) return;
297
- const cartId = cart._id;
298
- const cartOriginResources = ((_f = cart._origin) == null ? void 0 : _f.resources) || [];
299
- const resourceData = resources.find((r) => String(r._id) === String(cartId));
300
- if (!resourceData) return;
301
- let resourceItem = (resourceData.resources || []).find((r) => Number(r.id) === form_id);
302
- if (!resourceItem) return;
303
- resourceItem = {
304
- ...resourceItem,
305
- renderList: ((_g = resourceItem == null ? void 0 : resourceItem.renderList) == null ? void 0 : _g.map((r) => {
306
- return {
307
- ...r,
308
- label: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id)
309
- };
310
- })) || []
311
- };
312
- const cartResource = cartOriginResources.find((r) => Number(r.form_id) === form_id);
313
- const renderId = (cartResource == null ? void 0 : cartResource.id) || 0;
314
- const renderItem = ((resourceItem == null ? void 0 : resourceItem.renderList) || []).find((r) => Number(r == null ? void 0 : r.id) === Number(renderId));
315
- return {
316
- cartItem: cart,
317
- resourceItem: {
318
- ...resourceItem,
319
- originRenderLists: resourceData.resources
320
- },
321
- renderItem
322
- };
323
- } catch (error) {
324
- return cart;
325
- }
326
- };
327
- var getMultiResources = (cart, resourceItem, currentKey) => {
328
- var _a;
329
- if (!resourceItem || !cart) return [];
330
- const isCurrentResourceStep = currentKey.startsWith("select-resource");
331
- let resources = ((_a = cart == null ? void 0 : cart._origin) == null ? void 0 : _a.resources) || [];
332
- let selectedResources = isCurrentResourceStep ? resources.filter((r) => (r == null ? void 0 : r.form_id) !== (resourceItem == null ? void 0 : resourceItem.form_id)) : resources;
333
- selectedResources = selectedResources.map((r) => {
334
- return {
335
- ...r,
336
- name: (r == null ? void 0 : r.main_field) || (r == null ? void 0 : r.id),
337
- isShowChangeResource: false,
338
- is_hide_like: true
339
- };
340
- });
341
- let currentResources = resources.find((r) => (r == null ? void 0 : r.form_id) === (resourceItem == null ? void 0 : resourceItem.form_id));
342
- let currentResource = isCurrentResourceStep ? {
343
- allowClearResource: true,
344
- lists: (resourceItem == null ? void 0 : resourceItem.renderList) || [],
345
- is_hide_like: true,
346
- id: currentResources == null ? void 0 : currentResources.id
347
- } : {};
348
- return [...selectedResources, currentResource];
349
- };
350
- var getCurrentBoard = (appointmentBooking, code) => {
351
- var _a;
352
- const { appointmentBoard } = (appointmentBooking == null ? void 0 : appointmentBooking.otherParams) || {};
353
- const resourceConfig = (_a = appointmentBoard == null ? void 0 : appointmentBoard.resource_tab) == null ? void 0 : _a[code];
354
- return resourceConfig;
355
- };
356
- var getResourceTitle = (appointmentBooking, code, utils, originResource) => {
357
- const resourceConfig = getCurrentBoard(appointmentBooking, code);
358
- let name = "";
359
- if (resourceConfig == null ? void 0 : resourceConfig.resource_type_title) {
360
- name = utils.translation(resourceConfig == null ? void 0 : resourceConfig.resource_type_title);
279
+ if (hasResourceFormId2) {
280
+ const index = (currentStep == null ? void 0 : currentStep.index) + 1;
281
+ const description = locales2.getText("pisell2.appointment.fill-form");
282
+ const isExist = stepList == null ? void 0 : stepList.some((item) => (item == null ? void 0 : item.key) === "select-time");
283
+ appointmentBooking.addStep({ index, key: "fill-form", description }, isExist ? "select-time" : void 0);
361
284
  } else {
362
- name = (originResource == null ? void 0 : originResource.title) || "";
285
+ appointmentBooking.removeStep("fill-form");
363
286
  }
364
- return name;
365
- };
366
- var checkAndMarkCartRenderError = (carts, appointmentBooking, utils) => {
367
- let hasError = false;
368
- const updatedCartList = carts == null ? void 0 : carts.map((cart) => {
369
- const currentResource = cart == null ? void 0 : cart.currentSelectedResource;
370
- if (!(currentResource == null ? void 0 : currentResource.renderItem)) {
371
- hasError = true;
372
- const resourceItem = (currentResource == null ? void 0 : currentResource.resourceItem) || {};
373
- const name = getResourceTitle(appointmentBooking, resourceItem == null ? void 0 : resourceItem.code, utils, resourceItem);
374
- return {
375
- ...cart,
376
- isErrorResource: true,
377
- resourceErrorText: name
378
- };
379
- }
380
- return cart;
381
- });
382
- return {
383
- hasError,
384
- updatedCartList
385
- };
386
- };
387
- var getFormInsertBeforeKey = (currentKey, stepList) => {
388
- const isFirstResource = currentKey === "select-resource";
389
- const timeStep = stepList.find((item) => item.key.startsWith("select-time"));
390
- if (isFirstResource && timeStep) {
391
- return timeStep.key;
392
- } else {
393
- return currentKey;
394
- }
395
- };
396
- var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
397
- let hasError = false;
398
- let updatedCartList = [...carts];
399
- if (isFormSubject && !checkAccount("holder")) {
400
- updatedCartList = carts == null ? void 0 : carts.map((item) => {
401
- if (!(item == null ? void 0 : item.holder_id)) {
402
- hasError = true;
403
- return {
404
- ...item,
405
- isErrorHolder: true
406
- };
287
+ const stepLists = (_c = (_b = (_a = appointmentBooking == null ? void 0 : appointmentBooking.store) == null ? void 0 : _a.step) == null ? void 0 : _b.store) == null ? void 0 : _c.stepList;
288
+ if ((currentStep == null ? void 0 : currentStep.index) + 2 === (stepLists == null ? void 0 : stepLists.length)) {
289
+ const _checkHolder = () => {
290
+ const result = checkHolder({
291
+ isFormSubject,
292
+ checkAccount,
293
+ carts
294
+ });
295
+ if (result) {
296
+ setCarts(result);
407
297
  }
408
- return item;
409
- });
410
- }
411
- return {
412
- hasError,
413
- updatedCartList
414
- };
415
- };
416
- var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
417
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
418
- try {
419
- const currentStepKey = (_b = (_a = currentKey == null ? void 0 : currentKey.split("_@")) == null ? void 0 : _a[1]) == null ? void 0 : _b.split("-");
420
- const form_id = Number((currentStepKey == null ? void 0 : currentStepKey[0]) || ((_e = (_d = (_c = resources == null ? void 0 : resources[0]) == null ? void 0 : _c.resources) == null ? void 0 : _d[0]) == null ? void 0 : _e.id));
421
- const form_code = (currentStepKey == null ? void 0 : currentStepKey[1]) || ((_h = (_g = (_f = resources == null ? void 0 : resources[0]) == null ? void 0 : _f.resources) == null ? void 0 : _g[0]) == null ? void 0 : _h.code);
422
- const cart_id = currentStepKey == null ? void 0 : currentStepKey[2];
423
- const resource_form_id = currentStepKey == null ? void 0 : currentStepKey[3];
424
- const policy_id = currentStepKey == null ? void 0 : currentStepKey[4];
425
- const resource_tab = (_j = (_i = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _i.appointmentBoard) == null ? void 0 : _j.resource_tab;
426
- const config = resource_tab == null ? void 0 : resource_tab[form_code];
427
- const isRequired = (config == null ? void 0 : config.customer_resource) === "customer_resource_required";
428
- const isSystem = (config == null ? void 0 : config.customer_resource) === "customer_resource_system";
429
- const isSkip = (config == null ? void 0 : config.hasOwnProperty("resource_skip_select")) ? !!(config == null ? void 0 : config.resource_skip_select) : true;
430
- return {
431
- isRequired,
432
- isSystem,
433
- isSkip,
434
- form_id,
435
- form_code,
436
- cart_id,
437
- resource_form_id,
438
- policy_id
298
+ if (!!result) return true;
439
299
  };
440
- } catch (error) {
441
- return {};
442
- }
443
- };
444
- var currentRenderLists = (resources, code) => {
445
- var _a;
446
- if (!(resources == null ? void 0 : resources.length) || !code) return [];
447
- const _resources = ((_a = resources == null ? void 0 : resources[0]) == null ? void 0 : _a.resources) || [];
448
- const currentResource = _resources == null ? void 0 : _resources.find((item) => item.code === code);
449
- return (currentResource == null ? void 0 : currentResource.renderList) || [];
450
- };
451
- var updateCartResources = (item, value) => {
452
- var _a;
453
- let newResource = [];
454
- let resources = ((_a = item == null ? void 0 : item._origin) == null ? void 0 : _a.resources) || [];
455
- const currentResourceIndex = resources.findIndex(
456
- (item2) => item2.form_id === value.form_id
457
- );
458
- if (currentResourceIndex > -1) {
459
- newResource = resources.map(
460
- (item2) => item2.form_id === value.form_id ? value : item2
461
- );
300
+ if (!isLogin) {
301
+ utils.action({
302
+ type: "pisell1.login",
303
+ data: {
304
+ type: "plugin"
305
+ },
306
+ callback: (status) => {
307
+ var _a2;
308
+ if (status === "success") {
309
+ if (!isFormSubject) {
310
+ const user = JSON.parse(((_a2 = utils == null ? void 0 : utils.storage) == null ? void 0 : _a2.get("customer")) || "{}");
311
+ const currentUser = formatCustomer(user);
312
+ const meAccount = accountLists == null ? void 0 : accountLists.find((d) => !(d == null ? void 0 : d.isGuest));
313
+ appointmentBooking.setLoginAccount(meAccount == null ? void 0 : meAccount.id, currentUser);
314
+ } else {
315
+ getHolders();
316
+ }
317
+ if (isSkip) {
318
+ isNext = true;
319
+ }
320
+ }
321
+ }
322
+ });
323
+ } else {
324
+ isNext = true;
325
+ }
326
+ if (isNext && !_checkHolder()) {
327
+ nextStep();
328
+ } else {
329
+ return true;
330
+ }
462
331
  } else {
463
- newResource = [...resources, value];
332
+ if (isSkip) {
333
+ nextStep();
334
+ }
464
335
  }
465
- return newResource || [];
466
336
  };
467
337
  // Annotate the CommonJS export names for ESM import in node:
468
338
  0 && (module.exports = {
469
339
  Toast,
470
- checkAndGoNext,
471
- checkAndMarkCartRenderError,
472
340
  checkHasFormStep,
473
- currentAppointmentBoard,
474
- currentRenderLists,
475
341
  formatCarts,
476
342
  formatCartsResources,
477
343
  formatCurrentUser,
@@ -479,18 +345,12 @@ var updateCartResources = (item, value) => {
479
345
  formatForms,
480
346
  formatGuest,
481
347
  formatHolder,
482
- getCartCurrentResourceData,
483
- getCurrentBoard,
484
348
  getCustomer,
485
- getFormInsertBeforeKey,
486
349
  getMeAccount,
487
- getMultiResources,
488
350
  getPunctuationMark,
489
- getResourceTitle,
490
351
  hasResourceFormId,
491
352
  openForm,
492
353
  sortResources,
493
354
  updateBookingFormStorage,
494
- updateCartResources,
495
355
  updateLists
496
356
  });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  /**
3
4
  * @title: 底部
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const VoucherCard: (props: any) => JSX.Element | null;
4
3
  export default VoucherCard;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Deposit: (props: any) => JSX.Element;
2
3
  export default Deposit;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SendModalValues } from './index';
3
2
  declare const useSendModal: (bookingId?: number) => {
4
3
  open: boolean;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useClearCart: (state: any, dispatch: any) => false | JSX.Element;
3
2
  export default useClearCart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
4
3
  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>;
@@ -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,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
4
  interface AddServiceProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const BookingList: ({ items }: {
3
2
  items: any[];
4
3
  }) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, resourceItem, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -104,7 +104,7 @@ var isBooking4Shop = (shopId, renderType) => {
104
104
  if (renderType === "eventBooking") {
105
105
  return false;
106
106
  }
107
- const booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285];
107
+ const booking4Shops = [8390, 1350, 1401, 3013, 7154, 7572, 7007, 8119, 7320, 7362, 6497, 6087, 6303, 6726, 8191, 6812, 6813, 6814, 7651, 8586, 8581, 9, 2155, 8030, 1749, 8194, 2327, 6813, 8609, 8610, 8782, 1285, 6124];
108
108
  return booking4Shops.includes(shopId);
109
109
  };
110
110
  function generateDateRange(start, end) {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import '../../../info/service/addService/index.less';
3
4
  interface AddServiceProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ServiceItem: ({ d, handleEditService, state, handleLike, errorMessage, handleDeleteService, }: any) => JSX.Element;
4
3
  export default ServiceItem;
@@ -9,7 +9,7 @@ import { PosProps } from './const';
9
9
  */
10
10
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
11
11
  className?: string | undefined;
12
- onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
12
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
13
13
  [keys: string]: unknown;
14
14
  } | undefined, other?: any) => void) | undefined;
15
15
  onClose: () => void;
@@ -11,7 +11,7 @@ import './device.less';
11
11
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
12
12
  api: PayProps['api'];
13
13
  className?: string | undefined;
14
- onChange?: ((status: "success" | "print" | "page" | "fail" | "mark_tx_processed", params?: string | {
14
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
15
15
  [keys: string]: unknown;
16
16
  } | undefined, other?: any) => void) | undefined;
17
17
  onClose: () => void;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -295,15 +295,15 @@ export declare const backUpFree: (payload: Partial<State>) => {
295
295
  name?: string | undefined;
296
296
  symbol?: string | undefined;
297
297
  amount?: string | number | undefined;
298
- mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
298
+ mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
300
+ eftpos?: "payo" | "tyro" | "windcave" | "stripe" | undefined;
301
301
  action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
305
305
  subTitle?: string | undefined;
306
- type?: "unset" | "step" | undefined;
306
+ type?: "step" | "unset" | undefined;
307
307
  render?: boolean | undefined;
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const ErrorTip: ({ text }: any) => JSX.Element;
4
3
  export default ErrorTip;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Total: ({ className, isFooter }: any) => JSX.Element;
4
3
  export default Total;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
4
3
  export default Cart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const EmptyHolderModal: (props: any) => JSX.Element;
4
3
  export default EmptyHolderModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: () => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Information: () => JSX.Element;
4
3
  export default Information;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const InformationOptionsModal: (props: any) => JSX.Element;
4
3
  export default InformationOptionsModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const OrderProductModal: (props: any) => JSX.Element;
4
3
  export default OrderProductModal;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const RemoveOptionConfirmModal: (props: any) => JSX.Element;
3
2
  export default RemoveOptionConfirmModal;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type CallToBookProps = {
3
2
  show: boolean;
4
3
  type: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const WeekItem: (props: any) => JSX.Element;
4
3
  export default WeekItem;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare type CalenDateWeekProps = {
4
3
  currentDate: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const BookingOptions: () => JSX.Element;
3
2
  export default BookingOptions;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Schedule: () => JSX.Element;
2
3
  export default Schedule;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const EventBooking: () => JSX.Element;
3
4
  export default EventBooking;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const SetupForm: ({ onReady, amount, order_id, payment_method, scene, }: any) => JSX.Element;
4
3
  export default SetupForm;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { WalletPassDataType } from '../../../PaymentMethods/WalletPass/serve';
3
2
  import './index.less';
4
3
  interface WalletUseListProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface CustomerListProps {
4
3
  value: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { PopoverProps } from 'antd';
3
2
  import { CustomerCardProps } from './CustomerCard';
4
3
  import './index.less';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const TabProduct: (props: any) => JSX.Element;
3
2
  export default TabProduct;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  export interface ProductCardConfig {
4
3
  showImg: boolean;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
- request = {};
31
30
  constructor() {
31
+ this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Cart: () => JSX.Element;
4
3
  export default Cart;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useAddService: (id?: number, type?: string) => JSX.Element | null;
3
2
  export default useAddService;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const useClearCart: (key?: number | undefined) => JSX.Element | null;
3
2
  export default useClearCart;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { Dayjs } from 'dayjs';
3
2
  import './index.less';
4
3
  interface ITimeBarProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Modal as AntModal, ModalFuncProps as AntModalFuncProps, ModalProps as AntModalProps } from 'antd';
3
2
  import './index.less';
4
3
  interface ModalProps extends AntModalProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './../../index.less';
3
2
  declare const Search: () => JSX.Element;
4
3
  export default Search;