@pisell/private-materials 6.12.446 → 6.12.448
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 +2 -2
- package/build/lowcode/view.js +2 -2
- package/es/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.js +0 -1
- package/es/components/bigSale/components/ProductList/index.js +0 -1
- package/es/components/bigSale/components/TimeBar/index.js +0 -1
- package/es/components/bigSale/dialog.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleContext.js +0 -1
- package/es/components/bigSale/hooks/useBigSaleProductListConfig.js +1 -0
- package/es/components/bigSale/hooks/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +0 -1
- package/es/components/bigSale/templates/Kiosk/KioskFulfillmentModal.js +12 -20
- package/es/components/bigSale/templates/Kiosk/KioskFulfillmentReference.js +4 -4
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/kiosk/components/Shell/useKioskMemberAction.js +0 -1
- package/es/components/kiosk/sales/KioskSaleSession.js +0 -1
- package/es/components/kiosk/sales/useCheckout.js +0 -1
- package/es/components/kiosk/sales/useSaleSessionExit.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.js +0 -1
- package/es/components/ticketBooking/components/ProductDisplayAdapter/index.js +3 -0
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +1 -0
- package/es/components/venueBookingSales/catalogPresentation.js +1 -0
- package/es/components/venueBookingSales/checkout/VenueBookingHolderStep.js +0 -1
- package/es/components/venueBookingSales/checkout/useVenueBookingCheckout.js +0 -1
- package/es/components/venueBookingSales/checkout/useVenueCustomerAccess.js +0 -1
- package/es/components/venueBookingSales/checkout/useVenueKioskCheckout.js +0 -1
- package/es/components/venueBookingSales/extras/VenueExtraDetailModal.js +0 -1
- package/es/components/venueBookingSales/useVenueBookingSession.js +0 -1
- package/es/index.js +0 -2
- 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/saleDetail/Base.js +0 -1
- package/es/plus/saleDetail/components/Client/hooks/useClientSelectorProps.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/PrintAction.js +0 -1
- package/es/plus/saleDetail/components/DetailActions/index.js +0 -1
- package/es/plus/saleDetail/components/SummaryFinancialSections/index.js +0 -1
- package/es/plus/saleDetail/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/components/Dish/index.js +0 -1
- package/es/plus/saleDetail/tmpl/B/index.js +0 -1
- package/es/plus/salesSdk/utils/addProductWithFlowDebounced.js +1 -1
- package/es/plus/salesSdk/utils/bookingDate.js +1 -1
- package/es/plus/salesSdk/utils/editCartLineBooking.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/private-materials/lowcode/authmodal/meta.d.ts +1 -0
- 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/lib/components/bigSale/templates/Kiosk/KioskFulfillmentModal.js +12 -20
- package/lib/components/bigSale/templates/Kiosk/KioskFulfillmentReference.js +4 -4
- package/lib/plus/salesSdk/utils/editCartLineBooking.js +1 -1
- package/package.json +1 -1
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -54
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import useEngineContext from "../../../../hooks/useEngineContext.js";
|
|
2
2
|
import { subscribeBookingDateChange } from "../../../../plus/salesSdk/utils/bookingDate.js";
|
|
3
|
-
import "../../../../plus/salesSdk/index.js";
|
|
4
3
|
import dayjs from "dayjs";
|
|
5
4
|
import { useCallback, useEffect, useState } from "react";
|
|
6
5
|
//#region src/components/bigSale/components/BookingFloatingPanel/useBookingPanelController.ts
|
|
@@ -20,7 +20,6 @@ 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";
|
|
24
23
|
import { buildBigSaleProductListPreferencesKey, readBigSaleProductListPreferences, readStoredBigSaleProductListPreferences, removeBigSaleProductListPreferences, resolveBigSaleAutoProductListPreferences, writeBigSaleProductListPreferences } from "../../utils/productListPreferences.js";
|
|
25
24
|
import { resolveBigSaleProductDisplayConfig, useBigSaleProductListConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
26
25
|
import locales_default$1 from "../../locales/index.js";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import locales_default from "../../locales/index.js";
|
|
10
9
|
import { getPosWeekStartsOn, resolvePosCountryCode } from "../../../../utils/posDateLocale.js";
|
|
11
10
|
import dayjs from "dayjs";
|
|
@@ -6,7 +6,6 @@ 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";
|
|
10
9
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
11
10
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
12
11
|
import BigSale from "./index.js";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import { useMemo } from "react";
|
|
9
8
|
//#region src/components/bigSale/hooks/useBigSaleContext.ts
|
|
10
9
|
/**
|
|
@@ -2,6 +2,7 @@ import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/
|
|
|
2
2
|
import { _objectWithoutProperties } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
|
|
3
3
|
import { generateProductTabs, sortProductsByTabOrder } from "../../ticketBooking/components/ProductDisplayAdapter/utils.js";
|
|
4
4
|
import { ProductDisplayPresets } from "../../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
5
|
+
import "../../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
5
6
|
import { mergeBigSaleProductListPreferences } from "../utils/productListPreferences.js";
|
|
6
7
|
import { useMemo, useRef } from "react";
|
|
7
8
|
import isEqual from "lodash/isEqual";
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
import { isPersistedBigSaleOrderId } from "../utils/orderIdentity.js";
|
|
8
7
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
9
8
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
@@ -8,7 +8,6 @@ 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";
|
|
12
11
|
import { resolveCustomerDetailAppearance } from "../../pro/skuDetailModal/customerDetailPolicy.js";
|
|
13
12
|
import { resolveKioskPlatformSource, resolveKioskPresentation } from "../kioskSale/resolveKioskPresentation.js";
|
|
14
13
|
import { isVenueKioskRuntime } from "../venueBookingSales/kiosk/customer.js";
|
|
@@ -53,18 +53,13 @@ const COPY = {
|
|
|
53
53
|
function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, selection, reference, onSelectionChange, onReferenceChange, loadAvailability, onCancel, onContinue, onRetry }) {
|
|
54
54
|
const locale = String(useLocale()).replace(/_/g, "-").toLowerCase();
|
|
55
55
|
const copy = locale.startsWith("zh") ? /^zh-(hk|tw|hant)/.test(locale) ? COPY["zh-HK"] : COPY["zh-CN"] : locale.startsWith("ja") ? COPY.ja : locale.startsWith("pt") ? COPY.pt : COPY.en;
|
|
56
|
-
const
|
|
57
|
-
const composingRef = useRef(false);
|
|
56
|
+
const referenceInput = useRef(null);
|
|
58
57
|
const [panelState, setPanelState] = useState({ loading: false });
|
|
59
58
|
const locked = loading || saving;
|
|
60
59
|
const ready = Boolean(config && (!config.handoverModes.length || selection));
|
|
61
|
-
const continueDisabled = locked || !ready ||
|
|
60
|
+
const continueDisabled = locked || !ready || panelState.loading || Boolean(panelState.error);
|
|
62
61
|
useEffect(() => {
|
|
63
|
-
if (!open) {
|
|
64
|
-
composingRef.current = false;
|
|
65
|
-
setComposing(false);
|
|
66
|
-
setPanelState({ loading: false });
|
|
67
|
-
}
|
|
62
|
+
if (!open) setPanelState({ loading: false });
|
|
68
63
|
}, [open]);
|
|
69
64
|
return /* @__PURE__ */ React.createElement(PisellModal, {
|
|
70
65
|
open,
|
|
@@ -91,7 +86,13 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
|
|
|
91
86
|
loading: saving,
|
|
92
87
|
disabled: continueDisabled,
|
|
93
88
|
onClick: () => {
|
|
94
|
-
if (!
|
|
89
|
+
if (!open || continueDisabled) return;
|
|
90
|
+
const input = referenceInput.current;
|
|
91
|
+
if (input) {
|
|
92
|
+
input.blur();
|
|
93
|
+
onReferenceChange(input.value);
|
|
94
|
+
}
|
|
95
|
+
onContinue();
|
|
95
96
|
}
|
|
96
97
|
}, copy.continue)]
|
|
97
98
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
@@ -120,22 +121,13 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
|
|
|
120
121
|
disabled: saving,
|
|
121
122
|
onStateChange: setPanelState
|
|
122
123
|
}) : null, (config === null || config === void 0 ? void 0 : config.fulfillmentRefMode) === "manual_input" ? /* @__PURE__ */ React.createElement(KioskFulfillmentReference, {
|
|
124
|
+
inputRef: referenceInput,
|
|
123
125
|
value: reference,
|
|
124
126
|
serviceType: selection === null || selection === void 0 ? void 0 : selection.serviceType,
|
|
125
127
|
manualInputType: config.manualInputType,
|
|
126
128
|
disabled: saving,
|
|
127
129
|
onChange: onReferenceChange,
|
|
128
|
-
|
|
129
|
-
onClear: () => onReferenceChange(""),
|
|
130
|
-
onCompositionStart: () => {
|
|
131
|
-
composingRef.current = true;
|
|
132
|
-
setComposing(true);
|
|
133
|
-
},
|
|
134
|
-
onCompositionEnd: (value) => {
|
|
135
|
-
onReferenceChange(value);
|
|
136
|
-
composingRef.current = false;
|
|
137
|
-
setComposing(false);
|
|
138
|
-
}
|
|
130
|
+
onClear: () => onReferenceChange("")
|
|
139
131
|
}) : null)));
|
|
140
132
|
}
|
|
141
133
|
//#endregion
|
|
@@ -61,7 +61,7 @@ const COPY = {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
/** Controlled customer input; persistence and checkout ordering belong to the host. */
|
|
64
|
-
function KioskFulfillmentReference({ value, serviceType, manualInputType, disabled = false, error, onChange,
|
|
64
|
+
function KioskFulfillmentReference({ inputRef, value, serviceType, manualInputType, disabled = false, error, onChange, onClear }) {
|
|
65
65
|
const locale = String(useLocale()).replace(/_/g, "-").toLowerCase();
|
|
66
66
|
const copy = locale.startsWith("zh") ? /^zh-(hk|tw|hant)/.test(locale) ? COPY["zh-HK"] : COPY["zh-CN"] : locale.startsWith("ja") ? COPY.ja : locale.startsWith("pt") ? COPY.pt : COPY.en;
|
|
67
67
|
const id = useStableInstanceId("kiosk-fulfillment-reference");
|
|
@@ -79,6 +79,7 @@ function KioskFulfillmentReference({ value, serviceType, manualInputType, disabl
|
|
|
79
79
|
className: "pisell-kiosk-fulfillment-reference__description",
|
|
80
80
|
id: hintId
|
|
81
81
|
}, description), /* @__PURE__ */ React.createElement("div", { className: "pisell-kiosk-fulfillment-reference__input-row" }, /* @__PURE__ */ React.createElement("input", {
|
|
82
|
+
ref: inputRef,
|
|
82
83
|
id: inputId,
|
|
83
84
|
className: "pisell-kiosk-fulfillment-reference__input",
|
|
84
85
|
type: "text",
|
|
@@ -88,9 +89,8 @@ function KioskFulfillmentReference({ value, serviceType, manualInputType, disabl
|
|
|
88
89
|
"aria-describedby": error ? `${hintId} ${errorId}` : hintId,
|
|
89
90
|
"aria-invalid": Boolean(error),
|
|
90
91
|
onChange: (event) => onChange(event.currentTarget.value),
|
|
91
|
-
onBlur,
|
|
92
|
-
|
|
93
|
-
onCompositionEnd: (event) => onCompositionEnd(event.currentTarget.value)
|
|
92
|
+
onBlur: (event) => onChange(event.currentTarget.value),
|
|
93
|
+
onCompositionEnd: (event) => onChange(event.currentTarget.value)
|
|
94
94
|
}), /* @__PURE__ */ React.createElement("button", {
|
|
95
95
|
className: "pisell-kiosk-fulfillment-reference__clear",
|
|
96
96
|
type: "button",
|
|
@@ -14,7 +14,6 @@ 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";
|
|
18
17
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
19
18
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
20
19
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
import { useKioskSale } from "../../sales/KioskSaleContext.js";
|
|
8
7
|
import { captureShoppingOrder } from "../../sales/shopping/orderIdentity.js";
|
|
9
8
|
import { maskCustomerPhone } from "./memberPhone.js";
|
|
@@ -4,7 +4,6 @@ import useInitLocalesOnce from "../../../hooks/useInitLocalesOnce.js";
|
|
|
4
4
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
5
5
|
import { isFulfillmentTimingBooking } from "../../../plus/salesSdk/utils/fulfillmentTimingBooking.js";
|
|
6
6
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
7
|
-
import "../../../plus/salesSdk/index.js";
|
|
8
7
|
import { resolveSaleDetailProductQuantity, resolveSaleDetailTempOrder } from "../../../plus/saleDetail/utils.js";
|
|
9
8
|
import locales_default from "../../bigSale/locales/index.js";
|
|
10
9
|
import { KioskSaleContext } from "./KioskSaleContext.js";
|
|
@@ -5,7 +5,6 @@ import { useSalesSdkHostBridges } from "../../../plus/salesSdk/context/SalesSdkH
|
|
|
5
5
|
import { useSalesSdkBusinessAvailability } from "../../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
6
6
|
import { collectUnassignedHolderLines } from "../../../plus/salesSdk/utils/holderSubmitValidation.js";
|
|
7
7
|
import { useSalesSdkGlobalScanActivity } from "../../../plus/salesSdk/context/SalesSdkGlobalScanActivityContext.js";
|
|
8
|
-
import "../../../plus/salesSdk/index.js";
|
|
9
8
|
import { defaultCheckoutOptions } from "../app/contracts.js";
|
|
10
9
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
11
10
|
import { useSalesCommands } from "../runtime/operations/useSalesCommands.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { saveShoppingStep } from "./shopping/shoppingStepStorage.js";
|
|
7
6
|
import { useEffect, useRef, useState } from "react";
|
|
8
7
|
import { useMemoizedFn } from "ahooks";
|
|
@@ -2,7 +2,6 @@ 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, shouldApplySharedTempOrderPayload } from "../../plus/salesSdk/tempOrderSync.js";
|
|
5
|
-
import "../../plus/salesSdk/index.js";
|
|
6
5
|
import { useEffect, useRef, useState } from "react";
|
|
7
6
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
|
8
7
|
function createRequestId() {
|
|
@@ -20,6 +20,7 @@ import { useProducts } from "../../hooks/pisellos/useProducts.js";
|
|
|
20
20
|
import { useService } from "../../../booking/info/service/serviceManager/index.js";
|
|
21
21
|
import ProductDisplayAdapter_default from "../ProductDisplayAdapter/ProductDisplayAdapter.js";
|
|
22
22
|
import { resolveProductDisplayConfig } from "../ProductDisplayAdapter/types.js";
|
|
23
|
+
import "../ProductDisplayAdapter/index.js";
|
|
23
24
|
import notAvailable_default from "../notAvailable/index.js";
|
|
24
25
|
import MultiDayTimeSelectModal from "./MultiDayTimeSelectModal.js";
|
|
25
26
|
import dayjs from "dayjs";
|
|
@@ -3,6 +3,7 @@ import index from "../../plus/productSelect/components/pisellPriceText/index.js"
|
|
|
3
3
|
import { resolveProductPricePresentation } from "../../plus/productSelect/pricing/pricePresentation.js";
|
|
4
4
|
import SettlementPriceList from "../../plus/multiCurrencySettlement/SettlementPriceList.js";
|
|
5
5
|
import { ProductDisplayPresets } from "../ticketBooking/components/ProductDisplayAdapter/types.js";
|
|
6
|
+
import "../ticketBooking/components/ProductDisplayAdapter/index.js";
|
|
6
7
|
import { DEFAULT_BIG_SALE_PRODUCT_LIST_PREFERENCES } from "../bigSale/utils/productListPreferences.js";
|
|
7
8
|
import { translate } from "../../plus/venueBookingDesign/i18n.js";
|
|
8
9
|
import { ProductCard as ProductCard$1 } from "../../plus/venueBookingDesign/shared/ProductCard.js";
|
|
@@ -7,7 +7,6 @@ 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";
|
|
11
10
|
import { isProgressTarget } from "../../../plus/venueBookingDesign/shared/booking-progress.js";
|
|
12
11
|
import { useBookingProgress } from "../../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
|
13
12
|
import { Button as Button$1 } from "../../../plus/venueBookingDesign/shared/Controls.js";
|
|
@@ -7,7 +7,6 @@ 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";
|
|
11
10
|
import { isSalesOrderSubmitSuccess } from "../../../plus/saleDetail/components/DetailActions/utils.js";
|
|
12
11
|
import { resolveKioskDeferredSubmission } from "../../bigSale/templates/Kiosk/deferredCheckout.js";
|
|
13
12
|
import { isH5ZeroAmountValue, toFiniteKioskAmount } from "../../bigSale/templates/Kiosk/zeroAmountCheckout.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { orderIdentity } from "../presentation.js";
|
|
7
6
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerAuthRequest } from "../kiosk/customer.js";
|
|
8
7
|
import { confirmationErrorMessage } from "./errorMessage.js";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import locales_default from "../../bigSale/locales/index.js";
|
|
9
8
|
import { presentBaseSalesPaymentResult } from "../../checkout/paymentRuntime/presentBaseSalesPaymentResult.js";
|
|
10
9
|
import { usePaymentScreenProtection } from "../../checkout/paymentRuntime/usePaymentScreenProtection.js";
|
|
@@ -10,7 +10,6 @@ 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";
|
|
14
13
|
import { localizedText, orderIdentity } from "../presentation.js";
|
|
15
14
|
import { ensureVenueKioskCustomer, isVenueKioskRuntime, venueKioskCustomerId } from "../kiosk/customer.js";
|
|
16
15
|
import { ProductDescription } from "../../../plus/venueBookingDesign/shared/ProductDescription.js";
|
|
@@ -11,7 +11,6 @@ import { useSalesSdkHostBridges } from "../../plus/salesSdk/context/SalesSdkHost
|
|
|
11
11
|
import { formatTempOrderSettlementAmount } from "../../plus/multiCurrencySettlement/index.js";
|
|
12
12
|
import { useSalesSdkBusinessAvailability } from "../../plus/salesSdk/context/SalesSdkBusinessAvailabilityContext.js";
|
|
13
13
|
import { pickIdentity } from "../../plus/salesSdk/utils/identity.js";
|
|
14
|
-
import "../../plus/salesSdk/index.js";
|
|
15
14
|
import { resolveEffectiveSaleDetailAmountDue } from "../../plus/saleDetail/utils.js";
|
|
16
15
|
import { useBookingUI } from "../../plus/venueBookingDesign/context.js";
|
|
17
16
|
import { useBookingProgress } from "../../plus/venueBookingDesign/shared/useBookingProgress.js";
|
package/es/index.js
CHANGED
|
@@ -91,7 +91,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
91
91
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
92
92
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
93
93
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
94
|
-
import "./plus/salesSdk/index.js";
|
|
95
94
|
import { defineExitPolicy, defineNavigationGuard, definePredicate, defineTrigger, defineWorkflow } from "./components/HDLKiosk/kernel/application/defineApplication.js";
|
|
96
95
|
import { accept, defineSlice, perform, require } from "./components/HDLKiosk/kernel/application/defineSlice.js";
|
|
97
96
|
import { defineKioskScanCommand, kioskScanTrigger, salesScan, startOnScan } from "./components/kiosk/sales/inputs/scan.js";
|
|
@@ -182,7 +181,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
182
181
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
183
182
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
184
183
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
185
|
-
import "./plus/pisellReservation/index.js";
|
|
186
184
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
187
185
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
188
186
|
import CupList from "./components/ecocup/cupList/index.js";
|
|
@@ -280,4 +280,4 @@ function attachSelectedSettlement(item, selectedSettlement) {
|
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
//#endregion
|
|
283
|
-
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct,
|
|
283
|
+
export { attachSelectedSettlement, buildSettlementPriceRows, createVirtualOnlySkuDisplayProduct, formatSettlementAmount, formatSettlementSelectionTotal, formatTempOrderSettlementAmount, 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,
|
|
262
|
+
export { applyHostResourceShellToBaseRow, bookingListToReservationTableRows, customerBrief, extractResourceRecordIds, filterBookingsByResourceIds, 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,
|
|
81
|
+
export { PISELL_RESERVATION_FLOOR_PLAN_CODE, ensureShopFloorPlanByCode, 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,
|
|
930
|
+
export { RESERVATION_BOUND_ROUND_TABLE_ELEMENT_KIND, RESERVATION_BOUND_TABLE_ELEMENT_KIND, applyReservationFloorMapLiveLabels, defaultReservationTableRows, getDefaultReservationFloorMapConfig, getReservationDataSourceFormColumns, getReservationFloorMapShellConfig, mergeFloorMapElementKindCategoriesWithDefaults, mergeFloorMapElementKindsWithDefaults };
|
|
@@ -13,7 +13,6 @@ 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";
|
|
17
16
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
18
17
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
19
18
|
import { SaleDetailTemplateRenderer } from "./tmpl/index.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { useMemo } from "react";
|
|
7
6
|
import { useMemoizedFn } from "ahooks";
|
|
8
7
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import { invokeLocalReceiptPrint, resolveLocalReceiptPrintModule, resolveSaleDetailOrderIdFromSales } from "./utils.js";
|
|
9
8
|
import { getRemotePrintActions, getWristbandList } from "../../serve.js";
|
|
10
9
|
import { EBizPrintType } from "./types.js";
|
|
@@ -10,7 +10,6 @@ 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";
|
|
14
13
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
15
14
|
import { getNumericAmount, getSalesHostModule, resolveSaleDetailOrderIdFromSales, resolveSaleDetailOrderIdFromSalesResult, shouldCloseDialogAfterCheckout, updateLocalOrder } from "./utils.js";
|
|
16
15
|
import { deriveSaleOrderSubmitState } from "../../actions/state.js";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import { resolveSaleDetailTempOrder } from "../../utils.js";
|
|
10
9
|
import React, { memo, useMemo } from "react";
|
|
11
10
|
import { formatAmount, locales } from "@pisell/utils";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import Base_default from "./Base.js";
|
|
10
9
|
import { resolveSaleDetailOsProps } from "./osProps.js";
|
|
11
10
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { SaleDetailStatusOverview } from "../shared/StatusOverview.js";
|
|
6
5
|
import { DishGroupView } from "./DishGroupView.js";
|
|
7
6
|
import dayjs from "dayjs";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { getInternalNotesByScheduleEvent } from "../../serve.js";
|
|
6
5
|
import { TEMPLATE_B_PAY_ACTIONS, TEMPLATE_B_SUMMARY_ACTIONS } from "../../components/DetailActions/configs/index.js";
|
|
7
6
|
import { DetailActions } from "../../components/DetailActions/index.js";
|
|
@@ -31,4 +31,4 @@ function subscribeBookingDateChange(bookingTicket, callback) {
|
|
|
31
31
|
return typeof off === "function" ? off : () => {};
|
|
32
32
|
}
|
|
33
33
|
//#endregion
|
|
34
|
-
export {
|
|
34
|
+
export { formatBookingDateTime, subscribeBookingDateChange };
|
|
@@ -117,7 +117,7 @@ function _resolveSourceProductForBookingEdit() {
|
|
|
117
117
|
});
|
|
118
118
|
if (!merged.product_resource && cartView.product_resource) merged.product_resource = cartView.product_resource;
|
|
119
119
|
if (!merged.capacity && cartView.capacity) merged.capacity = cartView.capacity;
|
|
120
|
-
if (hasProductResourceMeta(
|
|
120
|
+
if (catalogItem && hasProductResourceMeta(catalogItem)) return merged;
|
|
121
121
|
const scheduleDate = booking.start_date != null ? String(booking.start_date) : dayjs().format("YYYY-MM-DD");
|
|
122
122
|
const startTime = booking.start_time != null ? String(booking.start_time) : dayjs().format("HH:mm");
|
|
123
123
|
try {
|
|
@@ -102,4 +102,4 @@ function buildHolderListRequestKey(params) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay,
|
|
105
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, enrichCartProductHolderDisplay, resolveHolderDisplayConfig };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthMethodType,
|
|
1
|
+
import { AuthMethodType, VerificationMethod } from "./shared/types.js";
|
|
2
2
|
import { Login2, Login2Config, Login2Events, Login2Props } from "./Login2.js";
|
|
3
3
|
import { Register2, Register2Config, Register2Events, Register2Props } from "./Register2.js";
|
|
4
|
-
import { AuthModal } from "./AuthModal.js";
|
|
4
|
+
import { AuthModal, AuthModalProps } from "./AuthModal.js";
|
|
@@ -226,4 +226,4 @@ interface RegisterFormData {
|
|
|
226
226
|
verification_token?: string;
|
|
227
227
|
}
|
|
228
228
|
//#endregion
|
|
229
|
-
export { AuthMethodType, EmailAuthConfig,
|
|
229
|
+
export { AuthMethodType, EmailAuthConfig, LegalTermsConfig, LoginFormData, LoginMethodItem, OAuthConfig, PhoneAuthConfig, RegisterFormData, RegistrationMethodItem, UIConfig, VerificationMethod };
|
|
@@ -56,18 +56,13 @@ const COPY = {
|
|
|
56
56
|
function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, selection, reference, onSelectionChange, onReferenceChange, loadAvailability, onCancel, onContinue, onRetry }) {
|
|
57
57
|
const locale = String(require_useLocale.default()).replace(/_/g, "-").toLowerCase();
|
|
58
58
|
const copy = locale.startsWith("zh") ? /^zh-(hk|tw|hant)/.test(locale) ? COPY["zh-HK"] : COPY["zh-CN"] : locale.startsWith("ja") ? COPY.ja : locale.startsWith("pt") ? COPY.pt : COPY.en;
|
|
59
|
-
const
|
|
60
|
-
const composingRef = (0, react.useRef)(false);
|
|
59
|
+
const referenceInput = (0, react.useRef)(null);
|
|
61
60
|
const [panelState, setPanelState] = (0, react.useState)({ loading: false });
|
|
62
61
|
const locked = loading || saving;
|
|
63
62
|
const ready = Boolean(config && (!config.handoverModes.length || selection));
|
|
64
|
-
const continueDisabled = locked || !ready ||
|
|
63
|
+
const continueDisabled = locked || !ready || panelState.loading || Boolean(panelState.error);
|
|
65
64
|
(0, react.useEffect)(() => {
|
|
66
|
-
if (!open) {
|
|
67
|
-
composingRef.current = false;
|
|
68
|
-
setComposing(false);
|
|
69
|
-
setPanelState({ loading: false });
|
|
70
|
-
}
|
|
65
|
+
if (!open) setPanelState({ loading: false });
|
|
71
66
|
}, [open]);
|
|
72
67
|
return /* @__PURE__ */ react.default.createElement(_pisell_materials.PisellModal, {
|
|
73
68
|
open,
|
|
@@ -94,7 +89,13 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
|
|
|
94
89
|
loading: saving,
|
|
95
90
|
disabled: continueDisabled,
|
|
96
91
|
onClick: () => {
|
|
97
|
-
if (!
|
|
92
|
+
if (!open || continueDisabled) return;
|
|
93
|
+
const input = referenceInput.current;
|
|
94
|
+
if (input) {
|
|
95
|
+
input.blur();
|
|
96
|
+
onReferenceChange(input.value);
|
|
97
|
+
}
|
|
98
|
+
onContinue();
|
|
98
99
|
}
|
|
99
100
|
}, copy.continue)]
|
|
100
101
|
}, /* @__PURE__ */ react.default.createElement("div", {
|
|
@@ -123,22 +124,13 @@ function KioskFulfillmentModal({ open, mobile, loading, saving, error, config, s
|
|
|
123
124
|
disabled: saving,
|
|
124
125
|
onStateChange: setPanelState
|
|
125
126
|
}) : null, (config === null || config === void 0 ? void 0 : config.fulfillmentRefMode) === "manual_input" ? /* @__PURE__ */ react.default.createElement(require_KioskFulfillmentReference.default, {
|
|
127
|
+
inputRef: referenceInput,
|
|
126
128
|
value: reference,
|
|
127
129
|
serviceType: selection === null || selection === void 0 ? void 0 : selection.serviceType,
|
|
128
130
|
manualInputType: config.manualInputType,
|
|
129
131
|
disabled: saving,
|
|
130
132
|
onChange: onReferenceChange,
|
|
131
|
-
|
|
132
|
-
onClear: () => onReferenceChange(""),
|
|
133
|
-
onCompositionStart: () => {
|
|
134
|
-
composingRef.current = true;
|
|
135
|
-
setComposing(true);
|
|
136
|
-
},
|
|
137
|
-
onCompositionEnd: (value) => {
|
|
138
|
-
onReferenceChange(value);
|
|
139
|
-
composingRef.current = false;
|
|
140
|
-
setComposing(false);
|
|
141
|
-
}
|
|
133
|
+
onClear: () => onReferenceChange("")
|
|
142
134
|
}) : null)));
|
|
143
135
|
}
|
|
144
136
|
//#endregion
|
|
@@ -63,7 +63,7 @@ const COPY = {
|
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
/** Controlled customer input; persistence and checkout ordering belong to the host. */
|
|
66
|
-
function KioskFulfillmentReference({ value, serviceType, manualInputType, disabled = false, error, onChange,
|
|
66
|
+
function KioskFulfillmentReference({ inputRef, value, serviceType, manualInputType, disabled = false, error, onChange, onClear }) {
|
|
67
67
|
const locale = String(require_useLocale.default()).replace(/_/g, "-").toLowerCase();
|
|
68
68
|
const copy = locale.startsWith("zh") ? /^zh-(hk|tw|hant)/.test(locale) ? COPY["zh-HK"] : COPY["zh-CN"] : locale.startsWith("ja") ? COPY.ja : locale.startsWith("pt") ? COPY.pt : COPY.en;
|
|
69
69
|
const id = require_useStableInstanceId.default("kiosk-fulfillment-reference");
|
|
@@ -81,6 +81,7 @@ function KioskFulfillmentReference({ value, serviceType, manualInputType, disabl
|
|
|
81
81
|
className: "pisell-kiosk-fulfillment-reference__description",
|
|
82
82
|
id: hintId
|
|
83
83
|
}, description), /* @__PURE__ */ react.default.createElement("div", { className: "pisell-kiosk-fulfillment-reference__input-row" }, /* @__PURE__ */ react.default.createElement("input", {
|
|
84
|
+
ref: inputRef,
|
|
84
85
|
id: inputId,
|
|
85
86
|
className: "pisell-kiosk-fulfillment-reference__input",
|
|
86
87
|
type: "text",
|
|
@@ -90,9 +91,8 @@ function KioskFulfillmentReference({ value, serviceType, manualInputType, disabl
|
|
|
90
91
|
"aria-describedby": error ? `${hintId} ${errorId}` : hintId,
|
|
91
92
|
"aria-invalid": Boolean(error),
|
|
92
93
|
onChange: (event) => onChange(event.currentTarget.value),
|
|
93
|
-
onBlur,
|
|
94
|
-
|
|
95
|
-
onCompositionEnd: (event) => onCompositionEnd(event.currentTarget.value)
|
|
94
|
+
onBlur: (event) => onChange(event.currentTarget.value),
|
|
95
|
+
onCompositionEnd: (event) => onChange(event.currentTarget.value)
|
|
96
96
|
}), /* @__PURE__ */ react.default.createElement("button", {
|
|
97
97
|
className: "pisell-kiosk-fulfillment-reference__clear",
|
|
98
98
|
type: "button",
|
|
@@ -119,7 +119,7 @@ function _resolveSourceProductForBookingEdit() {
|
|
|
119
119
|
});
|
|
120
120
|
if (!merged.product_resource && cartView.product_resource) merged.product_resource = cartView.product_resource;
|
|
121
121
|
if (!merged.capacity && cartView.capacity) merged.capacity = cartView.capacity;
|
|
122
|
-
if (hasProductResourceMeta(
|
|
122
|
+
if (catalogItem && hasProductResourceMeta(catalogItem)) return merged;
|
|
123
123
|
const scheduleDate = booking.start_date != null ? String(booking.start_date) : (0, dayjs.default)().format("YYYY-MM-DD");
|
|
124
124
|
const startTime = booking.start_time != null ? String(booking.start_time) : (0, dayjs.default)().format("HH:mm");
|
|
125
125
|
try {
|