@pisell/private-materials 6.6.48 → 6.6.49

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 (115) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +1 -1
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +1 -1
  9. package/es/components/appointmentBooking/components/Voucher/index.js +7 -22
  10. package/es/components/booking/addons/index.js +2 -3
  11. package/es/components/booking/addons/model.d.ts +10 -1
  12. package/es/components/booking/components/footer/amount.js +1 -1
  13. package/es/components/booking/components/footer/index.js +0 -7
  14. package/es/components/booking/components/footer/utils.d.ts +1 -1
  15. package/es/components/booking/components/footer/utils.js +5 -7
  16. package/es/components/booking/components/voucher/index.js +0 -6
  17. package/es/components/booking/components/voucher/index.less +1 -4
  18. package/es/components/booking/components/voucherModal/index.less +0 -1
  19. package/es/components/booking/forms/model.d.ts +10 -1
  20. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  21. package/es/components/booking/hooks/useClearCart.d.ts +1 -1
  22. package/es/components/booking/hooks/useClearCart.js +39 -9
  23. package/es/components/booking/info/model.d.ts +10 -1
  24. package/es/components/booking/info/service/index.less +4 -2
  25. package/es/components/booking/info2/cartClientCard/index.js +82 -2
  26. package/es/components/booking/info2/serve.d.ts +8 -0
  27. package/es/components/booking/info2/serve.js +52 -0
  28. package/es/components/booking/info2/service/editService/index.js +3 -9
  29. package/es/components/booking/info2/service/index.js +4 -5
  30. package/es/components/booking/locales.d.ts +20 -0
  31. package/es/components/booking/locales.js +20 -0
  32. package/es/components/booking/model.d.ts +9 -1
  33. package/es/components/booking/notes/model.d.ts +10 -1
  34. package/es/components/booking/payments/model.d.ts +10 -1
  35. package/es/components/checkout/components/WalletPassModule/index.js +0 -1
  36. package/es/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  37. package/es/components/checkout/components/WalletPassModule/utils.js +3 -17
  38. package/es/components/checkout/hooks/useWalletPass.d.ts +1 -1
  39. package/es/components/checkout/hooks/useWalletPass.js +192 -316
  40. package/es/components/eftposPay/hooks.d.ts +1 -1
  41. package/es/components/eftposPay/store/index.d.ts +2 -2
  42. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  43. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +145 -166
  44. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  45. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +3 -3
  46. package/es/components/pay/toC/WalletPassBlock/index.js +1 -3
  47. package/es/components/pay/toC/index.js +27 -66
  48. package/es/components/pay/toC/model.d.ts +9 -2
  49. package/es/components/pay/toC/serve.d.ts +0 -18
  50. package/es/components/pay/toC/serve.js +1 -29
  51. package/es/components/pay/toC/utils.d.ts +2 -2
  52. package/es/components/pay/toC/utils.js +0 -4
  53. package/es/components/schedules/model.d.ts +9 -1
  54. package/es/components/shoppingCart/components/Cart/index.less +1 -0
  55. package/es/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  56. package/es/components/shoppingCart/hooks/useClearCart.js +41 -11
  57. package/es/components/ticketBooking/components/addServiceVariant/addService.js +4 -7
  58. package/es/components/ticketBooking/index.js +5 -2
  59. package/es/plus/clinetSearch/index.d.ts +1 -0
  60. package/es/plus/clinetSearch/index.js +9 -3
  61. package/es/plus/clinetSearch/index.less +13 -0
  62. package/lib/components/appointmentBooking/components/Voucher/index.js +2 -10
  63. package/lib/components/booking/addons/index.js +2 -3
  64. package/lib/components/booking/addons/model.d.ts +10 -1
  65. package/lib/components/booking/components/footer/amount.js +1 -1
  66. package/lib/components/booking/components/footer/index.js +0 -9
  67. package/lib/components/booking/components/footer/utils.d.ts +1 -1
  68. package/lib/components/booking/components/footer/utils.js +3 -5
  69. package/lib/components/booking/components/voucher/index.js +0 -6
  70. package/lib/components/booking/components/voucher/index.less +1 -4
  71. package/lib/components/booking/components/voucherModal/index.less +0 -1
  72. package/lib/components/booking/forms/model.d.ts +10 -1
  73. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  74. package/lib/components/booking/hooks/useClearCart.d.ts +1 -1
  75. package/lib/components/booking/hooks/useClearCart.js +28 -6
  76. package/lib/components/booking/info/model.d.ts +10 -1
  77. package/lib/components/booking/info/service/index.less +4 -2
  78. package/lib/components/booking/info2/cartClientCard/index.js +46 -2
  79. package/lib/components/booking/info2/serve.d.ts +8 -0
  80. package/lib/components/booking/info2/serve.js +12 -0
  81. package/lib/components/booking/info2/service/editService/index.js +19 -25
  82. package/lib/components/booking/info2/service/index.js +4 -2
  83. package/lib/components/booking/locales.d.ts +20 -0
  84. package/lib/components/booking/locales.js +20 -0
  85. package/lib/components/booking/model.d.ts +9 -1
  86. package/lib/components/booking/notes/model.d.ts +10 -1
  87. package/lib/components/booking/payments/model.d.ts +10 -1
  88. package/lib/components/checkout/components/WalletPassModule/index.js +0 -1
  89. package/lib/components/checkout/components/WalletPassModule/utils.d.ts +0 -1
  90. package/lib/components/checkout/components/WalletPassModule/utils.js +2 -18
  91. package/lib/components/checkout/hooks/useWalletPass.d.ts +1 -1
  92. package/lib/components/checkout/hooks/useWalletPass.js +108 -157
  93. package/lib/components/eftposPay/hooks.d.ts +1 -1
  94. package/lib/components/eftposPay/store/index.d.ts +2 -2
  95. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +0 -5
  96. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +103 -90
  97. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +0 -6
  98. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -2
  99. package/lib/components/pay/toC/WalletPassBlock/index.js +1 -3
  100. package/lib/components/pay/toC/index.js +11 -52
  101. package/lib/components/pay/toC/model.d.ts +9 -2
  102. package/lib/components/pay/toC/serve.d.ts +0 -18
  103. package/lib/components/pay/toC/serve.js +0 -6
  104. package/lib/components/pay/toC/utils.d.ts +2 -2
  105. package/lib/components/pay/toC/utils.js +0 -4
  106. package/lib/components/schedules/model.d.ts +9 -1
  107. package/lib/components/shoppingCart/components/Cart/index.less +1 -0
  108. package/lib/components/shoppingCart/hooks/useClearCart.d.ts +1 -1
  109. package/lib/components/shoppingCart/hooks/useClearCart.js +42 -11
  110. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +7 -11
  111. package/lib/components/ticketBooking/index.js +4 -2
  112. package/lib/plus/clinetSearch/index.d.ts +1 -0
  113. package/lib/plus/clinetSearch/index.js +10 -0
  114. package/lib/plus/clinetSearch/index.less +13 -0
  115. package/package.json +3 -3
@@ -66,7 +66,7 @@ var productListSetting = {
66
66
  isStock: 0
67
67
  };
68
68
  var AddSerivce = (props) => {
69
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
69
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
70
70
  const {
71
71
  onEdit,
72
72
  state,
@@ -75,9 +75,6 @@ var AddSerivce = (props) => {
75
75
  productDisplayConfig
76
76
  } = props;
77
77
  const context = (0, import_useEngineContext.default)();
78
- const {
79
- getData
80
- } = (_a = context.appHelper) == null ? void 0 : _a.utils;
81
78
  const notAvailableRef = (0, import_react.useRef)(null);
82
79
  import_utils2.request.setRequest(context.appHelper.utils.request);
83
80
  const isActive = (0, import_IsActiveContext.useIsActive)();
@@ -89,9 +86,9 @@ var AddSerivce = (props) => {
89
86
  dispatch
90
87
  });
91
88
  const isBooking4 = (0, import_utils5.isBooking4Shop)(
92
- ((_d = (_c = (_b = context.appHelper) == null ? void 0 : _b.utils) == null ? void 0 : _c.getData) == null ? void 0 : _d.call(_c, "shop_id")) || ((_i = (_h = (_g = (_f = (_e = context.appHelper.utils.store) == null ? void 0 : _e.getState) == null ? void 0 : _f.call(_e)) == null ? void 0 : _g.global) == null ? void 0 : _h.globalConfig) == null ? void 0 : _i.id),
89
+ ((_c = (_b = (_a = context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getData) == null ? void 0 : _c.call(_b, "shop_id")) || ((_h = (_g = (_f = (_e = (_d = context.appHelper.utils.store) == null ? void 0 : _d.getState) == null ? void 0 : _e.call(_d)) == null ? void 0 : _f.global) == null ? void 0 : _g.globalConfig) == null ? void 0 : _h.id),
93
90
  state == null ? void 0 : state.renderType,
94
- (_j = context.appHelper.utils) == null ? void 0 : _j.businessUtils
91
+ (_i = context.appHelper.utils) == null ? void 0 : _i.businessUtils
95
92
  );
96
93
  const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
97
94
  const [firstLoading, setFirstLoading] = (0, import_react.useState)(true);
@@ -136,11 +133,11 @@ var AddSerivce = (props) => {
136
133
  const menuList = (0, import_react.useMemo)(() => {
137
134
  var _a2, _b2, _c2;
138
135
  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) || [];
139
- }, [(_k = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _k.config]);
136
+ }, [(_j = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _j.config]);
140
137
  const customerId = (0, import_react.useMemo)(() => {
141
138
  var _a2, _b2;
142
139
  return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
143
- }, [(_m = (_l = state.client) == null ? void 0 : _l.value) == null ? void 0 : _m.id]);
140
+ }, [(_l = (_k = state.client) == null ? void 0 : _k.value) == null ? void 0 : _l.id]);
144
141
  const scanAddService = (0, import_ahooks.useMemoizedFn)((list, code) => {
145
142
  let newService = [...state.service.value];
146
143
  list.forEach((item) => {
@@ -205,7 +202,7 @@ var AddSerivce = (props) => {
205
202
  }
206
203
  );
207
204
  const processAddService = (0, import_ahooks.useMemoizedFn)(async (item, _detail, e, notShowToast, startDate, endDate) => {
208
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m2, _n, _o, _p, _q, _r, _s, _t;
205
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2, _j2, _k2, _l2, _m, _n, _o, _p, _q, _r, _s, _t;
209
206
  const other = JSON.parse(JSON.stringify(e));
210
207
  other.session = e.session;
211
208
  let cacheItem = {
@@ -213,7 +210,6 @@ var AddSerivce = (props) => {
213
210
  product_id: item.id,
214
211
  _id: (0, import_utils.getUniqueId)(),
215
212
  _key: e.key,
216
- is_price_include_tax: getData("is_price_include_tax"),
217
213
  _extend: {
218
214
  start_date: startDate,
219
215
  quantity: (e == null ? void 0 : e.quantity) || 1,
@@ -259,7 +255,7 @@ var AddSerivce = (props) => {
259
255
  if (res && res.length > 0) {
260
256
  cacheItem._extend.holder_id = res;
261
257
  } else {
262
- if (((_n = (_m2 = (_l2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _l2.config) == null ? void 0 : _m2.basic) == null ? void 0 : _n.subject_require) === "require") {
258
+ if (((_n = (_m = (_l2 = state == null ? void 0 : state.bookingConfig) == null ? void 0 : _l2.config) == null ? void 0 : _m.basic) == null ? void 0 : _n.subject_require) === "require") {
263
259
  return;
264
260
  }
265
261
  }
@@ -233,7 +233,7 @@ var ticketBooking_default = (props) => {
233
233
  }, [isShowMenuBar, activeNavKey, propsProductDisplayConfig]);
234
234
  const storeRef = (0, import_react.useRef)(null);
235
235
  const context = (0, import_useEngineContext.default)();
236
- const { pisellos, pisellosAllModule } = (_a = context.appHelper) == null ? void 0 : _a.utils;
236
+ const { pisellos, pisellosAllModule, businessUtils } = (_a = context.appHelper) == null ? void 0 : _a.utils;
237
237
  const { BookingTicket, ShopDiscountImpl } = pisellosAllModule || {};
238
238
  import_utils.locales.init(
239
239
  import_locales.default,
@@ -251,12 +251,14 @@ var ticketBooking_default = (props) => {
251
251
  storeRef.current = store;
252
252
  }, [bookingConfigParams, productExtensionType]);
253
253
  (0, import_react.useMemo)(() => {
254
+ var _a2;
254
255
  if (BookingTicket) {
255
256
  pisellos == null ? void 0 : pisellos.registerModule(new BookingTicket((0, import_utils3.getBookingTicketKey)(osKey)), {
256
257
  initialState: {},
257
258
  otherParams: {
258
259
  cacheId: (0, import_utils3.getBookingTicketKey)(osKey),
259
- platform: "shop"
260
+ platform: "shop",
261
+ isFranchisee: (_a2 = businessUtils == null ? void 0 : businessUtils.getAppByModal) == null ? void 0 : _a2.call(businessUtils, "franchisee")
260
262
  }
261
263
  });
262
264
  }
@@ -10,6 +10,7 @@ interface ClientSearchProps extends Omit<ComprehensiveSearchProps, 'resultDispla
10
10
  hasMore?: boolean;
11
11
  onLoadMore?: () => void;
12
12
  state?: any;
13
+ resultLoading?: boolean;
13
14
  }
14
15
  export declare type ClientSearchRef = {
15
16
  resetScrollPosition: () => void;
@@ -52,6 +52,7 @@ var ClientSearch = (0, import_react.forwardRef)(
52
52
  hasMore,
53
53
  onLoadMore,
54
54
  state,
55
+ resultLoading,
55
56
  ...props
56
57
  }, ref) => {
57
58
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -85,12 +86,21 @@ var ClientSearch = (0, import_react.forwardRef)(
85
86
  ref: scrollContainerRef,
86
87
  id: "client-search_infinite-scroll",
87
88
  style: {
89
+ position: "relative",
88
90
  height: "calc(100% - 40px)",
89
91
  overflowY: "auto",
90
92
  overflowX: "hidden",
91
93
  display: "flex"
92
94
  }
93
95
  },
96
+ resultLoading && /* @__PURE__ */ import_react.default.createElement(
97
+ import_antd.Spin,
98
+ {
99
+ spinning: resultLoading || false,
100
+ className: "pisell-client-search-result-loading",
101
+ size: "large"
102
+ }
103
+ ),
94
104
  /* @__PURE__ */ import_react.default.createElement(
95
105
  import_InfiniteScroll.default,
96
106
  {
@@ -93,3 +93,16 @@
93
93
  }
94
94
  }
95
95
  }
96
+
97
+ .pisell-client-search-result-loading {
98
+ position: absolute;
99
+ top: 0;
100
+ left: 0;
101
+ right: 0;
102
+ bottom: 0;
103
+ display: flex;
104
+ justify-content: center;
105
+ align-items: center;
106
+ background-color: rgba(255, 255, 255, 0.8);
107
+ z-index: 10;
108
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "6.6.48",
3
+ "version": "6.6.49",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -61,10 +61,10 @@
61
61
  "styled-components": "^6.0.0-rc.3",
62
62
  "@react-spring/web": "^9.6.1",
63
63
  "@use-gesture/react": "^10.3.1",
64
- "@pisell/date-picker": "3.0.7",
65
64
  "@pisell/utils": "3.0.2",
65
+ "@pisell/materials": "6.6.14",
66
66
  "@pisell/icon": "0.0.11",
67
- "@pisell/materials": "6.6.14"
67
+ "@pisell/date-picker": "3.0.7"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "react": "^18.0.0",