@pisell/private-materials 3.3.95 → 3.3.96

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 (143) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +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/components/voucher/index.js +2 -2
  36. package/es/components/booking/info/model.js +5 -0
  37. package/es/components/eftposPay/const.d.ts +4 -1
  38. package/es/components/eftposPay/const.js +3 -1
  39. package/es/components/eftposPay/hooks.d.ts +1 -1
  40. package/es/components/eftposPay/hooks.js +3 -1
  41. package/es/components/eftposPay/index.js +1 -1
  42. package/es/components/eftposPay/linkly/const.d.ts +23 -0
  43. package/es/components/eftposPay/linkly/const.js +82 -0
  44. package/es/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  45. package/es/components/eftposPay/linkly/hooks/index.js +2 -0
  46. package/es/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  47. package/es/components/eftposPay/linkly/hooks/normal.js +321 -0
  48. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  49. package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +273 -0
  50. package/es/components/eftposPay/linkly/index.d.ts +2 -0
  51. package/es/components/eftposPay/linkly/index.js +197 -0
  52. package/es/components/eftposPay/linkly/service.d.ts +32 -0
  53. package/es/components/eftposPay/linkly/service.js +81 -0
  54. package/es/components/eftposPay/manufacturer.d.ts +1 -0
  55. package/es/components/eftposPay/manufacturer.js +4 -0
  56. package/es/components/eftposPay/pay.d.ts +1 -1
  57. package/es/components/eftposPay/pay.js +6 -2
  58. package/es/components/eftposPay/store/index.d.ts +1 -1
  59. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +29 -17
  60. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  61. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +17 -0
  62. package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +10 -6
  63. package/es/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  64. package/es/components/eventBooking/components/bookingDetailModal/index.js +3 -1
  65. package/es/components/eventBooking/locales.d.ts +24 -0
  66. package/es/components/eventBooking/locales.js +27 -3
  67. package/es/components/pay/toC/PaymentMethods/index.js +5 -4
  68. package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  69. package/es/components/ticketBooking/components/ticketBooking/index.js +120 -1
  70. package/es/components/ticketBooking/locales.d.ts +164 -146
  71. package/es/components/ticketBooking/locales.js +195 -147
  72. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  73. package/es/components/ticketBooking/utils/formatProductMessage.js +62 -0
  74. package/es/components/ticketBooking/utils/formatTime.d.ts +31 -0
  75. package/es/components/ticketBooking/utils/formatTime.js +144 -0
  76. package/lib/components/Sales/Cart/index.js +1 -0
  77. package/lib/components/Sales/Cart/utils.d.ts +40 -0
  78. package/lib/components/Sales/Cart/utils.js +117 -0
  79. package/lib/components/Sales/Checkout/index.d.ts +4 -0
  80. package/lib/components/Sales/Checkout/index.js +39 -7
  81. package/lib/components/Sales/Checkout/serve.d.ts +13 -0
  82. package/lib/components/Sales/Checkout/serve.js +7 -2
  83. package/lib/components/Sales/Checkout/utils.js +2 -0
  84. package/lib/components/Sales/Summary/index.d.ts +10 -0
  85. package/lib/components/Sales/Summary/index.js +7 -1
  86. package/lib/components/Sales/Summary/serve.d.ts +1 -0
  87. package/lib/components/Sales/Summary/serve.js +32 -0
  88. package/lib/components/Sales/Summary/utils.d.ts +15 -0
  89. package/lib/components/Sales/Summary/utils.js +30 -1
  90. package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
  91. package/lib/components/appointmentBooking/components/Content/index.js +6 -1
  92. package/lib/components/appointmentBooking/components/Content/index.less +1 -1
  93. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +6 -0
  94. package/lib/components/appointmentBooking/components/Deposit/index.js +36 -4
  95. package/lib/components/appointmentBooking/components/Services/index.js +6 -11
  96. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +8 -4
  97. package/lib/components/appointmentBooking/deposit/index.js +4 -2
  98. package/lib/components/appointmentBooking/index.js +11 -0
  99. package/lib/components/appointmentBooking/index.less +1 -1
  100. package/lib/components/booking/components/voucher/index.js +2 -2
  101. package/lib/components/booking/info/model.js +3 -0
  102. package/lib/components/eftposPay/const.d.ts +4 -1
  103. package/lib/components/eftposPay/const.js +2 -0
  104. package/lib/components/eftposPay/hooks.d.ts +1 -1
  105. package/lib/components/eftposPay/hooks.js +11 -4
  106. package/lib/components/eftposPay/index.js +1 -1
  107. package/lib/components/eftposPay/linkly/const.d.ts +23 -0
  108. package/lib/components/eftposPay/linkly/const.js +102 -0
  109. package/lib/components/eftposPay/linkly/hooks/index.d.ts +2 -0
  110. package/lib/components/eftposPay/linkly/hooks/index.js +25 -0
  111. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +30 -0
  112. package/lib/components/eftposPay/linkly/hooks/normal.js +242 -0
  113. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +4 -0
  114. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +222 -0
  115. package/lib/components/eftposPay/linkly/index.d.ts +2 -0
  116. package/lib/components/eftposPay/linkly/index.js +208 -0
  117. package/lib/components/eftposPay/linkly/service.d.ts +32 -0
  118. package/lib/components/eftposPay/linkly/service.js +55 -0
  119. package/lib/components/eftposPay/manufacturer.d.ts +1 -0
  120. package/lib/components/eftposPay/manufacturer.js +6 -0
  121. package/lib/components/eftposPay/pay.d.ts +1 -1
  122. package/lib/components/eftposPay/pay.js +13 -2
  123. package/lib/components/eftposPay/store/index.d.ts +1 -1
  124. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +16 -3
  125. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +2 -0
  126. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +55 -0
  127. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +8 -5
  128. package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +4 -2
  129. package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
  130. package/lib/components/eventBooking/locales.d.ts +24 -0
  131. package/lib/components/eventBooking/locales.js +27 -3
  132. package/lib/components/pay/toC/PaymentMethods/index.js +10 -9
  133. package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
  134. package/lib/components/ticketBooking/components/ticketBooking/index.js +120 -1
  135. package/lib/components/ticketBooking/locales.d.ts +164 -146
  136. package/lib/components/ticketBooking/locales.js +22 -4
  137. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +2 -0
  138. package/lib/components/ticketBooking/utils/formatProductMessage.js +84 -0
  139. package/lib/components/ticketBooking/utils/formatTime.d.ts +31 -0
  140. package/lib/components/ticketBooking/utils/formatTime.js +139 -0
  141. package/package.json +2 -2
  142. package/es/components/index.d.ts +0 -20
  143. package/lib/components/index.d.ts +0 -20
@@ -0,0 +1,32 @@
1
+ /**
2
+ * linkly支付接口
3
+ */
4
+ export declare const linklyPayApi: (data: any) => Promise<any>;
5
+ /**
6
+ * 查询linkly支付结果
7
+ */
8
+ export declare const linklyPayQueryApi: (param: any) => Promise<any>;
9
+ /**
10
+ * 取消linkly支付
11
+ */
12
+ export declare const linklyPayCancelApi: (param: any) => Promise<any>;
13
+ /**
14
+ * linkly支付签名结果处理
15
+ */
16
+ export declare const linklyPaySignatureApi: (param: any) => Promise<any>;
17
+ /**
18
+ * linkly退款接口
19
+ */
20
+ export declare const linklyRefundApi: (data: any) => Promise<any>;
21
+ /**
22
+ * 查询linkly退款结果
23
+ */
24
+ export declare const linklyRefundQueryApi: (param: any) => Promise<any>;
25
+ /**
26
+ * 取消linkly退款
27
+ */
28
+ export declare const linklyRefundCancelApi: (param: any) => Promise<any>;
29
+ /**
30
+ * linkly退款签名结果处理
31
+ */
32
+ export declare const linklyRefundSignatureApi: (param: any) => Promise<any>;
@@ -0,0 +1,55 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/eftposPay/linkly/service.ts
20
+ var service_exports = {};
21
+ __export(service_exports, {
22
+ linklyPayApi: () => linklyPayApi,
23
+ linklyPayCancelApi: () => linklyPayCancelApi,
24
+ linklyPayQueryApi: () => linklyPayQueryApi,
25
+ linklyPaySignatureApi: () => linklyPaySignatureApi,
26
+ linklyRefundApi: () => linklyRefundApi,
27
+ linklyRefundCancelApi: () => linklyRefundCancelApi,
28
+ linklyRefundQueryApi: () => linklyRefundQueryApi,
29
+ linklyRefundSignatureApi: () => linklyRefundSignatureApi
30
+ });
31
+ module.exports = __toCommonJS(service_exports);
32
+ var import_utils = require("../../../utils");
33
+ var linklyPayApi = (data) => {
34
+ return import_utils.request.getRequest().post("/shop/linkly/pay/apply", data, { customMessage: true, fullResult: true });
35
+ };
36
+ var linklyPayQueryApi = (param) => import_utils.request.getRequest().get("/shop/linkly/pay/query", param, { customMessage: true, fullResult: true });
37
+ var linklyPayCancelApi = (param) => import_utils.request.getRequest().post("/shop/linkly/pay/cancel", param, { customMessage: true, fullResult: true });
38
+ var linklyPaySignatureApi = (param) => import_utils.request.getRequest().post("/shop/linkly/pay/signature", param, { customMessage: true, fullResult: true });
39
+ var linklyRefundApi = (data) => {
40
+ return import_utils.request.getRequest().post("/shop/linkly/refund/apply", data, { customMessage: true, fullResult: true });
41
+ };
42
+ var linklyRefundQueryApi = (param) => import_utils.request.getRequest().get("/shop/linkly/refund/query", param, { customMessage: true, fullResult: true });
43
+ var linklyRefundCancelApi = (param) => import_utils.request.getRequest().post("/shop/linkly/refund/cancel", param, { customMessage: true, fullResult: true });
44
+ var linklyRefundSignatureApi = (param) => import_utils.request.getRequest().post("/shop/linkly/refund/signature", param, { customMessage: true, fullResult: true });
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ linklyPayApi,
48
+ linklyPayCancelApi,
49
+ linklyPayQueryApi,
50
+ linklyPaySignatureApi,
51
+ linklyRefundApi,
52
+ linklyRefundCancelApi,
53
+ linklyRefundQueryApi,
54
+ linklyRefundSignatureApi
55
+ });
@@ -3,4 +3,5 @@ export { getAmonunt } from './helper';
3
3
  export { default as Payo } from './payo';
4
4
  export { default as Windcave } from './windcave/windcave';
5
5
  export { default as Tyro } from './tyro';
6
+ export { default as Linkly } from './linkly';
6
7
  export declare const getInitState: (type: string, params?: any) => State;
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/eftposPay/manufacturer.tsx
30
30
  var manufacturer_exports = {};
31
31
  __export(manufacturer_exports, {
32
+ Linkly: () => import_linkly.default,
32
33
  Payo: () => import_payo.default,
33
34
  Tyro: () => import_tyro.default,
34
35
  Windcave: () => import_windcave.default,
@@ -40,10 +41,12 @@ var import_const = require("./const");
40
41
  var import_const2 = __toESM(require("./payo/const"));
41
42
  var import_const3 = __toESM(require("./tyro/const"));
42
43
  var import_const4 = __toESM(require("./windcave/const"));
44
+ var import_const5 = __toESM(require("./linkly/const"));
43
45
  var import_helper = require("./helper");
44
46
  var import_payo = __toESM(require("./payo"));
45
47
  var import_windcave = __toESM(require("./windcave/windcave"));
46
48
  var import_tyro = __toESM(require("./tyro"));
49
+ var import_linkly = __toESM(require("./linkly"));
47
50
  var getInitState = (type, params) => {
48
51
  switch (type) {
49
52
  case import_const.EftposEnum.Payo:
@@ -52,12 +55,15 @@ var getInitState = (type, params) => {
52
55
  return (0, import_const4.default)(params);
53
56
  case import_const.EftposEnum.Tyro:
54
57
  return (0, import_const3.default)(params);
58
+ case import_const.EftposEnum.Linkly:
59
+ return (0, import_const5.default)(params);
55
60
  default:
56
61
  throw new Error("未知的厂商类型");
57
62
  }
58
63
  };
59
64
  // Annotate the CommonJS export names for ESM import in node:
60
65
  0 && (module.exports = {
66
+ Linkly,
61
67
  Payo,
62
68
  Tyro,
63
69
  Windcave,
@@ -6,7 +6,7 @@ import './index.less';
6
6
  * @Author: hongbing.wang
7
7
  * @Date: 2024-08-20 14:59
8
8
  */
9
- declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client }: PayProps & {
9
+ declare const Pay: ({ api, onChange: onChangeStatus, className, terminal, net, isMobile, tyroUrl, tyroVersion, formatAmount, client, }: PayProps & {
10
10
  terminal: {
11
11
  network: boolean;
12
12
  };
@@ -145,6 +145,7 @@ var Pay = ({
145
145
  }
146
146
  };
147
147
  }, []);
148
+ console.log("data =>>>>>> ", data);
148
149
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.render ? /* @__PURE__ */ import_react.default.createElement(
149
150
  "div",
150
151
  {
@@ -160,7 +161,16 @@ var Pay = ({
160
161
  }
161
162
  ),
162
163
  data.eftpos === "payo" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Payo, { api, onChange }, data.warn && data.status !== import_const.StatusEnum.Success && client === import_const.ClientEnum.Merchant ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-warn" }, data.warn) : null, data.status === import_const.StatusEnum.Success ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item pisell-lowcode__eft-pay-step-item-tip" }, import_utils.locales.getText("page.eftpos-pay.text.transaction.end")) : null) : null,
163
- data.eftpos === "tyro" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Tyro, { api, onChange, key: data.key, url: tyroUrl, version: tyroVersion }) : null,
164
+ data.eftpos === "tyro" ? /* @__PURE__ */ import_react.default.createElement(
165
+ import_manufacturer.Tyro,
166
+ {
167
+ api,
168
+ onChange,
169
+ key: data.key,
170
+ url: tyroUrl,
171
+ version: tyroVersion
172
+ }
173
+ ) : null,
164
174
  data.eftpos === "windcave" ? /* @__PURE__ */ import_react.default.createElement(
165
175
  import_manufacturer.Windcave,
166
176
  {
@@ -169,7 +179,8 @@ var Pay = ({
169
179
  key: data.key,
170
180
  formatAmount
171
181
  }
172
- ) : null
182
+ ) : null,
183
+ data.eftpos === "linkly" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Linkly, { key: data.key, api, onChange }) : null
173
184
  ) : null, data.type === import_const.PayRouteEnum.Unset && Comm ? /* @__PURE__ */ import_react.default.createElement(
174
185
  Comm,
175
186
  {
@@ -297,7 +297,7 @@ 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?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
300
+ eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | undefined;
301
301
  action?: "amount" | "pay" | "deviceList" | undefined;
302
302
  key?: number | undefined;
303
303
  step?: number | undefined;
@@ -43,6 +43,7 @@ var import_serve = require("../../../../../Sales/Event/serve");
43
43
  var import_ahooks = require("ahooks");
44
44
  var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngineContext"));
45
45
  var import_index = require("./index.less");
46
+ var import_utils3 = require("../../../../../appointmentBooking/utils");
46
47
  var ContinueButton = () => {
47
48
  var _a, _b;
48
49
  const { data } = (0, import_Sales.useSales)();
@@ -53,9 +54,11 @@ var ContinueButton = () => {
53
54
  onCheckout,
54
55
  createBooking,
55
56
  onCheckBeforeBooking,
56
- checkBeforeBooking
57
+ checkBeforeBooking,
58
+ freePay
57
59
  } = (0, import_Sales.useCheckout)();
58
60
  const { openLoginModal, isLogin } = (0, import_Sales.useCustomer)();
61
+ const { deposit, isAgreeDepositPolicy } = (0, import_Sales.useSummary)();
59
62
  const [openCheckout, setOpenCheckout] = (0, import_react.useState)(false);
60
63
  const [checkedNumber, setCheckedNumber] = (0, import_react.useState)(0);
61
64
  const [openEmptyHolder, setOpenEmptyHolder] = (0, import_react.useState)(false);
@@ -226,8 +229,13 @@ var ContinueButton = () => {
226
229
  handleNextStep();
227
230
  };
228
231
  const handleContinue = async () => {
232
+ var _a2;
229
233
  if (isLastStep) {
230
234
  const value = (0, import_utils2.formatValues)(data);
235
+ if ((deposit == null ? void 0 : deposit.hasDeposit) && ((_a2 = deposit == null ? void 0 : deposit.protocols) == null ? void 0 : _a2.length) > 0 && !isAgreeDepositPolicy) {
236
+ (0, import_utils3.Toast)(import_utils.locales.getText("pisell2.appointment.deposit.agree.policy"));
237
+ return;
238
+ }
231
239
  const checkRes = await onCheckBeforeBooking(value);
232
240
  if ((checkRes == null ? void 0 : checkRes.result) === false) {
233
241
  setCheckedNumber(checkRes == null ? void 0 : checkRes.num);
@@ -263,8 +271,13 @@ var ContinueButton = () => {
263
271
  }, [currentStepData == null ? void 0 : currentStepData.key]);
264
272
  const confirmLoading = (0, import_react.useMemo)(() => {
265
273
  if (!isLastStep) return false;
266
- return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading);
267
- }, [isLastStep, createBooking == null ? void 0 : createBooking.loading, checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading]);
274
+ return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading) || (freePay == null ? void 0 : freePay.loading);
275
+ }, [
276
+ isLastStep,
277
+ createBooking == null ? void 0 : createBooking.loading,
278
+ checkBeforeBooking == null ? void 0 : checkBeforeBooking.loading,
279
+ freePay == null ? void 0 : freePay.loading
280
+ ]);
268
281
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
269
282
  import_materials.Button,
270
283
  {
@@ -0,0 +1,2 @@
1
+ declare const Deposit: () => JSX.Element;
2
+ export default Deposit;
@@ -0,0 +1,55 @@
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/Cart/Deposit/index.tsx
30
+ var Deposit_exports = {};
31
+ __export(Deposit_exports, {
32
+ default: () => Deposit_default
33
+ });
34
+ module.exports = __toCommonJS(Deposit_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_Sales = require("../../../../../Sales");
37
+ var import_Deposit = require("../../../../../appointmentBooking/components/Deposit");
38
+ var Deposit = () => {
39
+ const {
40
+ deposit,
41
+ isAgreeDepositPolicy,
42
+ setIsAgreeDepositPolicy,
43
+ getDepositProtocol
44
+ } = (0, import_Sales.useSummary)();
45
+ return /* @__PURE__ */ import_react.default.createElement(
46
+ import_Deposit.DepositContent,
47
+ {
48
+ isAgreeDepositPolicy: !!isAgreeDepositPolicy,
49
+ setIsAgreeDepositPolicy,
50
+ deposit,
51
+ depositProtocolRequest: getDepositProtocol
52
+ }
53
+ );
54
+ };
55
+ var Deposit_default = Deposit;
@@ -40,8 +40,9 @@ var import_useEngineContext = __toESM(require("../../../../../../hooks/useEngine
40
40
  var import_index = require("./index.less");
41
41
  var import_classnames = __toESM(require("classnames"));
42
42
  var Total = ({ className, isFooter }) => {
43
- var _a, _b, _c, _d, _e, _f;
44
- const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = (0, import_Sales.useSummary)();
43
+ var _a, _b, _c, _d, _e, _f, _g, _h;
44
+ const { cartData } = (0, import_Sales.useCart)();
45
+ const { taxTitle, totalTaxFee, isPriceIncludeTax, total, deposit } = (0, import_Sales.useSummary)();
45
46
  const context = (0, import_useEngineContext.default)();
46
47
  console.log(
47
48
  taxTitle,
@@ -49,8 +50,10 @@ var Total = ({ className, isFooter }) => {
49
50
  totalTaxFee,
50
51
  total,
51
52
  (_c = (_b = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getSymbolic) == null ? void 0 : _c.call(_b),
53
+ deposit,
52
54
  "wh97978"
53
55
  );
56
+ const showDeposit = ((_d = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _d.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit);
54
57
  return /* @__PURE__ */ import_react.default.createElement("div", { className: `event-total-wrap ${className}` }, !isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: "gst-wrap" }, /* @__PURE__ */ import_react.default.createElement("span", null, taxTitle, isFooter ? ": " : ""), /* @__PURE__ */ import_react.default.createElement(import_materials.PisellText.Amount, { value: totalTaxFee, showCurrencySymbol: true })) : null, /* @__PURE__ */ import_react.default.createElement(
55
58
  "div",
56
59
  {
@@ -58,16 +61,16 @@ var Total = ({ className, isFooter }) => {
58
61
  [["total-gst-wrap"]]: !isPriceIncludeTax && Number(totalTaxFee) > 0
59
62
  })
60
63
  },
61
- /* @__PURE__ */ import_react.default.createElement("div", { className: "left" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", null, import_utils.locales.getText("pisell2.event.total"), isFooter ? ": " : ""), isFooter ? /* @__PURE__ */ import_react.default.createElement(
64
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "left" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", null, isFooter && showDeposit ? import_utils.locales.getText("pisell2.appointment.deposit") : import_utils.locales.getText("pisell2.event.total"), isFooter ? ": " : ""), isFooter ? /* @__PURE__ */ import_react.default.createElement(
62
65
  import_materials.PisellText.Amount,
63
66
  {
64
- value: total,
67
+ value: ((_e = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _e.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? deposit == null ? void 0 : deposit.total : total,
65
68
  showCurrencySymbol: true,
66
69
  className: "event-amount"
67
70
  }
68
71
  ) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("span", { className: "gst" }, import_utils.locales.getText("pisell2.event.total.gst")(
69
72
  `${isFooter ? `${taxTitle}: ` : taxTitle}`,
70
- `${(_f = (_e = (_d = context == null ? void 0 : context.appHelper) == null ? void 0 : _d.utils) == null ? void 0 : _e.getSymbolic) == null ? void 0 : _f.call(_e)}${totalTaxFee}`
73
+ `${(_h = (_g = (_f = context == null ? void 0 : context.appHelper) == null ? void 0 : _f.utils) == null ? void 0 : _g.getSymbolic) == null ? void 0 : _h.call(_g)}${totalTaxFee}`
71
74
  )) : null),
72
75
  !isFooter ? /* @__PURE__ */ import_react.default.createElement(
73
76
  import_materials.PisellText.Amount,
@@ -39,8 +39,10 @@ var import_Sales = require("../../../../../Sales");
39
39
  var import_SelectHolderModal = __toESM(require("../../SelectHolderModal"));
40
40
  var import_ContinueButton = __toESM(require("../ContinueButton"));
41
41
  var import_Total = __toESM(require("./Total"));
42
+ var import_Deposit = __toESM(require("../Deposit"));
42
43
  var import_index = require("./index.less");
43
44
  var CartItem = () => {
45
+ var _a;
44
46
  const { open, holderData, selectedHolderIds } = (0, import_Sales.useHolder)();
45
47
  const {
46
48
  deleteCartItem,
@@ -48,7 +50,7 @@ var CartItem = () => {
48
50
  cartData,
49
51
  addNoteToCartItem
50
52
  } = (0, import_Sales.useCart)();
51
- const { subtotal } = (0, import_Sales.useSummary)();
53
+ const { deposit } = (0, import_Sales.useSummary)();
52
54
  const { isLastStep } = (0, import_Sales.useStep)();
53
55
  const handleClickCard = (e, type, key) => {
54
56
  if (type === "note") {
@@ -86,7 +88,7 @@ var CartItem = () => {
86
88
  onChange: (e, type, key) => handleClickCard(e, type, key)
87
89
  }
88
90
  )),
89
- /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
91
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null), ((_a = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _a.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit) ? /* @__PURE__ */ import_react.default.createElement(import_Deposit.default, null) : null, /* @__PURE__ */ import_react.default.createElement(import_ContinueButton.default, null))
90
92
  ), /* @__PURE__ */ import_react.default.createElement(import_SelectHolderModal.default, { open }));
91
93
  };
92
94
  var Item_default = CartItem;
@@ -239,7 +239,7 @@ var BookingDetailModal = (props) => {
239
239
  utils == null ? void 0 : utils.action({
240
240
  type: "pisell1.productDetail",
241
241
  data: {
242
- detail: { ...(bookingOption == null ? void 0 : bookingOption._originData) || {} },
242
+ detail: { ...(bookingOption == null ? void 0 : bookingOption._originData) || {}, open_deposit: 1 },
243
243
  isOS: false
244
244
  },
245
245
  callback: (data) => {
@@ -71,6 +71,14 @@ declare const _default: {
71
71
  'pisell2.event.capacity.limit.reached.tip': string;
72
72
  'pisell2.event.schedule.item.expand': string;
73
73
  'pisell2.event.schedule.item.collapse': string;
74
+ 'pisell2.appointment.deposit': string;
75
+ 'pisell2.appointment.deposit.agreed': string;
76
+ 'pisell2.appointment.deposit.agree.policy': string;
77
+ 'pisell2.appointment.deposit.and': string;
78
+ 'pisell2.appointment.deposit.amount.tip1': string;
79
+ 'pisell2.appointment.deposit.amount.tip2': string;
80
+ 'pisell2.appointment.deposit.close': string;
81
+ 'pisell2.appointment.booking.empty.data': string;
74
82
  };
75
83
  'zh-CN': {
76
84
  'pisell2.event.calendar.limit.unavailable': string;
@@ -144,6 +152,14 @@ declare const _default: {
144
152
  'pisell2.event.capacity.limit.reached.tip': string;
145
153
  'pisell2.event.schedule.item.expand': string;
146
154
  'pisell2.event.schedule.item.collapse': string;
155
+ 'pisell2.appointment.deposit': string;
156
+ 'pisell2.appointment.deposit.agreed': string;
157
+ 'pisell2.appointment.deposit.agree.policy': string;
158
+ 'pisell2.appointment.deposit.and': string;
159
+ 'pisell2.appointment.deposit.amount.tip1': string;
160
+ 'pisell2.appointment.deposit.amount.tip2': string;
161
+ 'pisell2.appointment.deposit.close': string;
162
+ 'pisell2.appointment.booking.empty.data': string;
147
163
  };
148
164
  'zh-HK': {
149
165
  'pisell2.event.calendar.limit.unavailable': string;
@@ -217,6 +233,14 @@ declare const _default: {
217
233
  'pisell2.event.capacity.limit.reached.tip': string;
218
234
  'pisell2.event.schedule.item.expand': string;
219
235
  'pisell2.event.schedule.item.collapse': string;
236
+ 'pisell2.appointment.deposit': string;
237
+ 'pisell2.appointment.deposit.agreed': string;
238
+ 'pisell2.appointment.deposit.agree.policy': string;
239
+ 'pisell2.appointment.deposit.and': string;
240
+ 'pisell2.appointment.deposit.amount.tip1': string;
241
+ 'pisell2.appointment.deposit.amount.tip2': string;
242
+ 'pisell2.appointment.deposit.close': string;
243
+ 'pisell2.appointment.booking.empty.data': string;
220
244
  };
221
245
  };
222
246
  export default _default;
@@ -94,7 +94,15 @@ var locales_default = {
94
94
  "pisell2.event.capacity.limit.reached.title": "Capacity limit reached",
95
95
  "pisell2.event.capacity.limit.reached.tip": "One or more events in your cart are no longer available due to full capacity. Please remove unavailable events from your cart to complete checkout.",
96
96
  "pisell2.event.schedule.item.expand": "See more",
97
- "pisell2.event.schedule.item.collapse": "See less"
97
+ "pisell2.event.schedule.item.collapse": "See less",
98
+ "pisell2.appointment.deposit": "Deposit",
99
+ "pisell2.appointment.deposit.agreed": "I have read and agree to the ",
100
+ "pisell2.appointment.deposit.agree.policy": "You need to agree the policy to proceed",
101
+ "pisell2.appointment.deposit.and": " & ",
102
+ "pisell2.appointment.deposit.amount.tip1": " needs to be paid as deposit.",
103
+ "pisell2.appointment.deposit.amount.tip2": " ",
104
+ "pisell2.appointment.deposit.close": "Close",
105
+ "pisell2.appointment.booking.empty.data": "No data"
98
106
  },
99
107
  "zh-CN": {
100
108
  "pisell2.event.calendar.limit.unavailable": "不可预约",
@@ -167,7 +175,15 @@ var locales_default = {
167
175
  "pisell2.event.capacity.limit.reached.title": "活动名额已满",
168
176
  "pisell2.event.capacity.limit.reached.tip": "购物车中有一个或多个活动已达预约上限,请将已满额的活动从购物车中移除后再完成结算。",
169
177
  "pisell2.event.schedule.item.expand": "查看更多",
170
- "pisell2.event.schedule.item.collapse": "收起"
178
+ "pisell2.event.schedule.item.collapse": "收起",
179
+ "pisell2.appointment.deposit": "定金",
180
+ "pisell2.appointment.deposit.agreed": "我已阅读并同意 ",
181
+ "pisell2.appointment.deposit.agree.policy": "您需要同意协议才能继续",
182
+ "pisell2.appointment.deposit.and": " 和 ",
183
+ "pisell2.appointment.deposit.amount.tip1": "请支付 ",
184
+ "pisell2.appointment.deposit.amount.tip2": " 定金。",
185
+ "pisell2.appointment.deposit.close": "关闭",
186
+ "pisell2.appointment.booking.empty.data": "暂无数据"
171
187
  },
172
188
  "zh-HK": {
173
189
  "pisell2.event.calendar.limit.unavailable": "不可預約",
@@ -240,6 +256,14 @@ var locales_default = {
240
256
  "pisell2.event.capacity.limit.reached.title": "活動名額已滿",
241
257
  "pisell2.event.capacity.limit.reached.tip": "購物車中有一個或多個活動已達預約上限,請將已滿額的活動從購物車中移除後再完成結算。",
242
258
  "pisell2.event.schedule.item.expand": "查看更多",
243
- "pisell2.event.schedule.item.collapse": "收起"
259
+ "pisell2.event.schedule.item.collapse": "收起",
260
+ "pisell2.appointment.deposit": "定金",
261
+ "pisell2.appointment.deposit.agreed": "我已閱讀並同意 ",
262
+ "pisell2.appointment.deposit.agree.policy": "您需要同意協議才能繼續",
263
+ "pisell2.appointment.deposit.and": " 和 ",
264
+ "pisell2.appointment.deposit.amount.tip1": "請支付 ",
265
+ "pisell2.appointment.deposit.amount.tip2": " 定金。",
266
+ "pisell2.appointment.deposit.close": "关闭",
267
+ "pisell2.appointment.booking.empty.data": "暫無數據"
244
268
  }
245
269
  };
@@ -65,7 +65,7 @@ var isOfflinePayment = (type) => {
65
65
  ].includes(type);
66
66
  };
67
67
  var PaymentMethods = (props, ref) => {
68
- var _a;
68
+ var _a, _b, _c;
69
69
  const MWCreditCardRef2 = (0, import_react.useRef)(null);
70
70
  const SuperPayAliPayH5Ref2 = (0, import_react.useRef)(null);
71
71
  const StripePayRef2 = (0, import_react.useRef)(null);
@@ -83,9 +83,9 @@ var PaymentMethods = (props, ref) => {
83
83
  const context = (0, import_useEngineContext.default)();
84
84
  const { interaction } = (_a = context.appHelper) == null ? void 0 : _a.utils;
85
85
  const init = async ({ type, payGroup }) => {
86
- var _a2, _b;
86
+ var _a2, _b2;
87
87
  const waitAmount = (payGroup == null ? void 0 : payGroup.wait_amount) || 0;
88
- const cards = (_b = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b.length;
88
+ const cards = (_b2 = (_a2 = payGroup == null ? void 0 : payGroup.walletPass) == null ? void 0 : _a2.cards) == null ? void 0 : _b2.length;
89
89
  if (cards && (waitAmount <= 0 || isOfflinePayment(type))) {
90
90
  try {
91
91
  await (0, import_serve.walletPassPay)((0, import_utils.formatWalletPassParams)(payGroup));
@@ -115,10 +115,11 @@ var PaymentMethods = (props, ref) => {
115
115
  }
116
116
  await onPayByType({ type, payGroup });
117
117
  };
118
+ console.log("paymentResult isAppEnv", (_c = (_b = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _b.isAppEnv) == null ? void 0 : _c.call(_b), interaction, context);
118
119
  (0, import_react.useEffect)(() => {
119
- var _a2, _b, _c, _d;
120
- console.log("paymentResult isAppEnv", (_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2));
121
- if ((_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.isAppEnv) == null ? void 0 : _d.call(_c)) {
120
+ var _a2, _b2, _c2, _d;
121
+ console.log("paymentResult isAppEnv", (_b2 = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b2.call(_a2));
122
+ if ((_d = (_c2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c2.isAppEnv) == null ? void 0 : _d.call(_c2)) {
122
123
  interaction.utils.mountFunction("global", "paymentResult", (strResult) => {
123
124
  console.log("paymentResult", strResult);
124
125
  if (!(0, import_utils2.isJson)(strResult)) return;
@@ -134,18 +135,18 @@ var PaymentMethods = (props, ref) => {
134
135
  }
135
136
  }, []);
136
137
  const onPayByType = async ({ type, payGroup }) => {
137
- var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
138
+ var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
138
139
  console.log(type, payGroup);
139
140
  if (type === "mw.apple") {
140
141
  await ((_a2 = ApplePayRef2.current) == null ? void 0 : _a2.init({ payGroup }));
141
142
  return;
142
143
  }
143
144
  if (type === "mw.google") {
144
- await ((_b = GooglePayRef2.current) == null ? void 0 : _b.init({ payGroup }));
145
+ await ((_b2 = GooglePayRef2.current) == null ? void 0 : _b2.init({ payGroup }));
145
146
  return;
146
147
  }
147
148
  if (type === "mw.credit_card") {
148
- (_c = MWCreditCardRef2.current) == null ? void 0 : _c.init({ payGroup });
149
+ (_c2 = MWCreditCardRef2.current) == null ? void 0 : _c2.init({ payGroup });
149
150
  return;
150
151
  }
151
152
  if (type === "superpay.alipay.h5") {
@@ -406,7 +406,7 @@ var AddSerivce = (props) => {
406
406
  isTitle: 1,
407
407
  isSubtitle: 1,
408
408
  isPrice: 1,
409
- isOriginPrice: 1,
409
+ isOriginPrice: 0,
410
410
  isStock: 1
411
411
  }
412
412
  }