@pisell/private-materials 3.3.55 → 3.3.57

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 (123) 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.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 +6 -6
  11. package/es/components/appointmentBooking/assets/resource.svg +1 -0
  12. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -1
  13. package/es/components/appointmentBooking/components/Header/index.d.ts +0 -1
  14. package/es/components/appointmentBooking/components/Resource/index.js +44 -5
  15. package/es/components/appointmentBooking/hooks.js +218 -177
  16. package/es/components/appointmentBooking/locales.d.ts +3 -0
  17. package/es/components/appointmentBooking/locales.js +9 -0
  18. package/es/components/booking/components/TabProduct/productItem/index.js +14 -2
  19. package/es/components/booking/components/drawer/index.js +4 -2
  20. package/es/components/booking/components/footer/index.js +1 -1
  21. package/es/components/booking/components/voucher/index.js +25 -17
  22. package/es/components/booking/info/client/index.js +2 -1
  23. package/es/components/booking/info/pet/index.js +3 -0
  24. package/es/components/booking/info/service2/utils.js +27 -27
  25. package/es/components/booking/info2/index.js +3 -3
  26. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  27. package/es/components/booking/info2/service/addService/utils.js +5 -2
  28. package/es/components/booking/info2/service/editService/index.js +1 -0
  29. package/es/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  30. package/es/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +23 -4
  31. package/es/components/eventBooking/components/progressBar/index.js +16 -0
  32. package/es/components/eventBooking/index.d.ts +0 -1
  33. package/es/components/pay/toC/PaymentList/index.js +10 -4
  34. package/es/components/pay/toC/PaymentList/serve.d.ts +1 -1
  35. package/es/components/pay/toC/PaymentList/serve.js +7 -1
  36. package/es/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +30 -13
  37. package/es/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +30 -13
  38. package/es/components/pay/toC/PaymentMethods/index.js +29 -2
  39. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  40. package/es/components/pay/toC/WalletPassBlock/index.less +4 -0
  41. package/es/components/pay/toC/index.js +38 -30
  42. package/es/components/pay/toC/utils.d.ts +6 -0
  43. package/es/components/pay/toC/utils.js +21 -0
  44. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  45. package/es/components/productExtension/fields/SelectProducts/ProductItem/index.js +18 -6
  46. package/es/components/productSelect/components/TabProduct/index.js +28 -10
  47. package/es/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  48. package/es/components/productSelect/components/TabProduct/tabs/index.js +243 -0
  49. package/es/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  50. package/es/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  51. package/es/components/productSelect/components/pisellPriceText/index.js +43 -0
  52. package/es/components/productSelect/components/productGroup/index.js +20 -7
  53. package/es/components/productSelect/components/productGroup/index.less +14 -1
  54. package/es/components/productSelect/index.less +1 -2
  55. package/es/components/ticketBooking/components/addServiceVariant/addService.js +16 -10
  56. package/es/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  57. package/es/components/ticketBooking/components/ticketBooking/index.js +18 -9
  58. package/es/components/ticketBooking/index.js +2 -1
  59. package/es/components/ticketBooking/locales.d.ts +3 -0
  60. package/es/components/ticketBooking/locales.js +12 -3
  61. package/es/components/ticketBooking/serve.d.ts +5 -0
  62. package/es/components/ticketBooking/serve.js +27 -0
  63. package/es/components/ticketBooking/utils/index.d.ts +5 -1
  64. package/es/components/ticketBooking/utils/index.js +35 -3
  65. package/es/components/wallet/index.js +51 -5
  66. package/lib/components/appointmentBooking/assets/resource.svg +1 -0
  67. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -1
  68. package/lib/components/appointmentBooking/components/Header/index.d.ts +0 -1
  69. package/lib/components/appointmentBooking/components/Resource/index.js +44 -5
  70. package/lib/components/appointmentBooking/hooks.js +12 -3
  71. package/lib/components/appointmentBooking/locales.d.ts +3 -0
  72. package/lib/components/appointmentBooking/locales.js +3 -0
  73. package/lib/components/booking/components/TabProduct/productItem/index.js +8 -1
  74. package/lib/components/booking/components/drawer/index.js +2 -2
  75. package/lib/components/booking/components/footer/index.js +1 -1
  76. package/lib/components/booking/components/voucher/index.js +31 -27
  77. package/lib/components/booking/info/client/index.js +2 -1
  78. package/lib/components/booking/info/pet/index.js +3 -0
  79. package/lib/components/booking/info/service2/utils.js +2 -2
  80. package/lib/components/booking/info2/index.js +7 -4
  81. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  82. package/lib/components/booking/info2/service/addService/utils.js +4 -2
  83. package/lib/components/booking/info2/service/editService/index.js +1 -0
  84. package/lib/components/eventBooking/components/Provider/Header/index.d.ts +0 -1
  85. package/lib/components/eventBooking/components/bookingDetailModal/components/BookingOptions.js +18 -8
  86. package/lib/components/eventBooking/components/progressBar/index.js +15 -0
  87. package/lib/components/eventBooking/index.d.ts +0 -1
  88. package/lib/components/pay/toC/PaymentList/index.js +11 -6
  89. package/lib/components/pay/toC/PaymentList/serve.d.ts +1 -1
  90. package/lib/components/pay/toC/PaymentList/serve.js +5 -2
  91. package/lib/components/pay/toC/PaymentMethods/SuperPayAliPayH5/index.js +10 -1
  92. package/lib/components/pay/toC/PaymentMethods/SuperPayWxPayH5/index.js +10 -1
  93. package/lib/components/pay/toC/PaymentMethods/index.js +28 -4
  94. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +0 -1
  95. package/lib/components/pay/toC/WalletPassBlock/index.less +4 -0
  96. package/lib/components/pay/toC/index.js +20 -13
  97. package/lib/components/pay/toC/utils.d.ts +6 -0
  98. package/lib/components/pay/toC/utils.js +15 -0
  99. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.d.ts +1 -1
  100. package/lib/components/productExtension/fields/SelectProducts/ProductItem/index.js +8 -1
  101. package/lib/components/productSelect/components/TabProduct/index.js +19 -6
  102. package/lib/components/productSelect/components/TabProduct/tabs/index.d.ts +21 -0
  103. package/lib/components/productSelect/components/TabProduct/tabs/index.js +202 -0
  104. package/lib/components/productSelect/components/TabProduct/tabs/index.less +126 -0
  105. package/lib/components/productSelect/components/pisellPriceText/index.d.ts +11 -0
  106. package/lib/components/productSelect/components/pisellPriceText/index.js +72 -0
  107. package/lib/components/productSelect/components/productGroup/index.js +24 -4
  108. package/lib/components/productSelect/components/productGroup/index.less +14 -1
  109. package/lib/components/productSelect/index.less +1 -2
  110. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +25 -14
  111. package/lib/components/ticketBooking/components/addServiceVariant/index.less +10 -0
  112. package/lib/components/ticketBooking/components/ticketBooking/index.js +17 -8
  113. package/lib/components/ticketBooking/index.js +2 -1
  114. package/lib/components/ticketBooking/locales.d.ts +3 -0
  115. package/lib/components/ticketBooking/locales.js +6 -3
  116. package/lib/components/ticketBooking/serve.d.ts +5 -0
  117. package/lib/components/ticketBooking/serve.js +8 -2
  118. package/lib/components/ticketBooking/utils/index.d.ts +5 -1
  119. package/lib/components/ticketBooking/utils/index.js +35 -3
  120. package/lib/components/wallet/index.js +26 -1
  121. package/package.json +4 -4
  122. package/es/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
  123. package/lib/components/booking/info2/service/editService/Resources/index.d.ts +0 -4
@@ -35,7 +35,6 @@ module.exports = __toCommonJS(addService_exports);
35
35
  var import_utils = require("@pisell/utils");
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_ahooks = require("ahooks");
38
- var import_materials = require("@pisell/materials");
39
38
  var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContext"));
40
39
  var import_utils2 = require("../../../booking/utils");
41
40
  var import_utils3 = require("../../../booking/info2/service/addService/utils");
@@ -49,13 +48,14 @@ var import_index = require("./index.less");
49
48
  var import_utils6 = require("../../utils");
50
49
  var import_notAvailable = __toESM(require("../notAvailable"));
51
50
  var AddSerivce = (props) => {
52
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
51
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
53
52
  const { onEdit, state, dispatch, renderMode = "current" } = props;
54
- const [loading, setLoading] = (0, import_react.useState)(false);
53
+ const [loading, setLoading] = (0, import_react.useState)(true);
55
54
  const context = (0, import_useEngineContext.default)();
56
55
  const notAvailableRef = (0, import_react.useRef)(null);
57
56
  const isLoadedServiceRef = (0, import_react.useRef)(false);
58
57
  import_utils2.request.setRequest(context.appHelper.utils.request);
58
+ const Toast = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.Toast;
59
59
  const { createBookingData, createBooking } = (0, import_serviceManager.useService)({
60
60
  renderMode,
61
61
  onEdit,
@@ -63,18 +63,18 @@ var AddSerivce = (props) => {
63
63
  dispatch
64
64
  });
65
65
  const isBooking4 = (0, import_utils5.isBooking4Shop)(
66
- (_e = (_d = (_c = (_b = (_a = context.appHelper.utils.store) == null ? void 0 : _a.getState) == null ? void 0 : _b.call(_a)) == null ? void 0 : _c.global) == null ? void 0 : _d.globalConfig) == null ? void 0 : _e.id,
66
+ (_g = (_f = (_e = (_d = (_c = context.appHelper.utils.store) == null ? void 0 : _c.getState) == null ? void 0 : _d.call(_c)) == null ? void 0 : _e.global) == null ? void 0 : _f.globalConfig) == null ? void 0 : _g.id,
67
67
  state == null ? void 0 : state.renderType
68
68
  );
69
69
  const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
70
70
  const menuList = (0, import_react.useMemo)(() => {
71
71
  var _a2, _b2, _c2;
72
72
  return ((_c2 = (_b2 = (_a2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _a2.config) == null ? void 0 : _b2.menu_list_tab) == null ? void 0 : _c2.menu_list) || [];
73
- }, [(_f = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _f.config]);
73
+ }, [(_h = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _h.config]);
74
74
  const customerId = (0, import_react.useMemo)(() => {
75
75
  var _a2, _b2;
76
76
  return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
77
- }, [(_h = (_g = state.client) == null ? void 0 : _g.value) == null ? void 0 : _h.id]);
77
+ }, [(_j = (_i = state.client) == null ? void 0 : _i.value) == null ? void 0 : _j.id]);
78
78
  const setDefaultService = async (list) => {
79
79
  if (state.renderType !== "eventBooking") {
80
80
  return;
@@ -229,7 +229,7 @@ var AddSerivce = (props) => {
229
229
  setCurrentProduct(null);
230
230
  },
231
231
  callback: async (e, extension_type, detail) => {
232
- var _a2;
232
+ var _a2, _b2;
233
233
  setCurrentProduct(null);
234
234
  if (lock) {
235
235
  return;
@@ -273,16 +273,27 @@ var AddSerivce = (props) => {
273
273
  if (renderMode === "current") {
274
274
  cacheItem.currentDefaultTime = state.date.value.format("HH:mm");
275
275
  }
276
- cacheItem = (0, import_utils3.getProductExtend)({ cacheItem, state });
276
+ cacheItem = (0, import_utils3.getProductExtend)({
277
+ cacheItem,
278
+ state,
279
+ isDisabledTime: true
280
+ });
277
281
  if (state.renderType === "eventBooking") {
278
282
  cacheItem.autoClose = false;
279
283
  }
280
284
  if (cacheItem.autoClose) {
281
285
  cacheItem.autoClose = false;
282
- let _list = (0, import_utils6.addService)(state.service.value, cacheItem);
283
- (0, import_materials.PisellToast)({
284
- content: import_utils.locales.getText("pisell2.ticket-booking.add-to-cart")
285
- });
286
+ let { list: _list, quantity } = (0, import_utils6.addService)(
287
+ state.service.value,
288
+ cacheItem
289
+ );
290
+ (_b2 = Toast == null ? void 0 : Toast.success) == null ? void 0 : _b2.call(
291
+ Toast,
292
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-title" }, cacheItem.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "add-toast-quantity" }, import_utils.locales.getText("pisell2.ticket-booking.in-cart")(
293
+ quantity || 1
294
+ )))
295
+ );
296
+ (0, import_utils6.addServiceScroll)(e.rowKey, cacheItem);
286
297
  dispatch({
287
298
  type: "setService",
288
299
  payload: {
@@ -319,7 +330,7 @@ var AddSerivce = (props) => {
319
330
  }
320
331
  }
321
332
  return _list;
322
- }, [(_i = state.service) == null ? void 0 : _i.services, state == null ? void 0 : state.activeCartId]);
333
+ }, [(_k = state.service) == null ? void 0 : _k.services, state == null ? void 0 : state.activeCartId]);
323
334
  const currentDate = (0, import_react.useMemo)(() => {
324
335
  return state.date.value.format("YYYY-MM-DD");
325
336
  }, [state.date.value]);
@@ -362,7 +373,7 @@ var AddSerivce = (props) => {
362
373
  }
363
374
  return null;
364
375
  }, [
365
- (_k = (_j = state.service) == null ? void 0 : _j.cacheItem) == null ? void 0 : _k.autoClose,
376
+ (_m = (_l = state.service) == null ? void 0 : _l.cacheItem) == null ? void 0 : _m.autoClose,
366
377
  state.service.addModal,
367
378
  import_utils.locales,
368
379
  renderList,
@@ -0,0 +1,10 @@
1
+ .add-toast-wrap {
2
+ width: 190px;
3
+ .add-toast-title {
4
+ margin-bottom: 12px;
5
+ line-height: 22px;
6
+ }
7
+ .add-toast-quantity {
8
+ font-size: 14px;
9
+ }
10
+ }
@@ -57,7 +57,7 @@ var TicketBooking = () => {
57
57
  const _timerRef = (0, import_react.useRef)();
58
58
  const _callbackFnRef = (0, import_react.useRef)();
59
59
  (0, import_react.useEffect)(() => {
60
- var _a2, _b, _c, _d, _e;
60
+ var _a2, _b, _c, _d, _e, _f;
61
61
  _persistentRef.current = storage.get(`drawer-booking`) === "true" ? true : isTerminal();
62
62
  if (lowcodeRef) {
63
63
  lowcodeRef.onReady(void 0);
@@ -95,10 +95,15 @@ var TicketBooking = () => {
95
95
  "booking",
96
96
  "refreshBookingDetail",
97
97
  (type, orderId) => {
98
- console.log(type, orderId, "type, orderId");
99
- if (state.bookingId) {
100
- _getBookingDetail();
101
- }
98
+ _initFn(() => {
99
+ });
100
+ }
101
+ );
102
+ (_f = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _f.mountFunction(
103
+ "booking",
104
+ "voidBooking",
105
+ (orderId) => {
106
+ (0, import_serve.voidAppointment)(orderId);
102
107
  }
103
108
  );
104
109
  return () => {
@@ -277,6 +282,7 @@ var TicketBooking = () => {
277
282
  }
278
283
  }
279
284
  }
285
+ _modalState.service.value = [];
280
286
  _modalState.service.cacheItem = null;
281
287
  _modalState.service.addTimeModal = false;
282
288
  _modalState.service.changeService = false;
@@ -644,8 +650,10 @@ var TicketBooking = () => {
644
650
  }
645
651
  );
646
652
  };
647
- const _callback = (data) => {
648
- console.log("callbackcallback");
653
+ const _callback = (data, type) => {
654
+ if (isTerminal() && type === "checkout") {
655
+ return;
656
+ }
649
657
  setState({
650
658
  createCount: state.createCount + 1
651
659
  });
@@ -761,7 +769,8 @@ var TicketBooking = () => {
761
769
  locale: engineProps.locale,
762
770
  refreshData: _refreshData,
763
771
  setActiveTab: _setActiveTab,
764
- clearAllValue: _clearAllValue
772
+ clearAllValue: _clearAllValue,
773
+ drawerMask: true
765
774
  },
766
775
  setGlobalState: _setModalState,
767
776
  setState,
@@ -36,6 +36,7 @@ var import_react = __toESM(require("react"));
36
36
  var import_miniRedux = require("./miniRedux");
37
37
  var import_utils = require("@pisell/utils");
38
38
  var import_dayjs = __toESM(require("dayjs"));
39
+ var import_lodash = require("lodash");
39
40
  var import_ticketBooking = __toESM(require("./components/ticketBooking/index"));
40
41
  var import_utils2 = require("../../utils");
41
42
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
@@ -186,7 +187,7 @@ var ticketBooking_default = (props) => {
186
187
  import_utils2.request.setRequest(context.appHelper.utils.request);
187
188
  }, []);
188
189
  (0, import_react.useMemo)(() => {
189
- const store = (0, import_miniRedux.createStore)({ ...initialState, bookingConfigParams, productExtensionType });
190
+ const store = (0, import_miniRedux.createStore)({ ...(0, import_lodash.cloneDeep)(initialState), bookingConfigParams, productExtensionType });
190
191
  storeRef.current = store;
191
192
  }, []);
192
193
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-ticket-booking-wrapper" }, /* @__PURE__ */ import_react.default.createElement(import_menuBar.default, null), /* @__PURE__ */ import_react.default.createElement(import_miniRedux.Provider, { store: storeRef.current }, /* @__PURE__ */ import_react.default.createElement(import_ticketBooking.default, null)));
@@ -47,6 +47,7 @@ declare const _default: {
47
47
  "pisell2.ticket-booking.add-to-cart": string;
48
48
  "pisell2.ticket-booking.not-available-title": string;
49
49
  "pisell2.ticket-booking.not-available-ok": string;
50
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
50
51
  };
51
52
  "zh-CN": {
52
53
  "pisell2.ticket-booking.info": string;
@@ -96,6 +97,7 @@ declare const _default: {
96
97
  "pisell2.ticket-booking.add-to-cart": string;
97
98
  "pisell2.ticket-booking.not-available-title": string;
98
99
  "pisell2.ticket-booking.not-available-ok": string;
100
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
99
101
  };
100
102
  "zh-HK": {
101
103
  "pisell2.ticket-booking.info": string;
@@ -145,6 +147,7 @@ declare const _default: {
145
147
  "pisell2.ticket-booking.add-to-cart": string;
146
148
  "pisell2.ticket-booking.not-available-title": string;
147
149
  "pisell2.ticket-booking.not-available-ok": string;
150
+ "pisell2.ticket-booking.in-cart": (number: number) => string;
148
151
  };
149
152
  };
150
153
  export default _default;
@@ -70,7 +70,8 @@ var locales_default = {
70
70
  "pisell2.ticket-booking.create-new": "Create new",
71
71
  "pisell2.ticket-booking.add-to-cart": "Added to Cart",
72
72
  "pisell2.ticket-booking.not-available-title": "Sorry, Not available at current time.",
73
- "pisell2.ticket-booking.not-available-ok": "OK"
73
+ "pisell2.ticket-booking.not-available-ok": "OK",
74
+ "pisell2.ticket-booking.in-cart": (number) => `${number} in cart`
74
75
  },
75
76
  "zh-CN": {
76
77
  "pisell2.ticket-booking.info": "信息",
@@ -119,7 +120,8 @@ var locales_default = {
119
120
  "pisell2.ticket-booking.create-new": "新建",
120
121
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
121
122
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售时间。",
122
- "pisell2.ticket-booking.not-available-ok": "好的"
123
+ "pisell2.ticket-booking.not-available-ok": "好的",
124
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
123
125
  },
124
126
  "zh-HK": {
125
127
  "pisell2.ticket-booking.info": "資訊",
@@ -168,6 +170,7 @@ var locales_default = {
168
170
  "pisell2.ticket-booking.create-new": "新建",
169
171
  "pisell2.ticket-booking.add-to-cart": "已加入购物车",
170
172
  "pisell2.ticket-booking.not-available-title": "抱歉,目前不在可售時間。",
171
- "pisell2.ticket-booking.not-available-ok": "好的"
173
+ "pisell2.ticket-booking.not-available-ok": "好的",
174
+ "pisell2.ticket-booking.in-cart": (number) => `已有${number}件`
172
175
  }
173
176
  };
@@ -280,3 +280,8 @@ export declare const getOrderInfoByCode: (params: any) => Promise<any>;
280
280
  * @Date: 2025-04-24 16:28
281
281
  */
282
282
  export declare const getClientsEs: (params: any) => Promise<any>;
283
+ /**
284
+ * 作废2.0预约订单
285
+ * @param order_id
286
+ */
287
+ export declare const voidAppointment: (order_id: number) => Promise<any>;
@@ -48,7 +48,8 @@ __export(serve_exports, {
48
48
  getServices: () => getServices,
49
49
  removeNoteByOrder: () => removeNoteByOrder,
50
50
  saveAddonsByOrderId: () => saveAddonsByOrderId,
51
- saveBookingFormData: () => saveBookingFormData
51
+ saveBookingFormData: () => saveBookingFormData,
52
+ voidAppointment: () => voidAppointment
52
53
  });
53
54
  module.exports = __toCommonJS(serve_exports);
54
55
  var import_utils = require("./../../utils");
@@ -183,6 +184,10 @@ var getClientsEs = async (params) => {
183
184
  let { data } = await import_utils.request.getRequest().get(prefix + "/customer/es/data", params);
184
185
  return data;
185
186
  };
187
+ var voidAppointment = async (order_id) => {
188
+ let { data } = await import_utils.request.getRequest().put(prefix + `/order/void/appointment/${order_id}`, {});
189
+ return data;
190
+ };
186
191
  // Annotate the CommonJS export names for ESM import in node:
187
192
  0 && (module.exports = {
188
193
  addNotesByOrder,
@@ -214,5 +219,6 @@ var getClientsEs = async (params) => {
214
219
  getServices,
215
220
  removeNoteByOrder,
216
221
  saveAddonsByOrderId,
217
- saveBookingFormData
222
+ saveBookingFormData,
223
+ voidAppointment
218
224
  });
@@ -12,4 +12,8 @@ export declare const restoreProductOtherData: (data: any) => {
12
12
  product_variant_id: number;
13
13
  quantity: number;
14
14
  } | undefined;
15
- export declare const addService: (list: any[], addItem: any) => any[];
15
+ export declare const addService: (list: any[], addItem: any) => {
16
+ list: any[];
17
+ quantity: any;
18
+ };
19
+ export declare const addServiceScroll: (rowKey: string, cacheItem: any) => void;
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var utils_exports = {};
31
31
  __export(utils_exports, {
32
32
  addService: () => addService,
33
+ addServiceScroll: () => addServiceScroll,
33
34
  formatBookingList: () => formatBookingList,
34
35
  formatDateToStr: () => formatDateToStr,
35
36
  getDefaultStartParam: () => getDefaultStartParam,
@@ -128,19 +129,27 @@ var isSameProduct = (a, b) => {
128
129
  };
129
130
  var addService = (list, addItem) => {
130
131
  let value = list;
132
+ let count;
131
133
  if (!(0, import_utils.isNormalProductByDurationSchedule)(addItem)) {
132
134
  value.push(addItem);
135
+ count = addItem._extend.quantity;
133
136
  } else {
134
137
  let isNotSame = true;
135
138
  value = list.map((item) => {
136
- var _a, _b;
139
+ var _a, _b, _c;
137
140
  if (isSameProduct(item, addItem)) {
138
141
  isNotSame = false;
142
+ const quantity = (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1);
143
+ count = quantity;
139
144
  return {
140
145
  ...item,
141
146
  _extend: {
142
147
  ...item._extend,
143
- quantity: (((_a = item == null ? void 0 : item._extend) == null ? void 0 : _a.quantity) || 1) + (((_b = addItem == null ? void 0 : addItem._extend) == null ? void 0 : _b.quantity) || 1)
148
+ quantity,
149
+ other: {
150
+ ...((_c = item._extend) == null ? void 0 : _c.other) || {},
151
+ quantity
152
+ }
144
153
  }
145
154
  };
146
155
  }
@@ -148,13 +157,36 @@ var addService = (list, addItem) => {
148
157
  });
149
158
  if (isNotSame) {
150
159
  value.push(addItem);
160
+ count = addItem._extend.quantity;
151
161
  }
152
162
  }
153
- return value;
163
+ return { list: value, quantity: count };
164
+ };
165
+ var addServiceScroll = (rowKey, cacheItem) => {
166
+ const list = document.querySelectorAll(`#rowKey-${rowKey}`);
167
+ setTimeout(() => {
168
+ if (list.length && (0, import_utils.isNormalProductByDurationSchedule)(cacheItem)) {
169
+ list[list.length - 1].scrollIntoView({
170
+ behavior: "smooth",
171
+ block: "center"
172
+ });
173
+ } else {
174
+ setTimeout(() => {
175
+ const bookingWrap = document.querySelectorAll(`.booking-info-warp`);
176
+ if (bookingWrap.length) {
177
+ bookingWrap[0].scrollTo({
178
+ top: 99999,
179
+ behavior: "smooth"
180
+ });
181
+ }
182
+ }, 100);
183
+ }
184
+ });
154
185
  };
155
186
  // Annotate the CommonJS export names for ESM import in node:
156
187
  0 && (module.exports = {
157
188
  addService,
189
+ addServiceScroll,
158
190
  formatBookingList,
159
191
  formatDateToStr,
160
192
  getDefaultStartParam,
@@ -239,9 +239,21 @@ var Wallet = (0, import_model.Provider)(() => {
239
239
  ]
240
240
  };
241
241
  const menuItem = ({ count = 0, title = "" }) => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-menu-item" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", { className: "pisell-lowcode-wallet-menu-title" }, title), count > 0 && /* @__PURE__ */ import_react.default.createElement(import_materials.Badge, { styleType: "default", count })), /* @__PURE__ */ import_react.default.createElement(import_icons.RightOutlined, null));
242
+ const mergeSearch = (currentSearch, params) => {
243
+ const searchParams = new URLSearchParams(currentSearch);
244
+ Object.entries(params).forEach(([key, value]) => {
245
+ searchParams.set(key, value);
246
+ });
247
+ return searchParams.toString();
248
+ };
242
249
  const MenuProps = {
243
250
  className: "pisell-lowcode-wallet-menu",
244
251
  onClick: (e) => {
252
+ var _a2, _b2;
253
+ (_b2 = (_a2 = context.appHelper.utils) == null ? void 0 : _a2.history) == null ? void 0 : _b2.push({
254
+ hash: location.hash,
255
+ search: mergeSearch(location.search, { type: "list" })
256
+ });
245
257
  dispatch({
246
258
  type: "setState",
247
259
  payload: {
@@ -286,12 +298,22 @@ var Wallet = (0, import_model.Provider)(() => {
286
298
  }
287
299
  ]
288
300
  };
301
+ (0, import_react.useEffect)(() => {
302
+ const searchParams = new URLSearchParams(location.search);
303
+ const type = searchParams.get("type");
304
+ if (type) {
305
+ dispatch({ type: "setState", payload: { setup: type } });
306
+ } else {
307
+ dispatch({ type: "setState", payload: { setup: "menu" } });
308
+ }
309
+ }, [location.search]);
289
310
  const onBack = () => {
290
311
  if (setup === "menu") {
291
312
  history.back();
292
313
  } else {
293
314
  const prevSetup = setup === "detail" ? "list" : "menu";
294
315
  dispatch({ type: "setState", payload: { setup: prevSetup } });
316
+ history.back();
295
317
  }
296
318
  };
297
319
  const openAddModal = () => {
@@ -424,7 +446,10 @@ var Wallet = (0, import_model.Provider)(() => {
424
446
  }
425
447
  return null;
426
448
  };
427
- const renderMobileLayout = () => /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-mobile" }, /* @__PURE__ */ import_react.default.createElement(import_WalletBar.default, { setup, onBack }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-content" }, renderMobileContent()), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-footer" }, renderMobileFooter()));
449
+ const renderMobileLayout = () => {
450
+ var _a2, _b2, _c2;
451
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-mobile" }, !((_c2 = (_b2 = (_a2 = utils == null ? void 0 : utils.interaction) == null ? void 0 : _a2.utils) == null ? void 0 : _b2.isAppEnv) == null ? void 0 : _c2.call(_b2)) && /* @__PURE__ */ import_react.default.createElement(import_WalletBar.default, { setup, onBack }), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-content" }, renderMobileContent()), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-wallet-footer" }, renderMobileFooter()));
452
+ };
428
453
  const renderSearchCard = (item) => {
429
454
  const {
430
455
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.55",
3
+ "version": "3.3.57",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,10 +59,10 @@
59
59
  "react-infinite-scroll-component": "^6.1.0",
60
60
  "rc-virtual-list": "^3.11.3",
61
61
  "decimal.js": "^10.4.3",
62
+ "@pisell/icon": "0.0.11",
62
63
  "@pisell/utils": "1.0.42",
63
- "@pisell/materials": "3.3.18",
64
- "@pisell/date-picker": "3.0.2",
65
- "@pisell/icon": "0.0.11"
64
+ "@pisell/materials": "3.3.22",
65
+ "@pisell/date-picker": "3.0.2"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "react": "^18.0.0",
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
4
- export default _default;