@pisell/private-materials 6.11.673 → 6.11.674
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 +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/useSelectFloorMapResourceForBigSale.js +0 -1
- package/es/components/bigSale/index.js +0 -1
- package/es/components/bigSale/templates/Kiosk/index.js +0 -1
- package/es/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.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/saasDevice/devicePasscodes/model.js +4 -4
- 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/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/customerAuthGate.js +1 -1
- package/es/plus/salesSdk/utils/enrichCartLineHolderDisplay.js +1 -1
- package/es/plus/walletPassGallery/components/timelineSection/index.js +4 -4
- 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/es/pro/skuDetailModal/flow/modules/time/index.js +10 -28
- package/es/pro/skuDetailModal/flow/modules/time/posCustomTime.js +1 -16
- package/lib/pro/skuDetailModal/flow/modules/time/index.js +9 -27
- package/lib/pro/skuDetailModal/flow/modules/time/posCustomTime.js +0 -16
- package/package.json +4 -4
- package/es/plus/pisellReservation/index.js +0 -17
- package/es/plus/salesSdk/index.js +0 -53
|
@@ -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
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import locales_default from "../../locales/index.js";
|
|
9
8
|
import dayjs from "dayjs";
|
|
10
9
|
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import { seedDineInReservationToCart } from "../../plus/pisellReservation/utils/seedDineInReservationToCart.js";
|
|
10
9
|
import { isPersistedBigSaleOrderId } from "./utils/orderIdentity.js";
|
|
11
10
|
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
|
/**
|
|
@@ -3,7 +3,6 @@ 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";
|
|
7
6
|
import { resolveOrderIdForHostActions } from "../../../plus/pisellReservation/components/bookingDetailModal/bookingDetailHostActions.js";
|
|
8
7
|
import { usePicoCodingOpenData } from "../../../plus/pisellReservation/hooks/usePicoCodingOpenData.js";
|
|
9
8
|
import { buildReplacementBookingResourcesFromReservationRow } from "../../../plus/pisellReservation/utils/reservationTicketBookingHostParams.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 { ResponsiveBigSaleBase } from "./Base.js";
|
|
13
12
|
import { isBigSaleProductSelectionFlowScene, resolveBigSaleSelectionFlowConfig } from "./selectionFlowConfig.js";
|
|
14
13
|
import { isKioskPresentation } from "./templateCapabilities.js";
|
|
@@ -9,7 +9,6 @@ import { resolvePaymentResultToastV2ViewModel } from "../../../checkout/componen
|
|
|
9
9
|
import PaymentResultToastV2_default from "../../../checkout/components/PaymentResultToastV2/index.js";
|
|
10
10
|
import { freePayApi } from "../../../Sales/Checkout/serve.js";
|
|
11
11
|
import { useSalesSdk } from "../../../../plus/salesSdk/hooks/useSalesSdk.js";
|
|
12
|
-
import "../../../../plus/salesSdk/index.js";
|
|
13
12
|
import { usePickSaleDetailContext } from "../../hooks/usePickSaleDetailContext.js";
|
|
14
13
|
import { resolveBigSaleAutoProductListPreferences } from "../../utils/productListPreferences.js";
|
|
15
14
|
import { resolveBigSaleProductDisplayConfig } from "../../hooks/useBigSaleProductListConfig.js";
|
|
@@ -2,7 +2,6 @@ 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";
|
|
6
5
|
import { useEffect, useRef } from "react";
|
|
7
6
|
import { useMemoizedFn } from "ahooks";
|
|
8
7
|
//#region src/components/sharedSecondaryBigSale/SharedSecondaryBigSaleReceiver.tsx
|
package/es/index.js
CHANGED
|
@@ -86,7 +86,6 @@ import { useSalesSdkProducts } from "./plus/salesSdk/hooks/useSalesSdkProducts.j
|
|
|
86
86
|
import SalesSdkDemo from "./plus/salesSdk/demo/index.js";
|
|
87
87
|
import { useSalesSdkDish } from "./plus/salesSdk/hooks/useSalesSdkDish.js";
|
|
88
88
|
import { useSyncOsModule } from "./plus/salesSdk/hooks/useSyncOsModule.js";
|
|
89
|
-
import "./plus/salesSdk/index.js";
|
|
90
89
|
import BigSaleRightActionPanel from "./components/BigSaleRightActionPanel/index.js";
|
|
91
90
|
import ResponsiveWrapper from "./components/list/ResponsiveWrapper.js";
|
|
92
91
|
import { resolveBigSaleSelectionFlowConfig } from "./components/bigSale/selectionFlowConfig.js";
|
|
@@ -140,7 +139,6 @@ import PisellVenueControlPage from "./plus/pisellReservation/PisellVenueControlP
|
|
|
140
139
|
import PisellVenueWallPage from "./plus/pisellReservation/PisellVenueWallPage.js";
|
|
141
140
|
import PisellReservationTablePage from "./plus/pisellReservation/PisellReservationTablePage.js";
|
|
142
141
|
import SelectFloorMapResourceDialog from "./plus/pisellReservation/components/SelectFloorMapResourceDialog.js";
|
|
143
|
-
import "./plus/pisellReservation/index.js";
|
|
144
142
|
import { PisellTopology, PisellTopologyCore } from "./plus/pisellTopology/PisellTopology.js";
|
|
145
143
|
import cupProject_default from "./components/ecocup/cupProject/index.js";
|
|
146
144
|
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 };
|
|
@@ -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 timezonePlugin from "dayjs/plugin/timezone";
|
|
4
|
+
import utcPlugin from "dayjs/plugin/utc";
|
|
5
5
|
//#region src/plus/saasDevice/devicePasscodes/model.ts
|
|
6
|
-
dayjs.extend(
|
|
7
|
-
dayjs.extend(
|
|
6
|
+
dayjs.extend(utcPlugin);
|
|
7
|
+
dayjs.extend(timezonePlugin);
|
|
8
8
|
const INITIAL_DEVICE_PASSCODE_STATE = {
|
|
9
9
|
deviceIds: [],
|
|
10
10
|
devicesById: {}
|
|
@@ -11,7 +11,6 @@ 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";
|
|
15
14
|
import locales_default from "./locales.js";
|
|
16
15
|
import locales_default$1 from "./components/LineItem/locales.js";
|
|
17
16
|
import { SaleOrderActionBoundary } from "./actions/index.js";
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
5
4
|
import { useMemo } from "react";
|
|
6
5
|
import { useMemoizedFn } from "ahooks";
|
|
7
6
|
//#region src/plus/saleDetail/components/Client/hooks/useClientSelectorProps.ts
|
|
@@ -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 { getRemotePrintActions, getWristbandList } from "../../serve.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";
|
|
@@ -4,7 +4,6 @@ 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";
|
|
8
7
|
import Base_default from "./Base.js";
|
|
9
8
|
import React, { forwardRef, useImperativeHandle } from "react";
|
|
10
9
|
//#region src/plus/saleDetail/index.tsx
|
|
@@ -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 { _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";
|
|
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 };
|
|
@@ -59,4 +59,4 @@ function normalizeCustomerAuthCustomer(value) {
|
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
|
62
|
-
export {
|
|
62
|
+
export { isValidOrderCustomerId, normalizeCustomerAuthCustomer, resolveCustomerAuthCurrentCustomerId, shouldPromptCustomerAuthForProduct };
|
|
@@ -71,4 +71,4 @@ function buildHolderListRequestKey(params) {
|
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
//#endregion
|
|
74
|
-
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay,
|
|
74
|
+
export { buildHolderListRequestKey, buildHolderListRequestParams, enrichCartBookingHolderDisplay, resolveHolderDisplayConfig };
|
|
@@ -5,12 +5,12 @@ import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
|
5
5
|
import { locales } from "@pisell/utils";
|
|
6
6
|
import { Button, PisellEmpty, PisellModal, PisellStatisticList, Skeleton, Timeline, usePisellConfig } from "@pisell/materials";
|
|
7
7
|
import { useRequest } from "ahooks";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
8
|
+
import timezonePlugin from "dayjs/plugin/timezone";
|
|
9
|
+
import utcPlugin from "dayjs/plugin/utc";
|
|
10
10
|
import "./index.less";
|
|
11
11
|
//#region src/plus/walletPassGallery/components/timelineSection/index.tsx
|
|
12
|
-
dayjs.extend(
|
|
13
|
-
dayjs.extend(
|
|
12
|
+
dayjs.extend(timezonePlugin);
|
|
13
|
+
dayjs.extend(utcPlugin);
|
|
14
14
|
const stateTimeUnix = 1723255863;
|
|
15
15
|
const POLL_INTERVAL = 2e3;
|
|
16
16
|
const POLL_MAX_TIMES = 5;
|
|
@@ -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 };
|
|
@@ -11,7 +11,7 @@ import { buildDraftCacheItem, getModuleOptions, getUnsupportedBookingFlowReason,
|
|
|
11
11
|
import TimeResourceSelector from "../../../../../components/eventBooking/components/timeResourceSelector/index.js";
|
|
12
12
|
import { resolveAvailabilityStatus } from "../../../../../components/eventBooking/components/bookingAvailabilityCalendar/utils.js";
|
|
13
13
|
import { validateAvailabilityTimeAutoResolution } from "../autoResolution.js";
|
|
14
|
-
import { getAvailabilityCandidateDurationMinutes, getPosFlexibleDurationPresetCandidates, getSessionPresetCandidates, isFlexibleDurationValue, isSameAvailabilityCandidateRange,
|
|
14
|
+
import { getAvailabilityCandidateDurationMinutes, getPosFlexibleDurationPresetCandidates, getSessionPresetCandidates, isFlexibleDurationValue, isSameAvailabilityCandidateRange, resolvePosCustomTimeBaseMinutes, resolvePosCustomTimeCandidate, resolvePosCustomTimeDefaultDurationMinutes, resolvePosCustomTimeDefaultStartTime, resolvePosFlexibleDurationInitialCandidate, resolvePosFlexibleDurationRequestIntent, shouldApplyPosFlexibleDurationOverride, shouldResetPosFlexibleTimeForDate, shouldShowPosCustomTimeCandidateCards } from "./posCustomTime.js";
|
|
15
15
|
import dayjs from "dayjs";
|
|
16
16
|
import React, { useEffect, useMemo } from "react";
|
|
17
17
|
import { Alert, Space } from "antd";
|
|
@@ -164,8 +164,8 @@ const finalizeCandidateWithoutResourceStep = function() {
|
|
|
164
164
|
}();
|
|
165
165
|
const refreshAvailabilityTimes = function() {
|
|
166
166
|
var _ref5 = _asyncToGenerator(function* (context, module, options = {}) {
|
|
167
|
-
var
|
|
168
|
-
const { durationOverride, startTimeOverride, selectionIntent = "restore"
|
|
167
|
+
var _context$getModuleDat2, _ref4;
|
|
168
|
+
const { durationOverride, startTimeOverride, selectionIntent = "restore" } = options;
|
|
169
169
|
const availability = context.services.availability;
|
|
170
170
|
const allowUnavailable = context.services.allowUnavailableBookingSelection === true;
|
|
171
171
|
const posDurationAvailability = isPosDurationAvailabilityContext(context);
|
|
@@ -176,7 +176,6 @@ const refreshAvailabilityTimes = function() {
|
|
|
176
176
|
const selectedDate = context.draft.booking.startDate.format("YYYY-MM-DD");
|
|
177
177
|
const requestId = Date.now() + Math.random();
|
|
178
178
|
const previousTimeData = context.getModuleData(module.key);
|
|
179
|
-
const availabilitySelectionOrigin = selectionOriginOverride || ((previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.availabilitySelectionOrigin) === "user" && ((_previousTimeData$sel = previousTimeData.selectedCandidate) === null || _previousTimeData$sel === void 0 ? void 0 : _previousTimeData$sel.date) === selectedDate ? "user" : "automatic");
|
|
180
179
|
const posCustomTimeHydrationKey = posCustomTimeAvailability && draftRequestedDuration && draftRequestedStartTime ? `${selectedDate}|${draftRequestedStartTime}|${draftRequestedDuration}` : void 0;
|
|
181
180
|
const product = context.draft.productData;
|
|
182
181
|
const effectiveSelectionIntent = resolvePosFlexibleDurationRequestIntent({
|
|
@@ -195,8 +194,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
195
194
|
requestId,
|
|
196
195
|
timeSlots: [],
|
|
197
196
|
posCustomTimeHydrationKey,
|
|
198
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
199
|
-
availabilitySelectionOrigin
|
|
197
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
200
198
|
});
|
|
201
199
|
const group = (yield availability.getProductTimeRanges(availability.contextId, _objectSpread2({
|
|
202
200
|
productIds: [availability.productId],
|
|
@@ -249,8 +247,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
249
247
|
selectedCandidate: void 0,
|
|
250
248
|
slotStepMinutes: group === null || group === void 0 ? void 0 : group.slotStepMinutes,
|
|
251
249
|
posCustomTimeHydrationKey,
|
|
252
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
253
|
-
availabilitySelectionOrigin
|
|
250
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
254
251
|
});
|
|
255
252
|
return;
|
|
256
253
|
}
|
|
@@ -305,22 +302,13 @@ const refreshAvailabilityTimes = function() {
|
|
|
305
302
|
const displayCandidates = posSessionAvailability ? getSessionPresetCandidates(times) : posDurationAvailability && isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? getPosFlexibleDurationPresetCandidates(times, requestedCustomRange, customSelectionIntent, Boolean(!customSelectionIntent && existingCandidate && existingCandidate.date === selectedDate && (previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.timeSlots.some((slot) => String(slot.id) === String(existingCandidate.key))))) : times;
|
|
306
303
|
const fallbackCandidate = shouldPreserveRequestedPosStart ? void 0 : selectableCandidates[0];
|
|
307
304
|
const preferPosFlexiblePreset = posDurationAvailability && isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) && !customSelectionIntent && context.services.selectionFlowMode !== "edit" && (selectionIntent === "fallback" || !existingCandidate || existingCandidate.date !== selectedDate);
|
|
308
|
-
const
|
|
305
|
+
const initialCandidate = posDurationAvailability && isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? resolvePosFlexibleDurationInitialCandidate({
|
|
309
306
|
presetCandidates: displayCandidates,
|
|
310
307
|
restoredCandidate,
|
|
311
308
|
fallbackCandidate,
|
|
312
309
|
preferPreset: preferPosFlexiblePreset,
|
|
313
310
|
allowRestoredFallback: fallbackSelectionIntent
|
|
314
311
|
}) : restoredCandidate || fallbackCandidate;
|
|
315
|
-
const initialCandidate = resolveAvailabilityInitialCandidate({
|
|
316
|
-
preferredCandidate,
|
|
317
|
-
normallySelectableCandidates,
|
|
318
|
-
normalFallbackCandidate: displayCandidates.find((candidate) => isAvailabilityCandidateSelectable(candidate)) || normallySelectableCandidates[0],
|
|
319
|
-
unavailableFallbackCandidates: displayCandidates.length > 0 ? displayCandidates : times,
|
|
320
|
-
allowUnavailableSelection: allowUnavailable,
|
|
321
|
-
preserveUnavailablePreferredCandidate: context.services.selectionFlowMode === "edit" || availabilitySelectionOrigin === "user"
|
|
322
|
-
});
|
|
323
|
-
const nextAvailabilitySelectionOrigin = availabilitySelectionOrigin === "user" && preferredCandidate && initialCandidate && String(preferredCandidate.key) === String(initialCandidate.key) ? "user" : "automatic";
|
|
324
312
|
context.setModuleData(module.key, {
|
|
325
313
|
requestId,
|
|
326
314
|
slotStepMinutes: group === null || group === void 0 ? void 0 : group.slotStepMinutes,
|
|
@@ -335,8 +323,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
335
323
|
})),
|
|
336
324
|
selectedCandidate: initialCandidate,
|
|
337
325
|
posCustomTimeHydrationKey,
|
|
338
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
339
|
-
availabilitySelectionOrigin: nextAvailabilitySelectionOrigin
|
|
326
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
340
327
|
});
|
|
341
328
|
const shouldWriteInitialCandidate = Boolean(initialCandidate) && (posCustomTimeAvailability || !existingCandidate || initialCandidate.key !== existingCandidate.key);
|
|
342
329
|
if (initialCandidate && shouldWriteInitialCandidate) {
|
|
@@ -555,10 +542,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
555
542
|
const durationProps = runtime.durationProps;
|
|
556
543
|
const applyAvailabilityCandidate = (candidate) => {
|
|
557
544
|
if (!availabilityData) return;
|
|
558
|
-
context.setModuleData(module.key, _objectSpread2(_objectSpread2({}, availabilityData), {}, {
|
|
559
|
-
selectedCandidate: candidate,
|
|
560
|
-
availabilitySelectionOrigin: "user"
|
|
561
|
-
}));
|
|
545
|
+
context.setModuleData(module.key, _objectSpread2(_objectSpread2({}, availabilityData), {}, { selectedCandidate: candidate }));
|
|
562
546
|
if (!candidate) return;
|
|
563
547
|
const startAt = dayjs(candidate.startAt);
|
|
564
548
|
const endAt = dayjs(candidate.endAt);
|
|
@@ -733,8 +717,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
733
717
|
refreshAvailabilityTimes(context, module, {
|
|
734
718
|
durationOverride: duration,
|
|
735
719
|
startTimeOverride: nextStartTime,
|
|
736
|
-
selectionIntent: "custom"
|
|
737
|
-
selectionOrigin: "user"
|
|
720
|
+
selectionIntent: "custom"
|
|
738
721
|
}).then(() => context.setModuleStatus(module.key, "ready")).catch((error) => context.setModuleStatus(module.key, "error", error instanceof Error ? error.message : String(error), error));
|
|
739
722
|
}
|
|
740
723
|
}), /* @__PURE__ */ React.createElement("div", { style: { fontWeight: 500 } }, selectionFlowText("pisell2.text.duration")), /* @__PURE__ */ React.createElement(Duration, _objectSpread2(_objectSpread2(_objectSpread2({}, durationProps), options.durationProps), {}, {
|
|
@@ -761,8 +744,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
761
744
|
refreshAvailabilityTimes(context, module, {
|
|
762
745
|
durationOverride: nextDuration,
|
|
763
746
|
startTimeOverride: startTime,
|
|
764
|
-
selectionIntent: "custom"
|
|
765
|
-
selectionOrigin: "user"
|
|
747
|
+
selectionIntent: "custom"
|
|
766
748
|
}).then(() => context.setModuleStatus(module.key, "ready")).catch((error) => context.setModuleStatus(module.key, "error", error instanceof Error ? error.message : String(error), error));
|
|
767
749
|
}
|
|
768
750
|
})));
|
|
@@ -63,21 +63,6 @@ const resolvePosCustomTimeCandidate = (params) => {
|
|
|
63
63
|
}
|
|
64
64
|
return params.restoredDraftCandidate || params.restoredExistingCandidate || params.fallbackCandidate;
|
|
65
65
|
};
|
|
66
|
-
/**
|
|
67
|
-
* Availability 刷新后,优先保留仍然正常可用的原候选。只有编辑态或用户
|
|
68
|
-
* 明确选择过时间时,才允许已满候选继续压过后续正常候选。若当天已经
|
|
69
|
-
* 没有正常候选,POS 仍可保留一个不可用候选进入人工处理流程。
|
|
70
|
-
*/
|
|
71
|
-
const resolveAvailabilityInitialCandidate = (params) => {
|
|
72
|
-
var _params$unavailableFa;
|
|
73
|
-
const preferredCandidate = params.preferredCandidate;
|
|
74
|
-
const refreshedPreferredCandidate = preferredCandidate ? params.normallySelectableCandidates.find((candidate) => String(candidate.key) === String(preferredCandidate.key)) : void 0;
|
|
75
|
-
if (refreshedPreferredCandidate) return refreshedPreferredCandidate;
|
|
76
|
-
if (preferredCandidate && params.preserveUnavailablePreferredCandidate === true) return preferredCandidate;
|
|
77
|
-
if (params.normalFallbackCandidate) return params.normalFallbackCandidate;
|
|
78
|
-
if (params.allowUnavailableSelection !== true) return void 0;
|
|
79
|
-
return preferredCandidate || ((_params$unavailableFa = params.unavailableFallbackCandidates) === null || _params$unavailableFa === void 0 ? void 0 : _params$unavailableFa[0]);
|
|
80
|
-
};
|
|
81
66
|
const getSessionPresetCandidates = (candidates) => candidates.filter((candidate) => candidate.source === "session_schedule");
|
|
82
67
|
const getPosFlexibleDurationPresetCandidates = (candidates, requestedCustomRange, customSelectionIntent = false, preserveRequestedRange = false) => {
|
|
83
68
|
if (!requestedCustomRange) return [...candidates];
|
|
@@ -92,4 +77,4 @@ const resolvePosFlexibleDurationInitialCandidate = (params) => {
|
|
|
92
77
|
return params.restoredCandidate || params.fallbackCandidate;
|
|
93
78
|
};
|
|
94
79
|
//#endregion
|
|
95
|
-
export { getAvailabilityCandidateDurationMinutes, getPosFlexibleDurationPresetCandidates, getSessionPresetCandidates, isFlexibleDurationValue, isSameAvailabilityCandidateRange,
|
|
80
|
+
export { getAvailabilityCandidateDurationMinutes, getPosFlexibleDurationPresetCandidates, getSessionPresetCandidates, isFlexibleDurationValue, isSameAvailabilityCandidateRange, resolvePosCustomTimeBaseMinutes, resolvePosCustomTimeCandidate, resolvePosCustomTimeDefaultDurationMinutes, resolvePosCustomTimeDefaultStartTime, resolvePosFlexibleDurationInitialCandidate, resolvePosFlexibleDurationRequestIntent, shouldApplyPosFlexibleDurationOverride, shouldResetPosFlexibleTimeForDate, shouldShowPosCustomTimeCandidateCards };
|
|
@@ -168,8 +168,8 @@ const finalizeCandidateWithoutResourceStep = function() {
|
|
|
168
168
|
}();
|
|
169
169
|
const refreshAvailabilityTimes = function() {
|
|
170
170
|
var _ref5 = require_asyncToGenerator._asyncToGenerator(function* (context, module, options = {}) {
|
|
171
|
-
var
|
|
172
|
-
const { durationOverride, startTimeOverride, selectionIntent = "restore"
|
|
171
|
+
var _context$getModuleDat2, _ref4;
|
|
172
|
+
const { durationOverride, startTimeOverride, selectionIntent = "restore" } = options;
|
|
173
173
|
const availability = context.services.availability;
|
|
174
174
|
const allowUnavailable = context.services.allowUnavailableBookingSelection === true;
|
|
175
175
|
const posDurationAvailability = isPosDurationAvailabilityContext(context);
|
|
@@ -180,7 +180,6 @@ const refreshAvailabilityTimes = function() {
|
|
|
180
180
|
const selectedDate = context.draft.booking.startDate.format("YYYY-MM-DD");
|
|
181
181
|
const requestId = Date.now() + Math.random();
|
|
182
182
|
const previousTimeData = context.getModuleData(module.key);
|
|
183
|
-
const availabilitySelectionOrigin = selectionOriginOverride || ((previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.availabilitySelectionOrigin) === "user" && ((_previousTimeData$sel = previousTimeData.selectedCandidate) === null || _previousTimeData$sel === void 0 ? void 0 : _previousTimeData$sel.date) === selectedDate ? "user" : "automatic");
|
|
184
183
|
const posCustomTimeHydrationKey = posCustomTimeAvailability && draftRequestedDuration && draftRequestedStartTime ? `${selectedDate}|${draftRequestedStartTime}|${draftRequestedDuration}` : void 0;
|
|
185
184
|
const product = context.draft.productData;
|
|
186
185
|
const effectiveSelectionIntent = require_posCustomTime.resolvePosFlexibleDurationRequestIntent({
|
|
@@ -199,8 +198,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
199
198
|
requestId,
|
|
200
199
|
timeSlots: [],
|
|
201
200
|
posCustomTimeHydrationKey,
|
|
202
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
203
|
-
availabilitySelectionOrigin
|
|
201
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
204
202
|
});
|
|
205
203
|
const group = (yield availability.getProductTimeRanges(availability.contextId, require_objectSpread2._objectSpread2({
|
|
206
204
|
productIds: [availability.productId],
|
|
@@ -253,8 +251,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
253
251
|
selectedCandidate: void 0,
|
|
254
252
|
slotStepMinutes: group === null || group === void 0 ? void 0 : group.slotStepMinutes,
|
|
255
253
|
posCustomTimeHydrationKey,
|
|
256
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
257
|
-
availabilitySelectionOrigin
|
|
254
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
258
255
|
});
|
|
259
256
|
return;
|
|
260
257
|
}
|
|
@@ -309,22 +306,13 @@ const refreshAvailabilityTimes = function() {
|
|
|
309
306
|
const displayCandidates = posSessionAvailability ? require_posCustomTime.getSessionPresetCandidates(times) : posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? require_posCustomTime.getPosFlexibleDurationPresetCandidates(times, requestedCustomRange, customSelectionIntent, Boolean(!customSelectionIntent && existingCandidate && existingCandidate.date === selectedDate && (previousTimeData === null || previousTimeData === void 0 ? void 0 : previousTimeData.timeSlots.some((slot) => String(slot.id) === String(existingCandidate.key))))) : times;
|
|
310
307
|
const fallbackCandidate = shouldPreserveRequestedPosStart ? void 0 : selectableCandidates[0];
|
|
311
308
|
const preferPosFlexiblePreset = posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) && !customSelectionIntent && context.services.selectionFlowMode !== "edit" && (selectionIntent === "fallback" || !existingCandidate || existingCandidate.date !== selectedDate);
|
|
312
|
-
const
|
|
309
|
+
const initialCandidate = posDurationAvailability && require_posCustomTime.isFlexibleDurationValue(product === null || product === void 0 ? void 0 : product.duration) ? require_posCustomTime.resolvePosFlexibleDurationInitialCandidate({
|
|
313
310
|
presetCandidates: displayCandidates,
|
|
314
311
|
restoredCandidate,
|
|
315
312
|
fallbackCandidate,
|
|
316
313
|
preferPreset: preferPosFlexiblePreset,
|
|
317
314
|
allowRestoredFallback: fallbackSelectionIntent
|
|
318
315
|
}) : restoredCandidate || fallbackCandidate;
|
|
319
|
-
const initialCandidate = require_posCustomTime.resolveAvailabilityInitialCandidate({
|
|
320
|
-
preferredCandidate,
|
|
321
|
-
normallySelectableCandidates,
|
|
322
|
-
normalFallbackCandidate: displayCandidates.find((candidate) => isAvailabilityCandidateSelectable(candidate)) || normallySelectableCandidates[0],
|
|
323
|
-
unavailableFallbackCandidates: displayCandidates.length > 0 ? displayCandidates : times,
|
|
324
|
-
allowUnavailableSelection: allowUnavailable,
|
|
325
|
-
preserveUnavailablePreferredCandidate: context.services.selectionFlowMode === "edit" || availabilitySelectionOrigin === "user"
|
|
326
|
-
});
|
|
327
|
-
const nextAvailabilitySelectionOrigin = availabilitySelectionOrigin === "user" && preferredCandidate && initialCandidate && String(preferredCandidate.key) === String(initialCandidate.key) ? "user" : "automatic";
|
|
328
316
|
context.setModuleData(module.key, {
|
|
329
317
|
requestId,
|
|
330
318
|
slotStepMinutes: group === null || group === void 0 ? void 0 : group.slotStepMinutes,
|
|
@@ -339,8 +327,7 @@ const refreshAvailabilityTimes = function() {
|
|
|
339
327
|
})),
|
|
340
328
|
selectedCandidate: initialCandidate,
|
|
341
329
|
posCustomTimeHydrationKey,
|
|
342
|
-
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
343
|
-
availabilitySelectionOrigin: nextAvailabilitySelectionOrigin
|
|
330
|
+
posCustomTimeSelectionIntent: effectiveSelectionIntent === "restore" ? void 0 : effectiveSelectionIntent
|
|
344
331
|
});
|
|
345
332
|
const shouldWriteInitialCandidate = Boolean(initialCandidate) && (posCustomTimeAvailability || !existingCandidate || initialCandidate.key !== existingCandidate.key);
|
|
346
333
|
if (initialCandidate && shouldWriteInitialCandidate) {
|
|
@@ -559,10 +546,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
559
546
|
const durationProps = runtime.durationProps;
|
|
560
547
|
const applyAvailabilityCandidate = (candidate) => {
|
|
561
548
|
if (!availabilityData) return;
|
|
562
|
-
context.setModuleData(module.key, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, availabilityData), {}, {
|
|
563
|
-
selectedCandidate: candidate,
|
|
564
|
-
availabilitySelectionOrigin: "user"
|
|
565
|
-
}));
|
|
549
|
+
context.setModuleData(module.key, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, availabilityData), {}, { selectedCandidate: candidate }));
|
|
566
550
|
if (!candidate) return;
|
|
567
551
|
const startAt = (0, dayjs.default)(candidate.startAt);
|
|
568
552
|
const endAt = (0, dayjs.default)(candidate.endAt);
|
|
@@ -737,8 +721,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
737
721
|
refreshAvailabilityTimes(context, module, {
|
|
738
722
|
durationOverride: duration,
|
|
739
723
|
startTimeOverride: nextStartTime,
|
|
740
|
-
selectionIntent: "custom"
|
|
741
|
-
selectionOrigin: "user"
|
|
724
|
+
selectionIntent: "custom"
|
|
742
725
|
}).then(() => context.setModuleStatus(module.key, "ready")).catch((error) => context.setModuleStatus(module.key, "error", error instanceof Error ? error.message : String(error), error));
|
|
743
726
|
}
|
|
744
727
|
}), /* @__PURE__ */ react.default.createElement("div", { style: { fontWeight: 500 } }, require_i18n.selectionFlowText("pisell2.text.duration")), /* @__PURE__ */ react.default.createElement(require_index.default, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, durationProps), options.durationProps), {}, {
|
|
@@ -765,8 +748,7 @@ const TimeFlowModuleComponent = ({ context, module, registerHandle }) => {
|
|
|
765
748
|
refreshAvailabilityTimes(context, module, {
|
|
766
749
|
durationOverride: nextDuration,
|
|
767
750
|
startTimeOverride: startTime,
|
|
768
|
-
selectionIntent: "custom"
|
|
769
|
-
selectionOrigin: "user"
|
|
751
|
+
selectionIntent: "custom"
|
|
770
752
|
}).then(() => context.setModuleStatus(module.key, "ready")).catch((error) => context.setModuleStatus(module.key, "error", error instanceof Error ? error.message : String(error), error));
|
|
771
753
|
}
|
|
772
754
|
})));
|
|
@@ -65,21 +65,6 @@ const resolvePosCustomTimeCandidate = (params) => {
|
|
|
65
65
|
}
|
|
66
66
|
return params.restoredDraftCandidate || params.restoredExistingCandidate || params.fallbackCandidate;
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Availability 刷新后,优先保留仍然正常可用的原候选。只有编辑态或用户
|
|
70
|
-
* 明确选择过时间时,才允许已满候选继续压过后续正常候选。若当天已经
|
|
71
|
-
* 没有正常候选,POS 仍可保留一个不可用候选进入人工处理流程。
|
|
72
|
-
*/
|
|
73
|
-
const resolveAvailabilityInitialCandidate = (params) => {
|
|
74
|
-
var _params$unavailableFa;
|
|
75
|
-
const preferredCandidate = params.preferredCandidate;
|
|
76
|
-
const refreshedPreferredCandidate = preferredCandidate ? params.normallySelectableCandidates.find((candidate) => String(candidate.key) === String(preferredCandidate.key)) : void 0;
|
|
77
|
-
if (refreshedPreferredCandidate) return refreshedPreferredCandidate;
|
|
78
|
-
if (preferredCandidate && params.preserveUnavailablePreferredCandidate === true) return preferredCandidate;
|
|
79
|
-
if (params.normalFallbackCandidate) return params.normalFallbackCandidate;
|
|
80
|
-
if (params.allowUnavailableSelection !== true) return void 0;
|
|
81
|
-
return preferredCandidate || ((_params$unavailableFa = params.unavailableFallbackCandidates) === null || _params$unavailableFa === void 0 ? void 0 : _params$unavailableFa[0]);
|
|
82
|
-
};
|
|
83
68
|
const getSessionPresetCandidates = (candidates) => candidates.filter((candidate) => candidate.source === "session_schedule");
|
|
84
69
|
const getPosFlexibleDurationPresetCandidates = (candidates, requestedCustomRange, customSelectionIntent = false, preserveRequestedRange = false) => {
|
|
85
70
|
if (!requestedCustomRange) return [...candidates];
|
|
@@ -99,7 +84,6 @@ exports.getPosFlexibleDurationPresetCandidates = getPosFlexibleDurationPresetCan
|
|
|
99
84
|
exports.getSessionPresetCandidates = getSessionPresetCandidates;
|
|
100
85
|
exports.isFlexibleDurationValue = isFlexibleDurationValue;
|
|
101
86
|
exports.isSameAvailabilityCandidateRange = isSameAvailabilityCandidateRange;
|
|
102
|
-
exports.resolveAvailabilityInitialCandidate = resolveAvailabilityInitialCandidate;
|
|
103
87
|
exports.resolvePosCustomTimeBaseMinutes = resolvePosCustomTimeBaseMinutes;
|
|
104
88
|
exports.resolvePosCustomTimeCandidate = resolvePosCustomTimeCandidate;
|
|
105
89
|
exports.resolvePosCustomTimeDefaultDurationMinutes = resolvePosCustomTimeDefaultDurationMinutes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/private-materials",
|
|
3
|
-
"version": "6.11.
|
|
3
|
+
"version": "6.11.674",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"styled-components": "^6.0.0-rc.3",
|
|
71
71
|
"use-sync-external-store": "^1.6.0",
|
|
72
72
|
"@pisell/pi-payment-sdk": "0.0.3",
|
|
73
|
-
"@pisell/icon": "0.0.11",
|
|
74
|
-
"@pisell/date-picker": "3.0.10",
|
|
75
73
|
"@pisell/utils": "3.0.4",
|
|
76
|
-
"@pisell/
|
|
74
|
+
"@pisell/icon": "0.0.11",
|
|
75
|
+
"@pisell/materials": "6.11.261",
|
|
76
|
+
"@pisell/date-picker": "3.0.10"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
79
|
"react": "^18.0.0",
|
|
@@ -1,17 +0,0 @@
|
|
|
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 {};
|