@pisell/private-materials 3.2.33 → 3.2.35

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 (191) 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 +5 -5
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/es/components/Sales/Event/index.js +7 -7
  12. package/es/components/Sales/Summary/utils.d.ts +1 -1
  13. package/es/components/appointmentBooking/components/Cart/ContinueButton/index.js +86 -41
  14. package/es/components/appointmentBooking/components/Cart/Item/Total.js +3 -2
  15. package/es/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  16. package/es/components/appointmentBooking/components/Cart/Item/index.js +34 -16
  17. package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -9
  18. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  19. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  20. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +16 -0
  21. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
  22. package/es/components/appointmentBooking/components/Content/index.js +42 -6
  23. package/es/components/appointmentBooking/components/Date/index.js +86 -24
  24. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  25. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  26. package/es/components/appointmentBooking/components/Deposit/index.less +16 -0
  27. package/es/components/appointmentBooking/components/Form/index.d.ts +3 -0
  28. package/es/components/appointmentBooking/components/Form/index.js +110 -0
  29. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  30. package/es/components/appointmentBooking/components/Header/index.js +3 -2
  31. package/es/components/appointmentBooking/components/Resource/index.js +4 -1
  32. package/es/components/appointmentBooking/components/Services/index.js +103 -9
  33. package/es/components/appointmentBooking/context.d.ts +3 -0
  34. package/es/components/appointmentBooking/context.js +19 -3
  35. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  36. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  37. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  38. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  39. package/es/components/appointmentBooking/deposit/index.js +101 -0
  40. package/es/components/appointmentBooking/deposit/index.less +53 -0
  41. package/es/components/appointmentBooking/hooks.d.ts +16 -0
  42. package/es/components/appointmentBooking/hooks.js +138 -53
  43. package/es/components/appointmentBooking/index.js +8 -0
  44. package/es/components/appointmentBooking/locales.d.ts +36 -3
  45. package/es/components/appointmentBooking/locales.js +42 -3
  46. package/es/components/appointmentBooking/utils.d.ts +23 -1
  47. package/es/components/appointmentBooking/utils.js +112 -27
  48. package/es/components/booking/addons/model.js +5 -5
  49. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  50. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  51. package/es/components/booking/components/browserSelect/index.js +1 -1
  52. package/es/components/booking/components/footer/index.js +6 -4
  53. package/es/components/booking/components/voucher/index.js +13 -15
  54. package/es/components/booking/forms/model.js +5 -5
  55. package/es/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  56. package/es/components/booking/info/index.js +2 -8
  57. package/es/components/booking/info/service/like/index.js +1 -1
  58. package/es/components/booking/info/service2/utils.d.ts +1 -1
  59. package/es/components/booking/info2/service/addTimeModal/index.js +3 -2
  60. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +4 -2
  61. package/es/components/booking/info2/service/editService/index.js +4 -11
  62. package/es/components/booking/materiels/startTime/index.js +1 -1
  63. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  64. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  65. package/es/components/booking/notes/addNote/index.js +1 -1
  66. package/es/components/booking/notes/model.js +5 -5
  67. package/es/components/booking/payments/model.js +5 -5
  68. package/es/components/booking/utils.d.ts +2 -2
  69. package/es/components/eftposPay/amount.d.ts +1 -1
  70. package/es/components/eftposPay/device.d.ts +1 -1
  71. package/es/components/eftposPay/hooks.d.ts +2 -2
  72. package/es/components/eftposPay/store/index.d.ts +4 -4
  73. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  74. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
  75. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  76. package/es/components/listComponent/index.js +5 -5
  77. package/es/components/productExtension/card/index.js +3 -3
  78. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  79. package/es/components/productExtension/fields/Forms/index.js +12 -12
  80. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  81. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  82. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  83. package/es/components/productExtension/server.js +2 -2
  84. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  85. package/es/components/schedules/calendar/index.js +4 -4
  86. package/es/components/schedules/calendar/serve.js +2 -2
  87. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  88. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  89. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  90. package/es/components/schedules/components/ResourceList/index.js +1 -1
  91. package/es/components/schedules/components/Search/index.js +5 -5
  92. package/es/components/schedules/model.js +5 -5
  93. package/es/components/schedules/openHours/index.js +1 -1
  94. package/es/components/schedules/openHours/serve.js +2 -2
  95. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  96. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  97. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  98. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  99. package/es/components/schedules/products/serve.js +2 -2
  100. package/es/components/schedules/products/utils.js +5 -5
  101. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  102. package/es/components/schedules/resources/detail/index.js +10 -10
  103. package/es/components/schedules/resources/list/index.js +2 -2
  104. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  105. package/es/components/schedules/resources/serve.js +2 -2
  106. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  107. package/es/components/schedules/utils.d.ts +1 -1
  108. package/es/components/schedules/utils.js +4 -4
  109. package/es/components/selectModal/index.js +2 -2
  110. package/es/components/shoppingCart/components/Cart/Product.js +16 -3
  111. package/es/components/shoppingCart/status.js +4 -1
  112. package/es/components/shoppingCart/type.d.ts +3 -0
  113. package/es/components/wallet/Detail/index.js +1 -1
  114. package/es/components/wallet/components/WalletCard.js +1 -1
  115. package/es/hooks/useComponents.js +1 -1
  116. package/es/index.d.ts +1 -0
  117. package/es/index.js +2 -1
  118. package/es/utils/index.d.ts +1 -1
  119. package/lib/components/Sales/Event/index.js +5 -1
  120. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  121. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +56 -20
  122. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  123. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  124. package/lib/components/appointmentBooking/components/Cart/Item/index.js +31 -11
  125. package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -9
  126. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  127. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +3 -0
  128. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +42 -0
  129. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
  130. package/lib/components/appointmentBooking/components/Content/index.js +31 -3
  131. package/lib/components/appointmentBooking/components/Date/index.js +27 -8
  132. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  133. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  134. package/lib/components/appointmentBooking/components/Deposit/index.less +16 -0
  135. package/lib/components/appointmentBooking/components/Form/index.d.ts +3 -0
  136. package/lib/components/appointmentBooking/components/Form/index.js +108 -0
  137. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  138. package/lib/components/appointmentBooking/components/Header/index.js +9 -6
  139. package/lib/components/appointmentBooking/components/Resource/index.js +2 -0
  140. package/lib/components/appointmentBooking/components/Services/index.js +48 -7
  141. package/lib/components/appointmentBooking/context.d.ts +3 -0
  142. package/lib/components/appointmentBooking/context.js +12 -4
  143. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  144. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  145. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  146. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  147. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  148. package/lib/components/appointmentBooking/deposit/index.less +53 -0
  149. package/lib/components/appointmentBooking/hooks.d.ts +16 -0
  150. package/lib/components/appointmentBooking/hooks.js +49 -6
  151. package/lib/components/appointmentBooking/index.js +5 -0
  152. package/lib/components/appointmentBooking/locales.d.ts +36 -3
  153. package/lib/components/appointmentBooking/locales.js +36 -3
  154. package/lib/components/appointmentBooking/utils.d.ts +23 -1
  155. package/lib/components/appointmentBooking/utils.js +84 -26
  156. package/lib/components/booking/components/footer/index.js +8 -6
  157. package/lib/components/booking/components/voucher/index.js +11 -15
  158. package/lib/components/booking/forms/sendModal/useSendModal.d.ts +1 -1
  159. package/lib/components/booking/info/index.js +4 -6
  160. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  161. package/lib/components/booking/info2/service/addTimeModal/index.js +4 -3
  162. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -1
  163. package/lib/components/booking/info2/service/editService/index.js +4 -11
  164. package/lib/components/booking/utils.d.ts +2 -2
  165. package/lib/components/eftposPay/amount.d.ts +1 -1
  166. package/lib/components/eftposPay/device.d.ts +1 -1
  167. package/lib/components/eftposPay/hooks.d.ts +2 -2
  168. package/lib/components/eftposPay/store/index.d.ts +4 -4
  169. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  170. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
  171. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  172. package/lib/components/schedules/utils.d.ts +1 -1
  173. package/lib/components/schedules/utils.js +1 -1
  174. package/lib/components/shoppingCart/components/Cart/Product.js +14 -3
  175. package/lib/components/shoppingCart/status.js +4 -1
  176. package/lib/components/shoppingCart/type.d.ts +3 -0
  177. package/lib/components/wallet/Detail/index.js +1 -1
  178. package/lib/components/wallet/components/WalletCard.js +1 -1
  179. package/lib/index.d.ts +1 -0
  180. package/lib/index.js +3 -0
  181. package/lib/utils/index.d.ts +1 -1
  182. package/lowcode/appointment-deposit/meta.ts +58 -0
  183. package/package.json +4 -4
  184. package/es/components/ticketBooking/data.d.ts +0 -0
  185. package/es/components/ticketBooking/data.js +0 -82
  186. package/es/components/ticketBooking/index.d.ts +0 -2
  187. package/es/components/ticketBooking/index.js +0 -6
  188. package/lib/components/ticketBooking/data.d.ts +0 -0
  189. package/lib/components/ticketBooking/data.js +0 -0
  190. package/lib/components/ticketBooking/index.d.ts +0 -2
  191. package/lib/components/ticketBooking/index.js +0 -28
@@ -41,7 +41,6 @@ var import_useEngineContext = __toESM(require("../../../../hooks/useEngineContex
41
41
  var import_materials = require("@pisell/materials");
42
42
  var import_useIsBooking4Shop = require("../../hooks/useIsBooking4Shop");
43
43
  var import_index = require("./index.less");
44
- var import_ahooks = require("ahooks");
45
44
  var ShopDiscountHooks = {
46
45
  onInited: "shopDiscount:onInited",
47
46
  onDestroy: "shopDiscount:onDestroy",
@@ -51,7 +50,6 @@ var ShopDiscountHooks = {
51
50
  onRulesListChange: "shopDiscount:onRulesListChange",
52
51
  onLoadPrepareCalcResult: "shopDiscount:onLoadPrepareCalcResult"
53
52
  };
54
- var services = {};
55
53
  var VoucherCard = (props) => {
56
54
  var _a, _b;
57
55
  const context = (0, import_useEngineContext.default)();
@@ -63,7 +61,6 @@ var VoucherCard = (props) => {
63
61
  const productRef = (0, import_react.useRef)(state.service.value);
64
62
  const isBooking4Shop = (0, import_useIsBooking4Shop.useIsBooking4Shop)(state);
65
63
  const shopDiscount = pisellos.getModule("shopDiscount");
66
- services = state.service;
67
64
  const availableData = (0, import_react.useMemo)(() => {
68
65
  if (!isBooking4Shop) return [];
69
66
  const shopDiscount2 = pisellos.getModule("shopDiscount");
@@ -96,24 +93,15 @@ var VoucherCard = (props) => {
96
93
  dispatch({
97
94
  type: "setService",
98
95
  payload: {
99
- ...services,
100
96
  value: val.productList
101
97
  }
102
98
  });
103
99
  }
104
100
  }, [state.service.value, isBooking4Shop]);
105
- const fn = (0, import_ahooks.useMemoizedFn)((result) => {
106
- dispatch({
107
- type: "setService",
108
- payload: {
109
- ...services,
110
- value: result.productList
111
- }
112
- });
113
- });
114
101
  (0, import_react.useEffect)(() => {
115
102
  if (!isBooking4Shop) return;
116
103
  pisellos.effects.on(ShopDiscountHooks.onCustomerChange, (customer) => {
104
+ console.log(customer, "customerChange");
117
105
  dispatch({
118
106
  type: "setClient",
119
107
  payload: {
@@ -123,11 +111,19 @@ var VoucherCard = (props) => {
123
111
  });
124
112
  pisellos.effects.on(
125
113
  ShopDiscountHooks.onLoadPrepareCalcResult,
126
- fn
114
+ (result) => {
115
+ dispatch({
116
+ type: "setService",
117
+ payload: {
118
+ value: result.productList
119
+ }
120
+ });
121
+ }
127
122
  );
128
123
  pisellos.effects.on(
129
124
  ShopDiscountHooks.onDiscountListChange,
130
125
  (discount) => {
126
+ console.log(discount, "discountChange");
131
127
  setDisCountList(discount);
132
128
  }
133
129
  );
@@ -137,7 +133,7 @@ var VoucherCard = (props) => {
137
133
  pisellos.effects.off(ShopDiscountHooks.onLoadPrepareCalcResult);
138
134
  pisellos.effects.off(ShopDiscountHooks.onDiscountListChange);
139
135
  };
140
- }, [state.bookingId, isBooking4Shop, fn]);
136
+ }, [state.bookingId, isBooking4Shop]);
141
137
  const onScanCode = async () => {
142
138
  const val = await shopDiscount.scanCode(code);
143
139
  console.log(val);
@@ -4,6 +4,6 @@ declare const useSendModal: (bookingId?: number) => {
4
4
  setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
5
5
  handleOpen: () => void;
6
6
  handleValuesChange: (val: any) => void;
7
- handleOk: (values: SendModalValues) => Promise<any>;
7
+ handleOk: (values: SendModalValues) => Promise<boolean | undefined>;
8
8
  };
9
9
  export default useSendModal;
@@ -38,14 +38,12 @@ var import_main = __toESM(require("./main"));
38
38
  var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
39
39
  var import_utils = require("./utils");
40
40
  var APP = (props) => {
41
- var _a, _b, _c, _d, _e;
41
+ var _a, _b, _c, _d, _e, _f;
42
42
  const context = (0, import_useEngineContext.default)();
43
- const { globalState } = props;
44
- const isBooking4 = (0, import_utils.isBooking4Shop)(
43
+ if ((0, import_utils.isBooking4Shop)(
45
44
  (_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,
46
- globalState == null ? void 0 : globalState.renderType
47
- );
48
- if (isBooking4 && (!(globalState == null ? void 0 : globalState.bookingId) || (globalState == null ? void 0 : globalState.isParallelResourcesBooking))) {
45
+ (_f = props == null ? void 0 : props.globalState) == null ? void 0 : _f.renderType
46
+ )) {
49
47
  return /* @__PURE__ */ import_react.default.createElement(import_info2.default, { ...props });
50
48
  }
51
49
  return /* @__PURE__ */ import_react.default.createElement(import_main.default, { ...props });
@@ -237,4 +237,4 @@ export declare const updateAppointmentServicePrice: (state: any, { start_date, e
237
237
  * @Author: WangHan
238
238
  * @Date: 2024-12-24 11:32
239
239
  */
240
- export declare const updateServicePrice: (state: any) => Promise<any> | never[];
240
+ export declare const updateServicePrice: (state: any) => never[] | Promise<any>;
@@ -118,13 +118,14 @@ var AddTimeModal = () => {
118
118
  arr = [
119
119
  ...arr,
120
120
  ...resource[form_id].map((d) => {
121
- var _a3, _b3, _c2, _d2;
122
- return (_d2 = (_c2 = (_b3 = (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps) == null ? void 0 : _b3[form_id]) == null ? void 0 : _c2.renderListMaps) == null ? void 0 : _d2[d.relation_id];
121
+ var _a3;
122
+ return (_a3 = state.service.cacheItem) == null ? void 0 : _a3._data.resourceMaps[form_id].renderListMaps[d.relation_id];
123
123
  })
124
124
  ];
125
125
  }
126
- return arr.filter(Boolean);
126
+ return arr;
127
127
  }, [(_f = (_e = (_d = state.service) == null ? void 0 : _d.cacheItem) == null ? void 0 : _e._extend) == null ? void 0 : _f.resource]);
128
+ console.log("currentResource", currentResource);
128
129
  const getTimeUsableStatus = (time) => {
129
130
  var _a2, _b2;
130
131
  if (!((_a2 = state.service.cacheItem) == null ? void 0 : _a2._extend) || !currentResource.length) {
@@ -45,7 +45,8 @@ var MaxLengthSelect = (props, ref) => {
45
45
  {
46
46
  ...props,
47
47
  onChange: handleChange,
48
- popupMatchSelectWidth: false
48
+ popupMatchSelectWidth: false,
49
+ getPopupContainer: () => document.querySelector("#main") || document.body
49
50
  },
50
51
  props.children
51
52
  );
@@ -309,14 +309,15 @@ var Info = (_, ref) => {
309
309
  value: item._extend.other
310
310
  },
311
311
  callback: (e2, extension_type, detail) => {
312
- var _a2;
313
312
  const _detail = detail || item;
314
313
  let cacheItem = {
315
- ...item,
316
314
  ..._detail,
317
315
  product_id: item.id,
318
316
  _id: item == null ? void 0 : item._id,
319
317
  _key: e2.key,
318
+ _data: {
319
+ ...item._data
320
+ },
320
321
  _extend: {
321
322
  ...item._extend,
322
323
  // 将当前表单的值覆盖进去
@@ -328,13 +329,6 @@ var Info = (_, ref) => {
328
329
  };
329
330
  let _total = (0, import_utils3.getProductTotalPrice)(cacheItem);
330
331
  cacheItem._extend.total = _total;
331
- try {
332
- cacheItem._extend.capacity = (0, import_utils4.setDefaultCapacitys)({
333
- capacitys: cacheItem._data.capacitys,
334
- cacheItem
335
- });
336
- } catch (err) {
337
- }
338
332
  cacheItem._extend.origin_total = _total;
339
333
  dispatch({
340
334
  type: "setService",
@@ -343,8 +337,7 @@ var Info = (_, ref) => {
343
337
  }
344
338
  });
345
339
  form.setFieldsValue({
346
- total: _total,
347
- capacity: (_a2 = cacheItem._extend) == null ? void 0 : _a2.capacity
340
+ total: _total
348
341
  });
349
342
  }
350
343
  });
@@ -162,10 +162,10 @@ export declare const getProductTotalPrice: (item: any) => number;
162
162
  export declare const getDuration: (duration: number | {
163
163
  type: string;
164
164
  value: number;
165
- }) => number | "flexible" | {
165
+ }) => number | {
166
166
  type: string;
167
167
  value: number;
168
- };
168
+ } | "flexible";
169
169
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
170
170
  export declare const getIsEdit: (state: any) => boolean;
171
171
  export {};
@@ -8,7 +8,7 @@ import { PosProps } from './const';
8
8
  */
9
9
  declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
10
10
  className?: string | undefined;
11
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
11
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -10,7 +10,7 @@ import './device.less';
10
10
  declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
11
11
  api: PayProps['api'];
12
12
  className?: string | undefined;
13
- onChange?: ((status: "success" | "page" | "print" | "fail" | "mark_tx_processed", params?: string | {
13
+ onChange?: ((status: "page" | "success" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -15,11 +15,11 @@ export declare const useStoreRef: <T extends {
15
15
  readonly numRef: React.MutableRefObject<string | number | undefined>;
16
16
  readonly orderIdRef: React.MutableRefObject<string | number>;
17
17
  readonly modeRef: React.MutableRefObject<ModeEnum>;
18
- readonly statusRef: React.MutableRefObject<"success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question">;
18
+ readonly statusRef: React.MutableRefObject<"loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question">;
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<"tyro" | "windcave" | "payo" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -174,7 +174,7 @@ export declare const updateCustom: (payload: {
174
174
  export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
175
175
  type: EActionTypes;
176
176
  payload: {
177
- status: "success" | "warn" | "loading" | "fail" | "question";
177
+ status: "loading" | "success" | "warn" | "fail" | "question";
178
178
  };
179
179
  };
180
180
  /**
@@ -297,8 +297,8 @@ export declare const backUpFree: (payload: Partial<State>) => {
297
297
  amount?: string | number | undefined;
298
298
  mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
299
299
  order_id?: string | number | undefined;
300
- eftpos?: "stripe" | "payo" | "tyro" | "windcave" | undefined;
301
- action?: "amount" | "pay" | "deviceList" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "payo" | "stripe" | undefined;
301
+ action?: "amount" | "deviceList" | "pay" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
304
304
  title?: string | undefined;
@@ -308,7 +308,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
308
308
  net?: boolean | undefined;
309
309
  component?: string | undefined;
310
310
  form?: string | undefined;
311
- status?: "success" | "warn" | "loading" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
311
+ status?: "loading" | "success" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
312
312
  warn?: string | undefined;
313
313
  steps?: {
314
314
  /** 用于重置当前步骤 */
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const SelectProduct: React.FC;
4
+ export default SelectProduct;
@@ -0,0 +1,69 @@
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/components/eventBooking/components/Provider/SelectProduct/index.tsx
30
+ var SelectProduct_exports = {};
31
+ __export(SelectProduct_exports, {
32
+ default: () => SelectProduct_default
33
+ });
34
+ module.exports = __toCommonJS(SelectProduct_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_Sales = require("../../../Sales");
37
+ var import_utils = require("@pisell/utils");
38
+ var import_materials = require("@pisell/materials");
39
+ var import_index = require("./index.less");
40
+ var SelectProduct = () => {
41
+ var _a;
42
+ const { data } = (0, import_Sales.useSales)();
43
+ const { addToCart, cartData } = (0, import_Sales.useCart)();
44
+ const handleAddToCart = (product) => {
45
+ addToCart(product);
46
+ };
47
+ const renderProductCard = (product) => {
48
+ var _a2;
49
+ const isSelected = (_a2 = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a2.some(
50
+ (item) => item.id === product.id
51
+ );
52
+ return /* @__PURE__ */ import_react.default.createElement(
53
+ "div",
54
+ {
55
+ key: product.id,
56
+ className: `product-card ${isSelected ? "product-card-selected" : ""}`,
57
+ onClick: () => handleAddToCart(product)
58
+ },
59
+ /* @__PURE__ */ import_react.default.createElement(import_materials.PisellCard, { bodyStyle: { padding: "16px" } }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "product-title" }, product.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-price" }, product.price, " ", product.currency)))
60
+ );
61
+ };
62
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "select-product-container" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "step-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "step-number" }, "Step 1"), /* @__PURE__ */ import_react.default.createElement("div", { className: "step-title" }, "Select Product")), /* @__PURE__ */ import_react.default.createElement("div", { className: "category-section" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "category-title" }, "Other"), /* @__PURE__ */ import_react.default.createElement("div", { className: "product-list" }, renderProductCard({
63
+ id: "1",
64
+ title: "appointment",
65
+ price: "1.00",
66
+ currency: "AUD"
67
+ }))), /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-section" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-title" }, "Your cart"), ((_a = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a.length) ? /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-items" }, cartData.cartItems.map((item) => /* @__PURE__ */ import_react.default.createElement("div", { key: item.id, className: "cart-item" }, item.title))) : /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-empty" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-empty-icon" }, "🛒"), /* @__PURE__ */ import_react.default.createElement("div", { className: "cart-empty-text" }, import_utils.locales.getText("pisell2.event.cart.empty")))));
68
+ };
69
+ var SelectProduct_default = SelectProduct;
@@ -0,0 +1,131 @@
1
+ .select-product-container {
2
+ padding: 24px;
3
+ background: #fff;
4
+
5
+ .step-header {
6
+ margin-bottom: 24px;
7
+
8
+ .step-number {
9
+ font-size: 14px;
10
+ color: #666;
11
+ margin-bottom: 8px;
12
+ }
13
+
14
+ .step-title {
15
+ font-size: 24px;
16
+ font-weight: 500;
17
+ color: #333;
18
+ }
19
+ }
20
+
21
+ .category-section {
22
+ margin-bottom: 24px;
23
+
24
+ .category-title {
25
+ font-size: 16px;
26
+ font-weight: 500;
27
+ color: #333;
28
+ margin-bottom: 16px;
29
+ }
30
+
31
+ .product-list {
32
+ display: grid;
33
+ grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
34
+ gap: 16px;
35
+ }
36
+ }
37
+
38
+ .product-card {
39
+ cursor: pointer;
40
+ transition: all 0.3s;
41
+
42
+ &:hover {
43
+ transform: translateY(-2px);
44
+ }
45
+
46
+ &.product-card-selected {
47
+ .pisell-card {
48
+ border-color: #1890ff;
49
+ background: rgba(24, 144, 255, 0.05);
50
+ }
51
+ }
52
+
53
+ .product-content {
54
+ text-align: center;
55
+
56
+ .product-title {
57
+ font-size: 16px;
58
+ color: #333;
59
+ margin-bottom: 8px;
60
+ }
61
+
62
+ .product-price {
63
+ font-size: 14px;
64
+ color: #666;
65
+ }
66
+ }
67
+ }
68
+
69
+ .cart-section {
70
+ background: #f5f5f5;
71
+ border-radius: 4px;
72
+ padding: 24px;
73
+
74
+ .cart-title {
75
+ font-size: 18px;
76
+ font-weight: 500;
77
+ color: #333;
78
+ margin-bottom: 16px;
79
+ }
80
+
81
+ .cart-empty {
82
+ text-align: center;
83
+ padding: 32px 0;
84
+
85
+ .cart-empty-icon {
86
+ font-size: 24px;
87
+ margin-bottom: 8px;
88
+ }
89
+
90
+ .cart-empty-text {
91
+ color: #999;
92
+ }
93
+ }
94
+
95
+ .cart-items {
96
+ .cart-item {
97
+ padding: 12px;
98
+ background: #fff;
99
+ border-radius: 4px;
100
+ margin-bottom: 8px;
101
+
102
+ &:last-child {
103
+ margin-bottom: 0;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+
110
+ // 移动端适配
111
+ @media screen and (max-width: 768px) {
112
+ .select-product-container {
113
+ padding: 16px;
114
+
115
+ .step-header {
116
+ margin-bottom: 16px;
117
+
118
+ .step-title {
119
+ font-size: 20px;
120
+ }
121
+ }
122
+
123
+ .product-list {
124
+ grid-template-columns: 1fr !important;
125
+ }
126
+
127
+ .cart-section {
128
+ padding: 16px;
129
+ }
130
+ }
131
+ }
@@ -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").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").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 = {};
30
31
  constructor() {
31
- this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -47,7 +47,10 @@ var Product = (props) => {
47
47
  hideAddBtn,
48
48
  platform,
49
49
  isShowChangeResource,
50
- isShowDelete
50
+ isShowDelete,
51
+ isShowChangeHolder,
52
+ isShowHolder,
53
+ isShowAddHolderButton
51
54
  } = state;
52
55
  const clearCart = (0, import_useClearCart.default)(id);
53
56
  const handleChange = (item, type, other) => {
@@ -60,15 +63,21 @@ var Product = (props) => {
60
63
  isShowPackageNote,
61
64
  disabledEdit,
62
65
  isShowChangeResource,
63
- isShowDelete
66
+ isShowChangeHolder,
67
+ isShowDelete,
68
+ isShowHolder,
69
+ isShowAddHolderButton
64
70
  };
65
71
  }, [
66
72
  isShowNote,
67
73
  isShowPackageNote,
68
74
  disabledEdit,
69
75
  isShowChangeResource,
70
- isShowDelete
76
+ isShowDelete,
77
+ isShowHolder,
78
+ isShowAddHolderButton
71
79
  ]);
80
+ console.log("productParams", productParams);
72
81
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__shopping-cart-content" }, clearCart, lists == null ? void 0 : lists.map((item) => {
73
82
  return /* @__PURE__ */ import_react.default.createElement(
74
83
  import_materials.ProductCard,
@@ -81,6 +90,8 @@ var Product = (props) => {
81
90
  onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
82
91
  onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
83
92
  onChangeResource: (e) => handleChange(item, "change_resource", e),
93
+ onChangeHolder: (e) => handleChange(item, "change_holder", e),
94
+ onAddHolder: (e) => handleChange(item, "add_holder", e),
84
95
  ...productParams
85
96
  }
86
97
  );
@@ -43,7 +43,10 @@ var productDefault = {
43
43
  products: [],
44
44
  isEdit: false,
45
45
  disabledEdit: false,
46
- isShowChangeResource: false
46
+ isShowChangeResource: false,
47
+ isShowChangeHolder: false,
48
+ isShowHolder: true,
49
+ isShowAddHolderButton: false
47
50
  };
48
51
  var defaultData = {
49
52
  isOpenGroup: true,
@@ -9,6 +9,9 @@ export interface productProps {
9
9
  disabledEdit?: boolean;
10
10
  isShowChangeResource?: boolean;
11
11
  isShowDelete?: boolean;
12
+ isShowChangeHolder?: boolean;
13
+ isShowHolder?: boolean;
14
+ isShowAddHolderButton?: boolean;
12
15
  }
13
16
  export interface shoppingCartProps {
14
17
  isOpenGroup?: boolean;
@@ -179,7 +179,7 @@ var Detail = (0, import_react.forwardRef)((props, ref) => {
179
179
  const formatCurrencyAmount = (amount = "", isNegative = false) => {
180
180
  if (!amount) return "";
181
181
  const absAmount = amount.startsWith("-") ? amount.substring(1) : amount;
182
- return isNegative ? `-${!["point_card", "good_pass"].includes(tag) ? symbol : ""}${absAmount}` : `${!["point_card", "good_pass"].includes(tag) ? symbol : ""}${amount}`;
182
+ return isNegative ? `-${tag !== "point_card" ? symbol : ""}${absAmount}` : `${tag !== "point_card" ? symbol : ""}${amount}`;
183
183
  };
184
184
  const getDetail = async () => {
185
185
  const { apple_wallet_url: apple_wallet_url2 = "", google_wallet_url: google_wallet_url2 = "" } = await (0, import_serve.getDetailApi)({ id: detail.id || "" });
@@ -74,7 +74,7 @@ var WalletCard = ({
74
74
  showDisabledReason: isDisabled,
75
75
  disabledReason,
76
76
  propStyle: { marginBottom: 16 },
77
- showBalanceSymbol: !["point_card", "good_pass"].includes(tag),
77
+ showBalanceSymbol: tag !== "point_card",
78
78
  active: isActive,
79
79
  name: product_title,
80
80
  qrCode: code,
package/lib/index.d.ts CHANGED
@@ -40,3 +40,4 @@ export { default as EventBookingDetailModal } from './components/eventBooking/co
40
40
  export { default as EventProgressBar } from './components/eventBooking/components/progressBar';
41
41
  export { default as ShoppingCart } from './components/shoppingCart';
42
42
  export { default as AppointmentBooking } from './components/appointmentBooking';
43
+ export { default as AppointmentDeposit } from './components/appointmentBooking/deposit';
package/lib/index.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  var src_exports = {};
31
31
  __export(src_exports, {
32
32
  AppointmentBooking: () => import_appointmentBooking.default,
33
+ AppointmentDeposit: () => import_deposit2.default,
33
34
  Booking: () => import_booking.default,
34
35
  BookingAddons: () => import_addons.default,
35
36
  BookingContacts: () => import_contacts.default,
@@ -116,11 +117,13 @@ var import_bookingDetailModal = __toESM(require("./components/eventBooking/compo
116
117
  var import_progressBar = __toESM(require("./components/eventBooking/components/progressBar"));
117
118
  var import_shoppingCart = __toESM(require("./components/shoppingCart"));
118
119
  var import_appointmentBooking = __toESM(require("./components/appointmentBooking"));
120
+ var import_deposit2 = __toESM(require("./components/appointmentBooking/deposit"));
119
121
  import_dayjs.default.extend(import_weekday.default);
120
122
  import_dayjs.default.extend(import_localeData.default);
121
123
  // Annotate the CommonJS export names for ESM import in node:
122
124
  0 && (module.exports = {
123
125
  AppointmentBooking,
126
+ AppointmentDeposit,
124
127
  Booking,
125
128
  BookingAddons,
126
129
  BookingContacts,
@@ -18,6 +18,6 @@ declare let modal: Omit<ModalStaticFunctions, 'warn'>;
18
18
  export declare const setModal: (m: Omit<ModalStaticFunctions, 'warn'>) => void;
19
19
  export declare const saveConfirm: () => Promise<{
20
20
  destroy: () => void;
21
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
21
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
22
22
  }>;
23
23
  export { modal };