@pisell/private-materials 3.3.26 → 3.3.27

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 (205) 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 +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +5 -5
  11. package/es/components/Sales/Customer/index.js +3 -1
  12. package/es/components/Sales/Event/Detail.js +5 -1
  13. package/es/components/Sales/Event/serve.d.ts +3 -0
  14. package/es/components/Sales/Init/index.d.ts +1 -0
  15. package/es/components/Sales/Init/index.js +3 -2
  16. package/es/components/Sales/Step/index.d.ts +2 -0
  17. package/es/components/Sales/Step/index.js +13 -4
  18. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  19. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +5 -5
  20. package/es/components/appointmentBooking/components/Content/index.d.ts +1 -0
  21. package/es/components/appointmentBooking/components/Services/index.js +2 -0
  22. package/es/components/appointmentBooking/deposit/index.js +2 -2
  23. package/es/components/appointmentBooking/index.d.ts +1 -0
  24. package/es/components/booking/components/footer/utils.js +16 -15
  25. package/es/components/booking/hooks/useQuotation.d.ts +4 -0
  26. package/es/components/booking/hooks/useQuotation.js +256 -0
  27. package/es/components/booking/info/index.d.ts +0 -1
  28. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  29. package/es/components/booking/info/service/addService/index.js +4 -4
  30. package/es/components/booking/info/service/editService/index.js +6 -3
  31. package/es/components/booking/info/service/index.js +4 -1
  32. package/es/components/booking/info/service2/Group/utils.js +1 -1
  33. package/es/components/booking/info/service2/hooks/useSelectPet.js +6 -4
  34. package/es/components/booking/info/service2/index.js +4 -1
  35. package/es/components/booking/info2/service/addService/index.d.ts +1 -0
  36. package/es/components/booking/info2/service/addService/index.js +29 -9
  37. package/es/components/booking/info2/service/editService/index.js +2 -0
  38. package/es/components/booking/info2/service/index.js +4 -1
  39. package/es/components/booking/locales.d.ts +6 -0
  40. package/es/components/booking/locales.js +9 -3
  41. package/es/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  42. package/es/components/eftposPay/component/fail/index.d.ts +1 -0
  43. package/es/components/eftposPay/component/fail/unknow.d.ts +1 -0
  44. package/es/components/eftposPay/hooks.d.ts +1 -1
  45. package/es/components/eftposPay/index.d.ts +1 -0
  46. package/es/components/eftposPay/pay.d.ts +1 -0
  47. package/es/components/eftposPay/store/index.d.ts +1 -1
  48. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +122 -31
  49. package/es/components/eventBooking/components/Provider/Event/index.js +20 -4
  50. package/es/components/eventBooking/components/Provider/Resource/index.js +26 -5
  51. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
  52. package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +1 -1
  53. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  54. package/es/components/eventBooking/components/bookingDetailModal/components/Schedule.js +5 -2
  55. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  56. package/es/components/eventBooking/components/scheduleCalendar/calendarItem.js +7 -2
  57. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  58. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +60 -0
  59. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  60. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  61. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +59 -0
  62. package/es/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  63. package/es/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
  64. package/es/components/eventBooking/components/scheduleCalendar/index.js +30 -21
  65. package/es/components/eventBooking/components/scheduleCalendar/index.less +2 -0
  66. package/es/components/eventBooking/index.d.ts +1 -0
  67. package/es/components/eventBooking/index.js +2 -2
  68. package/es/components/eventBooking/locales.d.ts +6 -0
  69. package/es/components/eventBooking/locales.js +166 -160
  70. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  71. package/es/components/pay/toC/PaymentMethods/WalletPass/List/index.js +3 -2
  72. package/es/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  73. package/es/components/pay/toC/PaymentMethods/WalletPass/index.js +73 -20
  74. package/es/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  75. package/es/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  76. package/es/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  77. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  78. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +60 -0
  79. package/es/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  80. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  81. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +98 -0
  82. package/es/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  83. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  84. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +34 -0
  85. package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  86. package/es/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  87. package/es/components/pay/toC/WalletPassBlock/index.js +119 -21
  88. package/es/components/pay/toC/WalletPassBlock/index.less +82 -13
  89. package/es/components/pay/toC/index.js +138 -89
  90. package/es/components/pay/toC/locales.d.ts +69 -3
  91. package/es/components/pay/toC/locales.js +132 -6
  92. package/es/components/pay/toC/model.d.ts +4 -0
  93. package/es/components/pay/toC/model.js +9 -0
  94. package/es/components/pay/toC/serve.d.ts +23 -0
  95. package/es/components/pay/toC/serve.js +34 -2
  96. package/es/components/pay/toC/utils.d.ts +3 -1
  97. package/es/components/pay/toC/utils.js +8 -3
  98. package/es/components/productSelect/components/productGroup/index.less +4 -12
  99. package/es/components/productSelect/index.less +1 -1
  100. package/es/components/ruleSetting/index.d.ts +1 -0
  101. package/es/components/ticketBooking/components/addServiceVariant/addService.js +15 -20
  102. package/es/components/ticketBooking/components/menuBar/index.less +0 -1
  103. package/es/components/ticketBooking/components/ticketBooking/index.less +2 -4
  104. package/es/hooks/useLocale.d.ts +2 -0
  105. package/es/hooks/useLocale.js +7 -0
  106. package/es/hooks/useLoginUser.d.ts +2 -0
  107. package/es/hooks/useLoginUser.js +19 -0
  108. package/lib/components/Sales/Customer/index.js +3 -1
  109. package/lib/components/Sales/Event/Detail.js +5 -1
  110. package/lib/components/Sales/Event/serve.d.ts +3 -0
  111. package/lib/components/Sales/Init/index.d.ts +1 -0
  112. package/lib/components/Sales/Init/index.js +3 -2
  113. package/lib/components/Sales/Step/index.d.ts +2 -0
  114. package/lib/components/Sales/Step/index.js +13 -4
  115. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -0
  116. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +2 -2
  117. package/lib/components/appointmentBooking/components/Content/index.d.ts +1 -0
  118. package/lib/components/appointmentBooking/components/Services/index.js +2 -0
  119. package/lib/components/appointmentBooking/deposit/index.js +2 -2
  120. package/lib/components/appointmentBooking/index.d.ts +1 -0
  121. package/lib/components/booking/components/footer/utils.js +5 -4
  122. package/lib/components/booking/hooks/useQuotation.d.ts +4 -0
  123. package/lib/components/booking/hooks/useQuotation.js +210 -0
  124. package/lib/components/booking/info/index.d.ts +0 -1
  125. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  126. package/lib/components/booking/info/service/addService/index.js +2 -3
  127. package/lib/components/booking/info/service/editService/index.js +5 -2
  128. package/lib/components/booking/info/service/index.js +3 -1
  129. package/lib/components/booking/info/service2/Group/utils.js +2 -2
  130. package/lib/components/booking/info/service2/hooks/useSelectPet.js +5 -3
  131. package/lib/components/booking/info/service2/index.js +3 -1
  132. package/lib/components/booking/info2/service/addService/index.d.ts +1 -0
  133. package/lib/components/booking/info2/service/addService/index.js +25 -17
  134. package/lib/components/booking/info2/service/editService/index.js +2 -1
  135. package/lib/components/booking/info2/service/index.js +3 -1
  136. package/lib/components/booking/locales.d.ts +6 -0
  137. package/lib/components/booking/locales.js +9 -3
  138. package/lib/components/eftposPay/component/fail/failCustom.d.ts +1 -0
  139. package/lib/components/eftposPay/component/fail/index.d.ts +1 -0
  140. package/lib/components/eftposPay/component/fail/unknow.d.ts +1 -0
  141. package/lib/components/eftposPay/hooks.d.ts +1 -1
  142. package/lib/components/eftposPay/index.d.ts +1 -0
  143. package/lib/components/eftposPay/pay.d.ts +1 -0
  144. package/lib/components/eftposPay/store/index.d.ts +1 -1
  145. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +52 -4
  146. package/lib/components/eventBooking/components/Provider/Event/index.js +15 -3
  147. package/lib/components/eventBooking/components/Provider/Resource/index.js +16 -3
  148. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.d.ts +2 -2
  149. package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/SelectDate/index.js +7 -7
  150. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.d.ts +1 -0
  151. package/lib/components/eventBooking/components/bookingDetailModal/components/Schedule.js +3 -1
  152. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
  153. package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.js +6 -5
  154. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.d.ts +3 -0
  155. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.js +75 -0
  156. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimeItem/index.less +63 -0
  157. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.d.ts +9 -0
  158. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.js +64 -0
  159. package/lib/components/eventBooking/components/scheduleCalendar/components/ScheduleTimes/index.less +7 -0
  160. package/lib/components/eventBooking/components/scheduleCalendar/index.d.ts +1 -0
  161. package/lib/components/eventBooking/components/scheduleCalendar/index.js +17 -11
  162. package/lib/components/eventBooking/components/scheduleCalendar/index.less +2 -0
  163. package/lib/components/eventBooking/index.d.ts +1 -0
  164. package/lib/components/eventBooking/index.js +2 -2
  165. package/lib/components/eventBooking/locales.d.ts +6 -0
  166. package/lib/components/eventBooking/locales.js +10 -4
  167. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.d.ts +3 -0
  168. package/lib/components/pay/toC/PaymentMethods/WalletPass/List/index.js +2 -2
  169. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.d.ts +5 -0
  170. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.js +52 -11
  171. package/lib/components/pay/toC/PaymentMethods/WalletPass/index.less +30 -0
  172. package/lib/components/pay/toC/PaymentMethods/WalletPass/serve.d.ts +2 -0
  173. package/lib/components/pay/toC/PaymentMethods/WalletPass/utils.js +2 -1
  174. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.d.ts +16 -0
  175. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.js +87 -0
  176. package/lib/components/pay/toC/WalletPassBlock/components/WalletAvailable/index.less +38 -0
  177. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.d.ts +17 -0
  178. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.js +103 -0
  179. package/lib/components/pay/toC/WalletPassBlock/components/WalletBestValueFound/index.less +133 -0
  180. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +7 -0
  181. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.js +52 -0
  182. package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.less +23 -0
  183. package/lib/components/pay/toC/WalletPassBlock/index.d.ts +9 -2
  184. package/lib/components/pay/toC/WalletPassBlock/index.js +115 -20
  185. package/lib/components/pay/toC/WalletPassBlock/index.less +82 -13
  186. package/lib/components/pay/toC/index.js +35 -9
  187. package/lib/components/pay/toC/locales.d.ts +69 -3
  188. package/lib/components/pay/toC/locales.js +72 -6
  189. package/lib/components/pay/toC/model.d.ts +4 -0
  190. package/lib/components/pay/toC/model.js +10 -0
  191. package/lib/components/pay/toC/serve.d.ts +23 -0
  192. package/lib/components/pay/toC/serve.js +12 -6
  193. package/lib/components/pay/toC/utils.d.ts +3 -1
  194. package/lib/components/pay/toC/utils.js +8 -3
  195. package/lib/components/productSelect/components/productGroup/index.less +4 -12
  196. package/lib/components/productSelect/index.less +1 -1
  197. package/lib/components/ruleSetting/index.d.ts +1 -0
  198. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +13 -16
  199. package/lib/components/ticketBooking/components/menuBar/index.less +0 -1
  200. package/lib/components/ticketBooking/components/ticketBooking/index.less +2 -4
  201. package/lib/hooks/useLocale.d.ts +2 -0
  202. package/lib/hooks/useLocale.js +41 -0
  203. package/lib/hooks/useLoginUser.d.ts +2 -0
  204. package/lib/hooks/useLoginUser.js +50 -0
  205. package/package.json +3 -3
@@ -32,6 +32,10 @@ var defaultState = {
32
32
  payCallback: () => {
33
33
  },
34
34
  history: null,
35
+ walletSetting: {
36
+ name: "",
37
+ popup_status: null
38
+ },
35
39
  payGroup: {
36
40
  wait_amount: 0
37
41
  }
@@ -48,6 +52,12 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
48
52
  (0, import_payGroup.syncPayGroupToStorage)(res);
49
53
  return { ...state, payGroup: res };
50
54
  },
55
+ setWalletSetting(state, payload) {
56
+ return { ...state, walletSetting: {
57
+ ...state.walletSetting,
58
+ ...payload
59
+ } };
60
+ },
51
61
  init(state, payload) {
52
62
  return { ...defaultState, ...payload };
53
63
  }
@@ -32,3 +32,26 @@ export declare const getPaymentInit: (values: {
32
32
  order_id?: string;
33
33
  amount?: number;
34
34
  }) => Promise<any>;
35
+ /**
36
+ * @title: 获取钱包名称和弹窗状态
37
+ * @description:
38
+ * @param {object} values
39
+ * @return {*}
40
+ * @Author: shengjie.zuo
41
+ * @member: 马天宇
42
+ * @Date: 2025-02-21 10:42
43
+ */
44
+ export declare const getWalletNameAndPopupStatus: (values: {
45
+ setting_type?: string;
46
+ }) => Promise<{
47
+ wallet: {
48
+ name?: {
49
+ en: string;
50
+ 'zh-CN': string;
51
+ 'zh-HK': string;
52
+ };
53
+ };
54
+ wallet_setting: {
55
+ popup_status?: 1 | 0;
56
+ };
57
+ }>;
@@ -21,7 +21,8 @@ var serve_exports = {};
21
21
  __export(serve_exports, {
22
22
  getPaymentInit: () => getPaymentInit,
23
23
  getPaymentList: () => getPaymentList,
24
- getPaymentsAndWalletPass: () => getPaymentsAndWalletPass
24
+ getPaymentsAndWalletPass: () => getPaymentsAndWalletPass,
25
+ getWalletNameAndPopupStatus: () => getWalletNameAndPopupStatus
25
26
  });
26
27
  module.exports = __toCommonJS(serve_exports);
27
28
  var import_utils = require("../../../utils");
@@ -35,9 +36,7 @@ var getPaymentList = async (values) => {
35
36
  );
36
37
  let arr = [];
37
38
  if ((0, import_utils2.isWx)()) {
38
- arr = arr.concat([
39
- "mw.google"
40
- ]);
39
+ arr = arr.concat(["mw.google"]);
41
40
  }
42
41
  if (!(0, import_utils2.isWx)()) {
43
42
  arr = arr.concat(["globepay.wechat.jsapi", "superpay.wechat.h5"]);
@@ -60,7 +59,9 @@ var getPaymentList = async (values) => {
60
59
  };
61
60
  var getPaymentsAndWalletPass = async (values) => {
62
61
  let { data } = await import_utils.request.getRequest().get("/h5/pay/order/payments-and-walletpass", values);
63
- const walletPass = (data.payment_list || []).find((d) => d.service === "pisell.wallet_pass");
62
+ const walletPass = (data.payment_list || []).find(
63
+ (d) => d.service === "pisell.wallet_pass"
64
+ );
64
65
  return {
65
66
  ...data,
66
67
  walletPass
@@ -70,9 +71,14 @@ var getPaymentInit = async (values) => {
70
71
  let { data } = await import_utils.request.getRequest().post("/h5/pay/payment/init", values);
71
72
  return data;
72
73
  };
74
+ var getWalletNameAndPopupStatus = async (values) => {
75
+ const { data } = await import_utils.request.getRequest().get("/h5/wallet/setting", values);
76
+ return data;
77
+ };
73
78
  // Annotate the CommonJS export names for ESM import in node:
74
79
  0 && (module.exports = {
75
80
  getPaymentInit,
76
81
  getPaymentList,
77
- getPaymentsAndWalletPass
82
+ getPaymentsAndWalletPass,
83
+ getWalletNameAndPopupStatus
78
84
  });
@@ -1,4 +1,5 @@
1
1
  import { PayGroup } from "./model";
2
+ import { WalletPassDataType } from "./PaymentMethods/WalletPass/serve";
2
3
  /**
3
4
  * 计算walletPass列表数据的总金额
4
5
  * @param list
@@ -21,7 +22,7 @@ export declare const formatWalletPassParams: (payGroup: PayGroup) => {
21
22
  order_id: string;
22
23
  payment_group_id: number;
23
24
  payments: {
24
- amount: any;
25
+ amount: string;
25
26
  wallet_pass_use_value: any;
26
27
  voucher_id: any;
27
28
  tag: any;
@@ -47,3 +48,4 @@ export declare const isFranchiseeShop: (path?: any, history?: any) => any;
47
48
  */
48
49
  export declare const getFranchiseeShopId: (path?: any, history?: any) => number;
49
50
  export declare const formatFranchiseeRoute: (url: string, history?: any) => string;
51
+ export declare const getAvailableMaxAmount: (data: WalletPassDataType) => string;
@@ -23,6 +23,7 @@ __export(utils_exports, {
23
23
  formatFranchiseeRoute: () => formatFranchiseeRoute,
24
24
  formatWalletPassList2PreparePayments: () => formatWalletPassList2PreparePayments,
25
25
  formatWalletPassParams: () => formatWalletPassParams,
26
+ getAvailableMaxAmount: () => getAvailableMaxAmount,
26
27
  getFranchiseeShopId: () => getFranchiseeShopId,
27
28
  getIsWalletPassAndTripartitePayment: () => getIsWalletPassAndTripartitePayment,
28
29
  isFranchiseeShop: () => isFranchiseeShop
@@ -31,13 +32,13 @@ module.exports = __toCommonJS(utils_exports);
31
32
  var import_decimal = require("decimal.js");
32
33
  var import_status = require("./status");
33
34
  var calcWalletPassListAmount = (list) => {
34
- return list.reduce((pre, cur) => pre.add(new import_decimal.Decimal(String(cur.available_max_amount || 0))), new import_decimal.Decimal("0")).toNumber();
35
+ return list.reduce((pre, cur) => pre.add(new import_decimal.Decimal(String(getAvailableMaxAmount(cur) || 0))), new import_decimal.Decimal("0")).toNumber();
35
36
  };
36
37
  var formatWalletPassList2PreparePayments = (list) => {
37
38
  return (list || []).map((item) => {
38
39
  return {
39
40
  voucher_id: item.id || 0,
40
- amount: Number(item.available_max_amount) || 0,
41
+ amount: Number(getAvailableMaxAmount(item)) || 0,
41
42
  tag: item.tag || ""
42
43
  };
43
44
  });
@@ -46,7 +47,7 @@ var formatWalletPassParams = (payGroup) => {
46
47
  const { order_id, payment_group_id, walletPass } = payGroup;
47
48
  const payments = (walletPass == null ? void 0 : walletPass.cards.map((item) => {
48
49
  return {
49
- amount: item.available_max_amount,
50
+ amount: getAvailableMaxAmount(item),
50
51
  wallet_pass_use_value: item.available_max_par_value,
51
52
  voucher_id: item.id,
52
53
  tag: item.tag,
@@ -81,12 +82,16 @@ var formatFranchiseeRoute = (url, history) => {
81
82
  }
82
83
  return url;
83
84
  };
85
+ var getAvailableMaxAmount = (data) => {
86
+ return data.tag !== "point_card" ? data.available_max_amount : data == null ? void 0 : data.recommended_usage_amount;
87
+ };
84
88
  // Annotate the CommonJS export names for ESM import in node:
85
89
  0 && (module.exports = {
86
90
  calcWalletPassListAmount,
87
91
  formatFranchiseeRoute,
88
92
  formatWalletPassList2PreparePayments,
89
93
  formatWalletPassParams,
94
+ getAvailableMaxAmount,
90
95
  getFranchiseeShopId,
91
96
  getIsWalletPassAndTripartitePayment,
92
97
  isFranchiseeShop
@@ -1,7 +1,6 @@
1
1
  .pisell-product-select-group {
2
2
  .group-title {
3
3
  color: var(--ps-category-text-color, #000);
4
- font-family: Inter;
5
4
  font-size: 18px;
6
5
  font-style: normal;
7
6
  font-weight: 600;
@@ -84,7 +83,6 @@
84
83
  background: var(--Error-100, #fee4e2);
85
84
  color: var(--Error-700, #b42318);
86
85
  text-align: center;
87
- font-family: Inter;
88
86
  font-size: 14px;
89
87
  font-style: normal;
90
88
  font-weight: 500;
@@ -114,8 +112,7 @@
114
112
  row-gap: 8px;
115
113
  min-height: 92px;
116
114
  .title {
117
- color: var(--ps-card-text, #1B1B1B);
118
- font-family: Inter;
115
+ color: var(--ps-card-text, #1b1b1b);
119
116
  font-size: 18px;
120
117
  font-style: normal;
121
118
  font-weight: 600;
@@ -130,9 +127,8 @@
130
127
  .stock,
131
128
  .specs {
132
129
  overflow: hidden;
133
- color: var(--ps-color-text-secondary, #4E4E4E);
130
+ color: var(--ps-color-text-secondary, #4e4e4e);
134
131
  text-overflow: ellipsis;
135
- font-family: Inter;
136
132
  font-size: 14px;
137
133
  font-style: normal;
138
134
  font-weight: 500;
@@ -161,7 +157,6 @@
161
157
  mix-blend-mode: multiply;
162
158
  color: var(--Error-700, #b42318);
163
159
  text-align: center;
164
- font-family: Inter;
165
160
  font-size: 14px;
166
161
  font-style: normal;
167
162
  font-weight: 500;
@@ -174,16 +169,14 @@
174
169
  gap: 8px;
175
170
  }
176
171
  .price {
177
- color: var(--ps-card-text, #1B1B1B);
178
- font-family: Inter;
172
+ color: var(--ps-card-text, #1b1b1b);
179
173
  font-size: 18px;
180
174
  font-style: normal;
181
175
  font-weight: 600;
182
176
  line-height: 28px;
183
177
  }
184
178
  .original-price {
185
- color: var(--ps-color-text-secondary, #4E4E4E);
186
- font-family: Inter;
179
+ color: var(--ps-color-text-secondary, #4e4e4e);
187
180
  font-size: 16px;
188
181
  font-style: normal;
189
182
  font-weight: 400;
@@ -197,7 +190,6 @@
197
190
 
198
191
  .remark {
199
192
  color: var(--Warning-600, #dc6803);
200
- font-family: Inter;
201
193
  font-size: 14px;
202
194
  font-style: normal;
203
195
  font-weight: 600;
@@ -50,7 +50,7 @@
50
50
 
51
51
  .booking-pisell-tabs-tab {
52
52
  .booking-pisell-tabs-tab-content {
53
- background: var(--ps-tab-item-bg, #FFFFFF) !important;
53
+ background: var(--ps-tab-item-bg, #ffffff) !important;
54
54
  font-weight: 400;
55
55
  }
56
56
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  interface RuleSettingProps {
3
4
  value: any;
@@ -47,7 +47,7 @@ var import_serviceManager = require("../../../booking/info/service/serviceManage
47
47
  var import_productSelect = __toESM(require("../../../productSelect"));
48
48
  var import_index = require("./index.less");
49
49
  var AddSerivce = (props) => {
50
- var _a, _b, _c, _d, _e, _f, _g, _h;
50
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
51
51
  const { onEdit, state, dispatch, renderMode = "current" } = props;
52
52
  const [loading, setLoading] = (0, import_react.useState)(false);
53
53
  const context = (0, import_useEngineContext.default)();
@@ -63,6 +63,10 @@ var AddSerivce = (props) => {
63
63
  state == null ? void 0 : state.renderType
64
64
  );
65
65
  const [currentProduct, setCurrentProduct] = (0, import_react.useState)(null);
66
+ const customerId = (0, import_react.useMemo)(() => {
67
+ var _a2, _b2;
68
+ return ((_b2 = (_a2 = state.client) == null ? void 0 : _a2.value) == null ? void 0 : _b2.id) || void 0;
69
+ }, [(_g = (_f = state.client) == null ? void 0 : _f.value) == null ? void 0 : _g.id]);
66
70
  const setDefaultService = async (list) => {
67
71
  if (state.renderType !== "eventBooking") {
68
72
  return;
@@ -134,11 +138,8 @@ var AddSerivce = (props) => {
134
138
  with_count: ["bundleGroup", "optionGroup"],
135
139
  order_by_string: "sort:desc",
136
140
  status: "published",
137
- ...state.isBookingCreatePage ? { schedule_date: params == null ? void 0 : params.schedule_date } : {
138
- _config: {
139
- useCache: true
140
- }
141
- }
141
+ schedule_date: params == null ? void 0 : params.schedule_date,
142
+ customer_id: params == null ? void 0 : params.customer_id
142
143
  });
143
144
  setLoading(false);
144
145
  if (!state.service.addModal) {
@@ -173,6 +174,7 @@ var AddSerivce = (props) => {
173
174
  package: true
174
175
  },
175
176
  is_eject: isEject ? 1 : 0,
177
+ customer_id: customerId,
176
178
  isOS: isSession
177
179
  },
178
180
  onCancel: () => {
@@ -269,20 +271,15 @@ var AddSerivce = (props) => {
269
271
  }
270
272
  }
271
273
  return _list;
272
- }, [(_f = state.service) == null ? void 0 : _f.services, state == null ? void 0 : state.activeCartId]);
274
+ }, [(_h = state.service) == null ? void 0 : _h.services, state == null ? void 0 : state.activeCartId]);
273
275
  const currentDate = (0, import_react.useMemo)(() => {
274
276
  return state.date.value.format("YYYY-MM-DD");
275
277
  }, [state.date.value]);
276
278
  (0, import_react.useEffect)(() => {
277
279
  if (renderMode === "current") {
278
- getServices({ schedule_date: currentDate });
279
- }
280
- }, [renderMode, currentDate]);
281
- (0, import_react.useEffect)(() => {
282
- if (state.renderType === "eventBooking" && state.modalOpen) {
283
- getServices({ schedule_date: currentDate });
280
+ getServices({ schedule_date: currentDate, customer_id: customerId });
284
281
  }
285
- }, [state.renderType, state.modalOpen]);
282
+ }, [renderMode, currentDate, customerId]);
286
283
  return (0, import_react.useMemo)(() => {
287
284
  if (renderMode === "current") {
288
285
  return /* @__PURE__ */ import_react.default.createElement(
@@ -295,13 +292,13 @@ var AddSerivce = (props) => {
295
292
  },
296
293
  onChange: handleSelectProduct,
297
294
  value: currentProduct == null ? void 0 : currentProduct.id,
298
- loading
295
+ loading: !renderList.length && loading
299
296
  }
300
297
  );
301
298
  }
302
299
  return null;
303
300
  }, [
304
- (_h = (_g = state.service) == null ? void 0 : _g.cacheItem) == null ? void 0 : _h.autoClose,
301
+ (_j = (_i = state.service) == null ? void 0 : _i.cacheItem) == null ? void 0 : _j.autoClose,
305
302
  state.service.addModal,
306
303
  import_utils.locales,
307
304
  renderList,
@@ -61,7 +61,6 @@
61
61
  > div {
62
62
  color: #fff;
63
63
  text-align: center;
64
- font-family: Inter;
65
64
  font-size: 8px;
66
65
  font-style: normal;
67
66
  font-weight: 400;
@@ -1,11 +1,9 @@
1
1
  .pisell-ticket-booking-wrapper {
2
-
3
-
4
2
  .pisell-lowcode__booking-tab-pane-footer {
5
3
  padding: 16px;
6
4
  }
7
5
  .create-booking-page-info-wrap-create {
8
- background-color: #1B1B1B;
6
+ background-color: #1b1b1b;
9
7
  .booking-info {
10
8
  .booking-info-create-new,
11
9
  .pisell-lowcode__booking-field-title,
@@ -15,4 +13,4 @@
15
13
  }
16
14
  }
17
15
  }
18
- }
16
+ }
@@ -0,0 +1,2 @@
1
+ declare const useLocale: () => any;
2
+ export default useLocale;
@@ -0,0 +1,41 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/hooks/useLocale.ts
30
+ var useLocale_exports = {};
31
+ __export(useLocale_exports, {
32
+ default: () => useLocale_default
33
+ });
34
+ module.exports = __toCommonJS(useLocale_exports);
35
+ var import_useEngineContext = __toESM(require("./useEngineContext"));
36
+ var useLocale = () => {
37
+ var _a, _b;
38
+ const context = (0, import_useEngineContext.default)();
39
+ return ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en";
40
+ };
41
+ var useLocale_default = useLocale;
@@ -0,0 +1,2 @@
1
+ declare const useLoginUser: () => any;
2
+ export default useLoginUser;
@@ -0,0 +1,50 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/hooks/useLoginUser.ts
30
+ var useLoginUser_exports = {};
31
+ __export(useLoginUser_exports, {
32
+ default: () => useLoginUser_default
33
+ });
34
+ module.exports = __toCommonJS(useLoginUser_exports);
35
+ var import_react = require("react");
36
+ var import_useEngineContext = __toESM(require("./useEngineContext"));
37
+ var useLoginUser = () => {
38
+ const context = (0, import_useEngineContext.default)();
39
+ const { store, storage, getStore } = context.appHelper.utils || {};
40
+ const user = (0, import_react.useMemo)(() => {
41
+ var _a, _b, _c;
42
+ const _store = getStore();
43
+ let userInfo = (_c = (_b = (_a = _store.getState) == null ? void 0 : _a.call(_store)) == null ? void 0 : _b.global) == null ? void 0 : _c.userInfo;
44
+ const localUserInfo = JSON.parse((storage == null ? void 0 : storage.get("customer")) || "{}");
45
+ userInfo = (userInfo == null ? void 0 : userInfo.id) ? userInfo : localUserInfo;
46
+ return userInfo;
47
+ }, [store]);
48
+ return user;
49
+ };
50
+ var useLoginUser_default = useLoginUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.26",
3
+ "version": "3.3.27",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -59,9 +59,9 @@
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/materials": "3.3.7",
63
- "@pisell/icon": "0.0.11",
62
+ "@pisell/materials": "3.3.8",
64
63
  "@pisell/utils": "1.0.42",
64
+ "@pisell/icon": "0.0.11",
65
65
  "@pisell/date-picker": "3.0.2"
66
66
  },
67
67
  "peerDependencies": {