@pisell/private-materials 6.12.486 → 6.12.487
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 +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +1 -0
- package/es/components/bigSale/components/ProductList/index.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 +1 -0
- package/es/components/bigSale/templates/Kiosk/index.js +1 -0
- package/es/components/kiosk/components/Shell/useKioskMemberAction.js +1 -0
- package/es/components/kiosk/sales/KioskSaleSession.js +1 -0
- package/es/components/kiosk/sales/useCheckout.js +1 -0
- package/es/components/kiosk/sales/useSaleSessionExit.js +1 -0
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +1 -0
- package/es/components/venueBookingSales/BookingComposer.js +5 -4
- package/es/components/venueBookingSales/availability/controller.js +1 -1
- package/es/components/venueBookingSales/checkout/VenueBookingHolderStep.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueCustomerAccess.js +1 -0
- package/es/components/venueBookingSales/checkout/useVenueKioskCheckout.js +1 -0
- package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +1 -0
- package/es/components/venueBookingSales/useBookingComposer.js +38 -7
- package/es/components/venueBookingSales/useVenueBookingSession.js +1 -0
- package/es/index.js +2 -0
- package/es/plus/multiCurrencySettlement/index.js +1 -1
- 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/floorRoomCard/endingSoonHighlight.js +4 -4
- package/es/plus/pisellReservation/index.js +17 -0
- package/es/plus/pisellReservation/utils/calendarBookingSelection.js +4 -4
- package/es/plus/saasDevice/devicePasscodes/model.js +4 -4
- 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/PrintAction.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/index.js +54 -0
- package/es/plus/salesSdk/types.d.ts +3 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
- package/es/pro/Login2.0/AuthModal.d.ts +1 -1
- package/es/pro/Login2.0/index.d.ts +2 -2
- package/es/pro/Login2.0/shared/types.d.ts +1 -1
- package/es/pro/skuDetailModal/flow/calendarEntry.js +2 -2
- package/es/pro/skuDetailModal/flow/registry.d.ts +1 -1
- package/lib/components/venueBookingSales/BookingComposer.js +5 -4
- package/lib/components/venueBookingSales/availability/controller.js +1 -1
- package/lib/components/venueBookingSales/useBookingComposer.js +38 -7
- package/lib/plus/salesSdk/types.d.ts +3 -1
- package/lib/pro/skuDetailModal/flow/registry.d.ts +1 -1
- package/package.json +4 -4
- 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
|
|
@@ -20,6 +20,7 @@ import { showAddToCartToast } from "../../../../plus/salesSdk/components/showAdd
|
|
|
20
20
|
import { mergeBookingsForDisplay } from "../../../../plus/salesSdk/utils/mergeBookingsForDisplay.js";
|
|
21
21
|
import useSalesSdkGlobalScanHandler from "../../../../plus/salesSdk/hooks/useSalesSdkGlobalScanHandler.js";
|
|
22
22
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
23
|
+
import "../../../../plus/salesSdk/index.js";
|
|
23
24
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
24
25
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
25
26
|
import locales_default$1 from "../../locales/index.js";
|
|
@@ -5,6 +5,7 @@ import useInitLocalesOnce from "../../../../hooks/useInitLocalesOnce.js";
|
|
|
5
5
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
6
6
|
import { setBookingTimeSelectionIntent } from "../../../../plus/salesSdk/utils/bookingTimeSelection.js";
|
|
7
7
|
import { useSalesSdkBookingContext } from "../../../../plus/salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
+
import "../../../../plus/salesSdk/index.js";
|
|
8
9
|
import locales_default from "../../locales/index.js";
|
|
9
10
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
10
11
|
import dayjs from "dayjs";
|
|
@@ -6,6 +6,7 @@ import { buildInitBookingContextParams, collectBookingIdsFromTempOrder } from ".
|
|
|
6
6
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
7
7
|
import { useSalesSdkCart } from "../../plus/salesSdk/hooks/useSalesSdkCart.js";
|
|
8
8
|
import { SalesSdkPrepareOrderSwitchContext, SalesSdkRootRefreshContext } from "../../plus/salesSdk/context/SalesSdkProvider.js";
|
|
9
|
+
import "../../plus/salesSdk/index.js";
|
|
9
10
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
10
11
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
11
12
|
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 { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
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 { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
7
8
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
9
|
import { findReservationRuleProductByResourceId } from "../../../plus/pisellReservation/data/reservationRuleProducts.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 { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
|
|
12
13
|
import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
|
|
13
14
|
import { isVenueKioskRuntime } from "../venueBookingSales/kiosk/customer.js";
|
|
@@ -14,6 +14,7 @@ import { useSalesSdkBusinessAvailability } from "../../../../plus/salesSdk/conte
|
|
|
14
14
|
import { collectUnassignedHolderLines } from "../../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
15
15
|
import { isFulfillmentTimingBooking } from "../../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
16
16
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
17
|
+
import "../../../../plus/salesSdk/index.js";
|
|
17
18
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
18
19
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
19
20
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -3,6 +3,7 @@ import { useSalesSdkHostBridges } from "../../../../plus/salesSdk/context/SalesS
|
|
|
3
3
|
import { isValidOrderCustomerId } from "../../../../plus/salesSdk/utils/customerAuthGate.js";
|
|
4
4
|
import { useSalesSdkGlobalScanActivity } from "../../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
5
5
|
import { getClientDisplayName, normalizeCustomer } from "../../../../plus/saleDetail/components/Client/utils.js";
|
|
6
|
+
import "../../../../plus/salesSdk/index.js";
|
|
6
7
|
import { useKioskSale } from "../../sales/KioskSaleContext.js";
|
|
7
8
|
import { captureShoppingOrder } from "../../sales/shopping/orderIdentity.js";
|
|
8
9
|
import { maskCustomerPhone } from "./memberPhone.js";
|
|
@@ -5,6 +5,7 @@ import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/
|
|
|
5
5
|
import { isFulfillmentTimingBooking } from "../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
6
6
|
import { KioskDialog } from "../components/KioskDialog/index.js";
|
|
7
7
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
8
|
+
import "../../../plus/salesSdk/index.js";
|
|
8
9
|
import { resolveSaleDetailProductQuantity, resolveSaleDetailTempOrder } from "../../../plus/saleDetail/utils.js";
|
|
9
10
|
import locales_default from "../../bigSale/locales/index.js";
|
|
10
11
|
import { KioskSaleContext } from "./KioskSaleContext.js";
|
|
@@ -6,6 +6,7 @@ import { isVirtualSettlementTempOrder } from "../../../plus/multiCurrencySettlem
|
|
|
6
6
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
7
7
|
import { collectUnassignedHolderLines } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
8
8
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
9
|
+
import "../../../plus/salesSdk/index.js";
|
|
9
10
|
import { defaultCheckoutOptions } from "../app/contracts.js";
|
|
10
11
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
11
12
|
import { useSalesCommands } from "../runtime/operations/useSalesCommands.js";
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
2
2
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
3
3
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
4
4
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
5
|
+
import "../../../plus/salesSdk/index.js";
|
|
5
6
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
6
7
|
import { useEffect, useRef, useState } from "react";
|
|
7
8
|
import { useMemoizedFn } from "ahooks";
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _asyncToGenerator } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
3
3
|
import { useSalesSdk } from "../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
4
4
|
import { TEMP_ORDER_SYNC_REQUEST_MESSAGE_TYPE, getTempOrderSyncPayload, getTempOrderSyncRequestPayload, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
+
import "../../plus/salesSdk/index.js";
|
|
5
6
|
import { useEffect, useRef, useState } from "react";
|
|
6
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
|
7
8
|
function createRequestId() {
|
|
@@ -22,7 +22,7 @@ function BookingComposer(props) {
|
|
|
22
22
|
const text = (en, zh) => locale === "zh" ? zh : en;
|
|
23
23
|
const model = useBookingComposer(props);
|
|
24
24
|
const bookingUI = useOptionalBookingUI();
|
|
25
|
-
const { configuration, setConfiguration, quantity, setQuantity, quote, error, working, revision, commit } = model;
|
|
25
|
+
const { configuration, setConfiguration, quantity, setQuantity, maxQuantity, quantityDisabled, quote, error, working, revision, commit } = model;
|
|
26
26
|
const configurationDetail = mode === "tickets" && ((_draft$plan = draft.plan) === null || _draft$plan === void 0 ? void 0 : _draft$plan.hasConfiguration) ? draft.plan.productDetail : void 0;
|
|
27
27
|
const overSold = isSkuFlagSet((_props$skuOptions$con = (_props$skuOptions = props.skuOptions) === null || _props$skuOptions === void 0 || (_props$skuOptions = _props$skuOptions.config) === null || _props$skuOptions === void 0 ? void 0 : _props$skuOptions.overSold) !== null && _props$skuOptions$con !== void 0 ? _props$skuOptions$con : draft.detail.over_sold);
|
|
28
28
|
const configurationComplete = useMemo(() => Boolean(configurationDetail && validateBookingProductConfiguration(configurationDetail, configuration.skuValue, {
|
|
@@ -67,7 +67,7 @@ function BookingComposer(props) {
|
|
|
67
67
|
return (scrollContainer === null || scrollContainer === void 0 || (_scrollContainer$clos = scrollContainer.closest("[role=\"dialog\"]")) === null || _scrollContainer$clos === void 0 ? void 0 : _scrollContainer$clos.querySelector(".booking-config-actions .booking-primary-action")) || null;
|
|
68
68
|
}
|
|
69
69
|
}));
|
|
70
|
-
const quantityControl = (busy = false) => mode === "tickets" && !draft.lineUid ? /* @__PURE__ */ React.createElement("div", {
|
|
70
|
+
const quantityControl = (busy = false) => mode === "tickets" && !draft.lineUid && maxQuantity !== 0 ? /* @__PURE__ */ React.createElement("div", {
|
|
71
71
|
className: "reservation-quantity",
|
|
72
72
|
role: "group",
|
|
73
73
|
"aria-label": text("Number", "数量")
|
|
@@ -75,15 +75,16 @@ function BookingComposer(props) {
|
|
|
75
75
|
className: "booking-ticket-quantity",
|
|
76
76
|
variant: "capsule",
|
|
77
77
|
min: 1,
|
|
78
|
+
max: maxQuantity,
|
|
78
79
|
step: 1,
|
|
79
80
|
value: quantity,
|
|
80
|
-
disabled: busy || working || props.disabled,
|
|
81
|
+
disabled: busy || working || props.disabled || quantityDisabled,
|
|
81
82
|
commitInputOnClose: false,
|
|
82
83
|
selectAllInputOnOpen: true,
|
|
83
84
|
clearSelectedInputOnDelete: true,
|
|
84
85
|
ignoreEmptyInputConfirm: true,
|
|
85
86
|
onChange: (value) => {
|
|
86
|
-
if (!busy && !working && !props.disabled && Number.isSafeInteger(value) && value >= 1) setQuantity(value);
|
|
87
|
+
if (!busy && !working && !props.disabled && !quantityDisabled && Number.isSafeInteger(value) && value >= 1) setQuantity(value);
|
|
87
88
|
}
|
|
88
89
|
})) : null;
|
|
89
90
|
const footer = /* @__PURE__ */ React.createElement("div", { className: "venue-booking-sales__booking-footer" }, quantityControl(), /* @__PURE__ */ React.createElement("div", {
|
|
@@ -181,7 +181,7 @@ var BookingAvailabilityController = class {
|
|
|
181
181
|
});
|
|
182
182
|
return result;
|
|
183
183
|
} catch (error) {
|
|
184
|
-
const rejectedBeforeWrite = !!error && typeof error === "object" && "code" in error && error.code === "BUSINESS_UNAVAILABLE";
|
|
184
|
+
const rejectedBeforeWrite = !!error && typeof error === "object" && "code" in error && (error.code === "BUSINESS_UNAVAILABLE" || error.code === "ITEM_QUANTITY_LIMIT");
|
|
185
185
|
_this.publish({
|
|
186
186
|
status: "error",
|
|
187
187
|
ready: false,
|
|
@@ -7,6 +7,7 @@ import { useSalesSdkHolder } from "../../../plus/salesSdk/context/SalesSdkHolder
|
|
|
7
7
|
import { assignHolderToCartLine } from "../../../plus/salesSdk/utils/assignHolderToCartLine.js";
|
|
8
8
|
import { resolveLineByProductUid } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
9
9
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
10
|
+
import "../../../plus/salesSdk/index.js";
|
|
10
11
|
import { isProgressTarget } from "../../../plus/venueBookingDesign/shared/booking-progress.js";
|
|
11
12
|
import { useBookingProgress } from "../../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
|
12
13
|
import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Controls.js";
|
|
@@ -7,6 +7,7 @@ import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkH
|
|
|
7
7
|
import { isVirtualSettlementTempOrder } from "../../../plus/multiCurrencySettlement/index.js";
|
|
8
8
|
import { freePayApi } from "../../Sales/Checkout/serve.js";
|
|
9
9
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
10
|
+
import "../../../plus/salesSdk/index.js";
|
|
10
11
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
11
12
|
import { resolveKioskDeferredSubmission } from "../../bigSale/templates/Kiosk/deferredCheckout.js";
|
|
12
13
|
import { isH5ZeroAmountValue, toFiniteKioskAmount } from "../../bigSale/templates/Kiosk/zeroAmountCheckout.js";
|
|
@@ -2,6 +2,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
2
2
|
import useSalesUserLogin from "../../../hooks/useSalesUserLogin.js";
|
|
3
3
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
4
4
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
5
|
+
import "../../../plus/salesSdk/index.js";
|
|
5
6
|
import { orderIdentity } from "../presentation.js";
|
|
6
7
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerAuthRequest } from "../kiosk/customer.js";
|
|
7
8
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
@@ -4,6 +4,7 @@ import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122
|
|
|
4
4
|
import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
5
5
|
import { isHolderConfirmCancelled } from "../../../plus/salesSdk/holderConfirm/createHolderConfirmBridge.js";
|
|
6
6
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
7
|
+
import "../../../plus/salesSdk/index.js";
|
|
7
8
|
import locales_default from "../../bigSale/locales/index.js";
|
|
8
9
|
import { presentBaseSalesPaymentResult } from "../../checkout/paymentRuntime/presentBaseSalesPaymentResult.js";
|
|
9
10
|
import { usePaymentScreenProtection } from "../../checkout/paymentRuntime/usePaymentScreenProtection.js";
|
|
@@ -10,6 +10,7 @@ import immersive from "../../../pro/skuDetailModal/appearances/immersive/index.j
|
|
|
10
10
|
import { resolveEffectiveHolderConfig } from "../../../plus/salesSdk/utils/productHolderConfig.js";
|
|
11
11
|
import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkHostBridgesContext.js";
|
|
12
12
|
import { createOpenCustomerAuthHost } from "../../../plus/salesSdk/hosts/createOpenCustomerAuthHost.js";
|
|
13
|
+
import "../../../plus/salesSdk/index.js";
|
|
13
14
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
14
15
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
15
16
|
import { ProductDescription } from "../../../plus/venueBookingDesign/shared/ProductDescription.js";
|
|
@@ -16,10 +16,11 @@ import { useEffect, useMemo, useRef, useState } from "react";
|
|
|
16
16
|
* Start a new keyed hook owner for a new draft/openId, as the existing Composer does.
|
|
17
17
|
*/
|
|
18
18
|
function useBookingComposer(props) {
|
|
19
|
-
var _draft$openId, _draft$plan, _draft$detail$
|
|
19
|
+
var _draft$detail$product, _draft$openId, _draft$plan, _draft$detail$product2, _selection$candidate, _os$otherParams, _context$sales$salesS, _selection$requiremen2, _selection$selectedRe;
|
|
20
20
|
const { mode, draft, context, date, scopeKey, locale, priceSource } = props;
|
|
21
21
|
const text = (en, zh) => locale === "zh" ? zh : en;
|
|
22
|
-
const
|
|
22
|
+
const ticket = context.sales.bookingTicket;
|
|
23
|
+
const os = ticket;
|
|
23
24
|
const businessAvailability = useSalesSdkBusinessAvailability();
|
|
24
25
|
const panel = useRef(null);
|
|
25
26
|
const [configuration, setConfiguration] = useState(draft.configuration);
|
|
@@ -27,6 +28,33 @@ function useBookingComposer(props) {
|
|
|
27
28
|
const initialQuantity = Number(draft.quantity);
|
|
28
29
|
return Number.isSafeInteger(initialQuantity) && initialQuantity > 0 ? initialQuantity : 1;
|
|
29
30
|
});
|
|
31
|
+
const productId = Number((_draft$detail$product = draft.detail.product_id) !== null && _draft$detail$product !== void 0 ? _draft$detail$product : draft.detail.id);
|
|
32
|
+
const checkQuantityLimit = mode === "tickets" && !draft.lineUid && !!(ticket === null || ticket === void 0 ? void 0 : ticket.getVenueTicketRemainingQuantity);
|
|
33
|
+
const [quantityLimit, setQuantityLimit] = useState();
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (!checkQuantityLimit || !(ticket === null || ticket === void 0 ? void 0 : ticket.getVenueTicketRemainingQuantity)) return;
|
|
36
|
+
let active = true;
|
|
37
|
+
setQuantityLimit(void 0);
|
|
38
|
+
ticket.getVenueTicketRemainingQuantity(productId).then((remaining) => {
|
|
39
|
+
if (!active) return;
|
|
40
|
+
if (remaining !== void 0 && remaining > 0) setQuantity((current) => Math.min(current, remaining));
|
|
41
|
+
setQuantityLimit({ remaining });
|
|
42
|
+
}, () => {
|
|
43
|
+
if (active) setQuantityLimit({ failed: true });
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
active = false;
|
|
47
|
+
};
|
|
48
|
+
}, [
|
|
49
|
+
checkQuantityLimit,
|
|
50
|
+
ticket,
|
|
51
|
+
productId,
|
|
52
|
+
scopeKey
|
|
53
|
+
]);
|
|
54
|
+
const maxQuantity = checkQuantityLimit ? quantityLimit === null || quantityLimit === void 0 ? void 0 : quantityLimit.remaining : void 0;
|
|
55
|
+
const quantityDisabled = checkQuantityLimit && (!quantityLimit || !!quantityLimit.failed || maxQuantity === 0);
|
|
56
|
+
const quantityValid = !quantityDisabled && (maxQuantity === void 0 || quantity <= maxQuantity);
|
|
57
|
+
const quantityError = checkQuantityLimit && (quantityLimit === null || quantityLimit === void 0 ? void 0 : quantityLimit.failed) ? text("Unable to check the ticket limit. Reopen this ticket to try again.", "无法核对门票限购数量,请重新打开门票。") : maxQuantity === 0 ? text("You have reached the limit for this ticket.", "已达到该门票的购买上限。") : void 0;
|
|
30
58
|
const [selection, setSelection] = useState();
|
|
31
59
|
const lastDraftIntent = useRef(draft.initialSelection);
|
|
32
60
|
const [quote, setQuote] = useState();
|
|
@@ -65,7 +93,7 @@ function useBookingComposer(props) {
|
|
|
65
93
|
scopeKey,
|
|
66
94
|
mode,
|
|
67
95
|
(_draft$openId = draft.openId) !== null && _draft$openId !== void 0 ? _draft$openId : (_draft$plan = draft.plan) === null || _draft$plan === void 0 ? void 0 : _draft$plan.openId,
|
|
68
|
-
(_draft$detail$
|
|
96
|
+
(_draft$detail$product2 = draft.detail.product_id) !== null && _draft$detail$product2 !== void 0 ? _draft$detail$product2 : draft.detail.id,
|
|
69
97
|
draft.lineUid,
|
|
70
98
|
date,
|
|
71
99
|
quantity,
|
|
@@ -91,7 +119,7 @@ function useBookingComposer(props) {
|
|
|
91
119
|
useEffect(() => {
|
|
92
120
|
let active = true;
|
|
93
121
|
setQuote(void 0);
|
|
94
|
-
if (!(selection === null || selection === void 0 ? void 0 : selection.candidate) || !["selecting", "ready"].includes(selection.status) || mode !== "tickets" && !selection.ready || selection.requiresOrderReconciliation || selection.candidate.date !== date || selection.candidate.availabilityContextId !== selection.contextId || !selection.times.some((time) => sameContextualTime(time, selection.candidate) && selectable(time, (selection.partySize || 0) * selection.bookingCount))) return;
|
|
122
|
+
if (!quantityValid || !(selection === null || selection === void 0 ? void 0 : selection.candidate) || !["selecting", "ready"].includes(selection.status) || mode !== "tickets" && !selection.ready || selection.requiresOrderReconciliation || selection.candidate.date !== date || selection.candidate.availabilityContextId !== selection.contextId || !selection.times.some((time) => sameContextualTime(time, selection.candidate) && selectable(time, (selection.partySize || 0) * selection.bookingCount))) return;
|
|
95
123
|
setError(void 0);
|
|
96
124
|
quoteBookingProduct({
|
|
97
125
|
os: priceSource,
|
|
@@ -115,6 +143,7 @@ function useBookingComposer(props) {
|
|
|
115
143
|
draft,
|
|
116
144
|
prepared.product,
|
|
117
145
|
revision,
|
|
146
|
+
quantityValid,
|
|
118
147
|
selection === null || selection === void 0 ? void 0 : selection.ready,
|
|
119
148
|
selection === null || selection === void 0 ? void 0 : selection.status,
|
|
120
149
|
selection === null || selection === void 0 ? void 0 : selection.contextId,
|
|
@@ -123,7 +152,7 @@ function useBookingComposer(props) {
|
|
|
123
152
|
const commit = function() {
|
|
124
153
|
var _ref = _asyncToGenerator(function* () {
|
|
125
154
|
var _busyCallback$current2, _os$getTempOrder, _props$operationLog, _prepared$product$pro, _selection$requiremen;
|
|
126
|
-
if (lock.current || props.disabled || !quote || !(selection === null || selection === void 0 ? void 0 : selection.ready) || !selection.candidate || !panel.current) return false;
|
|
155
|
+
if (lock.current || props.disabled || !quantityValid || !quote || !(selection === null || selection === void 0 ? void 0 : selection.ready) || !selection.candidate || !panel.current) return false;
|
|
127
156
|
lock.current = true;
|
|
128
157
|
setWorking(true);
|
|
129
158
|
(_busyCallback$current2 = busyCallback.current) === null || _busyCallback$current2 === void 0 || _busyCallback$current2.call(busyCallback, true);
|
|
@@ -271,7 +300,7 @@ function useBookingComposer(props) {
|
|
|
271
300
|
resourceSettingsFailed: Boolean(context.sales.salesSettingsError),
|
|
272
301
|
onRetryResourceSettings: context.sales.ensureSalesSettings
|
|
273
302
|
};
|
|
274
|
-
const bookingReady = Boolean((selection === null || selection === void 0 ? void 0 : selection.ready) && quote && !selection.requiresOrderReconciliation);
|
|
303
|
+
const bookingReady = Boolean(quantityValid && (selection === null || selection === void 0 ? void 0 : selection.ready) && quote && !selection.requiresOrderReconciliation);
|
|
275
304
|
const cancel = () => {
|
|
276
305
|
if (!lock.current) props.onCancel();
|
|
277
306
|
};
|
|
@@ -280,10 +309,12 @@ function useBookingComposer(props) {
|
|
|
280
309
|
setConfiguration,
|
|
281
310
|
quantity,
|
|
282
311
|
setQuantity,
|
|
312
|
+
maxQuantity,
|
|
313
|
+
quantityDisabled,
|
|
283
314
|
prepared,
|
|
284
315
|
selection,
|
|
285
316
|
quote,
|
|
286
|
-
error,
|
|
317
|
+
error: quantityError !== null && quantityError !== void 0 ? quantityError : error,
|
|
287
318
|
working,
|
|
288
319
|
revision,
|
|
289
320
|
panelRef: panel,
|
|
@@ -9,6 +9,7 @@ import { useSalesSdkHostBridges } from "../../plus/salesSdk/context/SalesSdkHost
|
|
|
9
9
|
import { formatTempOrderSettlementAmount } from "../../plus/multiCurrencySettlement/index.js";
|
|
10
10
|
import { useSalesSdkBusinessAvailability } from "../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
11
11
|
import { pickIdentity } from "../../plus/salesSdk/utils/identity.js";
|
|
12
|
+
import "../../plus/salesSdk/index.js";
|
|
12
13
|
import { getPendingWalletPaymentAmount, resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
13
14
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
14
15
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -92,6 +92,7 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
92
92
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
93
93
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
94
94
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
95
|
+
import "./plus/salesSdk/index.js";
|
|
95
96
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
96
97
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
97
98
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -185,6 +186,7 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
185
186
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
186
187
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
187
188
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
189
|
+
import "./plus/pisellReservation/index.js";
|
|
188
190
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
189
191
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
190
192
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -290,4 +290,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
//#endregion
|
|
293
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
293
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, findFirstVirtualCurrencyAsset, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, getReservedVirtualSettlementAmount, getSettlementKey, getSettlementOptions, hasSettlementOptions, hasSufficientVirtualCurrencyBalance, isVirtualOnlySettlementProduct, isVirtualSettlementTempOrder, resolveConfiguredUnavailableReason, resolveLegalSettlementAddOnUnitPrice, resolveSettlementOptionEntries, resolveVirtualSettlementErrorMessage, showVirtualSettlementErrorToast };
|
|
@@ -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 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/floorRoomCard/endingSoonHighlight.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
function endingSoonBookingBusiness(booking) {
|
|
8
8
|
var _ref, _booking$business_cod;
|
|
9
9
|
const order = booking.order;
|
|
@@ -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 {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import dayjs from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import utc from "dayjs/plugin/utc";
|
|
3
|
+
import timezone from "dayjs/plugin/timezone";
|
|
4
4
|
//#region src/plus/pisellReservation/utils/calendarBookingSelection.ts
|
|
5
|
-
dayjs.extend(
|
|
6
|
-
dayjs.extend(
|
|
5
|
+
dayjs.extend(utc);
|
|
6
|
+
dayjs.extend(timezone);
|
|
7
7
|
/** Resolve the same shop clock used by the POS host; previews use the device clock. */
|
|
8
8
|
function resolveReservationTimeZone(utils) {
|
|
9
9
|
var _utils$getStore$getSt, _utils$getStore, _utils$getStore$getSt2, _utils$store, _utils$store$getState, _utils$getApp, _utils$getApp$getStor, _utils$getApp$getStor2, _core$tenant, _core$core, _core$core2, _state$core, _state$core2, _utils$getData, _state$global, _state$global2, _state$global3;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
2
2
|
import dayjs from "dayjs";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import utc from "dayjs/plugin/utc";
|
|
4
|
+
import timezone from "dayjs/plugin/timezone";
|
|
5
5
|
//#region src/plus/saasDevice/devicePasscodes/model.ts
|
|
6
|
-
dayjs.extend(
|
|
7
|
-
dayjs.extend(
|
|
6
|
+
dayjs.extend(utc);
|
|
7
|
+
dayjs.extend(timezone);
|
|
8
8
|
const INITIAL_DEVICE_PASSCODE_STATE = {
|
|
9
9
|
deviceIds: [],
|
|
10
10
|
devicesById: {}
|
|
@@ -13,6 +13,7 @@ import { useSalesSdkCustomer } from "../salesSdk/hooks/useSalesSdkCustomer.js";
|
|
|
13
13
|
import locales_default from "./locales.js";
|
|
14
14
|
import { useSalesSdkBookingContext } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
15
15
|
import { useSalesSdkSummary } from "../salesSdk/hooks/useSalesSdkSummary.js";
|
|
16
|
+
import "../salesSdk/index.js";
|
|
16
17
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
17
18
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
18
19
|
import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
|
|
@@ -2,6 +2,7 @@ import useEngineContext from "../../../../../hooks/useEngineContext.js";
|
|
|
2
2
|
import { _objectSpread2 } from "../../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
|
|
3
3
|
import { resolveContactsInfo } from "../utils.js";
|
|
4
4
|
import { useSalesSdkBookingContext } from "../../../../salesSdk/context/SalesSdkBookingContext.js";
|
|
5
|
+
import "../../../../salesSdk/index.js";
|
|
5
6
|
import { useMemo } from "react";
|
|
6
7
|
import { useMemoizedFn } from "ahooks";
|
|
7
8
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -4,6 +4,7 @@ import { _asyncToGenerator } from "../../../../_virtual/_@oxc-project_runtime@0.
|
|
|
4
4
|
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
5
5
|
import useLogger from "../../../../hooks/useLogger.js";
|
|
6
6
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
7
|
+
import "../../../salesSdk/index.js";
|
|
7
8
|
import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
|
|
8
9
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
9
10
|
import { EBizPrintType } from "./types.js";
|
|
@@ -10,6 +10,7 @@ import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
|
10
10
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
11
11
|
import { useSalesSdkGlobalScanActivity } from "../../../salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
12
12
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
13
|
+
import "../../../salesSdk/index.js";
|
|
13
14
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
14
15
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
15
16
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -5,6 +5,7 @@ import { isAppliedPaymentRecord } from "../../../salesSdk/utils/paymentStatus.js
|
|
|
5
5
|
import { useSalesSdk } from "../../../salesSdk/hooks/useSalesSdk.js";
|
|
6
6
|
import { useSalesSdkCart } from "../../../salesSdk/hooks/useSalesSdkCart.js";
|
|
7
7
|
import { useSalesSdkSummary } from "../../../salesSdk/hooks/useSalesSdkSummary.js";
|
|
8
|
+
import "../../../salesSdk/index.js";
|
|
8
9
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
9
10
|
import React, { memo, useMemo } from "react";
|
|
10
11
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -5,6 +5,7 @@ import { useSalesSdk } from "../salesSdk/hooks/useSalesSdk.js";
|
|
|
5
5
|
import { SalesSdkProvider } from "../salesSdk/context/SalesSdkProvider.js";
|
|
6
6
|
import { SalesSdkDishProvider } from "../salesSdk/context/SalesSdkDishContext.js";
|
|
7
7
|
import { SalesSdkBookingContextProvider } from "../salesSdk/context/SalesSdkBookingContext.js";
|
|
8
|
+
import "../salesSdk/index.js";
|
|
8
9
|
import Base_default from "./Base.js";
|
|
9
10
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
10
11
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -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 useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.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";
|
|
@@ -0,0 +1,54 @@
|
|
|
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 "../multiCurrencySettlement/index.js";
|
|
9
|
+
import "./utils/customerAuthGate.js";
|
|
10
|
+
import "./context/SalesSdkBusinessAvailabilityContext.js";
|
|
11
|
+
import "./utils/appendPromotionTags.js";
|
|
12
|
+
import "./utils/productSkuOptions.js";
|
|
13
|
+
import "./context/SalesSdkUIHostsContext.js";
|
|
14
|
+
import "./utils/runAddProductFlow.js";
|
|
15
|
+
import "./components/showAddToCartToast.js";
|
|
16
|
+
import "./utils/resolveAddProductDebounceKey.js";
|
|
17
|
+
import "./utils/identity.js";
|
|
18
|
+
import "./utils/resolveInCartQuantityForAddToast.js";
|
|
19
|
+
import "./utils/addProductWithFlowDebounced.js";
|
|
20
|
+
import "./utils/bookingDate.js";
|
|
21
|
+
import "./utils/holderSubmitValidation.js";
|
|
22
|
+
import "./utils/removeOrderProducts.js";
|
|
23
|
+
import "./selectors.js";
|
|
24
|
+
import "./utils/enrich.js";
|
|
25
|
+
import "./giftSelect/createOpenGiftSelectHost.js";
|
|
26
|
+
import "./utils/ensureHoldersBeforeSubmit.js";
|
|
27
|
+
import "./hooks/useSalesSdk.js";
|
|
28
|
+
import "./bookingEditService/BookingEditServiceDrawer.js";
|
|
29
|
+
import "./hosts/BookingEditHostRenderer.js";
|
|
30
|
+
import "./hosts/CustomerAuthHostRenderer.js";
|
|
31
|
+
import "./hooks/useSalesSdkCart.js";
|
|
32
|
+
import "./hooks/useSalesSdkCustomer.js";
|
|
33
|
+
import "./normalProductDetail/NormalProductDetailHostRenderer.js";
|
|
34
|
+
import "./hosts/createOpenBookingEditHost.js";
|
|
35
|
+
import "./hosts/createOpenMultiDaySelectHost.js";
|
|
36
|
+
import "./hosts/createOpenHolderSelectHost.js";
|
|
37
|
+
import "./hosts/createOpenCustomerAuthHost.js";
|
|
38
|
+
import "./demo/hosts/legacyOpenProductDetail.js";
|
|
39
|
+
import "./hosts/createCompositeOpenProductDetailHost.js";
|
|
40
|
+
import "./normalProductDetail/createOpenNormalProductDetailHost.js";
|
|
41
|
+
import "./normalProductDetail/createOpenBookingSelectionFlowHost.js";
|
|
42
|
+
import "./giftSelect/GiftSelectModal.js";
|
|
43
|
+
import "./giftSelect/GiftSelectHostRenderer.js";
|
|
44
|
+
import "./allergy/AllergySelectionModal.js";
|
|
45
|
+
import "./context/SalesSdkProvider.js";
|
|
46
|
+
import "./context/SalesSdkDishContext.js";
|
|
47
|
+
import "./context/SalesSdkBookingContext.js";
|
|
48
|
+
import "./hooks/useSalesSdkSummary.js";
|
|
49
|
+
import "./hooks/useSalesSdkProducts.js";
|
|
50
|
+
import "./demo/index.js";
|
|
51
|
+
import "./hooks/useSalesSdkDish.js";
|
|
52
|
+
import "./hooks/useCurrentSalesSdkDish.js";
|
|
53
|
+
import "./hooks/useSyncOsModule.js";
|
|
54
|
+
export {};
|
|
@@ -1145,8 +1145,10 @@ interface BookingTicketHandle extends PickupTimingHandle {
|
|
|
1145
1145
|
getOpenData?: () => Promise<Record<string, any> | null>;
|
|
1146
1146
|
getContactInfoConfig?: () => Promise<SalesContactInfoConfig>;
|
|
1147
1147
|
validateContactInfo?: () => Promise<void>;
|
|
1148
|
-
/** Online
|
|
1148
|
+
/** Online checkout: reject missing required products and online venue-ticket upper bounds. */
|
|
1149
1149
|
validateRequiredProducts?: () => Promise<void>;
|
|
1150
|
+
/** Remaining online venue-ticket quantity, or undefined when no upper bound applies. */
|
|
1151
|
+
getVenueTicketRemainingQuantity?: (productId: number) => Promise<number | undefined>;
|
|
1150
1152
|
/** Fetch bundle relations for catalog cards when revealing a missing required product. */
|
|
1151
1153
|
queryRequiredProductBundles?: (productIds: number[]) => Promise<ProductData[]>;
|
|
1152
1154
|
/** 写入当前临时订单根字段 tempOrder.buzzer。 */
|