@pisell/private-materials 6.3.177 → 6.3.179
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/meta.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +9 -9
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/businessModel/SalesModel/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Cart/Item/index.js +90 -24
- package/es/components/appointmentBooking/components/ConfirmInformation/index.js +24 -20
- package/es/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/appointmentBooking/components/Header/index.js +4 -24
- package/es/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/es/components/appointmentBooking/hooks.d.ts +1 -17
- package/es/components/appointmentBooking/hooks.js +55 -128
- package/es/components/appointmentBooking/utils.d.ts +1 -0
- package/es/components/appointmentBooking/utils.js +54 -33
- package/es/components/booking/components/TabProduct/index.d.ts +1 -0
- package/es/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/es/components/booking/forms/table/index.d.ts +1 -0
- package/es/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/es/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/es/components/booking/info/index.d.ts +1 -0
- package/es/components/booking/info/service/like/index.d.ts +1 -0
- package/es/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/es/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/es/components/eftpos/SettlementModal/Action.d.ts +1 -0
- package/es/components/eftpos/SettlementModal/index.d.ts +1 -0
- package/es/components/eftpos/deviceList/index.d.ts +1 -0
- package/es/components/eftpos/form/index.d.ts +1 -0
- package/es/components/eftpos/group/index.d.ts +1 -0
- package/es/components/eftpos/hooks.d.ts +1 -0
- package/es/components/eftpos/icon/apiKey.d.ts +1 -0
- package/es/components/eftpos/icon/device.d.ts +1 -0
- package/es/components/eftpos/receipt/index.d.ts +1 -0
- package/es/components/eftpos/surcharge/index.d.ts +1 -0
- package/es/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/es/components/eftposPay/app.d.ts +1 -0
- package/es/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/es/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/es/components/eftposPay/component/step/index.d.ts +1 -0
- package/es/components/eftposPay/component/step/step.d.ts +1 -0
- package/es/components/eftposPay/device.js +4 -11
- package/es/components/eftposPay/hooks.d.ts +1 -1
- package/es/components/eftposPay/mx51/Action.d.ts +1 -0
- package/es/components/eftposPay/store/index.d.ts +1 -1
- package/es/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/es/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/es/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/es/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/es/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/es/components/eventBooking/components/progressBar/index.js +10 -30
- package/es/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/es/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- 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/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/es/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/es/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/es/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/es/components/scanOrder/components/Check/index.js +46 -187
- package/es/components/scanOrder/components/Check/index.less +0 -39
- package/es/components/scanOrder/components/Content/index.js +72 -189
- package/es/components/scanOrder/components/Menu/index.js +5 -11
- package/es/components/scanOrder/hooks.js +0 -7
- package/es/components/scanOrder/locales.d.ts +0 -75
- package/es/components/scanOrder/locales.js +0 -75
- package/es/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/es/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/es/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/es/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/es/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/es/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/es/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/es/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/es/components/venueBooking/components/Cart/index.js +165 -46
- package/es/components/venueBooking/components/Voucher/index.js +1 -6
- package/es/components/venueBooking/context.js +15 -2
- package/es/components/venueBooking/locales.d.ts +5 -0
- package/es/components/venueBooking/locales.js +10 -5
- package/es/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/es/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/es/plus/clientName/index.d.ts +1 -0
- package/es/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/es/plus/orderList/components/HandleActions.d.ts +1 -0
- package/es/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/es/plus/orderList/components/Reset.d.ts +1 -0
- package/es/plus/orderList/components/Toolbar.d.ts +1 -0
- package/es/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
- package/es/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/es/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/es/pro/Login2.0/locales.js +1 -1
- package/es/pro/Selector/demo.d.ts +1 -0
- package/es/pro/pisellPaymentList/example.d.ts +1 -0
- package/es/utils/buildCartHolderParams.d.ts +97 -0
- package/es/utils/buildCartHolderParams.js +200 -0
- package/lib/businessModel/SalesModel/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Cart/Item/index.js +70 -9
- package/lib/components/appointmentBooking/components/ConfirmInformation/index.js +6 -2
- package/lib/components/appointmentBooking/components/Guest/components/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/appointmentBooking/components/Header/index.js +1 -13
- package/lib/components/appointmentBooking/components/Voucher/index.js +10 -0
- package/lib/components/appointmentBooking/hooks.d.ts +1 -17
- package/lib/components/appointmentBooking/hooks.js +17 -91
- package/lib/components/appointmentBooking/utils.d.ts +1 -0
- package/lib/components/appointmentBooking/utils.js +24 -13
- package/lib/components/booking/components/TabProduct/index.d.ts +1 -0
- package/lib/components/booking/components/formItemChildrenWrap/index.d.ts +1 -0
- package/lib/components/booking/forms/table/index.d.ts +1 -0
- package/lib/components/booking/info/addServiceVariant/index.d.ts +1 -0
- package/lib/components/booking/info/clientVariant/hooks/useIsLowSpeedNetwork.d.ts +1 -0
- package/lib/components/booking/info/index.d.ts +1 -0
- package/lib/components/booking/info/service/like/index.d.ts +1 -0
- package/lib/components/ecocup/components/MoreDropdown/index.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useColumns.d.ts +1 -0
- package/lib/components/ecocup/cupList/hooks/useSummary.d.ts +1 -0
- package/lib/components/eftpos/SettlementModal/Action.d.ts +1 -0
- package/lib/components/eftpos/SettlementModal/index.d.ts +1 -0
- package/lib/components/eftpos/deviceList/index.d.ts +1 -0
- package/lib/components/eftpos/form/index.d.ts +1 -0
- package/lib/components/eftpos/group/index.d.ts +1 -0
- package/lib/components/eftpos/hooks.d.ts +1 -0
- package/lib/components/eftpos/icon/apiKey.d.ts +1 -0
- package/lib/components/eftpos/icon/device.d.ts +1 -0
- package/lib/components/eftpos/receipt/index.d.ts +1 -0
- package/lib/components/eftpos/surcharge/index.d.ts +1 -0
- package/lib/components/eftposPay/aggregatePayment/utils/payment.js +1 -2
- package/lib/components/eftposPay/app.d.ts +1 -0
- package/lib/components/eftposPay/component/alert/warn.d.ts +1 -0
- package/lib/components/eftposPay/component/header/titlebar.d.ts +1 -0
- package/lib/components/eftposPay/component/step/index.d.ts +1 -0
- package/lib/components/eftposPay/component/step/step.d.ts +1 -0
- package/lib/components/eftposPay/device.js +4 -6
- package/lib/components/eftposPay/hooks.d.ts +1 -1
- package/lib/components/eftposPay/mx51/Action.d.ts +1 -0
- package/lib/components/eftposPay/store/index.d.ts +1 -1
- package/lib/components/eftposPay/tyro/hooks.d.ts +1 -0
- package/lib/components/eventBooking/components/ErrorTip/index.d.ts +1 -0
- package/lib/components/eventBooking/components/Provider/InformationOptionsModal/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/CalenDateStatus/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/bookingAvailabilityCalendar/components/CalendarDate/Item/DayItem/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Item/index.d.ts +1 -0
- package/lib/components/eventBooking/components/bookingAvailabilityCalendar/components/CalendarDate/Status/index.d.ts +1 -0
- package/lib/components/eventBooking/components/progressBar/index.d.ts +1 -8
- package/lib/components/eventBooking/components/progressBar/index.js +9 -29
- package/lib/components/eventBooking/components/scheduleCalendar/calendarItem.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/Finish/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/SDK.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/StripeSDK/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/PageLoading/index.d.ts +1 -0
- package/lib/components/pay/toC/PaymentMethods/StripePay/Stripe/components/SetupForm/PaymentRequestForm.d.ts +1 -0
- 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/WalletPassBlock/components/WalletUseList/index.d.ts +1 -0
- package/lib/components/pisellSelectCustomerModal/RightPanel/Add/PhoneField/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Actor/index.d.ts +1 -0
- package/lib/components/productExtension/fields/Forms/index.d.ts +1 -0
- package/lib/components/scanOrder/components/Check/index.js +3 -116
- package/lib/components/scanOrder/components/Check/index.less +0 -39
- package/lib/components/scanOrder/components/Content/index.js +25 -106
- package/lib/components/scanOrder/components/Menu/index.js +0 -2
- package/lib/components/scanOrder/hooks.js +0 -7
- package/lib/components/scanOrder/locales.d.ts +0 -75
- package/lib/components/scanOrder/locales.js +0 -75
- package/lib/components/schedules/calendar/calendarItem.d.ts +1 -0
- package/lib/components/schedules/components/ScheduleList/RenderScheduleItem/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetail/index.d.ts +1 -0
- package/lib/components/schedules/products/ProductDetailDrawer/ProductDetailByDate/index.d.ts +1 -0
- package/lib/components/schedules/resources/relationProduct/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Cart/Product.d.ts +1 -0
- package/lib/components/shoppingCart/components/Empty/index.d.ts +1 -0
- package/lib/components/shoppingCart/components/Render/index.d.ts +1 -0
- package/lib/components/systemSettings/registry/components/DataSourceTreeSelect/index.d.ts +1 -0
- package/lib/components/ticketBooking/components/addServiceVariant/index.d.ts +1 -0
- package/lib/components/venueBooking/components/Cart/index.js +93 -14
- package/lib/components/venueBooking/components/Voucher/index.js +1 -5
- package/lib/components/venueBooking/context.js +12 -2
- package/lib/components/venueBooking/locales.d.ts +5 -0
- package/lib/components/venueBooking/locales.js +10 -5
- package/lib/components/workSpaceList/components/Modal/index.d.ts +1 -0
- package/lib/components/workSpaceList/components/SearchWorkspaceAndBase/index.d.ts +1 -0
- package/lib/plus/clientName/index.d.ts +1 -0
- package/lib/plus/clinetSearch/Add/PhoneField/index.d.ts +1 -0
- package/lib/plus/orderList/components/HandleActions.d.ts +1 -0
- package/lib/plus/orderList/components/QuickFilter.d.ts +1 -0
- package/lib/plus/orderList/components/Reset.d.ts +1 -0
- package/lib/plus/orderList/components/Toolbar.d.ts +1 -0
- package/lib/plus/pisellReservation/hooks/useReservationScheduleDebounced.d.ts +1 -0
- package/lib/plus/selectHolder/components/ErrorTip/index.d.ts +1 -0
- package/lib/plus/skuOptionsSelection/components/NormalCard/index.d.ts +1 -0
- package/lib/pro/Login2.0/locales.js +1 -1
- package/lib/pro/Selector/demo.d.ts +1 -0
- package/lib/pro/pisellPaymentList/example.d.ts +1 -0
- package/lib/utils/buildCartHolderParams.d.ts +97 -0
- package/lib/utils/buildCartHolderParams.js +172 -0
- package/package.json +1 -1
|
@@ -45,6 +45,7 @@ var import_voucher = require("../../../booking/components/voucher/index.less");
|
|
|
45
45
|
var import_utils2 = require("../../../booking/utils");
|
|
46
46
|
var import_index = require("./index.less");
|
|
47
47
|
var import_ahooks = require("ahooks");
|
|
48
|
+
var import_utils3 = require("../../utils");
|
|
48
49
|
var ShopDiscountHooks = {
|
|
49
50
|
onInited: "shopDiscount:onInited",
|
|
50
51
|
onDestroy: "shopDiscount:onDestroy",
|
|
@@ -268,7 +269,16 @@ var VoucherCard = (props) => {
|
|
|
268
269
|
onClick: () => {
|
|
269
270
|
if (!action) return;
|
|
270
271
|
openLoginModal({
|
|
272
|
+
data: {
|
|
273
|
+
type: "plugin"
|
|
274
|
+
},
|
|
271
275
|
callback: (status) => {
|
|
276
|
+
if (status === "success") {
|
|
277
|
+
const customer = (0, import_utils3.getCustomer)(utils);
|
|
278
|
+
appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
|
|
279
|
+
customer_id: customer == null ? void 0 : customer.id
|
|
280
|
+
});
|
|
281
|
+
}
|
|
272
282
|
}
|
|
273
283
|
});
|
|
274
284
|
}
|
|
@@ -46,6 +46,7 @@ export declare const useAppointmentBookingLogin: () => {
|
|
|
46
46
|
isLogin: boolean;
|
|
47
47
|
openLoginModal: (params: {
|
|
48
48
|
callback: any;
|
|
49
|
+
data?: any;
|
|
49
50
|
}) => void;
|
|
50
51
|
};
|
|
51
52
|
/**
|
|
@@ -105,20 +106,3 @@ export declare const useAppointmentBookingSetting: () => {
|
|
|
105
106
|
formName: any;
|
|
106
107
|
bookingSetting: any;
|
|
107
108
|
};
|
|
108
|
-
export interface UseInterceptBrowserBackOptions {
|
|
109
|
-
/** 是否启用拦截,默认 true */
|
|
110
|
-
enabled?: boolean;
|
|
111
|
-
/** 当前步骤 index(0-based),用于同步 history 栈深度 */
|
|
112
|
-
stepIndex: number;
|
|
113
|
-
/** 是否还能在流程内后退(如 currentStep.index > 0) */
|
|
114
|
-
canGoBack: () => boolean;
|
|
115
|
-
/** 流程内后退,对应 Header.handleBack */
|
|
116
|
-
onBack: () => void | Promise<void>;
|
|
117
|
-
/** 已在第一步时的退出逻辑,对应 Header.handleClose */
|
|
118
|
-
onExit?: () => void;
|
|
119
|
-
}
|
|
120
|
-
export interface UseInterceptBrowserBackResult {
|
|
121
|
-
/** 系统返回触发退出确认但被取消时,补回 history trap */
|
|
122
|
-
restoreBackTrap: () => void;
|
|
123
|
-
}
|
|
124
|
-
export declare const useInterceptBrowserBack: ({ enabled, stepIndex, canGoBack, onBack, onExit, }: UseInterceptBrowserBackOptions) => UseInterceptBrowserBackResult;
|
|
@@ -38,7 +38,6 @@ __export(hooks_exports, {
|
|
|
38
38
|
useAppointmentBookingResource: () => useAppointmentBookingResource,
|
|
39
39
|
useAppointmentBookingSetting: () => useAppointmentBookingSetting,
|
|
40
40
|
useAppointmentBookingStep: () => useAppointmentBookingStep,
|
|
41
|
-
useInterceptBrowserBack: () => useInterceptBrowserBack,
|
|
42
41
|
useIsSkipResourceStep: () => useIsSkipResourceStep,
|
|
43
42
|
useShopDiscount: () => useShopDiscount
|
|
44
43
|
});
|
|
@@ -290,7 +289,7 @@ var useAppointmentBookingStep = () => {
|
|
|
290
289
|
{ key: "错误信息", value: msg }
|
|
291
290
|
]);
|
|
292
291
|
};
|
|
293
|
-
const checkHolder = async () => {
|
|
292
|
+
const checkHolder = async (isLoginTrigger = false) => {
|
|
294
293
|
try {
|
|
295
294
|
setLoading(false);
|
|
296
295
|
if (isRetailTemplate || (appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
|
|
@@ -306,7 +305,7 @@ var useAppointmentBookingStep = () => {
|
|
|
306
305
|
const appoimentCarts = cartLists.filter(
|
|
307
306
|
(n) => !(appointmentBooking == null ? void 0 : appointmentBooking.isTargetCartIdNormalProduct(n._id))
|
|
308
307
|
);
|
|
309
|
-
const { hasError } = (0, import_utils2.checkAndGoNext)(
|
|
308
|
+
const { hasError, isEnableSkuHolderRule } = (0, import_utils2.checkAndGoNext)(
|
|
310
309
|
isFormSubject,
|
|
311
310
|
checkAccount,
|
|
312
311
|
appoimentCarts
|
|
@@ -319,6 +318,10 @@ var useAppointmentBookingStep = () => {
|
|
|
319
318
|
]);
|
|
320
319
|
}
|
|
321
320
|
if (hasError) {
|
|
321
|
+
(0, import_utils3.scrollToFirstErrorCard)(".pisell-lowcode-product-card-select-holder-error");
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
if (isLoginTrigger && isEnableSkuHolderRule) {
|
|
322
325
|
return;
|
|
323
326
|
}
|
|
324
327
|
if (!!(renderItem == null ? void 0 : renderItem.policy_id)) {
|
|
@@ -352,7 +355,13 @@ var useAppointmentBookingStep = () => {
|
|
|
352
355
|
]);
|
|
353
356
|
}
|
|
354
357
|
if (res === "success") {
|
|
355
|
-
|
|
358
|
+
if (isFormSubject && !isRetailTemplate && !(appointmentBooking == null ? void 0 : appointmentBooking.isCartAllNormalProducts())) {
|
|
359
|
+
const customer = (0, import_utils2.getCustomer)(utils);
|
|
360
|
+
appointmentBooking == null ? void 0 : appointmentBooking.refreshAllHolderFormRecords({
|
|
361
|
+
customer_id: customer == null ? void 0 : customer.id
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
checkHolder(true);
|
|
356
365
|
}
|
|
357
366
|
if (res === "close") {
|
|
358
367
|
setLoading(false);
|
|
@@ -434,13 +443,13 @@ var useAppointmentBookingCart = () => {
|
|
|
434
443
|
var _a3;
|
|
435
444
|
return {
|
|
436
445
|
...item,
|
|
437
|
-
addHolderButtonText: utils
|
|
446
|
+
// addHolderButtonText: utils?.translation(formMap?.[formId]?.form?.form?.setting?.title),
|
|
438
447
|
format: ["HH:mm", "HH:mm"],
|
|
439
448
|
show_time: true,
|
|
440
449
|
duration_type: ((_a3 = item == null ? void 0 : item.duration) == null ? void 0 : _a3.type) || "minutes",
|
|
441
450
|
locale,
|
|
442
451
|
symbol,
|
|
443
|
-
holders:
|
|
452
|
+
// holders: formatHolder(accountLists),
|
|
444
453
|
allowClearHolder: true,
|
|
445
454
|
allowClearResource: true,
|
|
446
455
|
isMultipleResource: true
|
|
@@ -465,10 +474,11 @@ var useAppointmentBookingLogin = () => {
|
|
|
465
474
|
const utils = contextUtils();
|
|
466
475
|
const isLogin = !!((_b = (_a = utils == null ? void 0 : utils.token) == null ? void 0 : _a.get) == null ? void 0 : _b.call(_a));
|
|
467
476
|
const openLoginModal = (params) => {
|
|
468
|
-
const { callback } = params || {};
|
|
477
|
+
const { callback, data = {} } = params || {};
|
|
469
478
|
utils.action({
|
|
470
479
|
type: "pisell1.login",
|
|
471
480
|
data: {
|
|
481
|
+
...data
|
|
472
482
|
// type: 'plugin'
|
|
473
483
|
},
|
|
474
484
|
callback
|
|
@@ -632,89 +642,6 @@ var useAppointmentBookingSetting = () => {
|
|
|
632
642
|
bookingSetting: ((_c = appointmentBooking == null ? void 0 : appointmentBooking.otherParams) == null ? void 0 : _c.bookingSetting) || {}
|
|
633
643
|
};
|
|
634
644
|
};
|
|
635
|
-
var APPOINTMENT_BOOKING_BACK_TRAP_KEY = "__pisellAppointmentBookingBackTrap";
|
|
636
|
-
var pushAppointmentBookingBackTrap = () => {
|
|
637
|
-
window.history.pushState(
|
|
638
|
-
{ [APPOINTMENT_BOOKING_BACK_TRAP_KEY]: true },
|
|
639
|
-
"",
|
|
640
|
-
window.location.href
|
|
641
|
-
);
|
|
642
|
-
};
|
|
643
|
-
var useInterceptBrowserBack = ({
|
|
644
|
-
enabled = true,
|
|
645
|
-
stepIndex,
|
|
646
|
-
canGoBack,
|
|
647
|
-
onBack,
|
|
648
|
-
onExit
|
|
649
|
-
}) => {
|
|
650
|
-
const optionsRef = (0, import_react.useRef)({ stepIndex, canGoBack, onBack, onExit });
|
|
651
|
-
optionsRef.current = { stepIndex, canGoBack, onBack, onExit };
|
|
652
|
-
const syncedStepIndexRef = (0, import_react.useRef)(null);
|
|
653
|
-
const trapCountRef = (0, import_react.useRef)(0);
|
|
654
|
-
const restoreBackTrap = (0, import_react.useCallback)(() => {
|
|
655
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
656
|
-
pushAppointmentBookingBackTrap();
|
|
657
|
-
trapCountRef.current += 1;
|
|
658
|
-
}, [enabled]);
|
|
659
|
-
(0, import_react.useEffect)(() => {
|
|
660
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
661
|
-
const targetTrapCount = Math.max(0, stepIndex) + 1;
|
|
662
|
-
if (syncedStepIndexRef.current === null) {
|
|
663
|
-
syncedStepIndexRef.current = stepIndex;
|
|
664
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
665
|
-
pushAppointmentBookingBackTrap();
|
|
666
|
-
trapCountRef.current += 1;
|
|
667
|
-
}
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
if (stepIndex > syncedStepIndexRef.current) {
|
|
671
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
672
|
-
pushAppointmentBookingBackTrap();
|
|
673
|
-
trapCountRef.current += 1;
|
|
674
|
-
}
|
|
675
|
-
} else if (stepIndex < syncedStepIndexRef.current) {
|
|
676
|
-
trapCountRef.current = targetTrapCount;
|
|
677
|
-
}
|
|
678
|
-
syncedStepIndexRef.current = stepIndex;
|
|
679
|
-
}, [enabled, stepIndex]);
|
|
680
|
-
(0, import_react.useEffect)(() => {
|
|
681
|
-
if (!enabled || !(0, import_utils.isMobile)() || typeof window === "undefined") return;
|
|
682
|
-
let isActive = true;
|
|
683
|
-
const handlePopState = () => {
|
|
684
|
-
if (!isActive) return;
|
|
685
|
-
trapCountRef.current = Math.max(0, trapCountRef.current - 1);
|
|
686
|
-
const {
|
|
687
|
-
canGoBack: canGoBackFn,
|
|
688
|
-
onBack: onBackFn,
|
|
689
|
-
onExit: onExitFn
|
|
690
|
-
} = optionsRef.current;
|
|
691
|
-
if (canGoBackFn()) {
|
|
692
|
-
void Promise.resolve(onBackFn());
|
|
693
|
-
return;
|
|
694
|
-
}
|
|
695
|
-
onExitFn == null ? void 0 : onExitFn();
|
|
696
|
-
};
|
|
697
|
-
const handlePageShow = (event) => {
|
|
698
|
-
if (!isActive || !event.persisted) return;
|
|
699
|
-
const { stepIndex: currentStepIndex } = optionsRef.current;
|
|
700
|
-
const targetTrapCount = Math.max(0, currentStepIndex) + 1;
|
|
701
|
-
syncedStepIndexRef.current = currentStepIndex;
|
|
702
|
-
trapCountRef.current = 0;
|
|
703
|
-
while (trapCountRef.current < targetTrapCount) {
|
|
704
|
-
pushAppointmentBookingBackTrap();
|
|
705
|
-
trapCountRef.current += 1;
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
window.addEventListener("popstate", handlePopState, true);
|
|
709
|
-
window.addEventListener("pageshow", handlePageShow);
|
|
710
|
-
return () => {
|
|
711
|
-
isActive = false;
|
|
712
|
-
window.removeEventListener("popstate", handlePopState, true);
|
|
713
|
-
window.removeEventListener("pageshow", handlePageShow);
|
|
714
|
-
};
|
|
715
|
-
}, [enabled]);
|
|
716
|
-
return { restoreBackTrap };
|
|
717
|
-
};
|
|
718
645
|
// Annotate the CommonJS export names for ESM import in node:
|
|
719
646
|
0 && (module.exports = {
|
|
720
647
|
contextUtils,
|
|
@@ -726,7 +653,6 @@ var useInterceptBrowserBack = ({
|
|
|
726
653
|
useAppointmentBookingResource,
|
|
727
654
|
useAppointmentBookingSetting,
|
|
728
655
|
useAppointmentBookingStep,
|
|
729
|
-
useInterceptBrowserBack,
|
|
730
656
|
useIsSkipResourceStep,
|
|
731
657
|
useShopDiscount
|
|
732
658
|
});
|
|
@@ -182,6 +182,7 @@ export declare const getFormInsertBeforeKey: (currentKey: string, stepList: any[
|
|
|
182
182
|
*/
|
|
183
183
|
export declare const checkAndGoNext: (isFormSubject: any, checkAccount: any, carts: any[]) => {
|
|
184
184
|
hasError: boolean;
|
|
185
|
+
isEnableSkuHolderRule: boolean;
|
|
185
186
|
updatedCartList: any[];
|
|
186
187
|
};
|
|
187
188
|
export declare const currentAppointmentBoard: (currentKey: string, resources: any[], appointmentBooking: any) => {
|
|
@@ -436,23 +436,34 @@ var getFormInsertBeforeKey = (currentKey, stepList) => {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
var checkAndGoNext = (isFormSubject, checkAccount, carts) => {
|
|
439
|
+
if (!isFormSubject) return {
|
|
440
|
+
hasError: false,
|
|
441
|
+
isEnableSkuHolderRule: false,
|
|
442
|
+
updatedCartList: carts
|
|
443
|
+
};
|
|
439
444
|
let hasError = false;
|
|
445
|
+
let isEnableSkuHolderRule = false;
|
|
440
446
|
let updatedCartList = [...carts];
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return
|
|
451
|
-
|
|
452
|
-
|
|
447
|
+
updatedCartList = carts == null ? void 0 : carts.map((item) => {
|
|
448
|
+
var _a;
|
|
449
|
+
const holderConfig = ((_a = item == null ? void 0 : item._productInit) == null ? void 0 : _a.holder_config) || {};
|
|
450
|
+
const { status, required, resource_id } = holderConfig || {};
|
|
451
|
+
if (!(item == null ? void 0 : item.holder_id) && status === "enable" && !required && resource_id) {
|
|
452
|
+
isEnableSkuHolderRule = true;
|
|
453
|
+
}
|
|
454
|
+
if (!(item == null ? void 0 : item.holder_id) && status === "enable" && required) {
|
|
455
|
+
hasError = true;
|
|
456
|
+
return {
|
|
457
|
+
...item,
|
|
458
|
+
isErrorHolder: true
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
return item;
|
|
462
|
+
});
|
|
453
463
|
return {
|
|
454
464
|
hasError,
|
|
455
|
-
updatedCartList
|
|
465
|
+
updatedCartList,
|
|
466
|
+
isEnableSkuHolderRule
|
|
456
467
|
};
|
|
457
468
|
};
|
|
458
469
|
var currentAppointmentBoard = (currentKey, resources, appointmentBooking) => {
|
|
@@ -176,7 +176,6 @@ var PaymentMethod = class {
|
|
|
176
176
|
this.isFinished = markAsFinished;
|
|
177
177
|
this.currentQueryApi = null;
|
|
178
178
|
this.currentActionType = null;
|
|
179
|
-
this.currentQueryId = "";
|
|
180
179
|
}
|
|
181
180
|
/**
|
|
182
181
|
* 开始新的操作流程(统一的流程初始化)
|
|
@@ -408,7 +407,7 @@ var PaymentMethod = class {
|
|
|
408
407
|
if (this.isFinished || !this.shouldContinue()) {
|
|
409
408
|
return;
|
|
410
409
|
}
|
|
411
|
-
if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.
|
|
410
|
+
if ((error == null ? void 0 : error.name) === "AbortError" || (error == null ? void 0 : error.message) === "REQUEST_TIMEOUT") {
|
|
412
411
|
paymentLog.addLog({
|
|
413
412
|
title: "查询轮询结果:error-请求被取消或超时,继续轮询"
|
|
414
413
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PosProps, RouteType } from './const';
|
|
2
3
|
declare const App: ({ action, api, device_number, terminal, tyroUrl, tyroVersion, onChangeParams, isMobile, channel, formatAmount, ...props }: Omit<PosProps, "type" | "mode" | "getApi"> & {
|
|
3
4
|
action: RouteType;
|
|
@@ -117,18 +117,16 @@ var device_default = ({
|
|
|
117
117
|
clearTimer();
|
|
118
118
|
setLoading(false);
|
|
119
119
|
if (res && Array.isArray(res.list) && res.list.length > 0) {
|
|
120
|
-
import_payLog.default.log("设备列表加载成功", { count: res.list.length, device_number });
|
|
120
|
+
import_payLog.default.log("设备列表加载成功", { count: res.list.length, hasDeviceNumber: !!device_number });
|
|
121
121
|
if (device_number) {
|
|
122
122
|
const hostDeviceList = res.list.filter(
|
|
123
123
|
(item) => {
|
|
124
124
|
var _a, _b;
|
|
125
|
-
return
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
].some((i) => String(i.number) === String(device_number));
|
|
125
|
+
return (_b = (_a = item == null ? void 0 : item.setting) == null ? void 0 : _a.devices) == null ? void 0 : _b.some(
|
|
126
|
+
(i) => i.number === device_number
|
|
127
|
+
);
|
|
129
128
|
}
|
|
130
129
|
);
|
|
131
|
-
import_payLog.default.log("匹配到设备", { count: hostDeviceList == null ? void 0 : hostDeviceList.length });
|
|
132
130
|
if (hostDeviceList.length >= 1) {
|
|
133
131
|
setDataStaus(true);
|
|
134
132
|
setList(setDeviceList(hostDeviceList));
|
|
@@ -19,7 +19,7 @@ export declare const useStoreRef: <T extends {
|
|
|
19
19
|
readonly netRef: React.MutableRefObject<boolean | undefined>;
|
|
20
20
|
readonly symbolRef: React.MutableRefObject<string>;
|
|
21
21
|
readonly amountRef: React.MutableRefObject<string | number>;
|
|
22
|
-
readonly eftposRef: React.MutableRefObject<"
|
|
22
|
+
readonly eftposRef: React.MutableRefObject<"tyro" | "windcave" | "stripe" | "payo" | "linkly" | "mx51">;
|
|
23
23
|
readonly clientRef: React.MutableRefObject<ClientEnum>;
|
|
24
24
|
readonly dataRef: React.MutableRefObject<import("./store").State>;
|
|
25
25
|
};
|
|
@@ -299,7 +299,7 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
|
299
299
|
amount?: string | number | undefined;
|
|
300
300
|
mode?: "refund" | "pay" | "fullPay" | "query" | undefined;
|
|
301
301
|
order_id?: string | number | undefined;
|
|
302
|
-
eftpos?: "
|
|
302
|
+
eftpos?: "tyro" | "windcave" | "stripe" | "payo" | "linkly" | "mx51" | undefined;
|
|
303
303
|
action?: "amount" | "pay" | "deviceList" | undefined;
|
|
304
304
|
key?: number | undefined;
|
|
305
305
|
step?: number | undefined;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
/** 暴露给父组件调用的方法 */
|
|
4
|
-
export interface ProgressBarHandle {
|
|
5
|
-
/** 等价于点击右上角关闭按钮,会走二次确认逻辑 */
|
|
6
|
-
triggerClose: () => void;
|
|
7
|
-
}
|
|
8
3
|
export interface ProgressBarProps {
|
|
9
4
|
title?: string | number;
|
|
10
5
|
description?: string;
|
|
@@ -16,8 +11,6 @@ export interface ProgressBarProps {
|
|
|
16
11
|
style?: React.CSSProperties;
|
|
17
12
|
onBack?: () => void;
|
|
18
13
|
onClose?: () => void;
|
|
19
|
-
/** 外部 triggerClose 打开确认弹窗后,用户点「继续」时的回调 */
|
|
20
|
-
onConfirmCancel?: () => void;
|
|
21
14
|
}
|
|
22
|
-
declare const ProgressBar: React.
|
|
15
|
+
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
23
16
|
export default ProgressBar;
|