@pisell/private-materials 6.12.177 → 6.12.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.js +11 -11
- package/build/lowcode/view.js +11 -11
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/TimeBar/index.js +1 -0
- package/es/components/bigSale/dialog.js +1 -0
- package/es/components/bigSale/hooks/useBigSaleContext.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +1 -0
- package/es/components/bigSale/index.js +4 -1
- package/es/components/bigSale/templates/Kiosk/index.js +7 -3
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/pisellReservation/data/bookingToReservationTables.js +1 -1
- package/es/plus/pisellReservation/floorMap/floorPlanApi.js +1 -1
- package/es/plus/pisellReservation/floorMap/reservationMock.js +1 -1
- package/es/plus/pisellReservation/index.js +17 -0
- package/es/plus/saleDetail/Base.js +1 -0
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +1 -0
- package/es/plus/saleDetail/components/DetailActions/index.js +1 -0
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +1 -0
- package/es/plus/saleDetail/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +1 -0
- package/es/plus/saleDetail/tmpl/B/index.js +1 -0
- package/es/plus/salesSdk/context/SalesSdkCartContext.js +2 -2
- package/es/plus/salesSdk/context/SalesSdkProvider.js +3 -2
- package/es/plus/salesSdk/index.js +51 -0
- package/es/plus/salesSdk/types.d.ts +5 -0
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/customerAuthGate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/plus/salesSdk/utils/productHolderConfig.js +2 -2
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -1
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/lib/components/bigSale/index.js +2 -0
- package/lib/components/bigSale/templates/Kiosk/index.js +6 -3
- package/lib/plus/salesSdk/context/SalesSdkCartContext.js +2 -2
- package/lib/plus/salesSdk/context/SalesSdkProvider.js +3 -2
- package/lib/plus/salesSdk/types.d.ts +5 -0
- package/lib/plus/salesSdk/utils/productHolderConfig.js +2 -2
- package/package.json +5 -5
- package/es/private-materials/lowcode/authmodal/meta.d.ts +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
+
import "../../../../plus/salesSdk/index.js";
|
|
3
4
|
import dayjs from "dayjs";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -4,6 +4,7 @@ import withResponsive from "../../../../responsive/withResponsive.js";
|
|
|
4
4
|
import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
7
|
+
import "../../../../plus/salesSdk/index.js";
|
|
7
8
|
import locales_default from "../../locales/index.js";
|
|
8
9
|
import dayjs from "dayjs";
|
|
9
10
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,6 +5,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
5
5
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
8
|
+
import "../../plus/salesSdk/index.js";
|
|
8
9
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
import BigSale from "./index.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdkCustomer } from "../../../plus/salesSdk/hooks/useSalesSdkCus
|
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../plus/salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
6
|
import { useSalesSdkProducts } from "../../../plus/salesSdk/hooks/useSalesSdkProducts.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import { useMemo } from "react";
|
|
8
9
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
9
10
|
/**
|
|
@@ -3,6 +3,7 @@ import useEngineContext from "../../../hooks/useEngineContext.js";
|
|
|
3
3
|
import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from "../../../plus/salesSdk/utils/buildDefaultLoadProductsParams.js";
|
|
4
4
|
import { useSalesSdkUIHosts } from "../../../plus/salesSdk/context/SalesSdkUIHostsContext.js";
|
|
5
5
|
import { SalesSdkRootRefreshContext } from "../../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
6
|
+
import "../../../plus/salesSdk/index.js";
|
|
6
7
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
7
8
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
8
9
|
import { buildReplacementBookingResourcesFromReservationRow } from "../../../plus/pisellReservation/utils/reservationTicketBookingHostParams.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
|
-
import useEngineContext from "../../hooks/useEngineContext.js";
|
|
2
|
+
import useEngineContext, { usePlatform } from "../../hooks/useEngineContext.js";
|
|
3
3
|
import useLocale, { LocaleOverrideProvider } from "../../hooks/useLocale.js";
|
|
4
4
|
import { useRuntime } from "../ticketBooking/hooks/useRuntime.js";
|
|
5
5
|
import { useTicketBookingSecondaryScreen } from "../ticketBooking/components/ticketBooking/useTicketBookingSecondaryScreen.js";
|
|
@@ -8,6 +8,7 @@ import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
|
8
8
|
import { useSalesSdkCustomer } from "../../plus/salesSdk/hooks/useSalesSdkCustomer.js";
|
|
9
9
|
import { SalesSdkProvider } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
10
10
|
import { SalesSdkBookingContextProvider } from "../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
11
|
+
import "../../plus/salesSdk/index.js";
|
|
11
12
|
import { ResponsiveBigSaleBase } from "./Base.js";
|
|
12
13
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
13
14
|
import dayjs from "dayjs";
|
|
@@ -50,6 +51,7 @@ const BigSaleHostRuntimeBridge = ({ runtimeRef }) => {
|
|
|
50
51
|
const BigSale = ({ osKey = DEFAULT_OS_KEY, osModuleName, selectionFlowScene, lifecycleOwner, orderId, autoBootstrap, autoRestoreOnInit, restoreOrderAfterPaidCheckout, destroyOnUnmount, businessCode, bookingConfigParams, autoInitBookingContext, otherParams, rulesHooks, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay, mode = "ticket", variant, tmpl, template, secondaryScreenDisplay, productLoadParams, productDisplayConfig, hideSelectFloorMapResourceAction, productCatalogSessionKey, productCatalogReady, saleDetailTemplate, saleDetailModuleConfig, autoCreate = true, enableTempOrderPersist, enableTempOrderSync = true, isActive = true, preserveProductCatalogOnInactiveCustomerClear, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, className, style, bootstrapSlot, saleDetailHeaderSlot, rightActionBarClose, overlaySlot, onOrderComplete, externalActionRequest, onExternalActionAccepted, onExternalPaymentSettled }) => {
|
|
51
52
|
var _context$appHelper, _context$appHelper2, _context$appHelper3, _ref;
|
|
52
53
|
const context = useEngineContext();
|
|
54
|
+
const platform = String(usePlatform() || "").trim().toLowerCase();
|
|
53
55
|
const action = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.action;
|
|
54
56
|
const pisellos = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.pisellos;
|
|
55
57
|
const isProductMergeDisabled = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.utils) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.businessUtils) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.isProductMergeDisabled;
|
|
@@ -132,6 +134,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, osModuleName, selectionFlowScene, lif
|
|
|
132
134
|
autoInitBookingContext,
|
|
133
135
|
otherParams,
|
|
134
136
|
deferHolderAuthOnClose: resolvedTemplate === "kiosk",
|
|
137
|
+
enableCustomerAuthHost: resolvedTemplate === "kiosk" && platform !== "h5",
|
|
135
138
|
shouldMergeProductLines,
|
|
136
139
|
rulesHooks,
|
|
137
140
|
legacyOpenProductDetail,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import useEngineContext, { usePlatform } from "../../../../hooks/useEngineContext.js";
|
|
4
|
+
import { isHolderConfirmCancelled } from "../../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
4
5
|
import { useSalesSdkHostBridges } from "../../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
5
6
|
import useSalesUserLogin, { isRequireLoginChannel } from "../../../../hooks/useSalesUserLogin.js";
|
|
6
7
|
import { resolvePaymentResultToastV2ViewModel } from "../../../checkout/components/PaymentResultToastV2/resolve.js";
|
|
7
8
|
import PaymentResultToastV2_default from "../../../checkout/components/PaymentResultToastV2/index.js";
|
|
8
9
|
import { freePayApi } from "../../../Sales/Checkout/serve.js";
|
|
9
10
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
11
|
+
import "../../../../plus/salesSdk/index.js";
|
|
10
12
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
11
13
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
12
14
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -24,6 +26,7 @@ import { locales } from "@pisell/utils";
|
|
|
24
26
|
import { ArrowLeftOutlined, CheckCircleFilled, PercentageOutlined } from "@ant-design/icons";
|
|
25
27
|
import "./index.less";
|
|
26
28
|
//#region src/components/bigSale/templates/Kiosk/index.tsx
|
|
29
|
+
const KIOSK_CHECKOUT_SUBMIT_OPTIONS = Object.freeze({ validateHolder: true });
|
|
27
30
|
/**
|
|
28
31
|
* 同步 Kiosk 协同预览当前所处的销售流程。
|
|
29
32
|
* 协同预览应用未挂载时保持静默,不能影响真实下单流程。
|
|
@@ -513,7 +516,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
513
516
|
shouldUseConsumerPayment
|
|
514
517
|
})) {
|
|
515
518
|
var _ref12, _context$sales$bookin8, _context$sales$bookin9, _context$sales$bookin10;
|
|
516
|
-
const result = yield context.cart.submit();
|
|
519
|
+
const result = yield context.cart.submit(void 0, KIOSK_CHECKOUT_SUBMIT_OPTIONS);
|
|
517
520
|
if (!isSalesOrderSubmitSuccess(result)) {
|
|
518
521
|
var _ref10, _ref11, _result$message, _result$data4;
|
|
519
522
|
showCheckoutFailure(String((_ref10 = (_ref11 = (_result$message = result === null || result === void 0 ? void 0 : result.message) !== null && _result$message !== void 0 ? _result$message : result === null || result === void 0 ? void 0 : result.msg) !== null && _ref11 !== void 0 ? _ref11 : result === null || result === void 0 || (_result$data4 = result.data) === null || _result$data4 === void 0 ? void 0 : _result$data4.message) !== null && _ref10 !== void 0 ? _ref10 : locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
|
|
@@ -572,10 +575,10 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
572
575
|
}
|
|
573
576
|
}
|
|
574
577
|
publishKioskCollaborationPreviewStatus(app, "checkout");
|
|
575
|
-
const result = yield context.sales.openCheckout({
|
|
578
|
+
const result = yield context.sales.openCheckout(_objectSpread2(_objectSpread2({}, KIOSK_CHECKOUT_SUBMIT_OPTIONS), {}, {
|
|
576
579
|
paymentResultDisplayMode: "page",
|
|
577
580
|
walletPassMode: "shared"
|
|
578
|
-
});
|
|
581
|
+
}));
|
|
579
582
|
if ((result === null || result === void 0 ? void 0 : result.reason) === "start-new-order") {
|
|
580
583
|
handleReturnToAdvertisement(false);
|
|
581
584
|
return;
|
|
@@ -602,6 +605,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
602
605
|
}
|
|
603
606
|
} catch (error) {
|
|
604
607
|
var _error$message;
|
|
608
|
+
if (isHolderConfirmCancelled(error)) return;
|
|
605
609
|
showCheckoutFailure(String((_error$message = error === null || error === void 0 ? void 0 : error.message) !== null && _error$message !== void 0 ? _error$message : locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
|
|
606
610
|
} finally {
|
|
607
611
|
checkoutOpeningRef.current = false;
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import useEngineContext from "../../hooks/useEngineContext.js";
|
|
3
3
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { getTempOrderSyncPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
+
import "../../plus/salesSdk/index.js";
|
|
5
6
|
import { useEffect, useRef } from "react";
|
|
6
7
|
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -85,6 +85,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
85
85
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
86
86
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
87
87
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
88
|
+
import "./plus/salesSdk/index.js";
|
|
88
89
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
89
90
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
90
91
|
import BigSale from "./components/bigSale/index.js";
|
|
@@ -137,6 +138,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
137
138
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
138
139
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
139
140
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
141
|
+
import "./plus/pisellReservation/index.js";
|
|
140
142
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
141
143
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
142
144
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -259,4 +259,4 @@ function bookingListToReservationTableRows(bookings) {
|
|
|
259
259
|
return rows;
|
|
260
260
|
}
|
|
261
261
|
//#endregion
|
|
262
|
-
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, hostBookingStatusToCardStatus, hostBookingUiPatchFromRecord, mergeBookingsForResourceRecord };
|
|
@@ -78,4 +78,4 @@ function toastFloorPlanLoadError(err) {
|
|
|
78
78
|
PisellToast({ content: err instanceof Error ? err.message : String(err) });
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
|
-
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, buildDefaultReservationFloorPlanPostBody, ensureShopFloorPlanByCode, putShopFloorPlan, saveViewConfigToShopFloorPlan, shopLayoutToSceneElements$1 as shopLayoutToSceneElements, toastFloorPlanLoadError, toastFloorPlanSaveError, unsubscribeShopFloorPlanCodeQuery };
|
|
@@ -927,4 +927,4 @@ function getReservationDataSourceFormColumns() {
|
|
|
927
927
|
];
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
|
-
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationSceneElements, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./serve/formResourcePage.js";
|
|
2
|
+
import "./floorRoomCard/mapRowToFloorRoomCardData.js";
|
|
3
|
+
import "./floorRoomCard/ReservationFloorRoomCard.js";
|
|
4
|
+
import "./floorMap/reservationMock.js";
|
|
5
|
+
import "./floorMap/floorPlanApi.js";
|
|
6
|
+
import "./reservationConstants.js";
|
|
7
|
+
import "./data/bookingToReservationTables.js";
|
|
8
|
+
import "./data/formResourceToReservationTables.js";
|
|
9
|
+
import "./data/salesEmbeddedResourceToTableRows.js";
|
|
10
|
+
import "./floorMap/reservationCards.js";
|
|
11
|
+
import "./PisellReservation.js";
|
|
12
|
+
import "./PisellReservationBookingPage.js";
|
|
13
|
+
import "./PisellVenueControlPage.js";
|
|
14
|
+
import "./PisellVenueWallPage.js";
|
|
15
|
+
import "./PisellReservationTablePage.js";
|
|
16
|
+
import "./components/SelectFloorMapResourceDialog.js";
|
|
17
|
+
export {};
|
|
@@ -11,6 +11,7 @@ import { useSalesSdkCart } from "../salesSdk/hooks/useSalesSdkCart.js";
|
|
|
11
11
|
import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
|
|
12
12
|
import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
13
13
|
import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
|
|
14
|
+
import "../salesSdk/index.js";
|
|
14
15
|
import locales_default from "./locales.js";
|
|
15
16
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
16
17
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
3
3
|
import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
|
|
4
|
+
import "../../../../salesSdk/index.js";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { useMemoizedFn } from "ahooks";
|
|
6
7
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -9,6 +9,7 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
9
9
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
10
10
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
11
11
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
12
|
+
import "../../../salesSdk/index.js";
|
|
12
13
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
13
14
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
14
15
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -3,6 +3,7 @@ import { resolvePaymentMethodName, usePaymentMethodNameMap } from "../../../pise
|
|
|
3
3
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
5
5
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
6
|
+
import "../../../salesSdk/index.js";
|
|
6
7
|
import React, { memo, useMemo } from "react";
|
|
7
8
|
import { formatAmount, locales } from "@pisell/utils";
|
|
8
9
|
import Decimal from "decimal.js";
|
|
@@ -4,6 +4,7 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
|
|
|
4
4
|
import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
|
|
5
5
|
import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
|
|
6
6
|
import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
7
|
+
import "../salesSdk/index.js";
|
|
7
8
|
import Base_default from "./Base.js";
|
|
8
9
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
9
10
|
//#region src/plus/saleDetail/index.tsx
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import useStableInstanceId from "../../../../../../hooks/useStableInstanceId.js";
|
|
2
2
|
import { useSalesSdkDish } from "../../../../../salesSdk/hooks/useSalesSdkDish.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
+
import "../../../../../salesSdk/index.js";
|
|
4
5
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
5
6
|
import { DishGroupView } from "./DishGroupView.js";
|
|
6
7
|
import dayjs from "dayjs";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
3
3
|
import { useCurrentSalesSdkDish } from "../../../salesSdk/hooks/useCurrentSalesSdkDish.js";
|
|
4
|
+
import "../../../salesSdk/index.js";
|
|
4
5
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
5
6
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
6
7
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -304,7 +304,7 @@ function readSnapshot(bookingTicket, getHolderOptionsForSource = () => [], shoul
|
|
|
304
304
|
return EMPTY_SNAPSHOT;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
|
-
const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, shouldMergeProductLines, mergeBookingLinesForDisplay = true }) => {
|
|
307
|
+
const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, enableCustomerAuthHost = false, shouldMergeProductLines, mergeBookingLinesForDisplay = true }) => {
|
|
308
308
|
var _sales$bookingTicket;
|
|
309
309
|
const sales = useContext(SalesSdkContext);
|
|
310
310
|
const productsCtx = useContext(SalesSdkProductContext);
|
|
@@ -1260,7 +1260,7 @@ const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, should
|
|
|
1260
1260
|
const orderCustomerSnapshot = (_ticket$getOrderCusto = (_ticket$getOrderCusto2 = ticket.getOrderCustomerSnapshot) === null || _ticket$getOrderCusto2 === void 0 ? void 0 : _ticket$getOrderCusto2.call(ticket)) !== null && _ticket$getOrderCusto !== void 0 ? _ticket$getOrderCusto : null;
|
|
1261
1261
|
const flowOptions = (yield ensureCustomerAuthBeforeAdd({
|
|
1262
1262
|
product,
|
|
1263
|
-
enabled:
|
|
1263
|
+
enabled: enableCustomerAuthHost,
|
|
1264
1264
|
currentCustomerId: resolveCustomerAuthCurrentCustomerId(liveTempOrder === null || liveTempOrder === void 0 ? void 0 : liveTempOrder.customer_id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$custom = liveTempOrder.customer) === null || _liveTempOrder$custom === void 0 ? void 0 : _liveTempOrder$custom.id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$_exten = liveTempOrder._extend) === null || _liveTempOrder$_exten === void 0 || (_liveTempOrder$_exten = _liveTempOrder$_exten.customerSnapshot) === null || _liveTempOrder$_exten === void 0 ? void 0 : _liveTempOrder$_exten.customer_id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$_exten2 = liveTempOrder._extend) === null || _liveTempOrder$_exten2 === void 0 || (_liveTempOrder$_exten2 = _liveTempOrder$_exten2.customerSnapshot) === null || _liveTempOrder$_exten2 === void 0 ? void 0 : _liveTempOrder$_exten2.id, orderCustomerSnapshot === null || orderCustomerSnapshot === void 0 ? void 0 : orderCustomerSnapshot.customer_id, orderCustomerSnapshot === null || orderCustomerSnapshot === void 0 ? void 0 : orderCustomerSnapshot.id, flowCtx.customerId, (_flowCtx$tempOrder = flowCtx.tempOrder) === null || _flowCtx$tempOrder === void 0 ? void 0 : _flowCtx$tempOrder.customer_id, (_flowCtx$tempOrder2 = flowCtx.tempOrder) === null || _flowCtx$tempOrder2 === void 0 || (_flowCtx$tempOrder2 = _flowCtx$tempOrder2.customer) === null || _flowCtx$tempOrder2 === void 0 ? void 0 : _flowCtx$tempOrder2.id, (_flowCtx$tempOrder3 = flowCtx.tempOrder) === null || _flowCtx$tempOrder3 === void 0 || (_flowCtx$tempOrder3 = _flowCtx$tempOrder3._extend) === null || _flowCtx$tempOrder3 === void 0 || (_flowCtx$tempOrder3 = _flowCtx$tempOrder3.customerSnapshot) === null || _flowCtx$tempOrder3 === void 0 ? void 0 : _flowCtx$tempOrder3.customer_id, (_flowCtx$tempOrder4 = flowCtx.tempOrder) === null || _flowCtx$tempOrder4 === void 0 || (_flowCtx$tempOrder4 = _flowCtx$tempOrder4._extend) === null || _flowCtx$tempOrder4 === void 0 || (_flowCtx$tempOrder4 = _flowCtx$tempOrder4.customerSnapshot) === null || _flowCtx$tempOrder4 === void 0 ? void 0 : _flowCtx$tempOrder4.id),
|
|
1265
1265
|
openCustomerAuth: (_uiHostsRef$current2 = uiHostsRef.current) === null || _uiHostsRef$current2 === void 0 ? void 0 : _uiHostsRef$current2.openCustomerAuth,
|
|
1266
1266
|
setOrderCustomer: (_ticket$setOrderCusto = ticket.setOrderCustomer) === null || _ticket$setOrderCusto === void 0 ? void 0 : _ticket$setOrderCusto.bind(ticket)
|
|
@@ -219,7 +219,7 @@ function SalesSdkBootstrap({ autoRestoreOnInit, autoBootstrap, autoInitBookingCo
|
|
|
219
219
|
]);
|
|
220
220
|
return null;
|
|
221
221
|
}
|
|
222
|
-
const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, deferHolderAuthOnClose = false, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
|
|
222
|
+
const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, deferHolderAuthOnClose = false, enableCustomerAuthHost = false, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
|
|
223
223
|
var _context$appHelper, _osKey$replace;
|
|
224
224
|
const context = useEngineContext();
|
|
225
225
|
const utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
|
@@ -231,7 +231,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
|
|
|
231
231
|
engineChannel: channel,
|
|
232
232
|
platform: otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform
|
|
233
233
|
});
|
|
234
|
-
const shouldEnableCustomerAuthModule =
|
|
234
|
+
const shouldEnableCustomerAuthModule = enableCustomerAuthHost;
|
|
235
235
|
const [promotionScanItemIncreaseRevision, setPromotionScanItemIncreaseRevision] = useState(0);
|
|
236
236
|
/** 加车 enrich 早于 BookingEdit 抽屉,须提前注入 HTTP 客户端供跨日报价等 serve 使用 */
|
|
237
237
|
useEffect(() => {
|
|
@@ -1326,6 +1326,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
|
|
|
1326
1326
|
preserveCatalogOnInactiveCustomerClear: preserveProductCatalogOnInactiveCustomerClear
|
|
1327
1327
|
}, /* @__PURE__ */ React.createElement(SalesSdkSummaryProvider, { ref: summaryProviderRef }, /* @__PURE__ */ React.createElement(SalesSdkCartProvider, {
|
|
1328
1328
|
deferHolderAuthOnClose,
|
|
1329
|
+
enableCustomerAuthHost,
|
|
1329
1330
|
shouldMergeProductLines,
|
|
1330
1331
|
mergeBookingLinesForDisplay
|
|
1331
1332
|
}, /* @__PURE__ */ React.createElement(SalesSdkGlobalScanSubscriber, {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./hosts/createInstanceHostBridge.js";
|
|
2
|
+
import "./holderConfirm/createHolderConfirmBridge.js";
|
|
3
|
+
import "./giftSelect/createGiftSelectBridge.js";
|
|
4
|
+
import "./context/SalesSdkHostBridgesContext.js";
|
|
5
|
+
import "./utils/formatHolderOptions.js";
|
|
6
|
+
import "./utils/enrichCartLineHolderDisplay.js";
|
|
7
|
+
import "./context/SalesSdkHolderContext.js";
|
|
8
|
+
import "./utils/appendPromotionTags.js";
|
|
9
|
+
import "./context/SalesSdkUIHostsContext.js";
|
|
10
|
+
import "./utils/runAddProductFlow.js";
|
|
11
|
+
import "./components/showAddToCartToast.js";
|
|
12
|
+
import "./utils/resolveAddProductDebounceKey.js";
|
|
13
|
+
import "./utils/productSkuOptions.js";
|
|
14
|
+
import "./utils/identity.js";
|
|
15
|
+
import "./utils/resolveInCartQuantityForAddToast.js";
|
|
16
|
+
import "./utils/addProductWithFlowDebounced.js";
|
|
17
|
+
import "./utils/customerAuthGate.js";
|
|
18
|
+
import "./utils/bookingDate.js";
|
|
19
|
+
import "./utils/holderSubmitValidation.js";
|
|
20
|
+
import "./utils/removeOrderProducts.js";
|
|
21
|
+
import "./selectors.js";
|
|
22
|
+
import "./utils/enrich.js";
|
|
23
|
+
import "./giftSelect/createOpenGiftSelectHost.js";
|
|
24
|
+
import "./utils/ensureHoldersBeforeSubmit.js";
|
|
25
|
+
import "./hooks/useSalesSdk.js";
|
|
26
|
+
import "./bookingEditService/BookingEditServiceDrawer.js";
|
|
27
|
+
import "./hosts/BookingEditHostRenderer.js";
|
|
28
|
+
import "./hosts/CustomerAuthHostRenderer.js";
|
|
29
|
+
import "./hooks/useSalesSdkCart.js";
|
|
30
|
+
import "./hooks/useSalesSdkCustomer.js";
|
|
31
|
+
import "./normalProductDetail/NormalProductDetailHostRenderer.js";
|
|
32
|
+
import "./hosts/createOpenBookingEditHost.js";
|
|
33
|
+
import "./hosts/createOpenMultiDaySelectHost.js";
|
|
34
|
+
import "./hosts/createOpenHolderSelectHost.js";
|
|
35
|
+
import "./hosts/createOpenCustomerAuthHost.js";
|
|
36
|
+
import "./demo/hosts/legacyOpenProductDetail.js";
|
|
37
|
+
import "./hosts/createCompositeOpenProductDetailHost.js";
|
|
38
|
+
import "./normalProductDetail/createOpenNormalProductDetailHost.js";
|
|
39
|
+
import "./normalProductDetail/createOpenBookingSelectionFlowHost.js";
|
|
40
|
+
import "./giftSelect/GiftSelectModal.js";
|
|
41
|
+
import "./giftSelect/GiftSelectHostRenderer.js";
|
|
42
|
+
import "./context/SalesSdkProvider.js";
|
|
43
|
+
import "./context/SalesSdkDishContext.js";
|
|
44
|
+
import "./context/SalesSdkBookingContext.js";
|
|
45
|
+
import "./hooks/useSalesSdkSummary.js";
|
|
46
|
+
import "./hooks/useSalesSdkProducts.js";
|
|
47
|
+
import "./demo/index.js";
|
|
48
|
+
import "./hooks/useSalesSdkDish.js";
|
|
49
|
+
import "./hooks/useCurrentSalesSdkDish.js";
|
|
50
|
+
import "./hooks/useSyncOsModule.js";
|
|
51
|
+
export {};
|
|
@@ -1716,6 +1716,11 @@ interface SalesSdkProviderProps {
|
|
|
1716
1716
|
* @internal 由 BigSale 根据 resolvedTemplate 注入。
|
|
1717
1717
|
*/
|
|
1718
1718
|
deferHolderAuthOnClose?: boolean;
|
|
1719
|
+
/**
|
|
1720
|
+
* 是否启用 SalesSdk 内置 CustomerAuthHost;H5 应使用宿主 pisell1.login。
|
|
1721
|
+
* @internal 由 BigSale 根据模板和运行平台注入。
|
|
1722
|
+
*/
|
|
1723
|
+
enableCustomerAuthHost?: boolean;
|
|
1719
1724
|
/**
|
|
1720
1725
|
* 运行时商品行合并策略;返回 false 时快速加购不做防抖合并,OS 始终新增商品行,
|
|
1721
1726
|
* 预约商品也保持独立展示。默认合并。
|
|
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
|
|
|
31
31
|
return typeof off === "function" ? off : () => {};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export { formatBookingDateTime, subscribeBookingDateChange };
|
|
34
|
+
export { BOOKING_CONTEXT_DATE_EVENT, formatBookingDateTime, subscribeBookingDateChange };
|
|
@@ -59,4 +59,4 @@ function normalizeCustomerAuthCustomer(value) {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
|
-
export { isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
|
|
62
|
+
export { isHolderRequiredProduct, isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
|
|
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
|
|
74
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, pickHolderIdFromBooking, resolveHolderDisplayConfig };
|
|
@@ -11,9 +11,9 @@ function normalizeHolderConfig(raw) {
|
|
|
11
11
|
* 从商品、cacheItem 或购物车行快照里读取商品级 holder_config。
|
|
12
12
|
*/
|
|
13
13
|
function getProductHolderConfigFromSource(source) {
|
|
14
|
-
var _source$metadata, _source$_origin, _source$_extend, _source$_extend2, _source$_extend3, _source$_extend4, _source$_extend5;
|
|
14
|
+
var _source$metadata, _source$metadata2, _source$_origin, _source$_extend, _source$_extend2, _source$_extend3, _source$_extend4, _source$_extend5, _source$_extend6;
|
|
15
15
|
if (!isObject(source)) return null;
|
|
16
|
-
return normalizeHolderConfig(source.holder_config) || normalizeHolderConfig((_source$metadata = source.metadata) === null || _source$metadata === void 0 || (_source$metadata = _source$
|
|
16
|
+
return normalizeHolderConfig(source.holder_config) || normalizeHolderConfig((_source$metadata = source.metadata) === null || _source$metadata === void 0 ? void 0 : _source$metadata.holder_config) || normalizeHolderConfig((_source$metadata2 = source.metadata) === null || _source$metadata2 === void 0 || (_source$metadata2 = _source$metadata2.origin) === null || _source$metadata2 === void 0 ? void 0 : _source$metadata2.holder_config) || normalizeHolderConfig((_source$_origin = source._origin) === null || _source$_origin === void 0 ? void 0 : _source$_origin.holder_config) || normalizeHolderConfig((_source$_extend = source._extend) === null || _source$_extend === void 0 ? void 0 : _source$_extend.holder_config) || normalizeHolderConfig((_source$_extend2 = source._extend) === null || _source$_extend2 === void 0 || (_source$_extend2 = _source$_extend2.product) === null || _source$_extend2 === void 0 ? void 0 : _source$_extend2.holder_config) || normalizeHolderConfig((_source$_extend3 = source._extend) === null || _source$_extend3 === void 0 || (_source$_extend3 = _source$_extend3.product) === null || _source$_extend3 === void 0 || (_source$_extend3 = _source$_extend3.metadata) === null || _source$_extend3 === void 0 ? void 0 : _source$_extend3.holder_config) || normalizeHolderConfig((_source$_extend4 = source._extend) === null || _source$_extend4 === void 0 || (_source$_extend4 = _source$_extend4.product) === null || _source$_extend4 === void 0 || (_source$_extend4 = _source$_extend4.metadata) === null || _source$_extend4 === void 0 || (_source$_extend4 = _source$_extend4.origin) === null || _source$_extend4 === void 0 ? void 0 : _source$_extend4.holder_config) || normalizeHolderConfig((_source$_extend5 = source._extend) === null || _source$_extend5 === void 0 || (_source$_extend5 = _source$_extend5.product) === null || _source$_extend5 === void 0 || (_source$_extend5 = _source$_extend5._origin) === null || _source$_extend5 === void 0 ? void 0 : _source$_extend5.holder_config) || normalizeHolderConfig((_source$_extend6 = source._extend) === null || _source$_extend6 === void 0 || (_source$_extend6 = _source$_extend6.product) === null || _source$_extend6 === void 0 || (_source$_extend6 = _source$_extend6._extend) === null || _source$_extend6 === void 0 ? void 0 : _source$_extend6.holder_config) || null;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* 商品 holder_config 是唯一启用/必填/form_id 真源;resource_id 映射为 holder form_id。
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LoginFormData, OAuthConfig, PhoneAuthConfig, RegisterFormData, UIConfig, VerificationMethod } from "./shared/types.js";
|
|
1
2
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
2
3
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
3
|
-
import { AuthModal
|
|
4
|
+
import { AuthModal } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig };
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, EmailRegistrationVerification, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
@@ -53,6 +53,7 @@ const BigSaleHostRuntimeBridge = ({ runtimeRef }) => {
|
|
|
53
53
|
const BigSale = ({ osKey = DEFAULT_OS_KEY, osModuleName, selectionFlowScene, lifecycleOwner, orderId, autoBootstrap, autoRestoreOnInit, restoreOrderAfterPaidCheckout, destroyOnUnmount, businessCode, bookingConfigParams, autoInitBookingContext, otherParams, rulesHooks, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay, mode = "ticket", variant, tmpl, template, secondaryScreenDisplay, productLoadParams, productDisplayConfig, hideSelectFloorMapResourceAction, productCatalogSessionKey, productCatalogReady, saleDetailTemplate, saleDetailModuleConfig, autoCreate = true, enableTempOrderPersist, enableTempOrderSync = true, isActive = true, preserveProductCatalogOnInactiveCustomerClear, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, className, style, bootstrapSlot, saleDetailHeaderSlot, rightActionBarClose, overlaySlot, onOrderComplete, externalActionRequest, onExternalActionAccepted, onExternalPaymentSettled }) => {
|
|
54
54
|
var _context$appHelper, _context$appHelper2, _context$appHelper3, _ref;
|
|
55
55
|
const context = require_useEngineContext.default();
|
|
56
|
+
const platform = String(require_useEngineContext.usePlatform() || "").trim().toLowerCase();
|
|
56
57
|
const action = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 || (_context$appHelper = _context$appHelper.utils) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.action;
|
|
57
58
|
const pisellos = context === null || context === void 0 || (_context$appHelper2 = context.appHelper) === null || _context$appHelper2 === void 0 || (_context$appHelper2 = _context$appHelper2.utils) === null || _context$appHelper2 === void 0 ? void 0 : _context$appHelper2.pisellos;
|
|
58
59
|
const isProductMergeDisabled = context === null || context === void 0 || (_context$appHelper3 = context.appHelper) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.utils) === null || _context$appHelper3 === void 0 || (_context$appHelper3 = _context$appHelper3.businessUtils) === null || _context$appHelper3 === void 0 ? void 0 : _context$appHelper3.isProductMergeDisabled;
|
|
@@ -135,6 +136,7 @@ const BigSale = ({ osKey = DEFAULT_OS_KEY, osModuleName, selectionFlowScene, lif
|
|
|
135
136
|
autoInitBookingContext,
|
|
136
137
|
otherParams,
|
|
137
138
|
deferHolderAuthOnClose: resolvedTemplate === "kiosk",
|
|
139
|
+
enableCustomerAuthHost: resolvedTemplate === "kiosk" && platform !== "h5",
|
|
138
140
|
shouldMergeProductLines,
|
|
139
141
|
rulesHooks,
|
|
140
142
|
legacyOpenProductDetail,
|
|
@@ -2,6 +2,7 @@ const require_runtime = require("../../../../_virtual/_rolldown/runtime.js");
|
|
|
2
2
|
const require_objectSpread2 = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js");
|
|
3
3
|
const require_asyncToGenerator = require("../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
|
|
4
4
|
const require_useEngineContext = require("../../../../hooks/useEngineContext.js");
|
|
5
|
+
const require_createHolderConfirmBridge = require("../../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js");
|
|
5
6
|
const require_SalesSdkHostBridgesContext = require("../../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js");
|
|
6
7
|
const require_useSalesUserLogin = require("../../../../hooks/useSalesUserLogin.js");
|
|
7
8
|
const require_resolve = require("../../../checkout/components/PaymentResultToastV2/resolve.js");
|
|
@@ -26,6 +27,7 @@ let _pisell_utils = require("@pisell/utils");
|
|
|
26
27
|
let _ant_design_icons = require("@ant-design/icons");
|
|
27
28
|
require("./index.less");
|
|
28
29
|
//#region src/components/bigSale/templates/Kiosk/index.tsx
|
|
30
|
+
const KIOSK_CHECKOUT_SUBMIT_OPTIONS = Object.freeze({ validateHolder: true });
|
|
29
31
|
/**
|
|
30
32
|
* 同步 Kiosk 协同预览当前所处的销售流程。
|
|
31
33
|
* 协同预览应用未挂载时保持静默,不能影响真实下单流程。
|
|
@@ -515,7 +517,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
515
517
|
shouldUseConsumerPayment
|
|
516
518
|
})) {
|
|
517
519
|
var _ref12, _context$sales$bookin8, _context$sales$bookin9, _context$sales$bookin10;
|
|
518
|
-
const result = yield context.cart.submit();
|
|
520
|
+
const result = yield context.cart.submit(void 0, KIOSK_CHECKOUT_SUBMIT_OPTIONS);
|
|
519
521
|
if (!require_utils.isSalesOrderSubmitSuccess(result)) {
|
|
520
522
|
var _ref10, _ref11, _result$message, _result$data4;
|
|
521
523
|
showCheckoutFailure(String((_ref10 = (_ref11 = (_result$message = result === null || result === void 0 ? void 0 : result.message) !== null && _result$message !== void 0 ? _result$message : result === null || result === void 0 ? void 0 : result.msg) !== null && _ref11 !== void 0 ? _ref11 : result === null || result === void 0 || (_result$data4 = result.data) === null || _result$data4 === void 0 ? void 0 : _result$data4.message) !== null && _ref10 !== void 0 ? _ref10 : _pisell_utils.locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
|
|
@@ -574,10 +576,10 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
574
576
|
}
|
|
575
577
|
}
|
|
576
578
|
publishKioskCollaborationPreviewStatus(app, "checkout");
|
|
577
|
-
const result = yield context.sales.openCheckout({
|
|
579
|
+
const result = yield context.sales.openCheckout(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, KIOSK_CHECKOUT_SUBMIT_OPTIONS), {}, {
|
|
578
580
|
paymentResultDisplayMode: "page",
|
|
579
581
|
walletPassMode: "shared"
|
|
580
|
-
});
|
|
582
|
+
}));
|
|
581
583
|
if ((result === null || result === void 0 ? void 0 : result.reason) === "start-new-order") {
|
|
582
584
|
handleReturnToAdvertisement(false);
|
|
583
585
|
return;
|
|
@@ -604,6 +606,7 @@ function KioskBigSaleTemplate({ isActive = true, osKey, context, mode, variant,
|
|
|
604
606
|
}
|
|
605
607
|
} catch (error) {
|
|
606
608
|
var _error$message;
|
|
609
|
+
if (require_createHolderConfirmBridge.isHolderConfirmCancelled(error)) return;
|
|
607
610
|
showCheckoutFailure(String((_error$message = error === null || error === void 0 ? void 0 : error.message) !== null && _error$message !== void 0 ? _error$message : _pisell_utils.locales.getText("pisell2.big-sale.kiosk.payment-failure-description")));
|
|
608
611
|
} finally {
|
|
609
612
|
checkoutOpeningRef.current = false;
|
|
@@ -307,7 +307,7 @@ function readSnapshot(bookingTicket, getHolderOptionsForSource = () => [], shoul
|
|
|
307
307
|
return EMPTY_SNAPSHOT;
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
|
-
const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, shouldMergeProductLines, mergeBookingLinesForDisplay = true }) => {
|
|
310
|
+
const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, enableCustomerAuthHost = false, shouldMergeProductLines, mergeBookingLinesForDisplay = true }) => {
|
|
311
311
|
var _sales$bookingTicket;
|
|
312
312
|
const sales = (0, react.useContext)(require_SalesSdkContext.SalesSdkContext);
|
|
313
313
|
const productsCtx = (0, react.useContext)(require_SalesSdkProductContext.SalesSdkProductContext);
|
|
@@ -1263,7 +1263,7 @@ const SalesSdkCartProvider = ({ children, deferHolderAuthOnClose = false, should
|
|
|
1263
1263
|
const orderCustomerSnapshot = (_ticket$getOrderCusto = (_ticket$getOrderCusto2 = ticket.getOrderCustomerSnapshot) === null || _ticket$getOrderCusto2 === void 0 ? void 0 : _ticket$getOrderCusto2.call(ticket)) !== null && _ticket$getOrderCusto !== void 0 ? _ticket$getOrderCusto : null;
|
|
1264
1264
|
const flowOptions = (yield require_ensureCustomerAuthBeforeAdd.ensureCustomerAuthBeforeAdd({
|
|
1265
1265
|
product,
|
|
1266
|
-
enabled:
|
|
1266
|
+
enabled: enableCustomerAuthHost,
|
|
1267
1267
|
currentCustomerId: require_customerAuthGate.resolveCustomerAuthCurrentCustomerId(liveTempOrder === null || liveTempOrder === void 0 ? void 0 : liveTempOrder.customer_id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$custom = liveTempOrder.customer) === null || _liveTempOrder$custom === void 0 ? void 0 : _liveTempOrder$custom.id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$_exten = liveTempOrder._extend) === null || _liveTempOrder$_exten === void 0 || (_liveTempOrder$_exten = _liveTempOrder$_exten.customerSnapshot) === null || _liveTempOrder$_exten === void 0 ? void 0 : _liveTempOrder$_exten.customer_id, liveTempOrder === null || liveTempOrder === void 0 || (_liveTempOrder$_exten2 = liveTempOrder._extend) === null || _liveTempOrder$_exten2 === void 0 || (_liveTempOrder$_exten2 = _liveTempOrder$_exten2.customerSnapshot) === null || _liveTempOrder$_exten2 === void 0 ? void 0 : _liveTempOrder$_exten2.id, orderCustomerSnapshot === null || orderCustomerSnapshot === void 0 ? void 0 : orderCustomerSnapshot.customer_id, orderCustomerSnapshot === null || orderCustomerSnapshot === void 0 ? void 0 : orderCustomerSnapshot.id, flowCtx.customerId, (_flowCtx$tempOrder = flowCtx.tempOrder) === null || _flowCtx$tempOrder === void 0 ? void 0 : _flowCtx$tempOrder.customer_id, (_flowCtx$tempOrder2 = flowCtx.tempOrder) === null || _flowCtx$tempOrder2 === void 0 || (_flowCtx$tempOrder2 = _flowCtx$tempOrder2.customer) === null || _flowCtx$tempOrder2 === void 0 ? void 0 : _flowCtx$tempOrder2.id, (_flowCtx$tempOrder3 = flowCtx.tempOrder) === null || _flowCtx$tempOrder3 === void 0 || (_flowCtx$tempOrder3 = _flowCtx$tempOrder3._extend) === null || _flowCtx$tempOrder3 === void 0 || (_flowCtx$tempOrder3 = _flowCtx$tempOrder3.customerSnapshot) === null || _flowCtx$tempOrder3 === void 0 ? void 0 : _flowCtx$tempOrder3.customer_id, (_flowCtx$tempOrder4 = flowCtx.tempOrder) === null || _flowCtx$tempOrder4 === void 0 || (_flowCtx$tempOrder4 = _flowCtx$tempOrder4._extend) === null || _flowCtx$tempOrder4 === void 0 || (_flowCtx$tempOrder4 = _flowCtx$tempOrder4.customerSnapshot) === null || _flowCtx$tempOrder4 === void 0 ? void 0 : _flowCtx$tempOrder4.id),
|
|
1268
1268
|
openCustomerAuth: (_uiHostsRef$current2 = uiHostsRef.current) === null || _uiHostsRef$current2 === void 0 ? void 0 : _uiHostsRef$current2.openCustomerAuth,
|
|
1269
1269
|
setOrderCustomer: (_ticket$setOrderCusto = ticket.setOrderCustomer) === null || _ticket$setOrderCusto === void 0 ? void 0 : _ticket$setOrderCusto.bind(ticket)
|
|
@@ -222,7 +222,7 @@ function SalesSdkBootstrap({ autoRestoreOnInit, autoBootstrap, autoInitBookingCo
|
|
|
222
222
|
]);
|
|
223
223
|
return null;
|
|
224
224
|
}
|
|
225
|
-
const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, deferHolderAuthOnClose = false, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
|
|
225
|
+
const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "ensure", lifecycleOwner = "provider", businessCode, bookingConfigParams, autoInitBookingContext = true, otherParams, deferHolderAuthOnClose = false, enableCustomerAuthHost = false, shouldMergeProductLines, rulesHooks, orderId, preloadedSalesDetail, autoBootstrap = true, autoRestoreOnInit = true, restoreOrderAfterPaidCheckout = true, destroyOnUnmount = true, uiHosts, normalProductDetailConfig, mergeBookingLinesForDisplay = true, legacyOpenProductDetail, enableTempOrderSync = false, enableTempOrderPersist = false, syncDetailOnOrderChange = false, isActive = true, preserveProductCatalogOnInactiveCustomerClear = false, enableGlobalScanListener = false, promotionScanSuccessMessageKey, promotionItemIncreaseMessageKey, defaultProductLoadParams, children }) => {
|
|
226
226
|
var _context$appHelper, _osKey$replace;
|
|
227
227
|
const context = require_useEngineContext.default();
|
|
228
228
|
const utils = (context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
|
|
@@ -234,7 +234,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
|
|
|
234
234
|
engineChannel: channel,
|
|
235
235
|
platform: otherParams === null || otherParams === void 0 ? void 0 : otherParams.platform
|
|
236
236
|
});
|
|
237
|
-
const shouldEnableCustomerAuthModule =
|
|
237
|
+
const shouldEnableCustomerAuthModule = enableCustomerAuthHost;
|
|
238
238
|
const [promotionScanItemIncreaseRevision, setPromotionScanItemIncreaseRevision] = (0, react.useState)(0);
|
|
239
239
|
/** 加车 enrich 早于 BookingEdit 抽屉,须提前注入 HTTP 客户端供跨日报价等 serve 使用 */
|
|
240
240
|
(0, react.useEffect)(() => {
|
|
@@ -1329,6 +1329,7 @@ const SalesSdkProvider = ({ osKey, solution = "bookingTicket", moduleAccess = "e
|
|
|
1329
1329
|
preserveCatalogOnInactiveCustomerClear: preserveProductCatalogOnInactiveCustomerClear
|
|
1330
1330
|
}, /* @__PURE__ */ react.default.createElement(require_SalesSdkSummaryContext.SalesSdkSummaryProvider, { ref: summaryProviderRef }, /* @__PURE__ */ react.default.createElement(require_SalesSdkCartContext.SalesSdkCartProvider, {
|
|
1331
1331
|
deferHolderAuthOnClose,
|
|
1332
|
+
enableCustomerAuthHost,
|
|
1332
1333
|
shouldMergeProductLines,
|
|
1333
1334
|
mergeBookingLinesForDisplay
|
|
1334
1335
|
}, /* @__PURE__ */ react.default.createElement(require_SalesSdkGlobalScanSubscriber.default, {
|
|
@@ -1716,6 +1716,11 @@ interface SalesSdkProviderProps {
|
|
|
1716
1716
|
* @internal 由 BigSale 根据 resolvedTemplate 注入。
|
|
1717
1717
|
*/
|
|
1718
1718
|
deferHolderAuthOnClose?: boolean;
|
|
1719
|
+
/**
|
|
1720
|
+
* 是否启用 SalesSdk 内置 CustomerAuthHost;H5 应使用宿主 pisell1.login。
|
|
1721
|
+
* @internal 由 BigSale 根据模板和运行平台注入。
|
|
1722
|
+
*/
|
|
1723
|
+
enableCustomerAuthHost?: boolean;
|
|
1719
1724
|
/**
|
|
1720
1725
|
* 运行时商品行合并策略;返回 false 时快速加购不做防抖合并,OS 始终新增商品行,
|
|
1721
1726
|
* 预约商品也保持独立展示。默认合并。
|