@pisell/private-materials 3.3.98 → 3.3.99
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +11 -11
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +11 -11
- package/es/components/Sales/Cart/index.d.ts +53 -0
- package/es/components/Sales/Cart/index.js +1 -5
- package/es/components/Sales/Cart/utils.d.ts +23 -0
- package/es/components/Sales/Cart/utils.js +0 -167
- package/es/components/Sales/Checkout/index.d.ts +33 -0
- package/es/components/Sales/Checkout/index.js +8 -52
- package/es/components/Sales/Checkout/serve.d.ts +2 -0
- package/es/components/Sales/Checkout/serve.js +2 -16
- package/es/components/Sales/Checkout/utils.d.ts +35 -0
- package/es/components/Sales/Checkout/utils.js +1 -7
- package/es/components/Sales/Summary/index.d.ts +25 -0
- package/es/components/Sales/Summary/index.js +2 -17
- package/es/components/Sales/Summary/serve.d.ts +0 -0
- package/es/components/Sales/Summary/serve.js +0 -6
- package/es/components/Sales/Summary/utils.d.ts +36 -0
- package/es/components/Sales/Summary/utils.js +1 -43
- package/es/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/es/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Content/index.js +1 -15
- package/es/components/appointmentBooking/components/Content/index.less +1 -1
- package/es/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/components/Deposit/index.js +7 -27
- package/es/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/es/components/appointmentBooking/components/Services/index.js +27 -23
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/components/PolicyModal/index.js +20 -25
- package/es/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/es/components/appointmentBooking/deposit/index.js +2 -4
- package/es/components/appointmentBooking/index.d.ts +3 -0
- package/es/components/appointmentBooking/index.js +0 -14
- package/es/components/appointmentBooking/index.less +1 -1
- package/es/components/booking/components/voucher/index.d.ts +3 -0
- package/es/components/booking/components/voucher/index.js +2 -2
- package/es/components/booking/info/dateRange/index.d.ts +1 -0
- package/es/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/Lists.d.ts +0 -1
- package/es/components/booking/info/service/addService/utils.d.ts +1 -1
- package/es/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/es/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/es/components/booking/materiels/startTime/index.d.ts +0 -1
- package/es/components/booking/utils.d.ts +2 -2
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/app.d.ts +0 -1
- package/es/components/eftposPay/const.d.ts +181 -0
- package/es/components/eftposPay/const.js +1 -3
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/hooks.d.ts +35 -0
- package/es/components/eftposPay/hooks.js +1 -3
- package/es/components/eftposPay/index.d.ts +4 -0
- package/es/components/eftposPay/index.js +1 -1
- package/es/components/eftposPay/manufacturer.d.ts +6 -0
- package/es/components/eftposPay/manufacturer.js +0 -4
- package/es/components/eftposPay/pay.d.ts +20 -0
- package/es/components/eftposPay/pay.js +2 -6
- package/es/components/eftposPay/store/index.d.ts +355 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +17 -29
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/Total.js +6 -10
- package/es/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/es/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/es/components/eventBooking/components/bookingDetailModal/index.js +1 -3
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/eventBooking/locales.d.ts +222 -0
- package/es/components/eventBooking/locales.js +3 -27
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/es/components/pay/toC/PaymentMethods/index.js +4 -5
- package/es/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/es/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/es/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/es/components/ticketBooking/locales.d.ts +153 -0
- package/es/components/ticketBooking/locales.js +147 -195
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/utils/index.d.ts +23 -0
- package/lib/components/Sales/Cart/index.d.ts +53 -0
- package/lib/components/Sales/Cart/index.js +0 -1
- package/lib/components/Sales/Cart/utils.d.ts +23 -0
- package/lib/components/Sales/Cart/utils.js +0 -117
- package/lib/components/Sales/Checkout/index.d.ts +33 -0
- package/lib/components/Sales/Checkout/index.js +7 -39
- package/lib/components/Sales/Checkout/serve.d.ts +2 -0
- package/lib/components/Sales/Checkout/serve.js +2 -7
- package/lib/components/Sales/Checkout/utils.d.ts +35 -0
- package/lib/components/Sales/Checkout/utils.js +0 -2
- package/lib/components/Sales/Summary/index.d.ts +25 -0
- package/lib/components/Sales/Summary/index.js +1 -7
- package/lib/components/Sales/Summary/serve.d.ts +0 -0
- package/lib/components/Sales/Summary/serve.js +0 -32
- package/lib/components/Sales/Summary/utils.d.ts +36 -0
- package/lib/components/Sales/Summary/utils.js +1 -30
- package/lib/components/appointmentBooking/components/Cart/Item/index.less +3 -3
- package/lib/components/appointmentBooking/components/Content/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Content/index.js +1 -6
- package/lib/components/appointmentBooking/components/Content/index.less +1 -1
- package/lib/components/appointmentBooking/components/Deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/components/Deposit/index.js +4 -36
- package/lib/components/appointmentBooking/components/Footer/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Services/index.d.ts +4 -0
- package/lib/components/appointmentBooking/components/Services/index.js +11 -6
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/components/PolicyModal/index.js +4 -8
- package/lib/components/appointmentBooking/deposit/index.d.ts +3 -0
- package/lib/components/appointmentBooking/deposit/index.js +2 -4
- package/lib/components/appointmentBooking/index.d.ts +3 -0
- package/lib/components/appointmentBooking/index.js +0 -11
- package/lib/components/appointmentBooking/index.less +1 -1
- package/lib/components/booking/components/voucher/index.d.ts +3 -0
- package/lib/components/booking/components/voucher/index.js +2 -2
- package/lib/components/booking/info/dateRange/index.d.ts +1 -0
- package/lib/components/booking/info/hooks/useInfoHolder.d.ts +0 -1
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/Lists.d.ts +0 -1
- package/lib/components/booking/info/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/info/service/editService/BookingList/index.d.ts +1 -0
- package/lib/components/booking/info2/service/addService/utils.d.ts +1 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +0 -1
- package/lib/components/booking/utils.d.ts +2 -2
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/app.d.ts +0 -1
- package/lib/components/eftposPay/const.d.ts +181 -0
- package/lib/components/eftposPay/const.js +0 -2
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/hooks.d.ts +35 -0
- package/lib/components/eftposPay/hooks.js +4 -11
- package/lib/components/eftposPay/index.d.ts +4 -0
- package/lib/components/eftposPay/index.js +1 -1
- package/lib/components/eftposPay/manufacturer.d.ts +6 -0
- package/lib/components/eftposPay/manufacturer.js +0 -6
- package/lib/components/eftposPay/pay.d.ts +20 -0
- package/lib/components/eftposPay/pay.js +2 -13
- package/lib/components/eftposPay/store/index.d.ts +355 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/ContinueButton/index.js +3 -16
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/Total.js +5 -8
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.d.ts +3 -0
- package/lib/components/eventBooking/components/Provider/Cart/Item/index.js +2 -4
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/CallToBook/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/WeekItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateWeek/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.d.ts +7 -0
- package/lib/components/eventBooking/components/bookingDetailModal/index.js +1 -1
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/eventBooking/locales.d.ts +222 -0
- package/lib/components/eventBooking/locales.js +3 -27
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/index.d.ts +9 -0
- package/lib/components/pay/toC/PaymentMethods/index.js +9 -10
- package/lib/components/pay/toC/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.d.ts +9 -0
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +1 -1
- package/lib/components/ticketBooking/components/ticketBooking/index.d.ts +4 -0
- package/lib/components/ticketBooking/components/ticketBooking/index.js +1 -120
- package/lib/components/ticketBooking/locales.d.ts +153 -0
- package/lib/components/ticketBooking/locales.js +4 -22
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/utils/index.d.ts +23 -0
- package/package.json +4 -4
- package/es/components/eftposPay/linkly/const.js +0 -82
- package/es/components/eftposPay/linkly/hooks/index.js +0 -2
- package/es/components/eftposPay/linkly/hooks/normal.js +0 -321
- package/es/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -273
- package/es/components/eftposPay/linkly/index.js +0 -197
- package/es/components/eftposPay/linkly/service.js +0 -81
- package/es/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -17
- package/es/components/ticketBooking/utils/formatProductMessage.js +0 -62
- package/es/components/ticketBooking/utils/formatTime.js +0 -144
- package/lib/components/eftposPay/linkly/const.js +0 -102
- package/lib/components/eftposPay/linkly/hooks/index.js +0 -25
- package/lib/components/eftposPay/linkly/hooks/normal.js +0 -242
- package/lib/components/eftposPay/linkly/hooks/useTimeQuery.js +0 -222
- package/lib/components/eftposPay/linkly/index.js +0 -208
- package/lib/components/eftposPay/linkly/service.js +0 -55
- package/lib/components/eventBooking/components/Provider/Cart/Deposit/index.js +0 -55
- package/lib/components/ticketBooking/utils/formatProductMessage.js +0 -84
- package/lib/components/ticketBooking/utils/formatTime.js +0 -139
|
@@ -145,7 +145,6 @@ var Pay = ({
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
}, []);
|
|
148
|
-
console.log("data =>>>>>> ", data);
|
|
149
148
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, data.render ? /* @__PURE__ */ import_react.default.createElement(
|
|
150
149
|
"div",
|
|
151
150
|
{
|
|
@@ -161,16 +160,7 @@ var Pay = ({
|
|
|
161
160
|
}
|
|
162
161
|
),
|
|
163
162
|
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,
|
|
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,
|
|
163
|
+
data.eftpos === "tyro" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Tyro, { api, onChange, key: data.key, url: tyroUrl, version: tyroVersion }) : null,
|
|
174
164
|
data.eftpos === "windcave" ? /* @__PURE__ */ import_react.default.createElement(
|
|
175
165
|
import_manufacturer.Windcave,
|
|
176
166
|
{
|
|
@@ -179,8 +169,7 @@ var Pay = ({
|
|
|
179
169
|
key: data.key,
|
|
180
170
|
formatAmount
|
|
181
171
|
}
|
|
182
|
-
) : null
|
|
183
|
-
data.eftpos === "linkly" ? /* @__PURE__ */ import_react.default.createElement(import_manufacturer.Linkly, { key: data.key, api, onChange }) : null
|
|
172
|
+
) : null
|
|
184
173
|
) : null, data.type === import_const.PayRouteEnum.Unset && Comm ? /* @__PURE__ */ import_react.default.createElement(
|
|
185
174
|
Comm,
|
|
186
175
|
{
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { DeviceStatusType, StatusType, ModeType, RouteType, ClientEnum } from '../const';
|
|
3
|
+
import { ThunkDispatch } from './useThunkReducer';
|
|
4
|
+
export declare enum EActionTypes {
|
|
5
|
+
UPDATE_INIT = "UPDATE_INIT",
|
|
6
|
+
UPDATE_CUSTOM = "UPDATE_CUSTOM",
|
|
7
|
+
UPDATE_KEY = "UPDATE_KEY",
|
|
8
|
+
UPDATE_STEP_KEY = "UPDATE_STEP_KEY",
|
|
9
|
+
UPDATE_DEVICE = "UPDATE_DEVICE",
|
|
10
|
+
UPDATE_NEXT_STEP = "UPDATE_NEXT_STEP",
|
|
11
|
+
UPDATE_STATUS = "UPDATE_STATUS",
|
|
12
|
+
UPDATE_TITLE = "UPDATE_TITLE",
|
|
13
|
+
UPDATE_LOADING = "UPDATE_LOADING",
|
|
14
|
+
UPDATE_COMPONENT = "UPDATE_COMPONENT",
|
|
15
|
+
UPDATE_STEPS = "UPDATE_STEPS",
|
|
16
|
+
UPDATE_STEP_CURRENT_ITEM_CUSTOM = "UPDATE_STEP_CURRENT_ITEM_CUSTOM",
|
|
17
|
+
UPDATE_STEP_ITEM = "UPDATE_STEP_ITEM",
|
|
18
|
+
BACKUP_PRODUCTION = "BACKUP_PRODUCTION",
|
|
19
|
+
BACKUP_FREE = "BACKUP_FREE",
|
|
20
|
+
UPDATE_CLIENT = "UPDATE_CLIENT"
|
|
21
|
+
}
|
|
22
|
+
export declare type State = {
|
|
23
|
+
/** 支付名称 */
|
|
24
|
+
name: string;
|
|
25
|
+
/** 金额单位 */
|
|
26
|
+
symbol: string;
|
|
27
|
+
/** 支付原始金额 */
|
|
28
|
+
amount: string | number;
|
|
29
|
+
/** 模式 */
|
|
30
|
+
mode: ModeType;
|
|
31
|
+
/** 订单号 */
|
|
32
|
+
order_id: string | number;
|
|
33
|
+
/** 厂商 */
|
|
34
|
+
eftpos: DeviceStatusType;
|
|
35
|
+
action?: RouteType;
|
|
36
|
+
/** 用于重置页面特指 =》全部步骤 */
|
|
37
|
+
key: number;
|
|
38
|
+
/** 当前执行到哪一步了 */
|
|
39
|
+
step: number;
|
|
40
|
+
/** 标题 */
|
|
41
|
+
title: string;
|
|
42
|
+
/** 标题 */
|
|
43
|
+
subTitle?: string;
|
|
44
|
+
/** step : 常规步骤页面 ,unset 自定义页面 */
|
|
45
|
+
type: 'step' | 'unset';
|
|
46
|
+
render: boolean;
|
|
47
|
+
/** 网络 */
|
|
48
|
+
net?: boolean;
|
|
49
|
+
/** 上面 unset 自定义页面,这里需要指定到具体页面 */
|
|
50
|
+
component: string;
|
|
51
|
+
form?: string;
|
|
52
|
+
/** 页面状态 */
|
|
53
|
+
status: StatusType;
|
|
54
|
+
/** 警告文案 */
|
|
55
|
+
warn: string;
|
|
56
|
+
steps: {
|
|
57
|
+
/** 用于重置当前步骤 */
|
|
58
|
+
key: number;
|
|
59
|
+
title?: string;
|
|
60
|
+
text?: string;
|
|
61
|
+
warn?: string;
|
|
62
|
+
tip?: string;
|
|
63
|
+
success?: string;
|
|
64
|
+
fail?: string;
|
|
65
|
+
loading?: string;
|
|
66
|
+
/** 步骤状态 */
|
|
67
|
+
status: StatusType;
|
|
68
|
+
custom?: {
|
|
69
|
+
/** 步骤自定义 */
|
|
70
|
+
[key: string]: unknown;
|
|
71
|
+
};
|
|
72
|
+
}[];
|
|
73
|
+
/** 支付流水号 */
|
|
74
|
+
number?: string | number;
|
|
75
|
+
/** 设备信息 */
|
|
76
|
+
device?: {
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
/** 支付信息 */
|
|
80
|
+
pay?: {
|
|
81
|
+
[key: string]: unknown;
|
|
82
|
+
};
|
|
83
|
+
custom?: {
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
manual?: {
|
|
87
|
+
title: string;
|
|
88
|
+
text: string;
|
|
89
|
+
status?: boolean;
|
|
90
|
+
money?: number;
|
|
91
|
+
};
|
|
92
|
+
backup?: Omit<State, 'backup'>;
|
|
93
|
+
client: ClientEnum;
|
|
94
|
+
};
|
|
95
|
+
export declare type Action = {
|
|
96
|
+
type: EActionTypes;
|
|
97
|
+
payload: Partial<State>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @title: 刷新 key
|
|
101
|
+
* @description: 用户重置组件生命周期,
|
|
102
|
+
* @param {number} key
|
|
103
|
+
* @Author: hongbing.wang
|
|
104
|
+
* @Date: 2024-08-19 09:56
|
|
105
|
+
*/
|
|
106
|
+
export declare const updateKey: (key: number) => {
|
|
107
|
+
type: EActionTypes;
|
|
108
|
+
payload: {
|
|
109
|
+
key: number;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* @title: 更新设备信息
|
|
114
|
+
* @description: 用户选择设备将回填到此处
|
|
115
|
+
* @param {object} payload
|
|
116
|
+
* @Author: hongbing.wang
|
|
117
|
+
* @Date: 2024-08-19 09:57
|
|
118
|
+
*/
|
|
119
|
+
export declare const updateDevice: (payload: {
|
|
120
|
+
device: State['device'];
|
|
121
|
+
}) => {
|
|
122
|
+
type: EActionTypes;
|
|
123
|
+
payload: {
|
|
124
|
+
device: State['device'];
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* @title: 刷新 步骤key
|
|
129
|
+
* @description: 重置某一步生命周期
|
|
130
|
+
* @Author: hongbing.wang
|
|
131
|
+
* @Date: 2024-08-19 09:58
|
|
132
|
+
*/
|
|
133
|
+
export declare const updateStepKey: () => {
|
|
134
|
+
type: EActionTypes;
|
|
135
|
+
payload: {};
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @title: 更新至下一步
|
|
139
|
+
* @description: 更新至下一步
|
|
140
|
+
* @param {string} warn?: 错误信息
|
|
141
|
+
* @Author: hongbing.wang
|
|
142
|
+
* @Date: 2024-08-19 09:58
|
|
143
|
+
*/
|
|
144
|
+
export declare const updateNextStep: (warn?: string) => {
|
|
145
|
+
type: EActionTypes;
|
|
146
|
+
payload: {
|
|
147
|
+
warn: string;
|
|
148
|
+
} | {
|
|
149
|
+
warn?: undefined;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* @title: 更新自定义信息
|
|
154
|
+
* @description: 更新自定义信息
|
|
155
|
+
* @param {object} payload
|
|
156
|
+
* @Author: hongbing.wang
|
|
157
|
+
* @Date: 2024-08-19 10:03
|
|
158
|
+
*/
|
|
159
|
+
export declare const updateCustom: (payload: {
|
|
160
|
+
[key: string]: unknown;
|
|
161
|
+
}) => {
|
|
162
|
+
type: EActionTypes;
|
|
163
|
+
payload: {
|
|
164
|
+
[key: string]: unknown;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* @title: 更新 全局状态
|
|
169
|
+
* @description: 更新 全局状态
|
|
170
|
+
* @param {string} status : 状态
|
|
171
|
+
* * @Author: hongbing.wang
|
|
172
|
+
* @Date: 2024-08-19 10:03
|
|
173
|
+
*/
|
|
174
|
+
export declare const updateStatus: (status: 'loading' | 'warn' | 'fail' | 'success' | 'question') => {
|
|
175
|
+
type: EActionTypes;
|
|
176
|
+
payload: {
|
|
177
|
+
status: "success" | "loading" | "warn" | "fail" | "question";
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* @title: 更新自定义组件
|
|
182
|
+
* @description: 更新自定义组件
|
|
183
|
+
* @param {string} component 组件名称
|
|
184
|
+
* @param {boolean} render : true : 隐藏 原组件(维持原组件内状态) ;false : 卸载
|
|
185
|
+
* @return {*}
|
|
186
|
+
* @Author: hongbing.wang
|
|
187
|
+
* @Date: 2024-08-19 10:04
|
|
188
|
+
*/
|
|
189
|
+
export declare const updateComponent: (component: string, render?: boolean) => {
|
|
190
|
+
type: EActionTypes;
|
|
191
|
+
payload: {
|
|
192
|
+
readonly component: string;
|
|
193
|
+
readonly type: "unset";
|
|
194
|
+
readonly render: boolean;
|
|
195
|
+
} | {
|
|
196
|
+
readonly type: "step";
|
|
197
|
+
readonly render: boolean;
|
|
198
|
+
readonly component?: undefined;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* @title: 更新步骤信息
|
|
203
|
+
* @description: 更新某一步骤信息
|
|
204
|
+
* @param {State} steps 某一步骤信息
|
|
205
|
+
* @Author: hongbing.wang
|
|
206
|
+
* @Date: 2024-08-19 10:07
|
|
207
|
+
*/
|
|
208
|
+
export declare const updateSteps: (steps: State['steps']) => {
|
|
209
|
+
type: EActionTypes;
|
|
210
|
+
payload: {
|
|
211
|
+
steps: {
|
|
212
|
+
/** 用于重置当前步骤 */
|
|
213
|
+
key: number;
|
|
214
|
+
title?: string | undefined;
|
|
215
|
+
text?: string | undefined;
|
|
216
|
+
warn?: string | undefined;
|
|
217
|
+
tip?: string | undefined;
|
|
218
|
+
success?: string | undefined;
|
|
219
|
+
fail?: string | undefined;
|
|
220
|
+
loading?: string | undefined;
|
|
221
|
+
/** 步骤状态 */
|
|
222
|
+
status: StatusType;
|
|
223
|
+
custom?: {
|
|
224
|
+
[key: string]: unknown;
|
|
225
|
+
} | undefined;
|
|
226
|
+
}[];
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* @title: 更新状态管理信息
|
|
231
|
+
* @description: 更新状态管理信息
|
|
232
|
+
* @param {Partial} payload
|
|
233
|
+
* @return {*}
|
|
234
|
+
* @Author: hongbing.wang
|
|
235
|
+
* @Date: 2024-08-19 10:08
|
|
236
|
+
*/
|
|
237
|
+
export declare const updateState: (payload: Partial<State>) => {
|
|
238
|
+
type: EActionTypes;
|
|
239
|
+
payload: Partial<State>;
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* @title: 更新当前步骤自定义信息
|
|
243
|
+
* @description: 更新当前步骤自定义信息
|
|
244
|
+
* @Author: hongbing.wang
|
|
245
|
+
* @Date: 2024-08-19 10:09
|
|
246
|
+
*/
|
|
247
|
+
export declare const updateCurrentCustomStemItem: (payload: NonNullable<Partial<State['steps'][number]['custom']>>) => {
|
|
248
|
+
type: EActionTypes;
|
|
249
|
+
payload: Partial<{
|
|
250
|
+
[key: string]: unknown;
|
|
251
|
+
}>;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* @title: 更新当前步骤信息
|
|
255
|
+
* @description: 更新当前步骤信息
|
|
256
|
+
* @Author: hongbing.wang
|
|
257
|
+
* @Date: 2024-08-19 10:09
|
|
258
|
+
*/
|
|
259
|
+
export declare const updateCurrentStemItem: (payload: any) => {
|
|
260
|
+
type: EActionTypes;
|
|
261
|
+
payload: any;
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* @title: 更新当前步骤信息
|
|
265
|
+
* @description: 更新当前步骤信息
|
|
266
|
+
* @Author: hongbing.wang
|
|
267
|
+
* @Date: 2024-08-19 10:09
|
|
268
|
+
*/
|
|
269
|
+
export declare const updateClient: (payload: ClientEnum) => {
|
|
270
|
+
type: EActionTypes;
|
|
271
|
+
payload: {
|
|
272
|
+
client: ClientEnum;
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* @title: 更新备份信息
|
|
277
|
+
* @description: 更新备份信息
|
|
278
|
+
* @Author: hongbing.wang
|
|
279
|
+
* @Date: 2024-08-19 10:25
|
|
280
|
+
*/
|
|
281
|
+
export declare const backUpProduction: (payload: Partial<State>) => {
|
|
282
|
+
type: EActionTypes;
|
|
283
|
+
payload: Partial<State>;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* @title: 释放备份信息
|
|
287
|
+
* @description: 释放备份信息
|
|
288
|
+
* @param {Partial} payload
|
|
289
|
+
* @Author: hongbing.wang
|
|
290
|
+
* @Date: 2024-08-19 10:27
|
|
291
|
+
*/
|
|
292
|
+
export declare const backUpFree: (payload: Partial<State>) => {
|
|
293
|
+
type: EActionTypes;
|
|
294
|
+
payload: {
|
|
295
|
+
name?: string | undefined;
|
|
296
|
+
symbol?: string | undefined;
|
|
297
|
+
amount?: string | number | undefined;
|
|
298
|
+
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
299
|
+
order_id?: string | number | undefined;
|
|
300
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | undefined;
|
|
301
|
+
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
302
|
+
key?: number | undefined;
|
|
303
|
+
step?: number | undefined;
|
|
304
|
+
title?: string | undefined;
|
|
305
|
+
subTitle?: string | undefined;
|
|
306
|
+
type?: "unset" | "step" | undefined;
|
|
307
|
+
render?: boolean | undefined;
|
|
308
|
+
net?: boolean | undefined;
|
|
309
|
+
component?: string | undefined;
|
|
310
|
+
form?: string | undefined;
|
|
311
|
+
status?: "success" | "loading" | "warn" | "fail" | "pedding" | "resove" | "reject" | "question" | undefined;
|
|
312
|
+
warn?: string | undefined;
|
|
313
|
+
steps?: {
|
|
314
|
+
/** 用于重置当前步骤 */
|
|
315
|
+
key: number;
|
|
316
|
+
title?: string | undefined;
|
|
317
|
+
text?: string | undefined;
|
|
318
|
+
warn?: string | undefined;
|
|
319
|
+
tip?: string | undefined;
|
|
320
|
+
success?: string | undefined;
|
|
321
|
+
fail?: string | undefined;
|
|
322
|
+
loading?: string | undefined;
|
|
323
|
+
/** 步骤状态 */
|
|
324
|
+
status: StatusType;
|
|
325
|
+
custom?: {
|
|
326
|
+
[key: string]: unknown;
|
|
327
|
+
} | undefined;
|
|
328
|
+
}[] | undefined;
|
|
329
|
+
number?: string | number | undefined;
|
|
330
|
+
device?: {
|
|
331
|
+
[key: string]: unknown;
|
|
332
|
+
} | undefined;
|
|
333
|
+
pay?: {
|
|
334
|
+
[key: string]: unknown;
|
|
335
|
+
} | undefined;
|
|
336
|
+
custom?: {
|
|
337
|
+
[key: string]: unknown;
|
|
338
|
+
} | undefined;
|
|
339
|
+
manual?: {
|
|
340
|
+
title: string;
|
|
341
|
+
text: string;
|
|
342
|
+
status?: boolean | undefined;
|
|
343
|
+
money?: number | undefined;
|
|
344
|
+
} | undefined;
|
|
345
|
+
backup?: Omit<State, "backup"> | undefined;
|
|
346
|
+
client?: ClientEnum | undefined;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
export declare function reducers(state: State, action: Action): State;
|
|
350
|
+
export declare const Provider: ({ children, state: providerState, }: {
|
|
351
|
+
children: ReactNode;
|
|
352
|
+
state?: State | undefined;
|
|
353
|
+
}) => JSX.Element;
|
|
354
|
+
export declare function useContextData(): State;
|
|
355
|
+
export declare function useDispatch(): ThunkDispatch<State, Action>;
|
|
@@ -43,7 +43,6 @@ 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");
|
|
47
46
|
var ContinueButton = () => {
|
|
48
47
|
var _a, _b;
|
|
49
48
|
const { data } = (0, import_Sales.useSales)();
|
|
@@ -54,11 +53,9 @@ var ContinueButton = () => {
|
|
|
54
53
|
onCheckout,
|
|
55
54
|
createBooking,
|
|
56
55
|
onCheckBeforeBooking,
|
|
57
|
-
checkBeforeBooking
|
|
58
|
-
freePay
|
|
56
|
+
checkBeforeBooking
|
|
59
57
|
} = (0, import_Sales.useCheckout)();
|
|
60
58
|
const { openLoginModal, isLogin } = (0, import_Sales.useCustomer)();
|
|
61
|
-
const { deposit, isAgreeDepositPolicy } = (0, import_Sales.useSummary)();
|
|
62
59
|
const [openCheckout, setOpenCheckout] = (0, import_react.useState)(false);
|
|
63
60
|
const [checkedNumber, setCheckedNumber] = (0, import_react.useState)(0);
|
|
64
61
|
const [openEmptyHolder, setOpenEmptyHolder] = (0, import_react.useState)(false);
|
|
@@ -229,13 +226,8 @@ var ContinueButton = () => {
|
|
|
229
226
|
handleNextStep();
|
|
230
227
|
};
|
|
231
228
|
const handleContinue = async () => {
|
|
232
|
-
var _a2;
|
|
233
229
|
if (isLastStep) {
|
|
234
230
|
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
|
-
}
|
|
239
231
|
const checkRes = await onCheckBeforeBooking(value);
|
|
240
232
|
if ((checkRes == null ? void 0 : checkRes.result) === false) {
|
|
241
233
|
setCheckedNumber(checkRes == null ? void 0 : checkRes.num);
|
|
@@ -271,13 +263,8 @@ var ContinueButton = () => {
|
|
|
271
263
|
}, [currentStepData == null ? void 0 : currentStepData.key]);
|
|
272
264
|
const confirmLoading = (0, import_react.useMemo)(() => {
|
|
273
265
|
if (!isLastStep) return false;
|
|
274
|
-
return (createBooking == null ? void 0 : createBooking.loading) || (checkBeforeBooking == null ? void 0 : checkBeforeBooking.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
|
-
]);
|
|
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]);
|
|
281
268
|
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
282
269
|
import_materials.Button,
|
|
283
270
|
{
|
|
@@ -40,9 +40,8 @@ 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 {
|
|
45
|
-
const { taxTitle, totalTaxFee, isPriceIncludeTax, total, deposit } = (0, import_Sales.useSummary)();
|
|
43
|
+
var _a, _b, _c, _d, _e, _f;
|
|
44
|
+
const { taxTitle, totalTaxFee, isPriceIncludeTax, total } = (0, import_Sales.useSummary)();
|
|
46
45
|
const context = (0, import_useEngineContext.default)();
|
|
47
46
|
console.log(
|
|
48
47
|
taxTitle,
|
|
@@ -50,10 +49,8 @@ var Total = ({ className, isFooter }) => {
|
|
|
50
49
|
totalTaxFee,
|
|
51
50
|
total,
|
|
52
51
|
(_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,
|
|
54
52
|
"wh97978"
|
|
55
53
|
);
|
|
56
|
-
const showDeposit = ((_d = cartData == null ? void 0 : cartData.cartItems) == null ? void 0 : _d.length) > 0 && (deposit == null ? void 0 : deposit.hasDeposit);
|
|
57
54
|
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(
|
|
58
55
|
"div",
|
|
59
56
|
{
|
|
@@ -61,16 +58,16 @@ var Total = ({ className, isFooter }) => {
|
|
|
61
58
|
[["total-gst-wrap"]]: !isPriceIncludeTax && Number(totalTaxFee) > 0
|
|
62
59
|
})
|
|
63
60
|
},
|
|
64
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "left" }, /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement("span", null,
|
|
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(
|
|
65
62
|
import_materials.PisellText.Amount,
|
|
66
63
|
{
|
|
67
|
-
value:
|
|
64
|
+
value: total,
|
|
68
65
|
showCurrencySymbol: true,
|
|
69
66
|
className: "event-amount"
|
|
70
67
|
}
|
|
71
68
|
) : null), isPriceIncludeTax && Number(totalTaxFee) > 0 ? /* @__PURE__ */ import_react.default.createElement("span", { className: "gst" }, import_utils.locales.getText("pisell2.event.total.gst")(
|
|
72
69
|
`${isFooter ? `${taxTitle}: ` : taxTitle}`,
|
|
73
|
-
`${(
|
|
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}`
|
|
74
71
|
)) : null),
|
|
75
72
|
!isFooter ? /* @__PURE__ */ import_react.default.createElement(
|
|
76
73
|
import_materials.PisellText.Amount,
|
|
@@ -39,10 +39,8 @@ 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"));
|
|
43
42
|
var import_index = require("./index.less");
|
|
44
43
|
var CartItem = () => {
|
|
45
|
-
var _a;
|
|
46
44
|
const { open, holderData, selectedHolderIds } = (0, import_Sales.useHolder)();
|
|
47
45
|
const {
|
|
48
46
|
deleteCartItem,
|
|
@@ -50,7 +48,7 @@ var CartItem = () => {
|
|
|
50
48
|
cartData,
|
|
51
49
|
addNoteToCartItem
|
|
52
50
|
} = (0, import_Sales.useCart)();
|
|
53
|
-
const {
|
|
51
|
+
const { subtotal } = (0, import_Sales.useSummary)();
|
|
54
52
|
const { isLastStep } = (0, import_Sales.useStep)();
|
|
55
53
|
const handleClickCard = (e, type, key) => {
|
|
56
54
|
if (type === "note") {
|
|
@@ -88,7 +86,7 @@ var CartItem = () => {
|
|
|
88
86
|
onChange: (e, type, key) => handleClickCard(e, type, key)
|
|
89
87
|
}
|
|
90
88
|
)),
|
|
91
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: "event-footer" }, /* @__PURE__ */ import_react.default.createElement(import_Total.default, null),
|
|
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))
|
|
92
90
|
), /* @__PURE__ */ import_react.default.createElement(import_SelectHolderModal.default, { open }));
|
|
93
91
|
};
|
|
94
92
|
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) || {} },
|
|
243
243
|
isOS: false
|
|
244
244
|
},
|
|
245
245
|
callback: (data) => {
|