@pisell/private-materials 3.3.96 → 3.3.98

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 (197) 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.js +2 -2
  8. package/build/lowcode/view.js +8 -8
  9. package/es/components/booking/addons/model.d.ts +1 -10
  10. package/es/components/booking/components/TabProduct/tabs/index.js +5 -1
  11. package/es/components/booking/components/browserSelect/index.js +1 -1
  12. package/es/components/booking/forms/model.d.ts +1 -10
  13. package/es/components/booking/forms/model.js +5 -5
  14. package/es/components/booking/info/index.d.ts +0 -1
  15. package/es/components/booking/info/model.d.ts +1 -10
  16. package/es/components/booking/info/service/Lists.d.ts +1 -0
  17. package/es/components/booking/info/service/addService/utils.d.ts +1 -1
  18. package/es/components/booking/info/service/like/index.js +1 -1
  19. package/es/components/booking/info/service2/Lists.d.ts +1 -0
  20. package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
  21. package/es/components/booking/materiels/holder/index.d.ts +1 -0
  22. package/es/components/booking/materiels/startTime/index.d.ts +1 -0
  23. package/es/components/booking/materiels/startTime/index.js +1 -1
  24. package/es/components/booking/model.d.ts +1 -9
  25. package/es/components/booking/notes/NoteBlock/NoteItem/index.js +1 -1
  26. package/es/components/booking/notes/NoteBlock/index.js +11 -11
  27. package/es/components/booking/notes/model.d.ts +1 -10
  28. package/es/components/booking/notes/model.js +5 -5
  29. package/es/components/booking/payments/model.d.ts +1 -10
  30. package/es/components/booking/payments/model.js +5 -5
  31. package/es/components/booking/utils.d.ts +2 -2
  32. package/es/components/eftposPay/amount.d.ts +1 -1
  33. package/es/components/eftposPay/app.d.ts +1 -0
  34. package/es/components/eftposPay/component/step/index.d.ts +1 -0
  35. package/es/components/eftposPay/device.d.ts +1 -1
  36. package/es/components/eftposPay/payo/config.js +30 -3
  37. package/es/components/index.d.ts +20 -0
  38. package/es/components/listComponent/index.js +5 -5
  39. package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  40. package/es/components/pay/toC/model.d.ts +1 -9
  41. package/es/components/productExtension/card/index.js +3 -3
  42. package/es/components/productExtension/fields/Actor/CutOffTime/index.js +1 -1
  43. package/es/components/productExtension/fields/Forms/index.js +12 -12
  44. package/es/components/productExtension/fields/SelectProducts/ProductItemPreview/index.js +1 -1
  45. package/es/components/productExtension/fields/SelectProducts/server.js +2 -2
  46. package/es/components/productExtension/fields/SelectResourcesTable/server.js +2 -2
  47. package/es/components/productExtension/server.js +2 -2
  48. package/es/components/ruleSetting/ruleBorder/index.js +1 -1
  49. package/es/components/schedules/calendar/index.js +4 -4
  50. package/es/components/schedules/calendar/serve.js +2 -2
  51. package/es/components/schedules/components/CurrentDay/index.d.ts +1 -0
  52. package/es/components/schedules/components/CurrentDay/index.js +5 -5
  53. package/es/components/schedules/components/CurrentDay/serve.js +2 -2
  54. package/es/components/schedules/components/DropdownSort/index.js +1 -1
  55. package/es/components/schedules/components/ResourceList/index.js +1 -1
  56. package/es/components/schedules/components/Search/index.js +5 -5
  57. package/es/components/schedules/model.d.ts +1 -9
  58. package/es/components/schedules/model.js +5 -5
  59. package/es/components/schedules/openHours/index.js +1 -1
  60. package/es/components/schedules/openHours/serve.js +2 -2
  61. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/MaxParticipantsModule/index.js +1 -1
  62. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/ResourcesModule/index.js +5 -5
  63. package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/SchedulesModule/index.js +4 -4
  64. package/es/components/schedules/products/ProductDetailDrawer/index.js +3 -3
  65. package/es/components/schedules/products/index.d.ts +1 -0
  66. package/es/components/schedules/products/serve.js +2 -2
  67. package/es/components/schedules/products/utils.js +5 -5
  68. package/es/components/schedules/resources/detail/detailContent.js +2 -2
  69. package/es/components/schedules/resources/detail/index.js +10 -10
  70. package/es/components/schedules/resources/list/index.js +2 -2
  71. package/es/components/schedules/resources/relationProduct/index.js +1 -1
  72. package/es/components/schedules/resources/serve.js +2 -2
  73. package/es/components/schedules/schedules/ScheduleDetailDrawer/index.js +9 -9
  74. package/es/components/schedules/utils.d.ts +1 -1
  75. package/es/components/schedules/utils.js +4 -4
  76. package/es/components/selectModal/index.js +2 -2
  77. package/es/components/wallet/Detail/model.d.ts +1 -13
  78. package/es/components/wallet/DiscountCard/model.d.ts +1 -14
  79. package/es/components/wallet/PointCard/model.d.ts +1 -13
  80. package/es/components/wallet/RechargeableCard/model.d.ts +1 -29
  81. package/es/components/wallet/Voucher/model.d.ts +1 -13
  82. package/es/components/wallet/model.d.ts +1 -9
  83. package/es/hooks/useComponents.js +1 -1
  84. package/lib/components/booking/addons/model.d.ts +1 -10
  85. package/lib/components/booking/forms/model.d.ts +1 -10
  86. package/lib/components/booking/info/index.d.ts +0 -1
  87. package/lib/components/booking/info/model.d.ts +1 -10
  88. package/lib/components/booking/info/service/Lists.d.ts +1 -0
  89. package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
  90. package/lib/components/booking/info/service2/Lists.d.ts +1 -0
  91. package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
  92. package/lib/components/booking/materiels/holder/index.d.ts +1 -0
  93. package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
  94. package/lib/components/booking/model.d.ts +1 -9
  95. package/lib/components/booking/notes/model.d.ts +1 -10
  96. package/lib/components/booking/payments/model.d.ts +1 -10
  97. package/lib/components/booking/utils.d.ts +2 -2
  98. package/lib/components/eftposPay/amount.d.ts +1 -1
  99. package/lib/components/eftposPay/app.d.ts +1 -0
  100. package/lib/components/eftposPay/component/step/index.d.ts +1 -0
  101. package/lib/components/eftposPay/device.d.ts +1 -1
  102. package/lib/components/eftposPay/payo/config.js +22 -2
  103. package/lib/components/index.d.ts +20 -0
  104. package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +0 -1
  105. package/lib/components/pay/toC/model.d.ts +1 -9
  106. package/lib/components/schedules/components/CurrentDay/index.d.ts +1 -0
  107. package/lib/components/schedules/model.d.ts +1 -9
  108. package/lib/components/schedules/products/index.d.ts +1 -0
  109. package/lib/components/schedules/utils.d.ts +1 -1
  110. package/lib/components/schedules/utils.js +1 -1
  111. package/lib/components/wallet/Detail/model.d.ts +1 -13
  112. package/lib/components/wallet/DiscountCard/model.d.ts +1 -14
  113. package/lib/components/wallet/PointCard/model.d.ts +1 -13
  114. package/lib/components/wallet/RechargeableCard/model.d.ts +1 -29
  115. package/lib/components/wallet/Voucher/model.d.ts +1 -13
  116. package/lib/components/wallet/model.d.ts +1 -9
  117. package/package.json +1 -1
  118. package/es/components/Sales/Cart/index.d.ts +0 -53
  119. package/es/components/Sales/Cart/utils.d.ts +0 -63
  120. package/es/components/Sales/Checkout/index.d.ts +0 -37
  121. package/es/components/Sales/Checkout/serve.d.ts +0 -15
  122. package/es/components/Sales/Checkout/utils.d.ts +0 -35
  123. package/es/components/Sales/Summary/index.d.ts +0 -35
  124. package/es/components/Sales/Summary/serve.d.ts +0 -1
  125. package/es/components/Sales/Summary/utils.d.ts +0 -51
  126. package/es/components/appointmentBooking/components/Content/index.d.ts +0 -3
  127. package/es/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  128. package/es/components/appointmentBooking/components/Services/index.d.ts +0 -4
  129. package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  130. package/es/components/appointmentBooking/deposit/index.d.ts +0 -3
  131. package/es/components/appointmentBooking/index.d.ts +0 -3
  132. package/es/components/booking/components/voucher/index.d.ts +0 -3
  133. package/es/components/eftposPay/const.d.ts +0 -184
  134. package/es/components/eftposPay/hooks.d.ts +0 -35
  135. package/es/components/eftposPay/index.d.ts +0 -4
  136. package/es/components/eftposPay/linkly/const.d.ts +0 -23
  137. package/es/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  138. package/es/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  139. package/es/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  140. package/es/components/eftposPay/linkly/index.d.ts +0 -2
  141. package/es/components/eftposPay/linkly/service.d.ts +0 -32
  142. package/es/components/eftposPay/manufacturer.d.ts +0 -7
  143. package/es/components/eftposPay/pay.d.ts +0 -20
  144. package/es/components/eftposPay/store/index.d.ts +0 -355
  145. package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -3
  146. package/es/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  147. package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  148. package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  149. package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  150. package/es/components/eventBooking/locales.d.ts +0 -246
  151. package/es/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  152. package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  153. package/es/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  154. package/es/components/ticketBooking/locales.d.ts +0 -171
  155. package/es/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  156. package/es/components/ticketBooking/utils/formatTime.d.ts +0 -31
  157. package/es/utils/index.d.ts +0 -23
  158. package/lib/components/Sales/Cart/index.d.ts +0 -53
  159. package/lib/components/Sales/Cart/utils.d.ts +0 -63
  160. package/lib/components/Sales/Checkout/index.d.ts +0 -37
  161. package/lib/components/Sales/Checkout/serve.d.ts +0 -15
  162. package/lib/components/Sales/Checkout/utils.d.ts +0 -35
  163. package/lib/components/Sales/Summary/index.d.ts +0 -35
  164. package/lib/components/Sales/Summary/serve.d.ts +0 -1
  165. package/lib/components/Sales/Summary/utils.d.ts +0 -51
  166. package/lib/components/appointmentBooking/components/Content/index.d.ts +0 -3
  167. package/lib/components/appointmentBooking/components/Deposit/index.d.ts +0 -9
  168. package/lib/components/appointmentBooking/components/Services/index.d.ts +0 -4
  169. package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +0 -3
  170. package/lib/components/appointmentBooking/deposit/index.d.ts +0 -3
  171. package/lib/components/appointmentBooking/index.d.ts +0 -3
  172. package/lib/components/booking/components/voucher/index.d.ts +0 -3
  173. package/lib/components/eftposPay/const.d.ts +0 -184
  174. package/lib/components/eftposPay/hooks.d.ts +0 -35
  175. package/lib/components/eftposPay/index.d.ts +0 -4
  176. package/lib/components/eftposPay/linkly/const.d.ts +0 -23
  177. package/lib/components/eftposPay/linkly/hooks/index.d.ts +0 -2
  178. package/lib/components/eftposPay/linkly/hooks/normal.d.ts +0 -30
  179. package/lib/components/eftposPay/linkly/hooks/useTimeQuery.d.ts +0 -4
  180. package/lib/components/eftposPay/linkly/index.d.ts +0 -2
  181. package/lib/components/eftposPay/linkly/service.d.ts +0 -32
  182. package/lib/components/eftposPay/manufacturer.d.ts +0 -7
  183. package/lib/components/eftposPay/pay.d.ts +0 -20
  184. package/lib/components/eftposPay/store/index.d.ts +0 -355
  185. package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +0 -3
  186. package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.d.ts +0 -2
  187. package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +0 -3
  188. package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +0 -3
  189. package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +0 -7
  190. package/lib/components/eventBooking/locales.d.ts +0 -246
  191. package/lib/components/pay/toC/PaymentMethods/index.d.ts +0 -9
  192. package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +0 -9
  193. package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +0 -4
  194. package/lib/components/ticketBooking/locales.d.ts +0 -171
  195. package/lib/components/ticketBooking/utils/formatProductMessage.d.ts +0 -2
  196. package/lib/components/ticketBooking/utils/formatTime.d.ts +0 -31
  197. package/lib/utils/index.d.ts +0 -23
@@ -237,7 +237,16 @@ var POS = ({
237
237
  };
238
238
  var Action = ({ onChange }) => {
239
239
  const dispatch = (0, import_store.useDispatch)();
240
- const { mode, client } = (0, import_store.useContextData)();
240
+ const { mode, client, order_id, number, device } = (0, import_store.useContextData)();
241
+ const [isShowCancel, setIsShowCancel] = (0, import_react.useState)(false);
242
+ (0, import_react.useEffect)(() => {
243
+ const timer = setTimeout(() => {
244
+ setIsShowCancel(true);
245
+ }, 30 * 1e3);
246
+ return () => {
247
+ clearTimeout(timer);
248
+ };
249
+ }, []);
241
250
  const onManually = () => {
242
251
  dispatch(
243
252
  (0, import_store.updateState)({
@@ -249,7 +258,18 @@ var Action = ({ onChange }) => {
249
258
  );
250
259
  dispatch((0, import_store.updateComponent)("Manual", true));
251
260
  };
252
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, client === import_const.ClientEnum.Merchant ? /* @__PURE__ */ import_react.default.createElement(
261
+ const onCancel = () => {
262
+ onChange("fail", { number, uniquePaymentNumber: number, device, order_id });
263
+ };
264
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode__eft-pay-step-item-btns" }, client !== import_const.ClientEnum.Merchant && isShowCancel && /* @__PURE__ */ import_react.default.createElement(
265
+ import_antd.Button,
266
+ {
267
+ block: true,
268
+ className: "pisell-lowcode__eft-pay-step-item-btn",
269
+ onClick: onCancel
270
+ },
271
+ import_utils.locales.getText("page.eftpos-pay.text.cancel")
272
+ ), client === import_const.ClientEnum.Merchant ? /* @__PURE__ */ import_react.default.createElement(
253
273
  import_antd.Button,
254
274
  {
255
275
  block: true,
@@ -0,0 +1,20 @@
1
+ import Login from './login';
2
+ import BookingInfo from './booking/info/index';
3
+ import Booking from './booking';
4
+ import BookingNotes from './booking/notes';
5
+ import BookingAddons from './booking/addons';
6
+ import BookingForms from './booking/forms';
7
+ import Schedules from './schedules';
8
+ import ProductExtension from './productExtension';
9
+ import RuleSetting from './ruleSetting';
10
+ import TaxSelect from './taxSelect';
11
+ import ToCPay from './pay/toC';
12
+ import Wallet from './wallet';
13
+ import WalletList from './walletList';
14
+ import WorkspaceListDetail from './workSpaceListDetail/';
15
+ import WorkspaceList from './workSpaceList';
16
+ import PisellSelectCustomerModal from './pisellSelectCustomerModal';
17
+ import SubTotal from './subTotal';
18
+ import EditBookingModal from './booking/editBookingModal';
19
+ import StepController from './stepController';
20
+ export { Login, BookingInfo, Booking, BookingNotes, BookingAddons, BookingForms, Schedules, ProductExtension, RuleSetting, TaxSelect, ToCPay, PisellSelectCustomerModal, Wallet, WalletList, WorkspaceList, WorkspaceListDetail, SubTotal, EditBookingModal, StepController };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.module.less';
3
2
  declare const StripePayment: () => JSX.Element;
4
3
  export default StripePayment;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export interface FormState {
3
2
  platform: 'pc' | 'h5' | '' | undefined;
4
3
  order: any;
@@ -29,11 +28,4 @@ export interface PayGroup {
29
28
  pay_number?: string;
30
29
  _order: any;
31
30
  }
32
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
33
- state: FormState;
34
- } & {
35
- dispatch: (params: {
36
- type: string;
37
- payload: any;
38
- }) => void;
39
- }>;
31
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import "./index.less";
2
3
  declare type CurrentDayProps = {
3
4
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CalendarDataItem, ScheduleItem } from "./type";
3
2
  import dayjs from "dayjs";
4
3
  export interface FormState {
@@ -69,11 +68,4 @@ export interface FormState {
69
68
  };
70
69
  setGlobalState: Function | null;
71
70
  }
72
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
73
- state: FormState;
74
- } & {
75
- dispatch: (params: {
76
- type: string;
77
- payload: any;
78
- }) => void;
79
- }>;
71
+ export declare const Provider: any, Context: any;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Products: () => JSX.Element;
3
4
  export default Products;
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
17
17
  export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
18
18
  export declare const saveConfirm: () => Promise<{
19
19
  destroy: () => void;
20
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
20
+ update: (configUpdate: import("antd/es/modal/interface").ModalFuncProps | ((prevConfig: import("antd/es/modal/interface").ModalFuncProps) => import("antd/es/modal/interface").ModalFuncProps)) => void;
21
21
  }>;
22
22
  export { modal };
@@ -27,8 +27,8 @@ __export(utils_exports, {
27
27
  module.exports = __toCommonJS(utils_exports);
28
28
  var import_utils = require("@pisell/utils");
29
29
  var Request = class {
30
+ request = {};
30
31
  constructor() {
31
- this.request = {};
32
32
  }
33
33
  setRequest(val) {
34
34
  this.request = val;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- addWalletCard: any;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- walletDetailState: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,14 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- setup?: 'menu' | 'list' | 'detail' | string;
5
- }
6
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
7
- state: RechargeState;
8
- } & {
9
- dispatch: (params: {
10
- type: string;
11
- payload: any;
12
- }) => void;
13
- }>;
14
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: number;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,29 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- selectedGiftOptionId: string | null;
4
- cardList: Array<{
5
- id: string;
6
- name: string;
7
- price: number;
8
- }>;
9
- selectedItem: {
10
- id?: string;
11
- gift_price?: number;
12
- price?: number;
13
- name?: string;
14
- variant_id?: string;
15
- };
16
- productId?: string;
17
- detailId?: string;
18
- total: string | number;
19
- rechargeModalOpen: boolean;
20
- }
21
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
22
- state: RechargeState;
23
- } & {
24
- dispatch: (params: {
25
- type: string;
26
- payload: any;
27
- }) => void;
28
- }>;
29
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,13 +1 @@
1
- /// <reference types="react" />
2
- interface RechargeState {
3
- total: 0;
4
- }
5
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
6
- state: RechargeState;
7
- } & {
8
- dispatch: (params: {
9
- type: string;
10
- payload: any;
11
- }) => void;
12
- }>;
13
- export {};
1
+ export declare const Provider: any, Context: any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IWalletListItemProps } from './serve';
3
2
  export interface WalletCardItemProps {
4
3
  id: string;
@@ -27,11 +26,4 @@ export interface WalletListProps {
27
26
  currentSearchListItemCode?: string;
28
27
  [key: string]: any;
29
28
  }
30
- export declare const Provider: (ComponentUi: any) => any, Context: import("react").Context<{
31
- global_wallet: WalletListProps;
32
- } & {
33
- dispatch: (params: {
34
- type: string;
35
- payload: any;
36
- }) => void;
37
- }>;
29
+ export declare const Provider: any, Context: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/private-materials",
3
- "version": "3.3.96",
3
+ "version": "3.3.98",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,53 +0,0 @@
1
- import React from 'react';
2
- import { TUpdateDisabledCartItem } from './types';
3
- interface CartItem {
4
- _id: string;
5
- [key: string]: any;
6
- }
7
- interface CartData {
8
- cartItems: CartItem[];
9
- currentCartItem: CartItem | null;
10
- }
11
- interface CartContextType {
12
- createCartItem: () => CartItem;
13
- createCartItemFromEvent: (eventItem: any) => CartItem;
14
- createCartItemFromHolder: (holderItem: any) => CartItem;
15
- addToCart: () => void;
16
- updateCartItem: (cartItem: CartItem) => CartItem;
17
- deleteCartItem: (cartItem: CartItem) => void;
18
- clickCartItem: (cartItem: CartItem) => void;
19
- updateCurrentCartItem: (cartItem: Partial<CartItem>) => void;
20
- clearCurrentCartItem: () => void;
21
- currentCartItem: CartItem | null;
22
- checkHolder: () => boolean;
23
- cartData: CartData;
24
- openCart: boolean;
25
- onOpenCart: any;
26
- onCloseCart: any;
27
- deleteCartItemByHolder: (holder_id: number) => void;
28
- addHolderToCartItem: (holderItem: any) => void;
29
- cartDataHolderList: any;
30
- addNoteToCartItem: (cartItem: CartItem) => void;
31
- updateDisabledCartItem: TUpdateDisabledCartItem;
32
- getWithoutCartItemsHolderNames: () => Array<string>;
33
- checkBeforeAddToCartResquest: any;
34
- checkBeforeAddToCart: () => Promise<{
35
- result: boolean;
36
- num: number;
37
- }>;
38
- }
39
- interface CartProviderProps {
40
- children: React.ReactNode;
41
- }
42
- export declare const CartContext: React.Context<CartContextType | undefined>;
43
- export declare const CartProvider: React.FC<CartProviderProps>;
44
- /**
45
- * 使用步骤管理的Hook
46
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
47
- * @returns {StepContextType} 步骤管理上下文
48
- */
49
- export declare const useCart: () => CartContextType;
50
- declare const _default: {
51
- defaultState: CartData;
52
- };
53
- export default _default;
@@ -1,63 +0,0 @@
1
- import Decimal from 'decimal.js';
2
- import { ICalculatePriceParams } from './types';
3
- export declare const handleProductInfo: (eventDetail: any, num: number) => {
4
- totalPrice: number;
5
- originTotal: any;
6
- is_charge_tax: any;
7
- };
8
- /**
9
- * 获取商品总价
10
- * @description 当前总价计算基于商品数量为1
11
- * @param item 商品
12
- * @returns 商品总价
13
- */
14
- export declare const getTotalPrice: (params: ICalculatePriceParams) => number;
15
- /**
16
- * 获取商品原始总价
17
- * @description 当前总价计算基于商品数量为1
18
- * @param item 商品
19
- * @returns 商品原始总价
20
- */
21
- export declare const getOriginTotalPrice: (params: ICalculatePriceParams) => number | undefined;
22
- export declare const handleCartItemOrigin: (cartItem: any, eventDetail: any) => any;
23
- export declare const formatBundleToOrigin: (bundle: any) => any;
24
- export declare const formatOptionsToOrigin: (options: any) => any;
25
- export declare const handleProductDeposit: (cartItem: any, eventDetail: any, num: number) => {
26
- total: number;
27
- protocols: any;
28
- } | null;
29
- /**
30
- * 获取商品定金
31
- * @description 定金基于商品售价来算,最终乘商品数量
32
- * 1、如果套餐主商品有定金规则,则定金为:(套餐商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
33
- * 2、如果套餐主商品没有定金规则,子商品有定金规则,则定金为:(套餐子商品售价 * 套餐子商品定金百分比 + 套餐子商品定金固定金额)* 商品数量,最终将所有子商品定金相加
34
- * 3、普通商品/单规格商品/组合规则商品,定金规则:(商品总售价 * 定金百分比 + 定金固定金额)* 商品数量
35
- * @param params 参数
36
- * @returns 商品定金
37
- */
38
- export declare const getProductDeposit: (params: {
39
- cartItem: any;
40
- product: any;
41
- bundle?: any;
42
- options?: any;
43
- num?: number;
44
- }) => {
45
- total: number;
46
- protocols: any;
47
- } | null;
48
- /**
49
- * 计算商品定金
50
- * @param params 参数
51
- * @returns 商品定金
52
- */
53
- export declare const calculateProductDeposit: (params: {
54
- depositData: {
55
- deposit_fixed?: string;
56
- deposit_percentage?: string;
57
- };
58
- total: string | number;
59
- num: number;
60
- }) => {
61
- result: boolean;
62
- depositTotal: Decimal;
63
- };
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- interface CheckoutData {
3
- }
4
- interface PayProps {
5
- order_id: string;
6
- amount: number;
7
- sale_channel?: string;
8
- is_deposit?: number;
9
- deposit_amount?: number;
10
- total_amount?: number;
11
- }
12
- interface CheckoutContextType {
13
- onCheckBeforeBooking: (data: any) => Promise<{
14
- result: boolean;
15
- num: number;
16
- }>;
17
- onCheckout: (data: any) => Promise<any>;
18
- onPay: (payProps: PayProps) => void;
19
- createBooking: any;
20
- checkBeforeBooking: any;
21
- freePay: any;
22
- }
23
- interface CheckoutProviderProps {
24
- children: React.ReactNode;
25
- }
26
- export declare const CheckoutContext: React.Context<CheckoutContextType | undefined>;
27
- export declare const CheckoutProvider: React.FC<CheckoutProviderProps>;
28
- /**
29
- * 使用步骤管理的Hook
30
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
31
- * @returns {StepContextType} 步骤管理上下文
32
- */
33
- export declare const useCheckout: () => CheckoutContextType;
34
- declare const _default: {
35
- defaultState: CheckoutData;
36
- };
37
- export default _default;
@@ -1,15 +0,0 @@
1
- /**
2
- * @title: 下单前置校验接口
3
- * @param {any} data
4
- */
5
- export declare const checkBeforeBookingApi: (data: any) => Promise<any>;
6
- /**
7
- * @title: 创建订单
8
- * @param {any} data
9
- */
10
- export declare const createBookingApi: (data: any) => Promise<any>;
11
- /**
12
- * @title: 免费支付
13
- * @param {string} orderId
14
- */
15
- export declare const freePayApi: (orderId: string) => Promise<any>;
@@ -1,35 +0,0 @@
1
- /**
2
- * @title: 套餐单规格信息
3
- * @description:
4
- * @param {any} option
5
- * @return {*}
6
- * @Author: zhiwei.Wang
7
- * @Date: 2024-02-19 09:26
8
- */
9
- export declare const formatProductOption: (option: any) => any;
10
- /**
11
- * @title: 套餐信息
12
- * @description:
13
- * @param {any} bundle
14
- * @return {*}
15
- * @Author: zhiwei.Wang
16
- * @Date: 2024-02-19 09:26
17
- */
18
- export declare const formatProductBundle: (bundle: any) => any;
19
- /**
20
- * @title: 格式化下单接口数据
21
- * @description:
22
- * @param {any} state saledModel数据源
23
- * @param {boolean} excludeDisabled 是否需要排除购物车中失效商品
24
- * @Author: xiangfeng.xue
25
- * @Date: 2025-01-21 17:57
26
- */
27
- export declare const formatValues: (state: any, excludeDisabled?: boolean, otherValue?: Record<string, any>) => any;
28
- /**
29
- * @title: 获取拉开表单弹窗参数
30
- * @param state
31
- */
32
- export declare const getFormParams: (state: any) => {
33
- product_id: any;
34
- appointment_type: string;
35
- };
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- interface SummaryData {
3
- }
4
- interface SummaryContextType {
5
- subtotal: number | string;
6
- total: number | string;
7
- taxTitle?: string;
8
- totalTaxFee?: string;
9
- isPriceIncludeTax?: 0 | 1;
10
- deposit?: {
11
- total: string;
12
- protocols: any[];
13
- hasDeposit: boolean;
14
- };
15
- isAgreeDepositPolicy: boolean;
16
- setIsAgreeDepositPolicy: (value: boolean) => void;
17
- getDepositProtocol: (params: {
18
- id: string;
19
- }) => Promise<any>;
20
- }
21
- interface SummaryProviderProps {
22
- children: React.ReactNode;
23
- }
24
- export declare const SummaryContext: React.Context<SummaryContextType | undefined>;
25
- export declare const SummaryProvider: React.FC<SummaryProviderProps>;
26
- /**
27
- * 使用步骤管理的Hook
28
- * @throws {Error} 如果在StepProvider外部使用会抛出错误
29
- * @returns {StepContextType} 步骤管理上下文
30
- */
31
- export declare const useSummary: () => SummaryContextType;
32
- declare const _default: {
33
- defaultState: SummaryData;
34
- };
35
- export default _default;
@@ -1 +0,0 @@
1
- export declare const getDepositProtocolApi: (id: string) => Promise<any>;
@@ -1,51 +0,0 @@
1
- import Decimal from 'decimal.js';
2
- interface CartItem {
3
- price: number | string;
4
- quantity?: number;
5
- [k: string]: any;
6
- }
7
- interface PriceDetail {
8
- subtotal: string;
9
- total: string;
10
- taxTitle?: string;
11
- totalTaxFee?: string;
12
- isPriceIncludeTax?: 0 | 1;
13
- deposit?: {
14
- total: string;
15
- protocols: any[];
16
- hasDeposit: boolean;
17
- };
18
- }
19
- /**
20
- * 计算商品小计(不含其他费用)
21
- * @param items - 购物车商品数组
22
- * @returns 商品总价字符串,保留2位小数
23
- */
24
- export declare const calculateSubtotal: (items: CartItem[]) => string;
25
- /**
26
- * @title: 单个商品的税费
27
- * @description:
28
- * 单个商品的税费 = 商品销售单价(折扣后) * 税率 * is_charge_tax /( 1+ 税率 * is_price_include_tax)
29
- * $taxFee = $price * $taxRate * $isChargeTax / (1 + $taxRate * $isPriceIncludeTax);
30
- * @return {*}
31
- * @Author: xiangfeng.xue
32
- */
33
- export declare const calculateTaxFee: (shopInfo: any, items: CartItem[]) => "0.00" | Decimal;
34
- /**
35
- * 计算所有价格明细
36
- * @param items - 购物车商品数组
37
- * @param options - 其他费用配置
38
- * @returns 价格明细对象
39
- */
40
- export declare const calculatePriceDetails: (shopInfo: any, items: CartItem[]) => PriceDetail;
41
- /**
42
- * @title: 计算定金
43
- * @param items - 购物车商品数组
44
- * @returns 定金字符串,保留2位小数
45
- */
46
- export declare const calculateDeposit: (items: CartItem[]) => {
47
- total: string;
48
- protocols: any[];
49
- hasDeposit: never;
50
- } | undefined;
51
- export {};
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Layout: () => JSX.Element;
3
- export default Layout;
@@ -1,9 +0,0 @@
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;
8
- declare const Deposit: () => JSX.Element;
9
- export default Deposit;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const Services: React.ForwardRefExoticComponent<React.RefAttributes<unknown>>;
4
- export default Services;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const DepositModal: (props: any) => JSX.Element;
3
- export default DepositModal;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const Deposit: (props: any) => JSX.Element;
3
- export default Deposit;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const AppointmentBooking: () => JSX.Element;
3
- export default AppointmentBooking;
@@ -1,3 +0,0 @@
1
- import './index.less';
2
- declare const VoucherCard: (props: any) => JSX.Element | null;
3
- export default VoucherCard;