@pisell/private-materials 3.3.95 → 3.3.97

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 (249) 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 +11 -11
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +11 -11
  11. package/es/components/Sales/Cart/index.js +5 -1
  12. package/es/components/Sales/Cart/utils.d.ts +40 -0
  13. package/es/components/Sales/Cart/utils.js +167 -0
  14. package/es/components/Sales/Checkout/index.d.ts +4 -0
  15. package/es/components/Sales/Checkout/index.js +52 -8
  16. package/es/components/Sales/Checkout/serve.d.ts +13 -0
  17. package/es/components/Sales/Checkout/serve.js +16 -2
  18. package/es/components/Sales/Checkout/utils.js +7 -1
  19. package/es/components/Sales/Summary/index.d.ts +10 -0
  20. package/es/components/Sales/Summary/index.js +17 -2
  21. package/es/components/Sales/Summary/serve.d.ts +1 -0
  22. package/es/components/Sales/Summary/serve.js +6 -0
  23. package/es/components/Sales/Summary/utils.d.ts +15 -0
  24. package/es/components/Sales/Summary/utils.js +43 -1
  25. package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  26. package/es/components/appointmentBooking/components/Content/index.js +15 -1
  27. package/es/components/appointmentBooking/components/Content/index.less +1 -1
  28. package/es/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  29. package/es/components/appointmentBooking/components/Deposit/index.js +27 -7
  30. package/es/components/appointmentBooking/components/Services/index.js +23 -27
  31. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +25 -20
  32. package/es/components/appointmentBooking/deposit/index.js +4 -2
  33. package/es/components/appointmentBooking/index.js +14 -0
  34. package/es/components/appointmentBooking/index.less +1 -1
  35. package/es/components/booking/addons/model.d.ts +1 -10
  36. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  37. package/es/components/booking/components/browserSelect/index.js +1 -1
  38. package/es/components/booking/components/voucher/index.js +2 -2
  39. package/es/components/booking/forms/model.d.ts +1 -10
  40. package/es/components/booking/forms/model.js +5 -5
  41. package/es/components/booking/info/index.d.ts +0 -1
  42. package/es/components/booking/info/model.d.ts +1 -10
  43. package/es/components/booking/info/model.js +5 -0
  44. package/es/components/booking/info/service/Lists.d.ts +1 -0
  45. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  46. package/es/components/booking/info/service/like/index.js +1 -1
  47. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  48. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  49. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  50. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  51. package/es/components/booking/materiels/startTime/index.js +1 -1
  52. package/es/components/booking/model.d.ts +1 -9
  53. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  54. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  55. package/es/components/booking/notes/model.d.ts +1 -10
  56. package/es/components/booking/notes/model.js +5 -5
  57. package/es/components/booking/payments/model.d.ts +1 -10
  58. package/es/components/booking/payments/model.js +5 -5
  59. package/es/components/booking/utils.d.ts +2 -2
  60. package/es/components/eftposPay/amount.d.ts +1 -1
  61. package/es/components/eftposPay/app.d.ts +1 -0
  62. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  63. package/es/components/eftposPay/const.d.ts +4 -1
  64. package/es/components/eftposPay/const.js +3 -1
  65. package/es/components/eftposPay/device.d.ts +1 -1
  66. package/es/components/eftposPay/hooks.d.ts +2 -2
  67. package/es/components/eftposPay/hooks.js +3 -1
  68. package/es/components/eftposPay/index.js +1 -1
  69. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  70. package/es/components/eftposPay/linkly/const.js +82 -0
  71. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  72. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  73. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  74. package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
  75. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  76. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  77. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  78. package/es/components/eftposPay/linkly/index.js +197 -0
  79. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  80. package/es/components/eftposPay/linkly/service.js +81 -0
  81. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  82. package/es/components/eftposPay/manufacturer.js +4 -0
  83. package/es/components/eftposPay/pay.d.ts +1 -1
  84. package/es/components/eftposPay/pay.js +6 -2
  85. package/es/components/eftposPay/payo/config.js +30 -3
  86. package/es/components/eftposPay/store/index.d.ts +4 -4
  87. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
  88. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  89. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  90. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  91. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  92. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -1
  93. package/es/components/eventBooking/locales.d.ts +24 -0
  94. package/es/components/eventBooking/locales.js +27 -3
  95. package/es/components/listComponent/index.js +5 -5
  96. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  97. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  98. package/es/components/pay/toC/model.d.ts +1 -9
  99. package/es/components/productExtension/card/index.js +3 -3
  100. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  101. package/es/components/productExtension/fields/Forms/index.js +12 -12
  102. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  103. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  104. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  105. package/es/components/productExtension/server.js +2 -2
  106. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  107. package/es/components/schedules/calendar/index.js +4 -4
  108. package/es/components/schedules/calendar/serve.js +2 -2
  109. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  110. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  111. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  112. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  113. package/es/components/schedules/components/ResourceList/index.js +1 -1
  114. package/es/components/schedules/components/Search/index.js +5 -5
  115. package/es/components/schedules/model.d.ts +1 -9
  116. package/es/components/schedules/model.js +5 -5
  117. package/es/components/schedules/openHours/index.js +1 -1
  118. package/es/components/schedules/openHours/serve.js +2 -2
  119. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  120. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  121. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  122. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  123. package/es/components/schedules/products/index.d.ts +1 -0
  124. package/es/components/schedules/products/serve.js +2 -2
  125. package/es/components/schedules/products/utils.js +5 -5
  126. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  127. package/es/components/schedules/resources/detail/index.js +10 -10
  128. package/es/components/schedules/resources/list/index.js +2 -2
  129. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  130. package/es/components/schedules/resources/serve.js +2 -2
  131. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  132. package/es/components/schedules/utils.d.ts +1 -1
  133. package/es/components/schedules/utils.js +4 -4
  134. package/es/components/selectModal/index.js +2 -2
  135. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  136. package/es/components/ticketBooking/components/ticketBooking/index.js +120 -1
  137. package/es/components/ticketBooking/locales.d.ts +164 -146
  138. package/es/components/ticketBooking/locales.js +195 -147
  139. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  140. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  141. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  142. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  143. package/es/components/wallet/Detail/model.d.ts +1 -13
  144. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  145. package/es/components/wallet/PointCard/model.d.ts +1 -13
  146. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  147. package/es/components/wallet/Voucher/model.d.ts +1 -13
  148. package/es/components/wallet/model.d.ts +1 -9
  149. package/es/hooks/useComponents.js +1 -1
  150. package/es/utils/index.d.ts +1 -1
  151. package/lib/components/Sales/Cart/index.js +1 -0
  152. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  153. package/lib/components/Sales/Cart/utils.js +117 -0
  154. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  155. package/lib/components/Sales/Checkout/index.js +39 -7
  156. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  157. package/lib/components/Sales/Checkout/serve.js +7 -2
  158. package/lib/components/Sales/Checkout/utils.js +2 -0
  159. package/lib/components/Sales/Summary/index.d.ts +10 -0
  160. package/lib/components/Sales/Summary/index.js +7 -1
  161. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  162. package/lib/components/Sales/Summary/serve.js +32 -0
  163. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  164. package/lib/components/Sales/Summary/utils.js +30 -1
  165. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  166. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  167. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  168. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  169. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  170. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  171. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  172. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  173. package/lib/components/appointmentBooking/index.js +11 -0
  174. package/lib/components/appointmentBooking/index.less +1 -1
  175. package/lib/components/booking/addons/model.d.ts +1 -10
  176. package/lib/components/booking/components/voucher/index.js +2 -2
  177. package/lib/components/booking/forms/model.d.ts +1 -10
  178. package/lib/components/booking/info/index.d.ts +0 -1
  179. package/lib/components/booking/info/model.d.ts +1 -10
  180. package/lib/components/booking/info/model.js +3 -0
  181. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  182. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  183. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  184. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  185. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  186. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  187. package/lib/components/booking/model.d.ts +1 -9
  188. package/lib/components/booking/notes/model.d.ts +1 -10
  189. package/lib/components/booking/payments/model.d.ts +1 -10
  190. package/lib/components/booking/utils.d.ts +2 -2
  191. package/lib/components/eftposPay/amount.d.ts +1 -1
  192. package/lib/components/eftposPay/app.d.ts +1 -0
  193. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  194. package/lib/components/eftposPay/const.d.ts +4 -1
  195. package/lib/components/eftposPay/const.js +2 -0
  196. package/lib/components/eftposPay/device.d.ts +1 -1
  197. package/lib/components/eftposPay/hooks.d.ts +2 -2
  198. package/lib/components/eftposPay/hooks.js +11 -4
  199. package/lib/components/eftposPay/index.js +1 -1
  200. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  201. package/lib/components/eftposPay/linkly/const.js +102 -0
  202. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  203. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  204. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  205. package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
  206. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  207. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  208. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  209. package/lib/components/eftposPay/linkly/index.js +208 -0
  210. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  211. package/lib/components/eftposPay/linkly/service.js +55 -0
  212. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  213. package/lib/components/eftposPay/manufacturer.js +6 -0
  214. package/lib/components/eftposPay/pay.d.ts +1 -1
  215. package/lib/components/eftposPay/pay.js +13 -2
  216. package/lib/components/eftposPay/payo/config.js +22 -2
  217. package/lib/components/eftposPay/store/index.d.ts +4 -4
  218. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
  219. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +3 -0
  220. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
  221. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  222. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  223. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  224. package/lib/components/eventBooking/locales.d.ts +24 -0
  225. package/lib/components/eventBooking/locales.js +27 -3
  226. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  227. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  228. package/lib/components/pay/toC/model.d.ts +1 -9
  229. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  230. package/lib/components/schedules/model.d.ts +1 -9
  231. package/lib/components/schedules/products/index.d.ts +1 -0
  232. package/lib/components/schedules/utils.d.ts +1 -1
  233. package/lib/components/schedules/utils.js +1 -1
  234. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  235. package/lib/components/ticketBooking/components/ticketBooking/index.js +120 -1
  236. package/lib/components/ticketBooking/locales.d.ts +164 -146
  237. package/lib/components/ticketBooking/locales.js +22 -4
  238. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  239. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  240. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  241. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  242. package/lib/components/wallet/Detail/model.d.ts +1 -13
  243. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  244. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  245. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  246. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  247. package/lib/components/wallet/model.d.ts +1 -9
  248. package/lib/utils/index.d.ts +1 -1
  249. package/package.json +3 -3
@@ -190,6 +190,10 @@ var Layout = () => {
190
190
  if (isDateSelectedFirst && key === "select-date") return false;
191
191
  return key !== "confirm-information";
192
192
  }, [isDateSelectedFirst, (_e = currentStep == null ? void 0 : currentStep.step) == null ? void 0 : _e.key]);
193
+ const depositProtocolRequest = (id) => {
194
+ var _a2;
195
+ return (_a2 = appointmentBooking == null ? void 0 : appointmentBooking.getProtocol) == null ? void 0 : _a2.call(appointmentBooking, id);
196
+ };
193
197
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, !isRetailTemplate ? /* @__PURE__ */ import_react.default.createElement(import_Header.default, null) : null, /* @__PURE__ */ import_react.default.createElement(
194
198
  "div",
195
199
  {
@@ -214,7 +218,8 @@ var Layout = () => {
214
218
  onConfirm: () => closePolicy(true),
215
219
  item: policyParams == null ? void 0 : policyParams.content,
216
220
  onChange: () => setLoading(false),
217
- isHideCheckout: false
221
+ isHideCheckout: false,
222
+ depositProtocolRequest
218
223
  }
219
224
  ) : null);
220
225
  };
@@ -107,7 +107,7 @@
107
107
  margin-top: 0;
108
108
 
109
109
  .appointment-cart-item-wrap {
110
- height: calc(100vh - 16px) !important;
110
+ height: calc(var(--vh, 1vh) * 100 - 16px) !important;
111
111
  }
112
112
  }
113
113
  }
@@ -1,3 +1,9 @@
1
1
  import './index.less';
2
+ export declare const DepositContent: (props: {
3
+ isAgreeDepositPolicy: boolean;
4
+ setIsAgreeDepositPolicy: (value: boolean) => void;
5
+ deposit: any;
6
+ depositProtocolRequest?: any;
7
+ }) => JSX.Element;
2
8
  declare const Deposit: () => JSX.Element;
3
9
  export default Deposit;
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/appointmentBooking/components/Deposit/index.tsx
30
30
  var Deposit_exports = {};
31
31
  __export(Deposit_exports, {
32
+ DepositContent: () => DepositContent,
32
33
  default: () => Deposit_default
33
34
  });
34
35
  module.exports = __toCommonJS(Deposit_exports);
@@ -38,9 +39,13 @@ var import_deposit = __toESM(require("../../deposit"));
38
39
  var import_context = require("../../context");
39
40
  var import_utils = require("@pisell/utils");
40
41
  var import_index = require("./index.less");
41
- var Deposit = () => {
42
- const { setIsAgreeDepositPolicy, isAgreeDepositPolicy, summary } = (0, import_context.useAppointmentBookingContext)();
43
- const { deposit } = summary;
42
+ var DepositContent = (props) => {
43
+ const {
44
+ isAgreeDepositPolicy,
45
+ setIsAgreeDepositPolicy,
46
+ deposit,
47
+ depositProtocolRequest
48
+ } = props;
44
49
  return /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-wrap" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "appointment-deposit-top" }, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.appointment.deposit")), /* @__PURE__ */ import_react.default.createElement(
45
50
  import_materials.PisellText.Amount,
46
51
  {
@@ -54,8 +59,35 @@ var Deposit = () => {
54
59
  total: deposit == null ? void 0 : deposit.total,
55
60
  protocols: deposit == null ? void 0 : deposit.protocols,
56
61
  isAgreePolicy: isAgreeDepositPolicy,
57
- onChange: (value) => setIsAgreeDepositPolicy(value)
62
+ onChange: (value) => setIsAgreeDepositPolicy(value),
63
+ depositProtocolRequest
58
64
  }
59
65
  ));
60
66
  };
67
+ var Deposit = () => {
68
+ const {
69
+ setIsAgreeDepositPolicy,
70
+ isAgreeDepositPolicy,
71
+ summary,
72
+ appointmentBooking
73
+ } = (0, import_context.useAppointmentBookingContext)();
74
+ const { deposit } = summary;
75
+ const depositProtocolRequest = (id) => {
76
+ var _a;
77
+ return (_a = appointmentBooking == null ? void 0 : appointmentBooking.getProtocol) == null ? void 0 : _a.call(appointmentBooking, id);
78
+ };
79
+ return /* @__PURE__ */ import_react.default.createElement(
80
+ DepositContent,
81
+ {
82
+ isAgreeDepositPolicy: !!isAgreeDepositPolicy,
83
+ setIsAgreeDepositPolicy,
84
+ deposit,
85
+ depositProtocolRequest
86
+ }
87
+ );
88
+ };
61
89
  var Deposit_default = Deposit;
90
+ // Annotate the CommonJS export names for ESM import in node:
91
+ 0 && (module.exports = {
92
+ DepositContent
93
+ });
@@ -74,9 +74,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
74
74
  let type = "";
75
75
  if (!isRetailTemplate) {
76
76
  type = await checkProductType(item == null ? void 0 : item.id);
77
- if (type === "session") {
78
- appointmentBooking.openProductDetail(item.id);
79
- }
77
+ appointmentBooking.openProductDetail(item.id);
80
78
  }
81
79
  utils == null ? void 0 : utils.action({
82
80
  type: "pisell1.productDetail",
@@ -86,6 +84,10 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
86
84
  },
87
85
  callback: async (data) => {
88
86
  var _a, _b;
87
+ if (data.isCancel) {
88
+ appointmentBooking.closeProductDetail();
89
+ return;
90
+ }
89
91
  const product = {
90
92
  ...data,
91
93
  options: (data == null ? void 0 : data.option) || []
@@ -96,13 +98,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
96
98
  appointmentBooking.storeProduct(product);
97
99
  return;
98
100
  }
99
- if (data == null ? void 0 : data.isCancel) {
100
- if (type === "session") {
101
- appointmentBooking.closeProductDetail();
102
- appointmentBooking.getAvailableDate();
103
- }
104
- return;
105
- }
106
101
  const session = data == null ? void 0 : data.session;
107
102
  if (session) {
108
103
  const startDate = (0, import_dayjs.default)(session == null ? void 0 : session.start_at).format("YYYY-MM-DD");
@@ -114,7 +109,6 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
114
109
  endTime: `${endDate} ${session == null ? void 0 : session.end_time}`
115
110
  }
116
111
  });
117
- appointmentBooking.closeProductDetail();
118
112
  await appointmentBooking.getAvailableDate({
119
113
  startDate,
120
114
  endDate
@@ -132,6 +126,7 @@ var Services = (0, import_react.forwardRef)((props, ref) => {
132
126
  await appointmentBooking.getAvailableDate();
133
127
  }
134
128
  }
129
+ appointmentBooking.closeProductDetail();
135
130
  if (isDateSelectedFirst) {
136
131
  const index = (currentStep == null ? void 0 : currentStep.index) + 2;
137
132
  if (type === "duration" || appointmentBooking.isCartHasDurationProduct()) {
@@ -36,7 +36,6 @@ var import_react = __toESM(require("react"));
36
36
  var import_antd = require("antd");
37
37
  var import_materials = require("@pisell/materials");
38
38
  var import_utils = require("@pisell/utils");
39
- var import_context = require("../../../context");
40
39
  var import_index = require("./index.less");
41
40
  var DepositModal = (props) => {
42
41
  const {
@@ -45,9 +44,10 @@ var DepositModal = (props) => {
45
44
  item,
46
45
  onChange,
47
46
  onConfirm,
48
- isHideCheckout = true
47
+ isHideCheckout = true,
48
+ depositProtocolRequest
49
+ // 定金协议请求
49
50
  } = props;
50
- const { appointmentBooking } = (0, import_context.useAppointmentBookingContext)();
51
51
  const [policy, setPolicy] = (0, import_react.useState)(null);
52
52
  const [loading, setLoading] = (0, import_react.useState)(false);
53
53
  const [disabled, setDisabled] = (0, import_react.useState)(false);
@@ -55,9 +55,13 @@ var DepositModal = (props) => {
55
55
  setDisabled(!isHideCheckout);
56
56
  }, [isHideCheckout]);
57
57
  const getPolicy = async (id) => {
58
+ if (!depositProtocolRequest) {
59
+ console.error("depositProtocolRequest is not defined");
60
+ return;
61
+ }
58
62
  setLoading(true);
59
63
  try {
60
- const { data } = await appointmentBooking.getProtocol(id);
64
+ const { data } = await (depositProtocolRequest == null ? void 0 : depositProtocolRequest(id));
61
65
  setPolicy(data);
62
66
  onChange && onChange(data);
63
67
  } catch (error) {
@@ -48,7 +48,8 @@ var Deposit = (props) => {
48
48
  title,
49
49
  isAgreePolicy = true,
50
50
  isShowTitle = true,
51
- onChange
51
+ onChange,
52
+ depositProtocolRequest
52
53
  } = props;
53
54
  const context = (0, import_useEngineContext.default)();
54
55
  const [visible, setVisible] = (0, import_react.useState)(false);
@@ -102,7 +103,8 @@ var Deposit = (props) => {
102
103
  {
103
104
  open: visible,
104
105
  onCancel: () => setVisible(false),
105
- item: policyItem
106
+ item: policyItem,
107
+ depositProtocolRequest
106
108
  }
107
109
  ));
108
110
  };
@@ -58,6 +58,17 @@ var AppointmentBooking = () => {
58
58
  }
59
59
  });
60
60
  }, []);
61
+ (0, import_react.useEffect)(() => {
62
+ const setRealVH = () => {
63
+ const vh = window.innerHeight * 0.01;
64
+ document.documentElement.style.setProperty("--vh", `${vh}px`);
65
+ };
66
+ setRealVH();
67
+ window.addEventListener("resize", setRealVH);
68
+ return () => {
69
+ window.removeEventListener("resize", setRealVH);
70
+ };
71
+ }, []);
61
72
  return /* @__PURE__ */ import_react.default.createElement(
62
73
  "div",
63
74
  {
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  align-items: center;
5
5
  background: #ffffff;
6
- height: 100vh;
6
+ height: calc(var(--vh, 1vh) * 100);
7
7
  overflow-y: auto;
8
8
 
9
9
  .pisell-section-headers {
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -41,8 +41,8 @@ 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_utils2 = require("./utils");
45
44
  var import_ahooks = require("ahooks");
45
+ var import_utils2 = require("./utils");
46
46
  var ShopDiscountHooks = {
47
47
  onInited: "shopDiscount:onInited",
48
48
  onDestroy: "shopDiscount:onDestroy",
@@ -274,8 +274,8 @@ var VoucherCard = (props) => {
274
274
  import_materials.PisellGoodPassCard,
275
275
  {
276
276
  style: { width: "100%" },
277
- mixedSort,
278
277
  dataSource: ((_d = (_c = state.service) == null ? void 0 : _c.value) == null ? void 0 : _d.length) ? availableData : [],
278
+ mixedSort,
279
279
  onChange: (val) => {
280
280
  const shopDiscount2 = pisellos.getModule("shopDiscount");
281
281
  const detail = shopDiscount2.setDiscountSelected({
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InfoProps } from './main';
3
2
  declare const APP: (props: InfoProps) => JSX.Element;
4
3
  export default APP;
@@ -1,14 +1,5 @@
1
- /// <reference types="react" />
2
- import { FormState } from '../model';
3
1
  export declare const walkInData: {
4
2
  id: number;
5
3
  nickname: string;
6
4
  };
7
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
8
- state: FormState;
9
- } & {
10
- dispatch: (params: {
11
- type: string;
12
- payload: any;
13
- }) => void;
14
- }>;
5
+ export declare const Provider: any, Context: any;
@@ -79,6 +79,9 @@ var { Provider, Context } = (0, import_utils.miniRedux)({
79
79
  },
80
80
  setActiveCartId(state, payload) {
81
81
  state.setGlobalState(payload);
82
+ },
83
+ setAddons(state, payload) {
84
+ state.setGlobalState({ addons: { ...state.addons, ...payload } });
82
85
  }
83
86
  },
84
87
  reducers: {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange, onAction, isParallelResource }: any) => JSX.Element;
2
3
  export default Lists;
@@ -6,7 +6,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
6
6
  type: string;
7
7
  value: number;
8
8
  };
9
- locale: string;
9
+ locale: any;
10
10
  slice: any;
11
11
  selectProps: {
12
12
  size: string;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const Lists: ({ onEdit, onChange }: any) => JSX.Element;
2
3
  export default Lists;
@@ -7,7 +7,7 @@ export declare const getDurationProps: ({ cacheItem, useStartTime, currentResour
7
7
  type: string;
8
8
  value: number;
9
9
  };
10
- locale: string;
10
+ locale: any;
11
11
  slice: any;
12
12
  selectProps: {
13
13
  size: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from 'antd';
2
3
  interface HolderProps extends SelectProps {
3
4
  selectProps?: SelectProps;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SelectProps } from "antd";
2
3
  interface StartTimeProps extends SelectProps {
3
4
  locale?: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  amountSymbol: string;
4
3
  apis: {
@@ -105,11 +104,4 @@ export declare const walkInData: {
105
104
  id: number;
106
105
  nickname: string;
107
106
  };
108
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
109
- state: FormState;
110
- } & {
111
- dispatch: (params: {
112
- type: string;
113
- payload: any;
114
- }) => void;
115
- }>;
107
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -1,10 +1 @@
1
- /// <reference types="react" />
2
- import { FormState } from "../model";
3
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
4
- state: FormState;
5
- } & {
6
- dispatch: (params: {
7
- type: string;
8
- payload: any;
9
- }) => void;
10
- }>;
1
+ export declare const Provider: any, Context: any;
@@ -165,10 +165,10 @@ export declare const getProductTotalPrice: (item: any) => number;
165
165
  export declare const getDuration: (duration: number | {
166
166
  type: string;
167
167
  value: number;
168
- }) => number | "flexible" | {
168
+ }) => number | {
169
169
  type: string;
170
170
  value: number;
171
- };
171
+ } | "flexible";
172
172
  export declare const isWalkIn: (customer_id?: number | string) => boolean;
173
173
  export declare const getIsEdit: (state: any) => boolean;
174
174
  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" | "print" | "fail" | "mark_tx_processed", params?: string | {
12
12
  [keys: string]: unknown;
13
13
  } | undefined, other?: any) => void) | undefined;
14
14
  onClose: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { PosProps, RouteType } from './const';
2
3
  declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
3
4
  action: RouteType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { StatusType } from '../../const';
2
3
  declare const _default: (props: {
3
4
  status: StatusType;
@@ -5,7 +5,8 @@ export declare enum EftposEnum {
5
5
  Tyro = "tyro",
6
6
  /** 后端支付 - 支付 + 退款 */
7
7
  Windcave = "windcave",
8
- Stripe = "stripe"
8
+ Stripe = "stripe",
9
+ Linkly = "linkly"
9
10
  }
10
11
  export declare enum StatusEnum {
11
12
  Loading = "loading",
@@ -147,6 +148,8 @@ export declare enum PayStatus {
147
148
  'Success' = "200",
148
149
  /** 未生成交易记录 */
149
150
  'NoPay' = "4004",
151
+ /** 配对失效 */
152
+ 'PairingFailure' = "606020",
150
153
  /** 支付失败 */
151
154
  'Unknown' = "701000",
152
155
  /** 交易请求超时 */
@@ -35,6 +35,7 @@ var EftposEnum = /* @__PURE__ */ ((EftposEnum2) => {
35
35
  EftposEnum2["Tyro"] = "tyro";
36
36
  EftposEnum2["Windcave"] = "windcave";
37
37
  EftposEnum2["Stripe"] = "stripe";
38
+ EftposEnum2["Linkly"] = "linkly";
38
39
  return EftposEnum2;
39
40
  })(EftposEnum || {});
40
41
  var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
@@ -88,6 +89,7 @@ var PayRouteEnum = /* @__PURE__ */ ((PayRouteEnum2) => {
88
89
  var PayStatus = /* @__PURE__ */ ((PayStatus2) => {
89
90
  PayStatus2["Success"] = "200";
90
91
  PayStatus2["NoPay"] = "4004";
92
+ PayStatus2["PairingFailure"] = "606020";
91
93
  PayStatus2["Unknown"] = "701000";
92
94
  PayStatus2["Timeout"] = "701001";
93
95
  PayStatus2["PayOtherEftposFailed"] = "701003";
@@ -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" | "print" | "fail" | "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" | "loading" | "warn" | "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<"tyro" | "windcave" | "stripe" | "payo">;
22
+ readonly eftposRef: React.MutableRefObject<"payo" | "tyro" | "windcave" | "stripe" | "linkly">;
23
23
  readonly clientRef: React.MutableRefObject<ClientEnum>;
24
24
  readonly dataRef: React.MutableRefObject<import("./store").State>;
25
25
  };
@@ -128,6 +128,7 @@ var useFail = (index) => {
128
128
  return;
129
129
  }
130
130
  const [code] = [`${res.code}`];
131
+ console.log("code---->>>>>>>", code);
131
132
  if (code === import_const.PayStatus.Unknown) {
132
133
  steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.failed")(
133
134
  modeRef.current
@@ -168,8 +169,12 @@ var useFail = (index) => {
168
169
  if (isMark) {
169
170
  if (clientRef.current === import_const2.ClientEnum.User) {
170
171
  steps[index].status = "fail";
171
- steps[index].title = import_utils.locales.getText("page.eftpos-pay.text.timedout.title");
172
- steps[index].fail = import_utils.locales.getText("page.eftpos-pay.text.transaction.eftpos.fail.other");
172
+ steps[index].title = import_utils.locales.getText(
173
+ "page.eftpos-pay.text.timedout.title"
174
+ );
175
+ steps[index].fail = import_utils.locales.getText(
176
+ "page.eftpos-pay.text.transaction.eftpos.fail.other"
177
+ );
173
178
  steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
174
179
  dispatch((0, import_store.updateSteps)(steps));
175
180
  dispatch((0, import_store.updateComponent)("Fail"));
@@ -310,7 +315,9 @@ ${import_utils.locales.getText(
310
315
  )}
311
316
  ${import_utils.locales.getText(
312
317
  "page.eftpos-pay.text.transaction.eftpos.fail.if"
313
- )(modeRef.current)}` : import_utils.locales.getText("page.eftpos-pay.text.transaction.eftpos.fail.other");
318
+ )(modeRef.current)}` : import_utils.locales.getText(
319
+ "page.eftpos-pay.text.transaction.eftpos.fail.other"
320
+ );
314
321
  steps[index].status = "warn";
315
322
  steps[index].custom = steps[index].custom ? { ...steps[index].custom, isPosNetworkError: true } : { isPosNetworkError: true };
316
323
  dispatch((0, import_store.updateSteps)(steps));
@@ -359,7 +366,7 @@ ${import_utils.locales.getText(
359
366
  );
360
367
  return;
361
368
  }
362
- if (code === import_const.PayStatus.UserConfigError) {
369
+ if (code === import_const.PayStatus.UserConfigError || code === import_const.PayStatus.PairingFailure) {
363
370
  steps[index].title = import_utils.locales.getText(
364
371
  "page.eftpos-pay.text.transaction.user.config.title"
365
372
  );
@@ -139,7 +139,7 @@ var eftposPay_default = (props) => {
139
139
  }, [mode, state]);
140
140
  (0, import_react.useEffect)(() => {
141
141
  document.body.id = "body";
142
- console.log("初始化 ........11221801");
142
+ console.log("初始化 ........112218017777");
143
143
  }, []);
144
144
  console.log("props?.params?.device_number = ", (_e = props == null ? void 0 : props.params) == null ? void 0 : _e.device_number);
145
145
  const api = (0, import_react.useMemo)(() => {
@@ -0,0 +1,23 @@
1
+ import { State } from '../store';
2
+ import { ModeEnum } from '../const';
3
+ export declare const getStep: (mode?: ModeEnum) => State['steps'];
4
+ declare const _default: (params: any) => State;
5
+ export default _default;
6
+ export declare enum EVisibleButtonType {
7
+ /** 取消按钮 */
8
+ CancelButton = "CancelButton",
9
+ /** 等待按钮 */
10
+ WaitButton = "WaitButton"
11
+ }
12
+ export declare enum LinklyActionStatus {
13
+ /** 空 */
14
+ Empty = "Empty",
15
+ /** 取消 */
16
+ Cancel = "Cancel",
17
+ /** 取消中 */
18
+ CancelWaiting = "CancelWaiting",
19
+ /** 签名 */
20
+ Signature = "Signature",
21
+ /** 签名等待中 */
22
+ SignatureWaiting = "SignatureWaiting"
23
+ }