@pisell/private-materials 6.11.648 → 6.11.650
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 +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/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/index.js +51 -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/ensureHoldersBeforeSubmit.js +2 -1
- 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/es/pro/skuDetailModal/flow/posAutoResolution.js +2 -2
- package/es/pro/skuDetailModal/index.js +11 -11
- package/lib/plus/salesSdk/utils/ensureHoldersBeforeSubmit.js +2 -1
- package/lib/pro/skuDetailModal/flow/posAutoResolution.js +2 -2
- package/lib/pro/skuDetailModal/index.js +10 -10
- 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";
|
|
@@ -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";
|
|
@@ -6,6 +6,7 @@ import useSalesUserLogin, { isRequireLoginChannel } from "../../../../hooks/useS
|
|
|
6
6
|
import { resolvePaymentResultToastV2ViewModel } from "../../../checkout/components/PaymentResultToastV2/resolve.js";
|
|
7
7
|
import PaymentResultToastV2_default from "../../../checkout/components/PaymentResultToastV2/index.js";
|
|
8
8
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
9
|
+
import "../../../../plus/salesSdk/index.js";
|
|
9
10
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
10
11
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
11
12
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -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";
|
|
@@ -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 {};
|
|
@@ -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 };
|
|
@@ -62,4 +62,4 @@ function normalizeCustomerAuthCustomer(value) {
|
|
|
62
62
|
return null;
|
|
63
63
|
}
|
|
64
64
|
//#endregion
|
|
65
|
-
export { isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
|
|
65
|
+
export { isHolderRequiredProduct, isKioskRuntime, 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 };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { _asyncToGenerator } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js";
|
|
2
2
|
import { isWalkIn } from "../../../components/booking/utils.js";
|
|
3
3
|
import { isHolderConfirmCancelled } from "../holderConfirm/createHolderConfirmBridge.js";
|
|
4
|
+
import { resolveEffectiveHolderConfig } from "./productHolderConfig.js";
|
|
4
5
|
import { buildHolderConfirmSnapshotKeys, collectUnassignedHolderLines, shouldPromptHolderBeforeSubmit } from "./holderSubmitValidation.js";
|
|
5
6
|
import { locales } from "@pisell/utils";
|
|
6
7
|
import { PisellToast } from "@pisell/materials";
|
|
@@ -27,7 +28,7 @@ function _ensureHoldersBeforeSubmit() {
|
|
|
27
28
|
bookingConfig,
|
|
28
29
|
bookingTicket
|
|
29
30
|
});
|
|
30
|
-
if (isWalkIn(customerId !== null && customerId !== void 0 ? customerId : void 0) && unassignedHolderLines.
|
|
31
|
+
if (isWalkIn(customerId !== null && customerId !== void 0 ? customerId : void 0) && unassignedHolderLines.some((line) => resolveEffectiveHolderConfig(line.cacheItem, bookingConfig).required)) {
|
|
31
32
|
PisellToast({ content: locales.getText("pisell2.text.please-select-the-customer-first") });
|
|
32
33
|
return false;
|
|
33
34
|
}
|
|
@@ -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 };
|
|
@@ -23,6 +23,6 @@ const getPosAutoResolutionDraftKey = (draft) => {
|
|
|
23
23
|
capacity: (_draft$booking$capaci = draft.booking.capacity) !== null && _draft$booking$capaci !== void 0 ? _draft$booking$capaci : null
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const shouldDirectlyConfirmPosSelectionFlow = ({ eligible, status, currentStepIndex }) => eligible && status === "resolved" && currentStepIndex === 0;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { getPosAutoResolutionDraftKey, isPosCreateAutoResolutionCandidate,
|
|
28
|
+
export { getPosAutoResolutionDraftKey, isPosCreateAutoResolutionCandidate, shouldDirectlyConfirmPosSelectionFlow };
|
|
@@ -35,7 +35,7 @@ import resolveBookingPriceDisplayAmounts, { canOpenBookingManualPriceChange } fr
|
|
|
35
35
|
import { normalizeSelectionDuration } from "./flow/modules/time/index.js";
|
|
36
36
|
import { flowModuleRegistry } from "./flow/registry.js";
|
|
37
37
|
import SkuDetailSelectionFlowView from "./flow/SkuDetailSelectionFlowView.js";
|
|
38
|
-
import { getPosAutoResolutionDraftKey, isPosCreateAutoResolutionCandidate,
|
|
38
|
+
import { getPosAutoResolutionDraftKey, isPosCreateAutoResolutionCandidate, shouldDirectlyConfirmPosSelectionFlow } from "./flow/posAutoResolution.js";
|
|
39
39
|
import dayjs from "dayjs";
|
|
40
40
|
import React, { forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
41
41
|
import { locales } from "@pisell/utils";
|
|
@@ -716,24 +716,23 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
716
716
|
posAutoResolutionDraftKey,
|
|
717
717
|
selectionFlowInstanceKey
|
|
718
718
|
]);
|
|
719
|
-
const
|
|
719
|
+
const canDirectlyConfirmPosSelectionFlow = shouldDirectlyConfirmPosSelectionFlow({
|
|
720
720
|
eligible: isPosCreateAutoResolutionEligible,
|
|
721
721
|
status: posAutoResolutionStatus,
|
|
722
722
|
currentStepIndex: currentStep
|
|
723
723
|
});
|
|
724
|
-
const
|
|
725
|
-
const maxStepIndex = useMemo(() => Math.max(0, visibleProcedureSteps.length - 1), [visibleProcedureSteps]);
|
|
724
|
+
const maxStepIndex = useMemo(() => Math.max(0, procedureSteps.length - 1), [procedureSteps]);
|
|
726
725
|
useLayoutEffect(() => {
|
|
727
726
|
var _selectionFlowRef$cur4, _selectionFlowRef$cur5, _procedureRef$current, _procedureRef$current2;
|
|
728
|
-
if (
|
|
727
|
+
if (procedureSteps.length === 0) return;
|
|
729
728
|
const sourceStepIndex = isCustomSelectionFlow ? (_selectionFlowRef$cur4 = (_selectionFlowRef$cur5 = selectionFlowRef.current) === null || _selectionFlowRef$cur5 === void 0 ? void 0 : _selectionFlowRef$cur5.getState().currentStepIndex) !== null && _selectionFlowRef$cur4 !== void 0 ? _selectionFlowRef$cur4 : currentStep : currentStep;
|
|
730
|
-
const nextStepIndex = Math.min(Math.max(0, sourceStepIndex),
|
|
729
|
+
const nextStepIndex = Math.min(Math.max(0, sourceStepIndex), procedureSteps.length - 1);
|
|
731
730
|
if (currentStep !== nextStepIndex) setCurrentStep(nextStepIndex);
|
|
732
731
|
(_procedureRef$current = procedureRef.current) === null || _procedureRef$current === void 0 || (_procedureRef$current2 = _procedureRef$current.goToStep) === null || _procedureRef$current2 === void 0 || _procedureRef$current2.call(_procedureRef$current, nextStepIndex);
|
|
733
732
|
}, [
|
|
734
733
|
currentStep,
|
|
735
734
|
isCustomSelectionFlow,
|
|
736
|
-
|
|
735
|
+
procedureSteps
|
|
737
736
|
]);
|
|
738
737
|
/**
|
|
739
738
|
* @description: 格式化组合规格数据
|
|
@@ -1269,10 +1268,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1269
1268
|
translationOriginal
|
|
1270
1269
|
]);
|
|
1271
1270
|
const pcConfirmButtonText = useMemo(() => {
|
|
1272
|
-
if (isCustomSelectionFlow) return currentStep < maxStepIndex ? locales.getText("pisell2.text.sku.detail.modal.btn.next") : locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1271
|
+
if (isCustomSelectionFlow) return currentStep < maxStepIndex && !canDirectlyConfirmPosSelectionFlow ? locales.getText("pisell2.text.sku.detail.modal.btn.next") : locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1273
1272
|
if (currentStep === 0 && hasSkuOptions) return locales.getText("pisell2.text.sku.detail.modal.btn.next");
|
|
1274
1273
|
return locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1275
1274
|
}, [
|
|
1275
|
+
canDirectlyConfirmPosSelectionFlow,
|
|
1276
1276
|
currentStep,
|
|
1277
1277
|
hasSkuOptions,
|
|
1278
1278
|
isCustomSelectionFlow,
|
|
@@ -1321,7 +1321,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1321
1321
|
if (isCustomSelectionFlow && !flowDraft) {
|
|
1322
1322
|
const flow = selectionFlowRef.current;
|
|
1323
1323
|
if (!flow) return false;
|
|
1324
|
-
if (
|
|
1324
|
+
if (canDirectlyConfirmPosSelectionFlow) {
|
|
1325
1325
|
const openTaskId = openTaskIdRef.current;
|
|
1326
1326
|
const draftKey = getPosAutoResolutionDraftKey(flow.getState().draft);
|
|
1327
1327
|
const runId = posAutoResolutionRunRef.current + 1;
|
|
@@ -1876,11 +1876,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1876
1876
|
};
|
|
1877
1877
|
const procedureHeaderProps = {
|
|
1878
1878
|
showBackOnFirstStep: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false,
|
|
1879
|
-
showSteps: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false &&
|
|
1879
|
+
showSteps: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false && procedureSteps.length > 1,
|
|
1880
1880
|
left: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false ? leftHeaderBack() : void 0,
|
|
1881
1881
|
right: leftHeaderClose(),
|
|
1882
1882
|
stepsProps: {
|
|
1883
|
-
items:
|
|
1883
|
+
items: procedureSteps,
|
|
1884
1884
|
mobileBreakpoint: 480,
|
|
1885
1885
|
clickable: isCustomSelectionFlow ? false : void 0
|
|
1886
1886
|
}
|
|
@@ -2,6 +2,7 @@ require("../../../_virtual/_rolldown/runtime.js");
|
|
|
2
2
|
const require_asyncToGenerator = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/asyncToGenerator.js");
|
|
3
3
|
const require_utils = require("../../../components/booking/utils.js");
|
|
4
4
|
const require_createHolderConfirmBridge = require("../holderConfirm/createHolderConfirmBridge.js");
|
|
5
|
+
const require_productHolderConfig = require("./productHolderConfig.js");
|
|
5
6
|
const require_holderSubmitValidation = require("./holderSubmitValidation.js");
|
|
6
7
|
let _pisell_utils = require("@pisell/utils");
|
|
7
8
|
let _pisell_materials = require("@pisell/materials");
|
|
@@ -28,7 +29,7 @@ function _ensureHoldersBeforeSubmit() {
|
|
|
28
29
|
bookingConfig,
|
|
29
30
|
bookingTicket
|
|
30
31
|
});
|
|
31
|
-
if (require_utils.isWalkIn(customerId !== null && customerId !== void 0 ? customerId : void 0) && unassignedHolderLines.
|
|
32
|
+
if (require_utils.isWalkIn(customerId !== null && customerId !== void 0 ? customerId : void 0) && unassignedHolderLines.some((line) => require_productHolderConfig.resolveEffectiveHolderConfig(line.cacheItem, bookingConfig).required)) {
|
|
32
33
|
(0, _pisell_materials.PisellToast)({ content: _pisell_utils.locales.getText("pisell2.text.please-select-the-customer-first") });
|
|
33
34
|
return false;
|
|
34
35
|
}
|
|
@@ -23,8 +23,8 @@ const getPosAutoResolutionDraftKey = (draft) => {
|
|
|
23
23
|
capacity: (_draft$booking$capaci = draft.booking.capacity) !== null && _draft$booking$capaci !== void 0 ? _draft$booking$capaci : null
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const shouldDirectlyConfirmPosSelectionFlow = ({ eligible, status, currentStepIndex }) => eligible && status === "resolved" && currentStepIndex === 0;
|
|
27
27
|
//#endregion
|
|
28
28
|
exports.getPosAutoResolutionDraftKey = getPosAutoResolutionDraftKey;
|
|
29
29
|
exports.isPosCreateAutoResolutionCandidate = isPosCreateAutoResolutionCandidate;
|
|
30
|
-
exports.
|
|
30
|
+
exports.shouldDirectlyConfirmPosSelectionFlow = shouldDirectlyConfirmPosSelectionFlow;
|
|
@@ -722,24 +722,23 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
722
722
|
posAutoResolutionDraftKey,
|
|
723
723
|
selectionFlowInstanceKey
|
|
724
724
|
]);
|
|
725
|
-
const
|
|
725
|
+
const canDirectlyConfirmPosSelectionFlow = require_posAutoResolution.shouldDirectlyConfirmPosSelectionFlow({
|
|
726
726
|
eligible: isPosCreateAutoResolutionEligible,
|
|
727
727
|
status: posAutoResolutionStatus,
|
|
728
728
|
currentStepIndex: currentStep
|
|
729
729
|
});
|
|
730
|
-
const
|
|
731
|
-
const maxStepIndex = (0, react.useMemo)(() => Math.max(0, visibleProcedureSteps.length - 1), [visibleProcedureSteps]);
|
|
730
|
+
const maxStepIndex = (0, react.useMemo)(() => Math.max(0, procedureSteps.length - 1), [procedureSteps]);
|
|
732
731
|
(0, react.useLayoutEffect)(() => {
|
|
733
732
|
var _selectionFlowRef$cur4, _selectionFlowRef$cur5, _procedureRef$current, _procedureRef$current2;
|
|
734
|
-
if (
|
|
733
|
+
if (procedureSteps.length === 0) return;
|
|
735
734
|
const sourceStepIndex = isCustomSelectionFlow ? (_selectionFlowRef$cur4 = (_selectionFlowRef$cur5 = selectionFlowRef.current) === null || _selectionFlowRef$cur5 === void 0 ? void 0 : _selectionFlowRef$cur5.getState().currentStepIndex) !== null && _selectionFlowRef$cur4 !== void 0 ? _selectionFlowRef$cur4 : currentStep : currentStep;
|
|
736
|
-
const nextStepIndex = Math.min(Math.max(0, sourceStepIndex),
|
|
735
|
+
const nextStepIndex = Math.min(Math.max(0, sourceStepIndex), procedureSteps.length - 1);
|
|
737
736
|
if (currentStep !== nextStepIndex) setCurrentStep(nextStepIndex);
|
|
738
737
|
(_procedureRef$current = procedureRef.current) === null || _procedureRef$current === void 0 || (_procedureRef$current2 = _procedureRef$current.goToStep) === null || _procedureRef$current2 === void 0 || _procedureRef$current2.call(_procedureRef$current, nextStepIndex);
|
|
739
738
|
}, [
|
|
740
739
|
currentStep,
|
|
741
740
|
isCustomSelectionFlow,
|
|
742
|
-
|
|
741
|
+
procedureSteps
|
|
743
742
|
]);
|
|
744
743
|
/**
|
|
745
744
|
* @description: 格式化组合规格数据
|
|
@@ -1275,10 +1274,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1275
1274
|
translationOriginal
|
|
1276
1275
|
]);
|
|
1277
1276
|
const pcConfirmButtonText = (0, react.useMemo)(() => {
|
|
1278
|
-
if (isCustomSelectionFlow) return currentStep < maxStepIndex ? _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.next") : _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1277
|
+
if (isCustomSelectionFlow) return currentStep < maxStepIndex && !canDirectlyConfirmPosSelectionFlow ? _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.next") : _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1279
1278
|
if (currentStep === 0 && hasSkuOptions) return _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.next");
|
|
1280
1279
|
return _pisell_utils.locales.getText("pisell2.text.sku.detail.modal.btn.confirm");
|
|
1281
1280
|
}, [
|
|
1281
|
+
canDirectlyConfirmPosSelectionFlow,
|
|
1282
1282
|
currentStep,
|
|
1283
1283
|
hasSkuOptions,
|
|
1284
1284
|
isCustomSelectionFlow,
|
|
@@ -1327,7 +1327,7 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1327
1327
|
if (isCustomSelectionFlow && !flowDraft) {
|
|
1328
1328
|
const flow = selectionFlowRef.current;
|
|
1329
1329
|
if (!flow) return false;
|
|
1330
|
-
if (
|
|
1330
|
+
if (canDirectlyConfirmPosSelectionFlow) {
|
|
1331
1331
|
const openTaskId = openTaskIdRef.current;
|
|
1332
1332
|
const draftKey = require_posAutoResolution.getPosAutoResolutionDraftKey(flow.getState().draft);
|
|
1333
1333
|
const runId = posAutoResolutionRunRef.current + 1;
|
|
@@ -1882,11 +1882,11 @@ const SkuDetailModal = ({ onConfirm, onRemove, onClose, variant }, ref) => {
|
|
|
1882
1882
|
};
|
|
1883
1883
|
const procedureHeaderProps = {
|
|
1884
1884
|
showBackOnFirstStep: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false,
|
|
1885
|
-
showSteps: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false &&
|
|
1885
|
+
showSteps: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false && procedureSteps.length > 1,
|
|
1886
1886
|
left: (skuDetailConfig === null || skuDetailConfig === void 0 ? void 0 : skuDetailConfig.isShowProcedureSteps) !== false ? leftHeaderBack() : void 0,
|
|
1887
1887
|
right: leftHeaderClose(),
|
|
1888
1888
|
stepsProps: {
|
|
1889
|
-
items:
|
|
1889
|
+
items: procedureSteps,
|
|
1890
1890
|
mobileBreakpoint: 480,
|
|
1891
1891
|
clickable: isCustomSelectionFlow ? false : void 0
|
|
1892
1892
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.650",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
"react-zoom-pan-pinch": "^3.7.0",
|
|
70
70
|
"styled-components": "^6.0.0-rc.3",
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
|
-
"@pisell/utils": "3.0.4",
|
|
73
|
-
"@pisell/icon": "0.0.11",
|
|
74
72
|
"@pisell/materials": "6.11.256",
|
|
75
|
-
"@pisell/
|
|
76
|
-
"@pisell/
|
|
73
|
+
"@pisell/pi-payment-sdk": "0.0.3",
|
|
74
|
+
"@pisell/icon": "0.0.11",
|
|
75
|
+
"@pisell/utils": "3.0.4",
|
|
76
|
+
"@pisell/date-picker": "3.0.10"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|