@pisell/private-materials 3.2.33 → 3.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) 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 +31 -15
  17. package/es/components/appointmentBooking/components/Cart/Item/index.less +15 -9
  18. package/es/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  19. package/es/components/appointmentBooking/components/Cart/index.js +2 -7
  20. package/es/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  21. package/es/components/appointmentBooking/components/ConfirmInformation/index.js +16 -0
  22. package/es/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
  23. package/es/components/appointmentBooking/components/Content/index.js +42 -6
  24. package/es/components/appointmentBooking/components/Date/index.js +86 -24
  25. package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  26. package/es/components/appointmentBooking/components/Deposit/index.js +30 -0
  27. package/es/components/appointmentBooking/components/Deposit/index.less +16 -0
  28. package/es/components/appointmentBooking/components/Form/index.d.ts +3 -0
  29. package/es/components/appointmentBooking/components/Form/index.js +110 -0
  30. package/es/components/appointmentBooking/components/Form/index.less +3 -0
  31. package/es/components/appointmentBooking/components/Header/index.js +3 -2
  32. package/es/components/appointmentBooking/components/Resource/index.js +4 -1
  33. package/es/components/appointmentBooking/components/Services/index.js +103 -9
  34. package/es/components/appointmentBooking/context.d.ts +3 -0
  35. package/es/components/appointmentBooking/context.js +19 -3
  36. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  37. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +108 -0
  38. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  39. package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
  40. package/es/components/appointmentBooking/deposit/index.js +101 -0
  41. package/es/components/appointmentBooking/deposit/index.less +53 -0
  42. package/es/components/appointmentBooking/hooks.d.ts +16 -0
  43. package/es/components/appointmentBooking/hooks.js +138 -53
  44. package/es/components/appointmentBooking/index.js +8 -0
  45. package/es/components/appointmentBooking/locales.d.ts +36 -3
  46. package/es/components/appointmentBooking/locales.js +42 -3
  47. package/es/components/appointmentBooking/utils.d.ts +22 -0
  48. package/es/components/appointmentBooking/utils.js +111 -26
  49. package/es/components/booking/addons/model.js +5 -5
  50. package/es/components/booking/components/TabProduct/selectProductItem/index.js +4 -4
  51. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  52. package/es/components/booking/components/browserSelect/index.js +1 -1
  53. package/es/components/booking/components/footer/index.d.ts +1 -0
  54. package/es/components/booking/components/footer/index.js +6 -4
  55. package/es/components/booking/components/voucher/index.js +13 -15
  56. package/es/components/booking/forms/model.js +5 -5
  57. package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
  58. package/es/components/booking/info/dateRange/index.d.ts +1 -0
  59. package/es/components/booking/info/index.d.ts +1 -0
  60. package/es/components/booking/info/index.js +2 -8
  61. package/es/components/booking/info/service/addService/index.d.ts +1 -0
  62. package/es/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  63. package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  64. package/es/components/booking/info/service/like/index.js +1 -1
  65. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  66. package/es/components/booking/info/service2/utils.d.ts +1 -1
  67. package/es/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  68. package/es/components/booking/info2/service/addTimeModal/index.js +3 -2
  69. package/es/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +4 -2
  70. package/es/components/booking/info2/service/editService/index.js +4 -11
  71. package/es/components/booking/materiels/startTime/index.js +1 -1
  72. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  73. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  74. package/es/components/booking/notes/addNote/index.js +1 -1
  75. package/es/components/booking/notes/model.js +5 -5
  76. package/es/components/booking/payments/model.js +5 -5
  77. package/es/components/booking/utils.d.ts +2 -2
  78. package/es/components/eftposPay/amount.d.ts +1 -1
  79. package/es/components/eftposPay/device.d.ts +1 -1
  80. package/es/components/eftposPay/hooks.d.ts +1 -1
  81. package/es/components/eftposPay/store/index.d.ts +2 -2
  82. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  83. package/es/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  84. package/es/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  85. package/es/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  86. package/es/components/eventBooking/components/Provider/SelectProduct/index.js +77 -0
  87. package/es/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  88. package/es/components/listComponent/index.js +5 -5
  89. package/es/components/productExtension/card/index.js +3 -3
  90. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  91. package/es/components/productExtension/fields/Forms/index.js +12 -12
  92. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  93. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  94. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  95. package/es/components/productExtension/server.js +2 -2
  96. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  97. package/es/components/schedules/calendar/index.js +4 -4
  98. package/es/components/schedules/calendar/serve.js +2 -2
  99. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  100. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  101. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  102. package/es/components/schedules/components/ResourceList/index.js +1 -1
  103. package/es/components/schedules/components/Search/index.js +5 -5
  104. package/es/components/schedules/model.js +5 -5
  105. package/es/components/schedules/openHours/index.js +1 -1
  106. package/es/components/schedules/openHours/serve.js +2 -2
  107. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  108. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  109. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  110. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  111. package/es/components/schedules/products/serve.js +2 -2
  112. package/es/components/schedules/products/utils.js +5 -5
  113. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  114. package/es/components/schedules/resources/detail/index.js +10 -10
  115. package/es/components/schedules/resources/list/index.js +2 -2
  116. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  117. package/es/components/schedules/resources/serve.js +2 -2
  118. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  119. package/es/components/schedules/utils.js +4 -4
  120. package/es/components/selectModal/index.js +2 -2
  121. package/es/components/shoppingCart/components/Cart/Product.js +12 -2
  122. package/es/components/shoppingCart/components/Cart/index.d.ts +1 -0
  123. package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
  124. package/es/components/shoppingCart/status.js +3 -1
  125. package/es/components/shoppingCart/type.d.ts +2 -0
  126. package/es/components/wallet/Detail/index.js +1 -1
  127. package/es/components/wallet/components/WalletCard.js +1 -1
  128. package/es/hooks/useComponents.js +1 -1
  129. package/es/index.d.ts +1 -0
  130. package/es/index.js +2 -1
  131. package/lib/components/Sales/Event/index.js +5 -1
  132. package/lib/components/Sales/Summary/utils.d.ts +1 -1
  133. package/lib/components/appointmentBooking/components/Cart/ContinueButton/index.js +56 -20
  134. package/lib/components/appointmentBooking/components/Cart/Item/Total.js +31 -24
  135. package/lib/components/appointmentBooking/components/Cart/Item/index.d.ts +1 -1
  136. package/lib/components/appointmentBooking/components/Cart/Item/index.js +28 -10
  137. package/lib/components/appointmentBooking/components/Cart/Item/index.less +15 -9
  138. package/lib/components/appointmentBooking/components/Cart/index.d.ts +1 -0
  139. package/lib/components/appointmentBooking/components/Cart/index.js +2 -2
  140. package/lib/components/appointmentBooking/components/ConfirmInformation/index.d.ts +4 -0
  141. package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +42 -0
  142. package/lib/components/appointmentBooking/components/ConfirmInformation/index.less +24 -0
  143. package/lib/components/appointmentBooking/components/Content/index.js +31 -3
  144. package/lib/components/appointmentBooking/components/Date/index.js +27 -8
  145. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
  146. package/lib/components/appointmentBooking/components/Deposit/index.js +61 -0
  147. package/lib/components/appointmentBooking/components/Deposit/index.less +16 -0
  148. package/lib/components/appointmentBooking/components/Form/index.d.ts +3 -0
  149. package/lib/components/appointmentBooking/components/Form/index.js +108 -0
  150. package/lib/components/appointmentBooking/components/Form/index.less +3 -0
  151. package/lib/components/appointmentBooking/components/Header/index.js +9 -6
  152. package/lib/components/appointmentBooking/components/Resource/index.js +2 -0
  153. package/lib/components/appointmentBooking/components/Services/index.js +48 -7
  154. package/lib/components/appointmentBooking/context.d.ts +3 -0
  155. package/lib/components/appointmentBooking/context.js +12 -4
  156. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
  157. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +95 -0
  158. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.less +9 -0
  159. package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
  160. package/lib/components/appointmentBooking/deposit/index.js +109 -0
  161. package/lib/components/appointmentBooking/deposit/index.less +53 -0
  162. package/lib/components/appointmentBooking/hooks.d.ts +16 -0
  163. package/lib/components/appointmentBooking/hooks.js +49 -6
  164. package/lib/components/appointmentBooking/index.js +5 -0
  165. package/lib/components/appointmentBooking/locales.d.ts +36 -3
  166. package/lib/components/appointmentBooking/locales.js +36 -3
  167. package/lib/components/appointmentBooking/utils.d.ts +22 -0
  168. package/lib/components/appointmentBooking/utils.js +83 -25
  169. package/lib/components/booking/components/footer/index.d.ts +1 -0
  170. package/lib/components/booking/components/footer/index.js +8 -6
  171. package/lib/components/booking/components/voucher/index.js +11 -15
  172. package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
  173. package/lib/components/booking/info/dateRange/index.d.ts +1 -0
  174. package/lib/components/booking/info/index.d.ts +1 -0
  175. package/lib/components/booking/info/index.js +4 -6
  176. package/lib/components/booking/info/service/addService/index.d.ts +1 -0
  177. package/lib/components/booking/info/service/addTimeModal/index.d.ts +1 -0
  178. package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
  179. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  180. package/lib/components/booking/info/service2/utils.d.ts +1 -1
  181. package/lib/components/booking/info2/service/addTimeModal/index.d.ts +1 -0
  182. package/lib/components/booking/info2/service/addTimeModal/index.js +4 -3
  183. package/lib/components/booking/info2/service/editService/Resources/MaxLengthSelect/index.js +2 -1
  184. package/lib/components/booking/info2/service/editService/index.js +4 -11
  185. package/lib/components/booking/utils.d.ts +2 -2
  186. package/lib/components/eftposPay/amount.d.ts +1 -1
  187. package/lib/components/eftposPay/device.d.ts +1 -1
  188. package/lib/components/eftposPay/hooks.d.ts +1 -1
  189. package/lib/components/eftposPay/store/index.d.ts +2 -2
  190. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +1 -0
  191. package/lib/components/eventBooking/components/Provider/Cart/index.d.ts +1 -0
  192. package/lib/components/eventBooking/components/Provider/Content/index.d.ts +1 -0
  193. package/lib/components/eventBooking/components/Provider/SelectProduct/index.d.ts +4 -0
  194. package/lib/components/eventBooking/components/Provider/SelectProduct/index.js +69 -0
  195. package/lib/components/eventBooking/components/Provider/SelectProduct/index.less +131 -0
  196. package/lib/components/schedules/utils.js +1 -1
  197. package/lib/components/shoppingCart/components/Cart/Product.js +8 -2
  198. package/lib/components/shoppingCart/components/Cart/index.d.ts +1 -0
  199. package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
  200. package/lib/components/shoppingCart/status.js +3 -1
  201. package/lib/components/shoppingCart/type.d.ts +2 -0
  202. package/lib/components/wallet/Detail/index.js +1 -1
  203. package/lib/components/wallet/components/WalletCard.js +1 -1
  204. package/lib/index.d.ts +1 -0
  205. package/lib/index.js +3 -0
  206. package/lowcode/appointment-deposit/meta.ts +58 -0
  207. package/package.json +4 -4
  208. package/es/components/ticketBooking/data.d.ts +0 -0
  209. package/es/components/ticketBooking/data.js +0 -82
  210. package/es/components/ticketBooking/index.d.ts +0 -2
  211. package/es/components/ticketBooking/index.js +0 -6
  212. package/es/components/workSpaceListDetail/index.d.ts +0 -4
  213. package/es/components/workSpaceListDetail/server.d.ts +0 -4
  214. package/lib/components/ticketBooking/data.d.ts +0 -0
  215. package/lib/components/ticketBooking/data.js +0 -0
  216. package/lib/components/ticketBooking/index.d.ts +0 -2
  217. package/lib/components/ticketBooking/index.js +0 -28
  218. package/lib/components/workSpaceListDetail/index.d.ts +0 -4
  219. package/lib/components/workSpaceListDetail/server.d.ts +0 -4
@@ -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);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface AddServiceVariantProps {
2
3
  globalState: any;
3
4
  setGlobalState: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export declare const disabledDate: (current: any, position: any, currentDate: any) => any;
3
4
  declare const DateRange: ({ state, dispatch, key }: any) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { InfoProps } from './main';
2
3
  declare const APP: (props: InfoProps) => JSX.Element;
3
4
  export default APP;
@@ -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 });
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PisellDrawerProps } from '../../../components/drawer';
2
3
  import './index.less';
3
4
  interface AddServiceProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const BookingList: ({ items }: {
2
3
  items: any[];
3
4
  }) => JSX.Element;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -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>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import '../../../info/service/addTimeModal/index.less';
2
3
  declare const AddTimeModal: () => JSX.Element;
3
4
  export default AddTimeModal;
@@ -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: "success" | "page" | "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: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
14
14
  [keys: string]: unknown;
15
15
  } | undefined, other?: any) => void) | undefined;
16
16
  onClose: () => void;
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
19
19
  readonly netRef: React.MutableRefObject<boolean | undefined>;
20
20
  readonly symbolRef: React.MutableRefObject<string>;
21
21
  readonly amountRef: React.MutableRefObject<string | number>;
22
- readonly eftposRef: React.MutableRefObject<"stripe" | "payo" | "tyro" | "windcave">;
22
+ readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "payo" | "stripe">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -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;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const CartItem: () => JSX.Element;
3
4
  export default CartItem;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: ({ open, onCancel }: any) => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Layout: () => JSX.Element;
3
4
  export default Layout;
@@ -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
+ }
@@ -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,9 @@ var Product = (props) => {
47
47
  hideAddBtn,
48
48
  platform,
49
49
  isShowChangeResource,
50
- isShowDelete
50
+ isShowDelete,
51
+ isShowChangeHolder,
52
+ isShowHolder
51
53
  } = state;
52
54
  const clearCart = (0, import_useClearCart.default)(id);
53
55
  const handleChange = (item, type, other) => {
@@ -60,7 +62,9 @@ var Product = (props) => {
60
62
  isShowPackageNote,
61
63
  disabledEdit,
62
64
  isShowChangeResource,
63
- isShowDelete
65
+ isShowChangeHolder,
66
+ isShowDelete,
67
+ isShowHolder
64
68
  };
65
69
  }, [
66
70
  isShowNote,
@@ -81,6 +85,8 @@ var Product = (props) => {
81
85
  onLike: (e) => handleChange(e, "like", { like_status: e.like_status }),
82
86
  onCard: (e) => handleChange == null ? void 0 : handleChange(e, "view"),
83
87
  onChangeResource: (e) => handleChange(item, "change_resource", e),
88
+ onChangeHolder: (e) => handleChange(item, "change_holder", e),
89
+ onAddHolder: (e) => handleChange(item, "add_holder"),
84
90
  ...productParams
85
91
  }
86
92
  );
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Cart: () => JSX.Element;
3
4
  export default Cart;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Content: () => JSX.Element;
3
4
  export default Content;
@@ -43,7 +43,9 @@ 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
47
49
  };
48
50
  var defaultData = {
49
51
  isOpenGroup: true,
@@ -9,6 +9,8 @@ export interface productProps {
9
9
  disabledEdit?: boolean;
10
10
  isShowChangeResource?: boolean;
11
11
  isShowDelete?: boolean;
12
+ isShowChangeHolder?: boolean;
13
+ isShowHolder?: boolean;
12
14
  }
13
15
  export interface shoppingCartProps {
14
16
  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,